From 07877b6a549b0e7bad7f6e1db4e0f280410f4be6 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Mon, 23 Aug 2021 03:05:32 -0600 Subject: force reset PWM phase when turning on from zero (to make initial response consistent) (otherwise, it can randomly take up to ~16ms to turn on) --- spaghetti-monster/fsm-ramping.c | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/fsm-ramping.c b/spaghetti-monster/fsm-ramping.c index 1a08149..017a5b8 100644 --- a/spaghetti-monster/fsm-ramping.c +++ b/spaghetti-monster/fsm-ramping.c @@ -58,6 +58,11 @@ void set_level(uint8_t level) { set_level_override(level); #else + #ifdef PWM1_CNT + static uint8_t prev_level = 0; + uint8_t api_level = level; + #endif + //TCCR0A = PHASE; if (level == 0) { #if PWM_CHANNELS >= 1 @@ -97,6 +102,7 @@ void set_level(uint8_t level) { LED2_ENABLE_PORT |= (1 << LED2_ENABLE_PIN); #endif + // PWM array index = level - 1 level --; #ifdef USE_TINT_RAMPING @@ -160,8 +166,10 @@ void set_level(uint8_t level) { // goes all the way to 65535 before returning) // (see attiny1634 reference manual page 103 for a warning about // the timing of changing the TOP value (section 12.8.4)) + // (but don't wait when turning on from zero, because + // it'll reset the phase below anyway) // to be safe, allow at least 64 cycles to update TOP - while(PWM1_CNT > (top - 64)) {} + while(prev_level && (PWM1_CNT > (top - 64))) {} #endif // pulse frequency modulation, a.k.a. dynamic PWM PWM1_TOP = top; @@ -169,18 +177,34 @@ void set_level(uint8_t level) { // repeat for other channels if necessary #ifdef PMW2_TOP #ifdef PWM2_CNT - while(PWM2_CNT > (top - 64)) {} + while(prev_level && (PWM2_CNT > (top - 64))) {} #endif PWM2_TOP = top; #endif #ifdef PMW3_TOP #ifdef PWM3_CNT - while(PWM3_CNT > (top - 64)) {} + while(prev_level && (PWM3_CNT > (top - 64))) {} #endif PWM3_TOP = top; #endif #endif // ifdef USE_DYN_PWM + #ifdef PWM1_CNT + // force reset phase when turning on from zero + // (because otherwise the initial response is inconsistent) + if (! prev_level) { + PWM1_CNT = 0; + #ifdef PWM2_CNT + PWM2_CNT = 0; + #endif + #ifdef PWM3_CNT + PWM3_CNT = 0; + #endif + } + #endif } + #ifdef PWM1_CNT + prev_level = api_level; + #endif #endif // ifdef OVERRIDE_SET_LEVEL #ifdef USE_DYNAMIC_UNDERCLOCKING auto_clock_speed(); -- cgit v1.2.3 From f8f9dd584fd466dbf1a5726c2a60de8653c03d4f Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Mon, 23 Aug 2021 03:54:09 -0600 Subject: made jump start level configurable at runtime, and made it activate in more places --- spaghetti-monster/anduril/load-save-config-fsm.h | 3 +++ spaghetti-monster/anduril/load-save-config.c | 6 ++++++ spaghetti-monster/anduril/lockout-mode.c | 3 +++ spaghetti-monster/anduril/off-mode.c | 17 +++++++++++++---- spaghetti-monster/anduril/ramp-mode-fsm.h | 5 +++++ spaghetti-monster/anduril/ramp-mode.c | 24 ++++++++++++++++++++++++ spaghetti-monster/anduril/ramp-mode.h | 10 ++++++++++ 7 files changed, 64 insertions(+), 4 deletions(-) (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/anduril/load-save-config-fsm.h b/spaghetti-monster/anduril/load-save-config-fsm.h index 9d3dd86..0a62380 100644 --- a/spaghetti-monster/anduril/load-save-config-fsm.h +++ b/spaghetti-monster/anduril/load-save-config-fsm.h @@ -43,6 +43,9 @@ typedef enum { #ifdef USE_TINT_RAMPING tint_e, #endif + #ifdef JUMP_START_MOON + jump_start_moon_e, + #endif #ifdef USE_STROBE_STATE strobe_type_e, #endif diff --git a/spaghetti-monster/anduril/load-save-config.c b/spaghetti-monster/anduril/load-save-config.c index 3823521..cdeaeea 100644 --- a/spaghetti-monster/anduril/load-save-config.c +++ b/spaghetti-monster/anduril/load-save-config.c @@ -45,6 +45,9 @@ void load_config() { #ifdef USE_TINT_RAMPING tint = eeprom[tint_e]; #endif + #ifdef JUMP_START_MOON + jump_start_moon = eeprom[jump_start_moon_e], + #endif #if defined(USE_PARTY_STROBE_MODE) || defined(USE_TACTICAL_STROBE_MODE) strobe_type = eeprom[strobe_type_e]; // TODO: move this to eeprom_wl? strobe_delays[0] = eeprom[strobe_delays_0_e]; @@ -108,6 +111,9 @@ void save_config() { #ifdef USE_TINT_RAMPING eeprom[tint_e] = tint; #endif + #ifdef JUMP_START_MOON + eeprom[jump_start_moon_e] = jump_start_moon, + #endif #if defined(USE_PARTY_STROBE_MODE) || defined(USE_TACTICAL_STROBE_MODE) eeprom[strobe_type_e] = strobe_type; // TODO: move this to eeprom_wl? eeprom[strobe_delays_0_e] = strobe_delays[0]; diff --git a/spaghetti-monster/anduril/lockout-mode.c b/spaghetti-monster/anduril/lockout-mode.c index 8c83cff..4e2196f 100644 --- a/spaghetti-monster/anduril/lockout-mode.c +++ b/spaghetti-monster/anduril/lockout-mode.c @@ -42,6 +42,9 @@ uint8_t lockout_state(Event event, uint16_t arg) { } else { // anything except second click if (ramp_floors[1] < lvl) lvl = ramp_floors[1]; } + #ifdef JUMP_START_MOON + if (! actual_level) jump_start_func(); + #endif set_level(lvl); } // button was released diff --git a/spaghetti-monster/anduril/off-mode.c b/spaghetti-monster/anduril/off-mode.c index b1faf47..4472f74 100644 --- a/spaghetti-monster/anduril/off-mode.c +++ b/spaghetti-monster/anduril/off-mode.c @@ -98,8 +98,7 @@ uint8_t off_state(Event event, uint16_t arg) { else if (event == EV_click1_press) { #ifdef JUMP_START_MOON if (!arg) { - set_level(JUMP_START_MOON); - delay_4ms(3); + jump_start_func(); } #endif set_level(nearest_level(1)); @@ -119,8 +118,7 @@ uint8_t off_state(Event event, uint16_t arg) { #ifdef JUMP_START_MOON // pulse the output for a moment to wake up the power regulator if (!arg) { - set_level(JUMP_START_MOON); - delay_4ms(3); + jump_start_func(); } #endif set_level(nearest_level(1)); @@ -151,6 +149,9 @@ uint8_t off_state(Event event, uint16_t arg) { #endif } #endif + #ifdef JUMP_START_MOON + jump_start_func(); + #endif set_level(nearest_level(memorized_level)); return MISCHIEF_MANAGED; } @@ -316,6 +317,14 @@ uint8_t off_state(Event event, uint16_t arg) { return MISCHIEF_MANAGED; } #endif // end 7 clicks + + #ifdef USE_GLOBALS_CONFIG + // 9 clicks, but hold last click: configure misc global settings + else if ((event == EV_click9_hold) && (!arg)) { + push_state(globals_config_state, 0); + return MISCHIEF_MANAGED; + } + #endif return EVENT_NOT_HANDLED; } diff --git a/spaghetti-monster/anduril/ramp-mode-fsm.h b/spaghetti-monster/anduril/ramp-mode-fsm.h index 997e80d..c6ef4c8 100644 --- a/spaghetti-monster/anduril/ramp-mode-fsm.h +++ b/spaghetti-monster/anduril/ramp-mode-fsm.h @@ -41,5 +41,10 @@ #define TICK_DURING_STANDBY #endif +// include an extra config mode for random stuff which doesn't fit elsewhere +#if defined(JUMP_START_MOON) || defined(USE_2C_STYLE_CONFIG) +#define USE_GLOBALS_CONFIG +#endif + #endif diff --git a/spaghetti-monster/anduril/ramp-mode.c b/spaghetti-monster/anduril/ramp-mode.c index 8ab4ec4..f4eba59 100644 --- a/spaghetti-monster/anduril/ramp-mode.c +++ b/spaghetti-monster/anduril/ramp-mode.c @@ -473,6 +473,24 @@ uint8_t manual_memory_timer_config_state(Event event, uint16_t arg) { } #endif +#ifdef USE_GLOBALS_CONFIG +void globals_config_save(uint8_t step, uint8_t value) { + if (0) {} + #ifdef USE_2C_STYLE_CONFIG + // TODO: make double-click style configurable (turbo or ceil) + else if (1 == step) {} + #endif + #ifdef JUMP_START_MOON + else { jump_start_moon = value; } + #endif +} + +uint8_t globals_config_state(Event event, uint16_t arg) { + // TODO: set number of steps based on how many configurable options + return config_state_base(event, arg, 1, globals_config_save); +} +#endif + // find the ramp level closest to the target, // using only the levels which are allowed in the current state uint8_t nearest_level(int16_t target) { @@ -534,6 +552,12 @@ void set_level_and_therm_target(uint8_t level) { #define set_level_and_therm_target(level) set_level(level) #endif +#ifdef JUMP_START_MOON +void jump_start_func() { + set_level(jump_start_moon); + delay_4ms(3); +} +#endif #endif diff --git a/spaghetti-monster/anduril/ramp-mode.h b/spaghetti-monster/anduril/ramp-mode.h index ed806bd..efc77d3 100644 --- a/spaghetti-monster/anduril/ramp-mode.h +++ b/spaghetti-monster/anduril/ramp-mode.h @@ -192,5 +192,15 @@ uint8_t ramp_stepss[] = { }; uint8_t ramp_discrete_step_size; // don't set this +#ifdef JUMP_START_MOON +uint8_t jump_start_moon = JUMP_START_MOON; +void jump_start_func(); +#endif + +#ifdef USE_GLOBALS_CONFIG +void globals_config_save(uint8_t step, uint8_t value); +uint8_t globals_config_state(Event event, uint16_t arg); +#endif + #endif -- cgit v1.2.3 From dac03ab316ed47aff8e1e28d357935c7e4cbda29 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Mon, 23 Aug 2021 04:24:08 -0600 Subject: moved jump start into FSM so it'll be more universal and the app won't need special clauses (also adjusted KR4 jump start levels a bit) --- spaghetti-monster/anduril/cfg-noctigon-kr4-nofet.h | 4 ++-- spaghetti-monster/anduril/cfg-noctigon-kr4.h | 2 +- spaghetti-monster/anduril/load-save-config-fsm.h | 4 ++-- spaghetti-monster/anduril/load-save-config.c | 8 ++++---- spaghetti-monster/anduril/lockout-mode.c | 3 --- spaghetti-monster/anduril/off-mode.c | 14 -------------- spaghetti-monster/anduril/ramp-mode-fsm.h | 7 ++++++- spaghetti-monster/anduril/ramp-mode.c | 10 ++-------- spaghetti-monster/anduril/ramp-mode.h | 5 ----- spaghetti-monster/fsm-ramping.c | 12 ++++++++++++ spaghetti-monster/fsm-ramping.h | 10 ++++++++++ 11 files changed, 39 insertions(+), 40 deletions(-) (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/anduril/cfg-noctigon-kr4-nofet.h b/spaghetti-monster/anduril/cfg-noctigon-kr4-nofet.h index 383a0c8..e4879ef 100644 --- a/spaghetti-monster/anduril/cfg-noctigon-kr4-nofet.h +++ b/spaghetti-monster/anduril/cfg-noctigon-kr4-nofet.h @@ -53,8 +53,8 @@ #define PARTY_STROBE_ONTIME 2 // jump start a bit higher than base driver -#undef JUMP_START_MOON -#define JUMP_START_MOON 31 +#undef DEFAULT_JUMP_START_LEVEL +#define DEFAULT_JUMP_START_LEVEL 25 // stop panicking at ~1300 lm #undef THERM_FASTER_LEVEL diff --git a/spaghetti-monster/anduril/cfg-noctigon-kr4.h b/spaghetti-monster/anduril/cfg-noctigon-kr4.h index d584445..8071457 100644 --- a/spaghetti-monster/anduril/cfg-noctigon-kr4.h +++ b/spaghetti-monster/anduril/cfg-noctigon-kr4.h @@ -69,7 +69,7 @@ #define THERM_CAL_OFFSET 5 // the power regulator is a bit slow, so push it harder for a quick response from off -#define JUMP_START_MOON 26 +#define DEFAULT_JUMP_START_LEVEL 21 #define BLINK_BRIGHTNESS DEFAULT_LEVEL #define BLINK_ONCE_TIME 12 diff --git a/spaghetti-monster/anduril/load-save-config-fsm.h b/spaghetti-monster/anduril/load-save-config-fsm.h index 0a62380..343c6ff 100644 --- a/spaghetti-monster/anduril/load-save-config-fsm.h +++ b/spaghetti-monster/anduril/load-save-config-fsm.h @@ -43,8 +43,8 @@ typedef enum { #ifdef USE_TINT_RAMPING tint_e, #endif - #ifdef JUMP_START_MOON - jump_start_moon_e, + #ifdef USE_JUMP_START + jump_start_level_e, #endif #ifdef USE_STROBE_STATE strobe_type_e, diff --git a/spaghetti-monster/anduril/load-save-config.c b/spaghetti-monster/anduril/load-save-config.c index cdeaeea..cd29ca5 100644 --- a/spaghetti-monster/anduril/load-save-config.c +++ b/spaghetti-monster/anduril/load-save-config.c @@ -45,8 +45,8 @@ void load_config() { #ifdef USE_TINT_RAMPING tint = eeprom[tint_e]; #endif - #ifdef JUMP_START_MOON - jump_start_moon = eeprom[jump_start_moon_e], + #ifdef USE_JUMP_START + jump_start_level = eeprom[jump_start_level_e], #endif #if defined(USE_PARTY_STROBE_MODE) || defined(USE_TACTICAL_STROBE_MODE) strobe_type = eeprom[strobe_type_e]; // TODO: move this to eeprom_wl? @@ -111,8 +111,8 @@ void save_config() { #ifdef USE_TINT_RAMPING eeprom[tint_e] = tint; #endif - #ifdef JUMP_START_MOON - eeprom[jump_start_moon_e] = jump_start_moon, + #ifdef USE_JUMP_START + eeprom[jump_start_level_e] = jump_start_level, #endif #if defined(USE_PARTY_STROBE_MODE) || defined(USE_TACTICAL_STROBE_MODE) eeprom[strobe_type_e] = strobe_type; // TODO: move this to eeprom_wl? diff --git a/spaghetti-monster/anduril/lockout-mode.c b/spaghetti-monster/anduril/lockout-mode.c index 4e2196f..8c83cff 100644 --- a/spaghetti-monster/anduril/lockout-mode.c +++ b/spaghetti-monster/anduril/lockout-mode.c @@ -42,9 +42,6 @@ uint8_t lockout_state(Event event, uint16_t arg) { } else { // anything except second click if (ramp_floors[1] < lvl) lvl = ramp_floors[1]; } - #ifdef JUMP_START_MOON - if (! actual_level) jump_start_func(); - #endif set_level(lvl); } // button was released diff --git a/spaghetti-monster/anduril/off-mode.c b/spaghetti-monster/anduril/off-mode.c index 4472f74..e37bec3 100644 --- a/spaghetti-monster/anduril/off-mode.c +++ b/spaghetti-monster/anduril/off-mode.c @@ -96,11 +96,6 @@ uint8_t off_state(Event event, uint16_t arg) { #if (B_TIMING_ON == B_PRESS_T) // hold (initially): go to lowest level (floor), but allow abort for regular click else if (event == EV_click1_press) { - #ifdef JUMP_START_MOON - if (!arg) { - jump_start_func(); - } - #endif set_level(nearest_level(1)); return MISCHIEF_MANAGED; } @@ -115,12 +110,6 @@ uint8_t off_state(Event event, uint16_t arg) { } else #endif #else // B_RELEASE_T or B_TIMEOUT_T - #ifdef JUMP_START_MOON - // pulse the output for a moment to wake up the power regulator - if (!arg) { - jump_start_func(); - } - #endif set_level(nearest_level(1)); #endif // don't start ramping immediately; @@ -149,9 +138,6 @@ uint8_t off_state(Event event, uint16_t arg) { #endif } #endif - #ifdef JUMP_START_MOON - jump_start_func(); - #endif set_level(nearest_level(memorized_level)); return MISCHIEF_MANAGED; } diff --git a/spaghetti-monster/anduril/ramp-mode-fsm.h b/spaghetti-monster/anduril/ramp-mode-fsm.h index c6ef4c8..425ac69 100644 --- a/spaghetti-monster/anduril/ramp-mode-fsm.h +++ b/spaghetti-monster/anduril/ramp-mode-fsm.h @@ -41,8 +41,13 @@ #define TICK_DURING_STANDBY #endif +// ensure the jump start feature gets compiled in if needed +#ifdef DEFAULT_JUMP_START_LEVEL +#define USE_JUMP_START +#endif + // include an extra config mode for random stuff which doesn't fit elsewhere -#if defined(JUMP_START_MOON) || defined(USE_2C_STYLE_CONFIG) +#if defined(USE_JUMP_START) || defined(USE_2C_STYLE_CONFIG) #define USE_GLOBALS_CONFIG #endif diff --git a/spaghetti-monster/anduril/ramp-mode.c b/spaghetti-monster/anduril/ramp-mode.c index f4eba59..e16a7b9 100644 --- a/spaghetti-monster/anduril/ramp-mode.c +++ b/spaghetti-monster/anduril/ramp-mode.c @@ -480,8 +480,8 @@ void globals_config_save(uint8_t step, uint8_t value) { // TODO: make double-click style configurable (turbo or ceil) else if (1 == step) {} #endif - #ifdef JUMP_START_MOON - else { jump_start_moon = value; } + #ifdef USE_JUMP_START + else { jump_start_level = value; } #endif } @@ -552,12 +552,6 @@ void set_level_and_therm_target(uint8_t level) { #define set_level_and_therm_target(level) set_level(level) #endif -#ifdef JUMP_START_MOON -void jump_start_func() { - set_level(jump_start_moon); - delay_4ms(3); -} -#endif #endif diff --git a/spaghetti-monster/anduril/ramp-mode.h b/spaghetti-monster/anduril/ramp-mode.h index efc77d3..7fb704a 100644 --- a/spaghetti-monster/anduril/ramp-mode.h +++ b/spaghetti-monster/anduril/ramp-mode.h @@ -192,11 +192,6 @@ uint8_t ramp_stepss[] = { }; uint8_t ramp_discrete_step_size; // don't set this -#ifdef JUMP_START_MOON -uint8_t jump_start_moon = JUMP_START_MOON; -void jump_start_func(); -#endif - #ifdef USE_GLOBALS_CONFIG void globals_config_save(uint8_t step, uint8_t value); uint8_t globals_config_state(Event event, uint16_t arg); diff --git a/spaghetti-monster/fsm-ramping.c b/spaghetti-monster/fsm-ramping.c index 017a5b8..54ca45c 100644 --- a/spaghetti-monster/fsm-ramping.c +++ b/spaghetti-monster/fsm-ramping.c @@ -24,6 +24,18 @@ #ifdef USE_RAMPING void set_level(uint8_t level) { + #ifdef USE_JUMP_START + // maybe "jump start" the engine, if it's prone to slow starts + // (pulse the output high for a moment to wake up the power regulator) + // (only do this when starting from off and going to a low level) + if ((! actual_level) + && level + && (level < jump_start_level)) { + set_level(jump_start_level); + delay_4ms(JUMP_START_TIME/4); + } + #endif // ifdef USE_JUMP_START + actual_level = level; #ifdef USE_SET_LEVEL_GRADUALLY diff --git a/spaghetti-monster/fsm-ramping.h b/spaghetti-monster/fsm-ramping.h index d1ef6bc..7a4fa3b 100644 --- a/spaghetti-monster/fsm-ramping.h +++ b/spaghetti-monster/fsm-ramping.h @@ -82,6 +82,16 @@ PROGMEM const PWM_DATATYPE pwm4_levels[] = { PWM4_LEVELS }; PROGMEM const PWM_DATATYPE pwm_tops[] = { PWM_TOPS }; #endif +#ifdef USE_JUMP_START +#ifndef JUMP_START_TIME +#define JUMP_START_TIME 8 // in ms, should be 4, 8, or 12 +#endif +#ifndef DEFAULT_JUMP_START_LEVEL +#define DEFAULT_JUMP_START_LEVEL 10 +#endif +uint8_t jump_start_level = DEFAULT_JUMP_START_LEVEL; +#endif + // default / example ramps #ifndef PWM1_LEVELS #if PWM_CHANNELS == 1 -- cgit v1.2.3 From d05bb6b30783867e76d7028843829ff9e1915bb1 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Mon, 23 Aug 2021 04:37:15 -0600 Subject: added documentation for the global config menu and jump start level --- spaghetti-monster/anduril/anduril-manual.txt | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/anduril/anduril-manual.txt b/spaghetti-monster/anduril/anduril-manual.txt index 57f1986..74ca0c7 100644 --- a/spaghetti-monster/anduril/anduril-manual.txt +++ b/spaghetti-monster/anduril/anduril-manual.txt @@ -639,6 +639,31 @@ when the main emitters are on, and when the light is otherwise awake. The aux LEDs on most lights only turn on when the light is asleep. +Global Config Menu +------------------ + +Some models may have an extra config menu for settings which don't fit +anywhere else. These settings are, in order: + + - 2C style: (not yet implemented) + + 1: 2C goes to turbo (Anduril V1 style) + 2: 2C goes to ramp ceiling (Anduril V2 style) + + - Jump Start level: + + Some lights are prone to starting up slowly at low levels, so they + have an option to "jump start" the engine by pulsing a higher power + level for a few milliseconds when changing from off to a low level. + This setting specifies how bright that pulse should be. + + The value can be from 1 to 150, but is usually between 10 and 30. + +Some settings are hardware-specific and may not be present on all +lights. The number of settings in the global menu depends on the +hardware model and the firmware version. + + Tint Ramping ------------ @@ -680,6 +705,7 @@ Off Any 4C Lockout mode Off Full 5C Momentary mode Off Full 7C Aux LEDs: Next pattern Off Full 7H Aux LEDs: Next color +Off Full 9H Global config menu Off Full 10C Enable Simple UI Off Simple 10H Disable Simple UI Off Full 10H Simple UI ramp config menu (1: floor, 2: ceiling, [3: steps]) -- cgit v1.2.3 From 21ce0589814e9b16583dfb27bc7fa028b8ab141e Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Fri, 27 Aug 2021 07:33:01 -0600 Subject: made it possible to use autolock in simple UI (requires the user to set it up, so it won't happen to new users unless they do it on purpose) --- spaghetti-monster/anduril/off-mode.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'spaghetti-monster') diff --git a/spaghetti-monster/anduril/off-mode.c b/spaghetti-monster/anduril/off-mode.c index e37bec3..6faad1c 100644 --- a/spaghetti-monster/anduril/off-mode.c +++ b/spaghetti-monster/anduril/off-mode.c @@ -78,17 +78,11 @@ uint8_t off_state(Event event, uint16_t arg) { #endif #ifdef USE_AUTOLOCK - // lock the light after being off for N minutes - #ifdef USE_SIMPLE_UI - if (! simple_ui_active) { // no auto-lock in Simple UI - #endif + // lock the light after being off for N minutes uint16_t ticks = autolock_time * SLEEP_TICKS_PER_MINUTE; if ((autolock_time > 0) && (arg > ticks)) { set_state(lockout_state, 0); } - #ifdef USE_SIMPLE_UI - } - #endif #endif // ifdef USE_AUTOLOCK return MISCHIEF_MANAGED; } -- cgit v1.2.3