aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2024-03-28 07:55:39 -0600
committerSelene ToyKeeper2024-03-28 07:55:39 -0600
commit56697810a0482d22ba861722bff657a99b3c3b7b (patch)
tree54561262fc2b9a7ab2565f651dadf69d1136f69a
parentincreased voltage precision from 0.025V to 0.02V (diff)
parentMerge branch 'tactical-mode-3c-fix' of github.com:SiteRelEnby/anduril into pr... (diff)
downloadanduril-56697810a0482d22ba861722bff657a99b3c3b7b.tar.gz
anduril-56697810a0482d22ba861722bff657a99b3c3b7b.tar.bz2
anduril-56697810a0482d22ba861722bff657a99b3c3b7b.zip
Merge branch 'pr49-SiteRelEnby-tactical-mode-3c-fix' into trunk
Fixes [bug #40](https://github.com/ToyKeeper/anduril/issues/40) Don't change channel during 3C in Tactical Mode. * pr49-SiteRelEnby-tactical-mode-3c-fix: Bugfix: Prevent switching channel modes when in tactical mode
-rw-r--r--ui/anduril/tactical-mode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/anduril/tactical-mode.c b/ui/anduril/tactical-mode.c
index 5acd902..002f917 100644
--- a/ui/anduril/tactical-mode.c
+++ b/ui/anduril/tactical-mode.c
@@ -68,6 +68,11 @@ uint8_t tactical_state(Event event, uint16_t arg) {
return lockout_state(event, arg);
}
+ // handle 3C here to prevent changing channel modes unintentionally
+ if (event == EV_3clicks) {
+ return EVENT_HANDLED;
+ }
+
// 6 clicks: exit and turn off
else if (event == EV_6clicks) {
blink_once();