diff options
Diffstat (limited to '')
| -rw-r--r-- | ui/anduril/lockout-mode.c | 4 | ||||
| -rw-r--r-- | ui/anduril/off-mode.c | 4 | ||||
| -rw-r--r-- | ui/anduril/ramp-mode.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/ui/anduril/lockout-mode.c b/ui/anduril/lockout-mode.c index 0e7b673..6f85ca9 100644 --- a/ui/anduril/lockout-mode.c +++ b/ui/anduril/lockout-mode.c @@ -65,13 +65,13 @@ uint8_t lockout_state(Event event, uint16_t arg) { #if defined(TICK_DURING_STANDBY) && (defined(USE_INDICATOR_LED) || defined(USE_AUX_RGB_LEDS)) else if (event == EV_sleep_tick) { if (ticks_since_on < 255) ticks_since_on ++; - #ifdef USE_MANUAL_MEMORY_TIMER + #if defined(USE_MANUAL_MEMORY) && defined(USE_MANUAL_MEMORY_TIMER) // reset to manual memory level when timer expires if (cfg.manual_memory && (arg >= (cfg.manual_memory_timer * SLEEP_TICKS_PER_MINUTE))) { manual_memory_restore(); } - #endif + #endif // ifdef USE_MANUAL_MEMORY_TIMER #if defined(USE_INDICATOR_LED) indicator_led_update(cfg.indicator_led_mode >> 2, arg); #elif defined(USE_AUX_RGB_LEDS) diff --git a/ui/anduril/off-mode.c b/ui/anduril/off-mode.c index 97c546e..36d771c 100644 --- a/ui/anduril/off-mode.c +++ b/ui/anduril/off-mode.c @@ -68,13 +68,13 @@ uint8_t off_state(Event event, uint16_t arg) { // blink the indicator LED, maybe else if (event == EV_sleep_tick) { if (ticks_since_on < 255) ticks_since_on ++; - #ifdef USE_MANUAL_MEMORY_TIMER + #if defined(USE_MANUAL_MEMORY) && defined(USE_MANUAL_MEMORY_TIMER) // reset to manual memory level when timer expires if (cfg.manual_memory && (arg >= (cfg.manual_memory_timer * SLEEP_TICKS_PER_MINUTE))) { manual_memory_restore(); } - #endif + #endif // ifdef USE_MANUAL_MEMORY_TIMER #ifdef USE_INDICATOR_LED indicator_led_update(cfg.indicator_led_mode & 0x03, arg); #elif defined(USE_AUX_RGB_LEDS) diff --git a/ui/anduril/ramp-mode.c b/ui/anduril/ramp-mode.c index 68b24ae..5ce1b54 100644 --- a/ui/anduril/ramp-mode.c +++ b/ui/anduril/ramp-mode.c @@ -569,14 +569,13 @@ 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 + if (0) {} #ifdef USE_MANUAL_MEMORY // item 1: disable manual memory, go back to automatic else if (manual_memory_config_step == step) { cfg.manual_memory = 0; } - #endif #ifdef USE_MANUAL_MEMORY_TIMER // item 2: set manual memory timer duration @@ -587,6 +586,7 @@ void ramp_extras_config_save(uint8_t step, uint8_t value) { cfg.manual_memory_timer = value; } #endif + #endif // ifdef USE_MANUAL_MEMORY #ifdef USE_RAMP_AFTER_MOON_CONFIG // item 3: ramp up after hold-from-off for moon? @@ -733,7 +733,7 @@ void manual_memory_save() { cfg.manual_memory_channel_args[i] = cfg.channel_mode_args[i]; #endif } -#endif +#endif // ifdef USE_MANUAL_MEMORY #ifdef USE_SUNSET_TIMER void reset_sunset_timer() { |
