diff options
| author | Selene ToyKeeper | 2021-09-14 20:23:53 -0600 |
|---|---|---|
| committer | Selene ToyKeeper | 2021-09-14 20:23:53 -0600 |
| commit | 21a6e84bfdff469cfb9cfffa5ad4e8c6eb24c598 (patch) | |
| tree | 5a7be35b2b9e27a0f87a67e79342e1c7fe557409 /spaghetti-monster | |
| parent | merged in a bunch of new features... (diff) | |
| download | anduril-21a6e84bfdff469cfb9cfffa5ad4e8c6eb24c598.tar.gz anduril-21a6e84bfdff469cfb9cfffa5ad4e8c6eb24c598.tar.bz2 anduril-21a6e84bfdff469cfb9cfffa5ad4e8c6eb24c598.zip | |
added a hold shortcut in number entry menu: click for +1, hold for +10
Diffstat (limited to 'spaghetti-monster')
| -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 |
