Merge lp:~sammyshp/flashlight-firmware/momentary-turbo into lp:~toykeeper/flashlight-firmware/anduril2

Proposed by Sven Greiner
Status: Needs review
Proposed branch: lp:~sammyshp/flashlight-firmware/momentary-turbo
Merge into: lp:~toykeeper/flashlight-firmware/anduril2
Diff against target: 15 lines (+5/-0)
1 file modified
ToyKeeper/spaghetti-monster/anduril/ramp-mode.c (+5/-0)
To merge this branch: bzr merge lp:~sammyshp/flashlight-firmware/momentary-turbo
Reviewer Review Type Date Requested Status
Selene ToyKeeper Pending
Review via email: mp+407817@code.launchpad.net

Description of the change

Allow turbo in momentary mode.

To post a comment you must log in.

Unmerged revisions

619. By Sven Greiner

Allow turbo in momentary mode

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ToyKeeper/spaghetti-monster/anduril/ramp-mode.c'
--- ToyKeeper/spaghetti-monster/anduril/ramp-mode.c 2021-08-23 10:24:08 +0000
+++ ToyKeeper/spaghetti-monster/anduril/ramp-mode.c 2021-08-30 08:45:59 +0000
@@ -375,6 +375,11 @@
375 #ifdef USE_MOMENTARY_MODE375 #ifdef USE_MOMENTARY_MODE
376 // 5 clicks: shortcut to momentary mode376 // 5 clicks: shortcut to momentary mode
377 else if (event == EV_5clicks) {377 else if (event == EV_5clicks) {
378 // Allow to use turbo in momentary mode. It is safe to overwrite
379 // memorized_level because the only way to exit momentary mode is to
380 // reboot the flashlight which restores memorized_level to the default
381 // or EEPROM (but we don't write to EEPROM here).
382 memorized_level = actual_level;
378 set_level(0);383 set_level(0);
379 set_state(momentary_state, 0);384 set_state(momentary_state, 0);
380 return MISCHIEF_MANAGED;385 return MISCHIEF_MANAGED;

Subscribers

People subscribed via source and target branches

to status/vote changes: