aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSammysHP2020-12-24 20:27:10 +0100
committerSammysHP2023-11-07 17:57:36 +0100
commita53bb0d6b38bfc187460fadf06f34014e71a3683 (patch)
tree81d07f07443a246b8ddaf12be5799b2e579007d8
parentmade build fail if eeprom data bigger than MCU's eeprom size (diff)
downloadanduril-a53bb0d6b38bfc187460fadf06f34014e71a3683.tar.gz
anduril-a53bb0d6b38bfc187460fadf06f34014e71a3683.tar.bz2
anduril-a53bb0d6b38bfc187460fadf06f34014e71a3683.zip
Allow turbo in momentary mode
Diffstat (limited to '')
-rw-r--r--ui/anduril/ramp-mode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/anduril/ramp-mode.c b/ui/anduril/ramp-mode.c
index 5ce1b54..bd82fbb 100644
--- a/ui/anduril/ramp-mode.c
+++ b/ui/anduril/ramp-mode.c
@@ -468,6 +468,11 @@ uint8_t steady_state(Event event, uint16_t arg) {
#ifdef USE_MOMENTARY_MODE
// 5 clicks: shortcut to momentary mode
else if (event == EV_5clicks) {
+ // Allow to use turbo in momentary mode. It is safe to overwrite
+ // memorized_level because the only way to exit momentary mode is to
+ // reboot the flashlight which restores memorized_level to the default
+ // or EEPROM (but we don't write to EEPROM here).
+ memorized_level = actual_level;
set_level(0);
set_state(momentary_state, 0);
return EVENT_HANDLED;
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.