From 6c7c99b1be9a684e3a6ccc533f46979b39f7a529 Mon Sep 17 00:00:00 2001 From: Selene ToyKeeper Date: Tue, 18 Jul 2023 14:44:40 -0600 Subject: converted Emisar D4 and BLF Q8 to multi-channel, and enabled previously-removed tactical mode on the Q8 since there seems to be enough space now (also lowercased their hwdef files) --- spaghetti-monster/fsm-channels.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'spaghetti-monster/fsm-channels.h') diff --git a/spaghetti-monster/fsm-channels.h b/spaghetti-monster/fsm-channels.h index b86e9ba..ba2d3fa 100644 --- a/spaghetti-monster/fsm-channels.h +++ b/spaghetti-monster/fsm-channels.h @@ -14,11 +14,19 @@ typedef SetLevelFunc * SetLevelFuncPtr; typedef bool GradualTickFunc(uint8_t gt); typedef GradualTickFunc * GradualTickFuncPtr; +// TODO: implement custom 3H handlers +typedef void ChannelArgFunc(); +typedef ChannelArgFunc * ChannelArgFuncPtr; + typedef struct Channel { SetLevelFuncPtr set_level; #ifdef USE_SET_LEVEL_GRADUALLY GradualTickFuncPtr gradual_tick; #endif + #ifdef USE_CUSTOM_3H_HANDLERS + // TODO: implement custom 3H handlers + ChannelArgFuncPtr ramp_channel_arg; + #endif #ifdef USE_CHANNEL_MODE_ARGS bool has_args; //uint8_t arg; // is in the config struct, not here @@ -30,7 +38,7 @@ Channel channels[]; // values are defined in the hwdef-*.c // TODO: size-optimize the case with only 1 channel mode? // (the arrays and stuff shouldn't be needed) -#ifdef USE_CFG +#if defined(USE_CFG) && (NUM_CHANNEL_MODES > 1) #define CH_MODE cfg.channel_mode #else // current multi-channel mode -- cgit v1.2.3