More generic serial port config
This commit is contained in:
@@ -1733,3 +1733,46 @@ static void r_jitterFilter(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
uint32_t i = yaml_str2uint(val, val_len);
|
||||
yaml_put_bits(data, i, bitoffs, 1);
|
||||
}
|
||||
|
||||
//struct_serialConfig
|
||||
static const struct YamlIdStr enum_SerialPort[] = {
|
||||
{ SP_AUX1, "AUX1" },
|
||||
{ SP_AUX2, "AUX2" },
|
||||
{ SP_VCP, "VCP" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "TELEMETRY_IN" },
|
||||
{ UART_MODE_SBUS_TRAINER, "SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "LUA" },
|
||||
{ UART_MODE_CLI, "CLI" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static uint32_t port_read(void* user, const char* val, uint8_t val_len)
|
||||
{
|
||||
(void)user;
|
||||
uint32_t port = yaml_parse_enum(enum_SerialPort, val, val_len);
|
||||
if (port < MAX_SERIAL_PORTS) return port;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
bool port_write(void* user, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts();
|
||||
|
||||
const char* str = yaml_output_enum(idx, enum_SerialPort);
|
||||
return str ? wf(opaque, str, strlen(str)) : true;
|
||||
}
|
||||
|
||||
static const struct YamlNode struct_serialConfig[] = {
|
||||
YAML_IDX_CUST( "port", sw_read, sw_write),
|
||||
YAML_ENUM( "mode", 4, enum_UartModes),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
|
||||
@@ -85,14 +85,6 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_DISABLE_TOUCH, "DISABLE_TOUCH" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ZoneOptionValueEnum[] = {
|
||||
{ ZOV_Unsigned, "Unsigned" },
|
||||
{ ZOV_Signed, "Signed" },
|
||||
@@ -427,8 +419,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 72, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ENUM("aux2SerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 16, struct_switchConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 8, struct_potConfig, nullptr),
|
||||
|
||||
@@ -84,14 +84,6 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
@@ -398,8 +390,9 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
|
||||
@@ -84,14 +84,6 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
@@ -398,8 +390,9 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
|
||||
@@ -84,14 +84,6 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
@@ -398,8 +390,9 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
|
||||
@@ -84,14 +84,6 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
@@ -406,8 +398,9 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
|
||||
@@ -84,14 +84,6 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
@@ -398,8 +390,9 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
|
||||
@@ -85,14 +85,6 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_DISABLE_TOUCH, "DISABLE_TOUCH" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ZoneOptionValueEnum[] = {
|
||||
{ ZOV_Unsigned, "Unsigned" },
|
||||
{ ZOV_Signed, "Signed" },
|
||||
@@ -448,8 +440,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 72, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ENUM("aux2SerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 16, struct_switchConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 8, struct_potConfig, nullptr),
|
||||
|
||||
@@ -85,14 +85,6 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_DISABLE_TOUCH, "DISABLE_TOUCH" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ZoneOptionValueEnum[] = {
|
||||
{ ZOV_Unsigned, "Unsigned" },
|
||||
{ ZOV_Signed, "Signed" },
|
||||
@@ -446,8 +438,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 72, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ENUM("aux2SerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 16, struct_switchConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 8, struct_potConfig, nullptr),
|
||||
|
||||
@@ -84,14 +84,6 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
@@ -398,8 +390,9 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
|
||||
@@ -84,14 +84,6 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
@@ -405,8 +397,9 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
|
||||
@@ -84,14 +84,6 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
@@ -444,8 +436,9 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
|
||||
@@ -84,14 +84,6 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
@@ -385,8 +377,9 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
|
||||
@@ -84,14 +84,6 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
@@ -393,8 +385,9 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
|
||||
@@ -84,14 +84,6 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
@@ -390,8 +382,9 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
|
||||
@@ -84,14 +84,6 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
@@ -392,8 +384,9 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
|
||||
@@ -84,14 +84,6 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
@@ -398,8 +390,9 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
|
||||
Reference in New Issue
Block a user