aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster
diff options
context:
space:
mode:
authorSelene ToyKeeper2021-09-14 20:23:53 -0600
committerSelene ToyKeeper2021-09-14 20:23:53 -0600
commit21a6e84bfdff469cfb9cfffa5ad4e8c6eb24c598 (patch)
tree5a7be35b2b9e27a0f87a67e79342e1c7fe557409 /spaghetti-monster
parentmerged in a bunch of new features... (diff)
downloadanduril-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.h4
-rw-r--r--spaghetti-monster/anduril/config-mode.c12
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
If you find this content useful please consider a small donation via bitcoin: bitcoin:1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2?amount=0.001&message=Donation Scraping git contents via cgit is very resource intensive. The continued hosting of these git repositories is entirely financed by your bitcoin contributions. For donations of a least 1 mBTC you include your IP address in the message of your bitcoin donation. This will remove this message in the future for requests from your IP, which will significantly reduce token usage. In any case, any contributions to bitcoin address 1mxKyQsHHugqRxPKgwaA7wUwJEGCNthn2 are very welcome. Thanks in advance for you contribution to a self-sustaining ecosystem.