fix(radio): Flex switch config not written to radio YAML file (#6581)
This commit is contained in:
@@ -1062,7 +1062,7 @@ PACK(struct RadioData {
|
|||||||
CUST_ARRAY(slidersConfig, struct_sliderConfig, MAX_POTS, nullptr);
|
CUST_ARRAY(slidersConfig, struct_sliderConfig, MAX_POTS, nullptr);
|
||||||
uint8_t stickInvert SKIP;
|
uint8_t stickInvert SKIP;
|
||||||
potconfig_t potsConfig ARRAY(4,struct_potConfig,nullptr);
|
potconfig_t potsConfig ARRAY(4,struct_potConfig,nullptr);
|
||||||
switchDef switchConfig[MAX_SWITCHES] FUNC(switchIsActive) NO_IDX; \
|
switchDef switchConfig[MAX_SWITCHES] FUNC(switchIsActive) NO_IDX;
|
||||||
CUST_ARRAY(flexSwitches, struct_flexSwitch, MAX_FLEX_SWITCHES, flex_sw_valid);
|
CUST_ARRAY(flexSwitches, struct_flexSwitch, MAX_FLEX_SWITCHES, flex_sw_valid);
|
||||||
|
|
||||||
EXTRA_GENERAL_FIELDS
|
EXTRA_GENERAL_FIELDS
|
||||||
|
|||||||
@@ -2497,5 +2497,5 @@ bool switchIsActive(void* user, uint8_t* data, uint32_t bitoffs)
|
|||||||
{
|
{
|
||||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||||
uint16_t idx = tw->getElmts();
|
uint16_t idx = tw->getElmts();
|
||||||
return idx < switchGetMaxSwitches();
|
return idx < switchGetMaxAllSwitches();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user