aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSelene ToyKeeper2024-03-28 08:28:54 -0600
committerSelene ToyKeeper2024-03-28 08:28:54 -0600
commitf15310efe87b4e761d40f684d9044a3df84ff165 (patch)
tree34e69987220cef3f1c2c656dfa7f93818ee9d9b2
parentMerge branch 'pr49-SiteRelEnby-tactical-mode-3c-fix' into trunk (diff)
parentfixed Tactical Mode's strobes when Momentary Mode not enabled (diff)
downloadanduril-f15310efe87b4e761d40f684d9044a3df84ff165.tar.gz
anduril-f15310efe87b4e761d40f684d9044a3df84ff165.tar.bz2
anduril-f15310efe87b4e761d40f684d9044a3df84ff165.zip
Merge branch 'pr46-SiteRelEnby-bugfix-tacmode-without-momentary' into trunk
Allows user to disable Momentary Mode at compile time, while keeping Tactical Mode. * pr46-SiteRelEnby-bugfix-tacmode-without-momentary: fixed Tactical Mode's strobes when Momentary Mode not enabled Bugfix: Tactical mode has a dependency on momentary mode
Diffstat (limited to '')
-rw-r--r--ui/anduril/anduril.c12
-rw-r--r--ui/anduril/strobe-modes.c2
2 files changed, 8 insertions, 6 deletions
diff --git a/ui/anduril/anduril.c b/ui/anduril/anduril.c
index 1cdb8d0..4378816 100644
--- a/ui/anduril/anduril.c
+++ b/ui/anduril/anduril.c
@@ -121,7 +121,7 @@
#include "anduril/lockout-mode.h"
#endif
-#ifdef USE_MOMENTARY_MODE
+#if (defined(USE_MOMENTARY_MODE) || defined(USE_TACTICAL_MODE))
#include "anduril/momentary-mode.h"
#endif
@@ -189,7 +189,7 @@
#include "anduril/lockout-mode.c"
#endif
-#ifdef USE_MOMENTARY_MODE
+#if (defined(USE_MOMENTARY_MODE) || defined(USE_TACTICAL_MODE))
#include "anduril/momentary-mode.c"
#endif
@@ -293,10 +293,12 @@ void loop() {
#ifdef USE_STROBE_STATE
else if ((state == strobe_state)
- #ifdef USE_MOMENTARY_MODE
+ #if defined(USE_MOMENTARY_MODE) || defined(USE_TACTICAL_MODE)
// also handle momentary strobes
- || ((
- (state == momentary_state)
+ || ((0
+ #ifdef USE_MOMENTARY_MODE
+ || (state == momentary_state)
+ #endif
#ifdef USE_TACTICAL_MODE
|| (state == tactical_state)
#endif
diff --git a/ui/anduril/strobe-modes.c b/ui/anduril/strobe-modes.c
index ccc4aa0..38e4dca 100644
--- a/ui/anduril/strobe-modes.c
+++ b/ui/anduril/strobe-modes.c
@@ -13,7 +13,7 @@ uint8_t strobe_state(Event event, uint16_t arg) {
// 'st' reduces ROM size slightly
strobe_mode_te st = current_strobe_type;
- #ifdef USE_MOMENTARY_MODE
+ #if defined(USE_MOMENTARY_MODE) || defined(USE_TACTICAL_MODE)
momentary_mode = 1; // 0 = ramping, 1 = strobes
#endif
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.