diff options
| -rw-r--r-- | spaghetti-monster/anduril/config-default.h | 4 | ||||
| -rw-r--r-- | spaghetti-monster/anduril/config-mode.c | 12 |
2 files changed, 14 insertions, 2 deletions
diff --git a/spaghetti-monster/anduril/config-default.h b/spaghetti-monster/anduril/config-default.h index 5b9897c..406e98b 100644 --- a/spaghetti-monster/anduril/config-default.h +++ b/spaghetti-monster/anduril/config-default.h @@ -181,6 +181,10 @@ #define USE_MOMENTARY_MODE +// enable a shortcut for +10 in number entry mode +// (click for +1, hold for +10) +#define USE_NUMBER_ENTRY_PLUS10 + // cut clock speed at very low modes for better efficiency // (defined here so config files can override it) #define USE_DYNAMIC_UNDERCLOCKING diff --git a/spaghetti-monster/anduril/config-mode.c b/spaghetti-monster/anduril/config-mode.c index f89a922..3af2a1c 100644 --- a/spaghetti-monster/anduril/config-mode.c +++ b/spaghetti-monster/anduril/config-mode.c @@ -146,9 +146,17 @@ uint8_t number_entry_state(Event event, uint16_t arg) { return MISCHIEF_MANAGED; } - // count clicks - else if (event == EV_click1_release) { + // count clicks: click = +1, hold = +10 + else if ((event == EV_click1_release) + #ifdef USE_NUMBER_ENTRY_PLUS10 + || (event == EV_click1_hold_release) + #endif + ) { entry_step = 1; // in case user clicked during initial delay + #ifdef USE_NUMBER_ENTRY_PLUS10 + if (event == EV_click1_hold_release) number_entry_value += 10; + else + #endif number_entry_value ++; // update the result empty_event_sequence(); // reset FSM's click count set_level(RAMP_SIZE/2); // flash briefly |
