feat(h7): increase GVAR limit to 15 (#6597)

Co-authored-by: elecpower <elecpower@users.noreply.github.com>
This commit is contained in:
3djc
2025-10-01 19:07:08 +10:00
committed by GitHub
co-authored by elecpower
parent 4de56d8096
commit 0da292001d
16 changed files with 100 additions and 43 deletions
@@ -48,7 +48,11 @@ static inline void check_yaml_funcs()
{
static_assert(offsetof(ModuleData, ppm) == 4,"");
check_size<ModuleData, 29>();
#if defined(STM32H7) || defined(STM32H7RS) || defined(STM32H5)
static_assert(MAX_GVARS == 15,"");
#else
static_assert(MAX_GVARS == 9,"");
#endif
}
static bool w_semver(void* user, uint8_t* data, uint32_t bitoffs,
@@ -567,7 +567,7 @@ static const struct YamlNode struct_FlightModeData[] = {
YAML_PADDING( 6 ),
YAML_UNSIGNED( "fadeIn", 8 ),
YAML_UNSIGNED( "fadeOut", 8 ),
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
YAML_ARRAY("gvars", 16, 15, struct_signed_16, gvar_is_active),
YAML_END
};
static const struct YamlNode struct_GVarData[] = {
@@ -902,11 +902,11 @@ static const struct YamlNode struct_ModelData[] = {
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
YAML_ARRAY("flightModeData", 352, 9, struct_FlightModeData, fmd_is_active),
YAML_ARRAY("flightModeData", 448, 9, struct_FlightModeData, fmd_is_active),
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
YAML_CUSTOM("switchWarningState",r_swtchWarn,nullptr),
YAML_ARRAY("switchWarning", 2, 32, struct_swtchWarn, nullptr),
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
YAML_ARRAY("gvars", 56, 15, struct_GVarData, NULL),
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
YAML_STRUCT("rssiAlarms", 0, struct_RssiAlarmData, NULL),
@@ -567,7 +567,7 @@ static const struct YamlNode struct_FlightModeData[] = {
YAML_PADDING( 6 ),
YAML_UNSIGNED( "fadeIn", 8 ),
YAML_UNSIGNED( "fadeOut", 8 ),
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
YAML_ARRAY("gvars", 16, 15, struct_signed_16, gvar_is_active),
YAML_END
};
static const struct YamlNode struct_GVarData[] = {
@@ -902,11 +902,11 @@ static const struct YamlNode struct_ModelData[] = {
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
YAML_ARRAY("flightModeData", 384, 9, struct_FlightModeData, fmd_is_active),
YAML_ARRAY("flightModeData", 480, 9, struct_FlightModeData, fmd_is_active),
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
YAML_CUSTOM("switchWarningState",r_swtchWarn,nullptr),
YAML_ARRAY("switchWarning", 2, 32, struct_swtchWarn, nullptr),
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
YAML_ARRAY("gvars", 56, 15, struct_GVarData, NULL),
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
YAML_STRUCT("rssiAlarms", 0, struct_RssiAlarmData, NULL),
@@ -567,7 +567,7 @@ static const struct YamlNode struct_FlightModeData[] = {
YAML_PADDING( 6 ),
YAML_UNSIGNED( "fadeIn", 8 ),
YAML_UNSIGNED( "fadeOut", 8 ),
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
YAML_ARRAY("gvars", 16, 15, struct_signed_16, gvar_is_active),
YAML_END
};
static const struct YamlNode struct_GVarData[] = {
@@ -902,11 +902,11 @@ static const struct YamlNode struct_ModelData[] = {
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
YAML_ARRAY("flightModeData", 384, 9, struct_FlightModeData, fmd_is_active),
YAML_ARRAY("flightModeData", 480, 9, struct_FlightModeData, fmd_is_active),
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
YAML_CUSTOM("switchWarningState",r_swtchWarn,nullptr),
YAML_ARRAY("switchWarning", 2, 32, struct_swtchWarn, nullptr),
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
YAML_ARRAY("gvars", 56, 15, struct_GVarData, NULL),
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
YAML_STRUCT("rssiAlarms", 0, struct_RssiAlarmData, NULL),
@@ -567,7 +567,7 @@ static const struct YamlNode struct_FlightModeData[] = {
YAML_PADDING( 6 ),
YAML_UNSIGNED( "fadeIn", 8 ),
YAML_UNSIGNED( "fadeOut", 8 ),
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
YAML_ARRAY("gvars", 16, 15, struct_signed_16, gvar_is_active),
YAML_END
};
static const struct YamlNode struct_GVarData[] = {
@@ -902,11 +902,11 @@ static const struct YamlNode struct_ModelData[] = {
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
YAML_ARRAY("flightModeData", 384, 9, struct_FlightModeData, fmd_is_active),
YAML_ARRAY("flightModeData", 480, 9, struct_FlightModeData, fmd_is_active),
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
YAML_CUSTOM("switchWarningState",r_swtchWarn,nullptr),
YAML_ARRAY("switchWarning", 2, 32, struct_swtchWarn, nullptr),
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
YAML_ARRAY("gvars", 56, 15, struct_GVarData, NULL),
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
YAML_STRUCT("rssiAlarms", 0, struct_RssiAlarmData, NULL),