aboutsummaryrefslogtreecommitdiff
path: root/spaghetti-monster/fsm-ramping.h
diff options
context:
space:
mode:
authorSelene ToyKeeper2023-04-17 01:30:41 -0600
committerSelene ToyKeeper2023-04-17 01:30:41 -0600
commit561a85c175920074fafea33738d24f54317e2f3a (patch)
tree6b250dd5f9fd1c4f687792964b43d212fedb5769 /spaghetti-monster/fsm-ramping.h
parentLT1S Pro: raised the ramp a bit; it seemed too low in the middle (diff)
downloadanduril-561a85c175920074fafea33738d24f54317e2f3a.tar.gz
anduril-561a85c175920074fafea33738d24f54317e2f3a.tar.bz2
anduril-561a85c175920074fafea33738d24f54317e2f3a.zip
made "Ramp 3H" do momentary turbo if current channel mode has no args
Diffstat (limited to '')
-rw-r--r--spaghetti-monster/fsm-ramping.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/spaghetti-monster/fsm-ramping.h b/spaghetti-monster/fsm-ramping.h
index 4511508..a9e333e 100644
--- a/spaghetti-monster/fsm-ramping.h
+++ b/spaghetti-monster/fsm-ramping.h
@@ -41,6 +41,7 @@ GradualTickFuncPtr gradual_tick_modes[NUM_CHANNEL_MODES];
#ifdef USE_CUSTOM_CHANNEL_3H_MODES
// different 3H behavior per channel?
// TODO: move to progmem
+// TODO: move to Anduril, not FSM
StatePtr channel_3H_modes[NUM_CHANNEL_MODES];
#endif
@@ -60,11 +61,14 @@ StatePtr channel_3H_modes[NUM_CHANNEL_MODES];
#endif
#endif
-#ifndef USE_CFG
- #ifdef USE_CHANNEL_MODE_ARGS
+#ifdef USE_CHANNEL_MODE_ARGS
+ #ifndef USE_CFG
// one byte of extra data per channel mode, like for tint value
uint8_t channel_mode_args[NUM_CHANNEL_MODES] = { CHANNEL_MODE_ARGS };
#endif
+ // bitmask: which modes respond to their "arg", and which don't?
+ //const uint8_t channel_has_args = CHANNEL_HAS_ARGS;
+ #define channel_has_args(n) ((CHANNEL_HAS_ARGS >> n) & 1)
#endif
void set_channel_mode(uint8_t mode);