From 1a50e8429fbe8c6125372d7ca296ef115e045564 Mon Sep 17 00:00:00 2001 From: mjnck Date: Mon, 26 Jun 2023 18:20:28 +0200 Subject: [PATCH] add manual and race mode for w/s switch --- src/main.cpp | 8 +++++++- src/nvs/module_settings.h | 6 ++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 313eab63..da48a9c9 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -160,6 +160,12 @@ AbstractProfile* profile_from_auto_ty(AutoProfile prof) { break; case AutoProfile::Winter: case AutoProfile::Comfort: + case AutoProfile::Manual: + p = manual; + break; + case AutoProfile::Race: + p = race; + break; default: return comfort; } @@ -271,4 +277,4 @@ extern "C" void app_main(void) } } -#endif // UNIT_TEST \ No newline at end of file +#endif // UNIT_TEST diff --git a/src/nvs/module_settings.h b/src/nvs/module_settings.h index 36242b08..e7dce7d4 100644 --- a/src/nvs/module_settings.h +++ b/src/nvs/module_settings.h @@ -259,7 +259,9 @@ enum AutoProfile: uint8_t { Sport = 0, Comfort = 1, Agility = 2, - Winter = 3 + Winter = 3, + Manual = 4, + Race = 5 }; typedef struct { @@ -301,4 +303,4 @@ namespace ModuleConfiguration { esp_err_t read_settings(uint8_t module_id, uint16_t* buffer_len, uint8_t** buffer); } -#endif \ No newline at end of file +#endif