[tpro] fix function switch behaviours and add always on capability (#1479)
* fix: tpro function switch toggle mode * feat: Function switches now have alway on option * Companion support for function switch always on * Fix nasty eeprom error * Update fs startup item model * Fix Tpro SWITCH_EXISTS Co-authored-by: 3djc <lesitewebdejc@hotmail.com> Co-authored-by: elecpower <neilh713@tpg.com.au>
This commit is contained in:
co-authored by
3djc
elecpower
parent
c6a9101314
commit
d1ef6f866c
@@ -86,8 +86,9 @@
|
||||
#if defined(FUNCTION_SWITCHES)
|
||||
#define FSWITCH_CONFIG(x) (bfGet<swconfig_t>(g_model.functionSwitchConfig, 2*(x), 2))
|
||||
#define FSWITCH_GROUP(x) (bfGet<swconfig_t>(g_model.functionSwitchGroup, 2*(x), 2))
|
||||
#define IS_FSWITCH_GROUP_ON(x) (bfGet<swconfig_t>(g_model.functionSwitchGroup, 2 * NUM_FUNCTIONS_SWITCHES + x, 1))
|
||||
#define IS_SWITCH_FS(x) (x >= NUM_REGULAR_SWITCHES)
|
||||
#define SWITCH_EXISTS(x) (IS_SWITCH_FS(x) ? true : (FSWITCH_CONFIG(x) != SWITCH_NONE))
|
||||
#define SWITCH_EXISTS(x) (IS_SWITCH_FS(x) ? true : (SWITCH_CONFIG(x) != SWITCH_NONE))
|
||||
#define IS_CONFIG_3POS(x) (IS_SWITCH_FS(x) ? (FSWITCH_CONFIG(x - NUM_REGULAR_SWITCHES) == SWITCH_3POS) : (SWITCH_CONFIG(x) == SWITCH_3POS))
|
||||
#define IS_CONFIG_TOGGLE(x) (IS_SWITCH_FS(x) ? (FSWITCH_CONFIG(x - NUM_REGULAR_SWITCHES) == SWITCH_TOGGLE) : (SWITCH_CONFIG(x) == SWITCH_TOGGLE))
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user