User controllable serial port power.

Thx to @raphaelcoeffic for numerous tips with YAML.
Tested with TX16S mkII.
This commit is contained in:
rotorman
2022-04-18 13:19:33 +02:00
parent f39f7a87ed
commit b1a3bc834f
22 changed files with 115 additions and 59 deletions
+9 -9
View File
@@ -116,33 +116,33 @@ static inline void check_struct()
CHKSIZE(TrainerData, 16);
#if defined(PCBXLITES)
CHKSIZE(RadioData, 859);
CHKSIZE(RadioData, 861);
CHKSIZE(ModelData, 6161);
#elif defined(PCBXLITE)
CHKSIZE(RadioData, 857);
CHKSIZE(RadioData, 859);
CHKSIZE(ModelData, 6161);
#elif defined(RADIO_TPRO)
CHKSIZE(RadioData, 840);
CHKSIZE(RadioData, 842);
CHKSIZE(ModelData, 6186);
#elif defined(PCBX7)
CHKSIZE(RadioData, 863);
CHKSIZE(RadioData, 865);
CHKSIZE(ModelData, 6161);
#elif defined(PCBX9E)
CHKSIZE(RadioData, 953);
CHKSIZE(RadioData, 955);
CHKSIZE(ModelData, 6613);
#elif defined(PCBX9D) || defined(PCBX9DP)
CHKSIZE(RadioData, 895);
CHKSIZE(RadioData, 897);
CHKSIZE(ModelData, 6605);
#elif defined(PCBHORUS)
#if defined(PCBX10)
CHKSIZE(RadioData, 919);
CHKSIZE(RadioData, 921);
CHKSIZE(ModelData, 11025);
#else
CHKSIZE(RadioData, 901);
CHKSIZE(RadioData, 903);
CHKSIZE(ModelData, 11023);
#endif
#elif defined(PCBNV14)
CHKSIZE(RadioData, 849);
CHKSIZE(RadioData, 851);
CHKSIZE(ModelData, 10839);
#endif
+1 -1
View File
@@ -902,7 +902,7 @@ PACK(struct RadioData {
CUST_ATTR(auxSerialMode, r_serialMode, nullptr);
CUST_ATTR(aux2SerialMode, r_serialMode, nullptr);
NOBACKUP(uint16_t serialPort ARRAY(STORAGE_SERIAL_PORTS,struct_serialConfig,nullptr));
NOBACKUP(uint32_t serialPort ARRAY(SERIAL_CONF_BITS_PER_PORT,struct_serialConfig,nullptr));
EXTRA_GENERAL_FIELDS
+14
View File
@@ -235,6 +235,20 @@ class SerialConfigWindow : public FormGroup
aux->setAvailableHandler(
[=](int value) { return isSerialModeAvailable(port_nr, value); });
grid.nextLine();
if (port_nr < SP_VCP)
{
new StaticText(this, grid.getLabelSlot(), "Port power:", 0, COLOR_THEME_PRIMARY1);
new CheckBox(
this, grid.getFieldSlot(1, 0),
[=] { return serialGetPower(port_nr); },
[=](int32_t newValue) {
serialSetPower(port_nr, newValue);
SET_DIRTY();
}
);
grid.nextLine();
}
}
if (display_ttl_warning) {
+49 -15
View File
@@ -86,17 +86,31 @@ int8_t getSerialPortMode(uint8_t port_nr)
#if !defined(BOOT)
if (port_nr < MAX_SERIAL_PORTS) {
auto cfg = g_eeGeneral.serialPort;
cfg >>= port_nr * 4; // 4 bits per port
return cfg & 0xF;
cfg >>= port_nr * SERIAL_CONF_BITS_PER_PORT;
return cfg & SERIAL_CONF_MODE_MASK;
}
#endif
return UART_MODE_NONE;
}
static bool getSerialPower(uint8_t port_nr)
{
#if !defined(BOOT)
if (port_nr < MAX_SERIAL_PORTS) {
auto cfg = g_eeGeneral.serialPort;
cfg >>= (port_nr * SERIAL_CONF_BITS_PER_PORT);
return cfg & (1 << SERIAL_CONF_POWER_BIT);
}
#endif
return false;
}
struct SerialPortState
{
uint8_t mode;
bool power;
const etx_serial_port_t* port;
void* usart_ctx;
};
@@ -189,7 +203,7 @@ static void serialSetCallBacks(int mode, void* ctx, const etx_serial_port_t* por
}
}
static void serialSetupPort(int mode, etx_serial_init& params, bool& power_required)
static void serialSetupPort(int mode, etx_serial_init& params)
{
switch (mode) {
@@ -203,7 +217,6 @@ static void serialSetupPort(int mode, etx_serial_init& params, bool& power_requi
#if !defined(BOOT)
case UART_MODE_TELEMETRY_MIRROR:
// TODO: query telemetry baudrate / add setting for module
power_required = true;
#if defined(CROSSFIRE)
if (modelTelemetryProtocol() == PROTOCOL_TELEMETRY_CROSSFIRE) {
params.baudrate = CROSSFIRE_TELEM_MIRROR_BAUDRATE;
@@ -217,7 +230,6 @@ static void serialSetupPort(int mode, etx_serial_init& params, bool& power_requi
if (modelTelemetryProtocol() == PROTOCOL_TELEMETRY_FRSKY_D_SECONDARY) {
params.baudrate = FRSKY_D_BAUDRATE;
params.rx_enable = true;
power_required = true;
}
break;
@@ -227,14 +239,12 @@ static void serialSetupPort(int mode, etx_serial_init& params, bool& power_requi
params.parity = ETX_Parity_Even;
params.stop_bits = ETX_StopBits_Two;
params.rx_enable = true;
power_required = true;
break;
#if defined(LUA)
case UART_MODE_LUA:
params.baudrate = LUA_DEFAULT_BAUDRATE;
params.rx_enable = true;
power_required = true;
break;
#endif
@@ -242,7 +252,6 @@ static void serialSetupPort(int mode, etx_serial_init& params, bool& power_requi
case UART_MODE_GPS:
params.baudrate = GPS_USART_BAUDRATE;
params.rx_enable = true;
power_required = true;
break;
#endif
#endif
@@ -263,6 +272,26 @@ const etx_serial_port_t* serialGetPort(uint8_t port_nr)
return port;
}
static void serialSetPowerState(uint8_t port_nr)
{
const etx_serial_port_t* port = serialGetPort(port_nr);
if (!port) return;
if (port->set_pwr) {
port->set_pwr(getSerialPower(port_nr));
}
}
void serialSetPower(uint8_t port_nr, bool enabled)
{
if (port_nr >= MAX_SERIAL_PORTS) return;
uint32_t pwr = (enabled ? 1 : 0) << SERIAL_CONF_POWER_BIT;
uint32_t pwr_mask = (1 << SERIAL_CONF_POWER_BIT) << port_nr * SERIAL_CONF_BITS_PER_PORT;
g_eeGeneral.serialPort = (g_eeGeneral.serialPort & ~pwr_mask) |
(pwr << port_nr * SERIAL_CONF_BITS_PER_PORT);
serialSetPowerState(port_nr);
}
void serialInit(uint8_t port_nr, int mode)
{
@@ -292,8 +321,7 @@ void serialInit(uint8_t port_nr, int mode)
.rx_enable = false,
};
bool power_required = false;
serialSetupPort(mode, params, power_required);
serialSetupPort(mode, params);
if (params.baudrate != 0) {
state->mode = mode;
@@ -304,9 +332,8 @@ void serialInit(uint8_t port_nr, int mode)
state->usart_ctx = port->uart->init(&params);
// Set power on/off
if (port->set_pwr) {
port->set_pwr(power_required);
}
if (port_nr < SP_VCP)
serialSetPowerState(port_nr);
}
// Update callbacks once the port is setup
@@ -329,12 +356,19 @@ int serialGetMode(uint8_t port_nr)
return getSerialPortMode(port_nr);
}
bool serialGetPower(uint8_t port_nr)
{
return getSerialPower(port_nr);
}
void serialSetMode(uint8_t port_nr, int mode)
{
if (port_nr >= MAX_SERIAL_PORTS) return;
uint16_t m = mode & 0xF;
uint16_t m = mode & SERIAL_CONF_MODE_MASK;
g_eeGeneral.serialPort =
(g_eeGeneral.serialPort & ~(0xF << port_nr * 4)) | (m << port_nr * 4);
(g_eeGeneral.serialPort &
~(SERIAL_CONF_MODE_MASK << port_nr * SERIAL_CONF_BITS_PER_PORT)) |
(m << port_nr * SERIAL_CONF_BITS_PER_PORT);
}
// uint8_t serialTracesEnabled(int port_nr)
+6
View File
@@ -25,9 +25,15 @@
#include <stdint.h>
#include "hal/serial_port.h"
#define SERIAL_CONF_BITS_PER_PORT 8
#define SERIAL_CONF_MODE_MASK 0x0F
#define SERIAL_CONF_POWER_BIT 4
const etx_serial_port_t* serialGetPort(uint8_t port_nr);
int serialGetMode(uint8_t port_nr);
void serialSetMode(uint8_t port_nr, int mode);
bool serialGetPower(uint8_t port_nr);
void serialSetPower(uint8_t port_nr, bool enabled);
void initSerialPorts();
void serialInit(uint8_t port_nr, int mode);
@@ -1854,6 +1854,7 @@ static bool port_write(void* user, yaml_writer_func wf, void* opaque)
static const struct YamlNode struct_serialConfig[] = {
YAML_IDX_CUST( "port", port_read, port_write),
YAML_ENUM( "mode", 4, enum_UartModes),
YAML_UNSIGNED( "power", 1 ),
YAML_END
};
@@ -1876,6 +1877,7 @@ static void r_serialMode(void* user, uint8_t* data, uint32_t bitoffs,
auto m = yaml_parse_enum(yaml_conv_220::enum_UartModes, val, val_len);
if (!m) return;
auto serialPort = reinterpret_cast<uint16_t*>(data);
*serialPort = (*serialPort & ~(0xF << port_nr * 4)) | (m << port_nr * 4);
auto serialPort = reinterpret_cast<uint32_t*>(data);
*serialPort = (*serialPort & ~(0xF << port_nr * SERIAL_CONF_BITS_PER_PORT)) |
(m << port_nr * SERIAL_CONF_BITS_PER_PORT);
}
@@ -423,7 +423,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_ARRAY("customFn", 72, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
YAML_ARRAY("serialPort", 8, 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),
@@ -439,7 +439,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_STRING("ownerRegistrationID", 8),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_UNSIGNED( "stickDeadZone", 3 ),
YAML_PADDING( 2 ),
YAML_PADDING( 3 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -394,7 +394,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
YAML_PADDING( 4 ),
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
@@ -407,7 +407,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_STRING("bluetoothName", 10),
YAML_STRING("ownerRegistrationID", 8),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_PADDING( 5 ),
YAML_PADDING( 6 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -394,7 +394,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
YAML_PADDING( 4 ),
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
@@ -407,7 +407,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_STRING("bluetoothName", 10),
YAML_STRING("ownerRegistrationID", 8),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_PADDING( 5 ),
YAML_PADDING( 6 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -394,7 +394,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
YAML_PADDING( 4 ),
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
@@ -407,7 +407,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_STRING("bluetoothName", 10),
YAML_STRING("ownerRegistrationID", 8),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_PADDING( 5 ),
YAML_PADDING( 6 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -402,7 +402,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
YAML_PADDING( 4 ),
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
@@ -413,7 +413,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_PADDING( 144 ),
YAML_STRING("ownerRegistrationID", 8),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_PADDING( 5 ),
YAML_PADDING( 6 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -394,7 +394,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
YAML_PADDING( 4 ),
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
@@ -407,7 +407,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_STRING("bluetoothName", 10),
YAML_STRING("ownerRegistrationID", 8),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_PADDING( 5 ),
YAML_PADDING( 6 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -444,7 +444,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_ARRAY("customFn", 72, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
YAML_ARRAY("serialPort", 8, 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),
@@ -459,7 +459,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_STRUCT("themeData", 480, struct_OpenTxTheme__PersistentData, NULL),
YAML_STRING("ownerRegistrationID", 8),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_PADDING( 5 ),
YAML_PADDING( 6 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -442,7 +442,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_ARRAY("customFn", 72, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
YAML_ARRAY("serialPort", 8, 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),
@@ -457,7 +457,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_STRUCT("themeData", 480, struct_OpenTxTheme__PersistentData, NULL),
YAML_STRING("ownerRegistrationID", 8),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_PADDING( 5 ),
YAML_PADDING( 6 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -394,7 +394,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
YAML_PADDING( 4 ),
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
@@ -407,7 +407,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_STRING("bluetoothName", 10),
YAML_STRING("ownerRegistrationID", 8),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_PADDING( 5 ),
YAML_PADDING( 6 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -401,7 +401,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
YAML_PADDING( 4 ),
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
@@ -414,7 +414,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_STRING("bluetoothName", 10),
YAML_STRING("ownerRegistrationID", 8),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_PADDING( 5 ),
YAML_PADDING( 6 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -440,7 +440,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
YAML_PADDING( 4 ),
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
@@ -453,7 +453,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_STRING("bluetoothName", 10),
YAML_STRING("ownerRegistrationID", 8),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_PADDING( 5 ),
YAML_PADDING( 6 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -381,7 +381,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
YAML_PADDING( 4 ),
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
@@ -392,7 +392,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_PADDING( 120 ),
YAML_STRING("ownerRegistrationID", 8),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_PADDING( 5 ),
YAML_PADDING( 6 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -389,7 +389,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
YAML_PADDING( 4 ),
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
@@ -402,7 +402,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_STRING("bluetoothName", 10),
YAML_STRING("ownerRegistrationID", 8),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_PADDING( 5 ),
YAML_PADDING( 6 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -386,7 +386,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
YAML_PADDING( 4 ),
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
@@ -399,7 +399,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_STRING("bluetoothName", 10),
YAML_STRING("ownerRegistrationID", 8),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_PADDING( 5 ),
YAML_PADDING( 6 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -388,7 +388,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
YAML_PADDING( 4 ),
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
@@ -403,7 +403,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_SIGNED( "gyroMax", 8 ),
YAML_SIGNED( "gyroOffset", 8 ),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_PADDING( 5 ),
YAML_PADDING( 6 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {
@@ -394,7 +394,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
YAML_ARRAY("serialPort", 4, 4, struct_serialConfig, nullptr),
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
YAML_PADDING( 4 ),
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
@@ -407,7 +407,7 @@ static const struct YamlNode struct_RadioData[] = {
YAML_STRING("bluetoothName", 10),
YAML_STRING("ownerRegistrationID", 8),
YAML_SIGNED( "uartSampleMode", 2 ),
YAML_PADDING( 5 ),
YAML_PADDING( 6 ),
YAML_END
};
static const struct YamlNode struct_unsigned_8[] = {