diff options
| author | Durval Menezes | 2023-11-05 06:57:07 -0300 |
|---|---|---|
| committer | Durval Menezes | 2023-11-05 07:18:50 -0300 |
| commit | 3c4d8b1697d924ba06ee9061d9144b34a1f33659 (patch) | |
| tree | 126444021b013a091ed9719826131fb33f236347 | |
| parent | detect-mcu.sh: don't hang when MCU isn't found; exit with an error instead (diff) | |
| download | anduril-3c4d8b1697d924ba06ee9061d9144b34a1f33659.tar.gz anduril-3c4d8b1697d924ba06ee9061d9144b34a1f33659.tar.bz2 anduril-3c4d8b1697d924ba06ee9061d9144b34a1f33659.zip | |
Fixes syntax errors when USE_MANUAL_MEMORY is undefined.
| -rw-r--r-- | ui/anduril/ramp-mode.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/ui/anduril/ramp-mode.c b/ui/anduril/ramp-mode.c index aff7be7..68b24ae 100644 --- a/ui/anduril/ramp-mode.c +++ b/ui/anduril/ramp-mode.c @@ -569,10 +569,14 @@ uint8_t simple_ui_config_state(Event event, uint16_t arg) { #ifdef USE_RAMP_EXTRAS_CONFIG void ramp_extras_config_save(uint8_t step, uint8_t value) { + if (0) { } //syntactic trick so USE_MANUAL_MEMORY can be #undef + + #ifdef USE_MANUAL_MEMORY // item 1: disable manual memory, go back to automatic - if (manual_memory_config_step == step) { + else if (manual_memory_config_step == step) { cfg.manual_memory = 0; } + #endif #ifdef USE_MANUAL_MEMORY_TIMER // item 2: set manual memory timer duration @@ -707,6 +711,7 @@ void set_level_and_therm_target(uint8_t level) { #define set_level_and_therm_target(level) set_level(level) #endif +#ifdef USE_MANUAL_MEMORY void manual_memory_restore() { memorized_level = cfg.manual_memory; #if NUM_CHANNEL_MODES > 1 @@ -728,6 +733,7 @@ void manual_memory_save() { cfg.manual_memory_channel_args[i] = cfg.channel_mode_args[i]; #endif } +#endif #ifdef USE_SUNSET_TIMER void reset_sunset_timer() { |
