Merge pull request #1186 from EdgeTX/cpn-storage-fmts
Companion YaML support
This commit is contained in:
@@ -240,10 +240,9 @@ enum TrainerMode {
|
||||
#endif
|
||||
|
||||
enum UartModes {
|
||||
#if defined(CLI) || defined(DEBUG)
|
||||
UART_MODE_DEBUG,
|
||||
#else
|
||||
UART_MODE_NONE,
|
||||
#if defined(CLI) || defined(DEBUG)
|
||||
UART_MODE_DEBUG SKIP = UART_MODE_NONE,
|
||||
#endif
|
||||
UART_MODE_TELEMETRY_MIRROR,
|
||||
UART_MODE_TELEMETRY,
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
|
||||
PACK(struct CurveRef {
|
||||
uint8_t type;
|
||||
int8_t value;
|
||||
int8_t value CUST(in_read_weight,in_write_weight);
|
||||
});
|
||||
|
||||
PACK(struct MixData {
|
||||
@@ -76,7 +76,7 @@ PACK(struct MixData {
|
||||
uint16_t mixWarn:2; // mixer warning
|
||||
uint16_t mltpx:2 ENUM(MixerMultiplex);
|
||||
uint16_t spare:1 SKIP;
|
||||
int32_t offset:14;
|
||||
int32_t offset:14 CUST(in_read_weight,in_write_weight);
|
||||
int32_t swtch:9 CUST(r_swtchSrc,w_swtchSrc);
|
||||
uint32_t flightModes:9 CUST(r_flightModes, w_flightModes);
|
||||
CurveRef curve;
|
||||
@@ -102,7 +102,7 @@ PACK(struct ExpoData {
|
||||
int32_t weight:8 CUST(in_read_weight,in_write_weight);
|
||||
int32_t spare:1 SKIP;
|
||||
NOBACKUP(char name[LEN_EXPOMIX_NAME]);
|
||||
int8_t offset;
|
||||
int8_t offset CUST(in_read_weight,in_write_weight);
|
||||
CurveRef curve;
|
||||
});
|
||||
|
||||
@@ -111,10 +111,10 @@ PACK(struct ExpoData {
|
||||
*/
|
||||
|
||||
PACK(struct LimitData {
|
||||
int32_t min:11;
|
||||
int32_t max:11;
|
||||
int32_t min:11 CUST(in_read_weight,in_write_weight);
|
||||
int32_t max:11 CUST(in_read_weight,in_write_weight);
|
||||
int32_t ppmCenter:10; // TODO can be reduced to 8 bits
|
||||
int16_t offset:11;
|
||||
int16_t offset:11 CUST(in_read_weight,in_write_weight);
|
||||
uint16_t symetrical:1;
|
||||
uint16_t revert:1;
|
||||
uint16_t spare:3 SKIP;
|
||||
@@ -834,6 +834,7 @@ PACK(struct RadioData {
|
||||
|
||||
// Real attributes
|
||||
NOBACKUP(uint8_t version);
|
||||
CUST_ATTR(board,nullptr,w_board);
|
||||
NOBACKUP(uint16_t variant SKIP);
|
||||
CalibData calib[NUM_STICKS + STORAGE_NUM_POTS + STORAGE_NUM_SLIDERS + STORAGE_NUM_MOUSE_ANALOGS] NO_IDX;
|
||||
NOBACKUP(uint16_t chkSum SKIP);
|
||||
@@ -867,12 +868,10 @@ PACK(struct RadioData {
|
||||
NOBACKUP(uint8_t templateSetup); // RETA order for receiver channels
|
||||
NOBACKUP(int8_t PPM_Multiplier);
|
||||
NOBACKUP(int8_t hapticLength CUST(r_5pos,w_5pos));
|
||||
N_HORUS_FIELD(N_TARANIS_FIELD(uint8_t spare2 SKIP));
|
||||
N_HORUS_FIELD(N_TARANIS_FIELD(uint8_t stickReverse));
|
||||
NOBACKUP(int8_t beepLength:3 CUST(r_5pos,w_5pos));
|
||||
NOBACKUP(int8_t hapticStrength:3 CUST(r_5pos,w_5pos));
|
||||
NOBACKUP(uint8_t gpsFormat:1);
|
||||
NOBACKUP(uint8_t unexpectedShutdown:1);
|
||||
NOBACKUP(uint8_t unexpectedShutdown:1 SKIP);
|
||||
NOBACKUP(uint8_t speakerPitch CUST(r_spPitch,w_spPitch));
|
||||
NOBACKUP(int8_t speakerVolume CUST(r_vol,w_vol));
|
||||
NOBACKUP(int8_t vBatMin CUST(r_vbat_min,w_vbat_min));
|
||||
|
||||
@@ -1507,7 +1507,7 @@ then the loaded script (or "chunk") is returned as a function. Otherwise, return
|
||||
as part of the file name and the .lua/.luac will be appended to that.
|
||||
|
||||
@param mode (string) (optional) Controls whether to force loading the text (.lua) or pre-compiled binary (.luac)
|
||||
version of the script. By default OTx will load the newest version and compile a new binary if necessary (overwriting any
|
||||
version of the script. By default ETX will load the newest version and compile a new binary if necessary (overwriting any
|
||||
existing .luac version of the same script, and stripping some debug info like line numbers).
|
||||
You can use `mode` to control the loading behavior more specifically. Possible values are:
|
||||
* `b` only binary.
|
||||
|
||||
@@ -158,7 +158,7 @@ static int luaModelGetModule(lua_State *L)
|
||||
if (module.type == MODULE_TYPE_MULTIMODULE) {
|
||||
int protocol = g_model.moduleData[idx].getMultiProtocol() + 1;
|
||||
int subprotocol = g_model.moduleData[idx].subType;
|
||||
convertOtxProtocolToMulti(&protocol, &subprotocol); // Special treatment for the FrSky entry...
|
||||
convertEtxProtocolToMulti(&protocol, &subprotocol); // Special treatment for the FrSky entry...
|
||||
lua_pushtableinteger(L, "protocol", protocol);
|
||||
lua_pushtableinteger(L, "subProtocol", subprotocol);
|
||||
if (getMultiModuleStatus(idx).isValid()) {
|
||||
@@ -231,8 +231,8 @@ static int luaModelSetModule(lua_State *L)
|
||||
#endif
|
||||
}
|
||||
#if defined(MULTIMODULE)
|
||||
if (protocol > 0 && subprotocol >= 0) { // Both are needed to compute otx protocol
|
||||
convertMultiProtocolToOtx(&protocol, &subprotocol);
|
||||
if (protocol > 0 && subprotocol >= 0) { // Both are needed to compute etx protocol
|
||||
convertMultiProtocolToEtx(&protocol, &subprotocol);
|
||||
g_model.moduleData[idx].setMultiProtocol(protocol - 1);
|
||||
g_model.moduleData[idx].subType = subprotocol;
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ static void sendDSM(uint8_t moduleIdx);
|
||||
void multiPatchCustom(uint8_t moduleIdx)
|
||||
{
|
||||
if (g_model.moduleData[moduleIdx].multi.customProto) {
|
||||
uint8_t type = g_model.moduleData[moduleIdx].getMultiProtocol() - 1; // custom where starting at 1, otx list at 0
|
||||
uint8_t type = g_model.moduleData[moduleIdx].getMultiProtocol() - 1; // custom where starting at 1, etx list at 0
|
||||
int subtype = g_model.moduleData[moduleIdx].subType;
|
||||
|
||||
g_model.moduleData[moduleIdx].multi.customProto = 0;
|
||||
@@ -268,7 +268,7 @@ void sendChannels(uint8_t moduleIdx)
|
||||
}
|
||||
}
|
||||
|
||||
void convertMultiProtocolToOtx(int *protocol, int *subprotocol)
|
||||
void convertMultiProtocolToEtx(int *protocol, int *subprotocol)
|
||||
{
|
||||
if (*protocol == 3 && *subprotocol == 0) {
|
||||
*protocol = MODULE_SUBTYPE_MULTI_FRSKY + 1;
|
||||
@@ -312,7 +312,7 @@ void convertMultiProtocolToOtx(int *protocol, int *subprotocol)
|
||||
*protocol -= 1;
|
||||
}
|
||||
|
||||
void convertOtxProtocolToMulti(int *protocol, int *subprotocol)
|
||||
void convertEtxProtocolToMulti(int *protocol, int *subprotocol)
|
||||
{
|
||||
// Special treatment for the FrSky entry...
|
||||
if (*protocol == MODULE_SUBTYPE_MULTI_FRSKY + 1) {
|
||||
@@ -407,7 +407,7 @@ void sendFrameProtocolHeader(uint8_t moduleIdx, bool failsafe)
|
||||
}
|
||||
|
||||
// Special treatment for the FrSky entry...
|
||||
convertOtxProtocolToMulti(&type, &subtype);
|
||||
convertEtxProtocolToMulti(&type, &subtype);
|
||||
|
||||
// Set the highest bit of option byte in AFHDS2A protocol to instruct MULTI to passthrough telemetry bytes instead
|
||||
// of sending Frsky D telemetry
|
||||
|
||||
@@ -25,8 +25,8 @@
|
||||
#include "pulses_common.h"
|
||||
|
||||
void multiPatchCustom(uint8_t moduleIdx);
|
||||
void convertOtxProtocolToMulti(int *protocol, int *subprotocol);
|
||||
void convertMultiProtocolToOtx(int *protocol, int *subprotocol);
|
||||
void convertEtxProtocolToMulti(int *protocol, int *subprotocol);
|
||||
void convertMultiProtocolToEtx(int *protocol, int *subprotocol);
|
||||
|
||||
class UartMultiPulses: public DataBuffer<uint8_t, 64>
|
||||
{
|
||||
|
||||
+20
-20
@@ -133,45 +133,45 @@ inline const char * SDCARD_ERROR(FRESULT result)
|
||||
const char * getBasename(const char * path);
|
||||
|
||||
#if defined(PCBX12S)
|
||||
#define OTX_FOURCC 0x3478746F // otx for X12S
|
||||
#define ETX_FOURCC 0x3478746F // etx for X12S
|
||||
#elif defined(RADIO_T16)
|
||||
#define OTX_FOURCC 0x3F78746F // otx for Jumper T16
|
||||
#define ETX_FOURCC 0x3F78746F // etx for Jumper T16
|
||||
#elif defined(RADIO_T18)
|
||||
#define OTX_FOURCC 0x4078746F // otx for Jumper T18
|
||||
#define ETX_FOURCC 0x4078746F // etx for Jumper T18
|
||||
#elif defined(RADIO_TX16S)
|
||||
#define OTX_FOURCC 0x3878746F // otx for Radiomaster TX16S
|
||||
#define ETX_FOURCC 0x3878746F // etx for Radiomaster TX16S
|
||||
#elif defined(PCBX10)
|
||||
#define OTX_FOURCC 0x3778746F // otx for X10
|
||||
#define ETX_FOURCC 0x3778746F // etx for X10
|
||||
#elif defined(PCBX9E)
|
||||
#define OTX_FOURCC 0x3578746F // otx for Taranis X9E
|
||||
#define ETX_FOURCC 0x3578746F // etx for Taranis X9E
|
||||
#elif defined(PCBXLITES)
|
||||
#define OTX_FOURCC 0x3B78746F // otx for Taranis X-Lite S
|
||||
#define ETX_FOURCC 0x3B78746F // etx for Taranis X-Lite S
|
||||
#elif defined(PCBXLITE)
|
||||
#define OTX_FOURCC 0x3978746F // otx for Taranis X-Lite
|
||||
#define ETX_FOURCC 0x3978746F // etx for Taranis X-Lite
|
||||
#elif defined(RADIO_T12)
|
||||
#define OTX_FOURCC 0x3D78746F // otx for Jumper T12
|
||||
#define ETX_FOURCC 0x3D78746F // etx for Jumper T12
|
||||
#elif defined(RADIO_TLITE)
|
||||
#define OTX_FOURCC 0x4278746F // otx for Jumper TLite
|
||||
#define ETX_FOURCC 0x4278746F // etx for Jumper TLite
|
||||
#elif defined(RADIO_TPRO)
|
||||
#define OTX_FOURCC 0x4678746F // otx for Jumper TPro
|
||||
#define ETX_FOURCC 0x4678746F // etx for Jumper TPro
|
||||
#elif defined(RADIO_TX12)
|
||||
#define OTX_FOURCC 0x4178746F // otx for Radiomaster TX12
|
||||
#define ETX_FOURCC 0x4178746F // etx for Radiomaster TX12
|
||||
#elif defined(RADIO_ZORRO)
|
||||
#define OTX_FOURCC 0x4778746F // otx for Radiomaster Zorro
|
||||
#define ETX_FOURCC 0x4778746F // otx for Radiomaster Zorro
|
||||
#elif defined(RADIO_T8)
|
||||
#define OTX_FOURCC 0x4378746F // otx for Radiomaster T8
|
||||
#define ETX_FOURCC 0x4378746F // etx for Radiomaster T8
|
||||
#elif defined(PCBX7)
|
||||
#define OTX_FOURCC 0x3678746F // otx for Taranis X7 / X7S / X7 Express / X7S Express
|
||||
#define ETX_FOURCC 0x3678746F // etx for Taranis X7 / X7S / X7 Express / X7S Express
|
||||
#elif defined(PCBX9LITES)
|
||||
#define OTX_FOURCC 0x3E78746F // otx for Taranis X9-Lite S
|
||||
#define ETX_FOURCC 0x3E78746F // etx for Taranis X9-Lite S
|
||||
#elif defined(PCBX9LITE)
|
||||
#define OTX_FOURCC 0x3C78746F // otx for Taranis X9-Lite
|
||||
#define ETX_FOURCC 0x3C78746F // etx for Taranis X9-Lite
|
||||
#elif defined(PCBX9D) || defined(PCBX9DP)
|
||||
#define OTX_FOURCC 0x3378746F // otx for Taranis X9D
|
||||
#define ETX_FOURCC 0x3378746F // etx for Taranis X9D
|
||||
#elif defined(PCBNV14)
|
||||
#define OTX_FOURCC 0x3A78746F // otx for NV14
|
||||
#define ETX_FOURCC 0x3A78746F // etx for NV14
|
||||
#elif defined(PCBSKY9X)
|
||||
#define OTX_FOURCC 0x3278746F // otx for sky9x
|
||||
#define ETX_FOURCC 0x3278746F // etx for sky9x
|
||||
#endif
|
||||
|
||||
bool isFileAvailable(const char * filename, bool exclDir = false);
|
||||
|
||||
@@ -23,21 +23,27 @@
|
||||
#include "datastructs_220.h"
|
||||
#include "myeeprom_220.h"
|
||||
|
||||
#define GVAR_SMALL 128
|
||||
#define VOLUME_LEVEL_DEF 12
|
||||
|
||||
bool w_board(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
return wf(opaque, FLAVOUR, sizeof(FLAVOUR)-1);
|
||||
}
|
||||
|
||||
#define in_read_weight nullptr
|
||||
|
||||
bool in_write_weight(const YamlNode* node, uint32_t val, yaml_writer_func wf,
|
||||
void* opaque)
|
||||
{
|
||||
int32_t sval = yaml_to_signed(val, node->size);
|
||||
int32_t gvar = (node->size > 8 ? GV1_LARGE : GV1_SMALL);
|
||||
|
||||
if (sval > GVAR_SMALL - 11 && sval < GVAR_SMALL - 1) {
|
||||
char n = GVAR_SMALL - sval + '0';
|
||||
if (sval >= gvar - 10 && sval <= gvar) {
|
||||
char n = gvar - sval + '1';
|
||||
return wf(opaque, "-GV", 3) && wf(opaque, &n, 1);
|
||||
} else if (sval < -GVAR_SMALL + 11 && sval > -GVAR_SMALL + 1) {
|
||||
char n = val - GVAR_SMALL + '1';
|
||||
} else if (sval <= -gvar + 10 && sval >= -gvar) {
|
||||
char n = val - gvar + '1';
|
||||
return wf(opaque, "GV", 2) && wf(opaque, &n, 1);
|
||||
}
|
||||
|
||||
@@ -1132,7 +1138,7 @@ bool w_modSubtype(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
// data as-is (no FrSky special casing)
|
||||
int type = md->getMultiProtocol() + 1;
|
||||
int subtype = val;
|
||||
convertOtxProtocolToMulti(&type, &subtype);
|
||||
convertEtxProtocolToMulti(&type, &subtype);
|
||||
|
||||
// output "[type],[subtype]"
|
||||
str = yaml_unsigned2str(type);
|
||||
|
||||
@@ -357,6 +357,7 @@ static const struct YamlNode struct_OpenTxTheme__PersistentData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 9, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -394,7 +395,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -465,7 +466,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -476,7 +477,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -489,10 +490,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -511,7 +512,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -363,7 +364,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -430,7 +431,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -441,7 +442,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -454,10 +455,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -476,7 +477,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -363,7 +364,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -430,7 +431,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -441,7 +442,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -454,10 +455,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -476,7 +477,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -363,7 +364,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -430,7 +431,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -441,7 +442,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -454,10 +455,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -476,7 +477,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -363,7 +364,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -430,7 +431,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -441,7 +442,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -454,10 +455,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -476,7 +477,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -378,6 +378,7 @@ static const struct YamlNode struct_OpenTxTheme__PersistentData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 15, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -411,7 +412,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -482,7 +483,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -493,7 +494,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -506,10 +507,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -528,7 +529,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -378,6 +378,7 @@ static const struct YamlNode struct_OpenTxTheme__PersistentData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 15, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -411,7 +412,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -482,7 +483,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -493,7 +494,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -506,10 +507,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -528,7 +529,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -363,7 +364,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -430,7 +431,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -441,7 +442,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -454,10 +455,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -476,7 +477,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -335,6 +335,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 9, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -370,7 +371,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -438,7 +439,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -449,7 +450,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -462,10 +463,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -484,7 +485,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -374,6 +374,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 12, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -409,7 +410,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -477,7 +478,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -488,7 +489,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -501,10 +502,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -523,7 +524,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -315,6 +315,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 5, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -350,7 +351,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -415,7 +416,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -426,7 +427,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -439,10 +440,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -461,7 +462,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -323,6 +323,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 5, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -358,7 +359,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -425,7 +426,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -436,7 +437,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -449,10 +450,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -471,7 +472,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -320,6 +320,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -355,7 +356,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -422,7 +423,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -433,7 +434,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -446,10 +447,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -468,7 +469,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -322,6 +322,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -357,7 +358,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -426,7 +427,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -437,7 +438,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -450,10 +451,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -472,7 +473,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -430,7 +431,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -441,7 +442,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -454,10 +455,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -476,7 +477,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -473,7 +473,7 @@ const char * eeBackupModel(uint8_t i_fileSrc)
|
||||
|
||||
uint16_t size = eeModelSize(i_fileSrc);
|
||||
|
||||
*(uint32_t*)&buf[0] = OTX_FOURCC;
|
||||
*(uint32_t*)&buf[0] = ETX_FOURCC;
|
||||
buf[4] = g_eeGeneral.version;
|
||||
buf[5] = 'M';
|
||||
*(uint16_t*)&buf[6] = size;
|
||||
@@ -540,7 +540,7 @@ const char * eeRestoreModel(uint8_t i_fileDst, char *model_name)
|
||||
}
|
||||
|
||||
uint8_t version = (uint8_t)buf[4];
|
||||
if (*(uint32_t*)&buf[0] != OTX_FOURCC || version < FIRST_CONV_EEPROM_VER || version > EEPROM_VER || buf[5] != 'M') {
|
||||
if (*(uint32_t*)&buf[0] != ETX_FOURCC || version < FIRST_CONV_EEPROM_VER || version > EEPROM_VER || buf[5] != 'M') {
|
||||
f_close(&restoreFile);
|
||||
return STR_INCOMPATIBLE;
|
||||
}
|
||||
|
||||
@@ -508,7 +508,7 @@ const char * eeBackupModel(uint8_t i_fileSrc)
|
||||
EFile theFile2;
|
||||
theFile2.openRd(FILE_MODEL(i_fileSrc));
|
||||
|
||||
*(uint32_t*)&buf[0] = OTX_FOURCC;
|
||||
*(uint32_t*)&buf[0] = ETX_FOURCC;
|
||||
buf[4] = g_eeGeneral.version;
|
||||
buf[5] = 'M';
|
||||
*(uint16_t*)&buf[6] = eeModelSize(i_fileSrc);
|
||||
@@ -561,7 +561,7 @@ const char * eeRestoreModel(uint8_t i_fileDst, char *model_name)
|
||||
}
|
||||
|
||||
uint8_t version = (uint8_t)buf[4];
|
||||
if (*(uint32_t*)&buf[0] != OTX_FOURCC || version < FIRST_CONV_EEPROM_VER || version > EEPROM_VER || buf[5] != 'M') {
|
||||
if (*(uint32_t*)&buf[0] != ETX_FOURCC || version < FIRST_CONV_EEPROM_VER || version > EEPROM_VER || buf[5] != 'M') {
|
||||
f_close(&g_oLogFile);
|
||||
return STR_INCOMPATIBLE;
|
||||
}
|
||||
|
||||
@@ -381,6 +381,7 @@ bool ModelsList::loadYaml()
|
||||
if (bytes_read == 0)
|
||||
break;
|
||||
|
||||
if (f_eof(&file)) yp.set_eof();
|
||||
if (yp.parse(line, bytes_read) != YamlParser::CONTINUE_PARSING)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ const char *writeFileBin(const char *filename, const uint8_t *data,
|
||||
return SDCARD_ERROR(result);
|
||||
}
|
||||
|
||||
*(uint32_t*)&buf[0] = OTX_FOURCC;
|
||||
*(uint32_t*)&buf[0] = ETX_FOURCC;
|
||||
buf[4] = version;
|
||||
buf[5] = 'M';
|
||||
*(uint16_t*)&buf[6] = size;
|
||||
@@ -99,7 +99,7 @@ const char* openFileBin(const char * fullpath, FIL * file, uint16_t * size, uint
|
||||
}
|
||||
|
||||
*version = (uint8_t)buf[4];
|
||||
if (*(uint32_t *)&buf[0] != OTX_FOURCC || *version < FIRST_CONV_EEPROM_VER ||
|
||||
if (*(uint32_t *)&buf[0] != ETX_FOURCC || *version < FIRST_CONV_EEPROM_VER ||
|
||||
*version > EEPROM_VER || buf[5] != 'M') {
|
||||
f_close(file);
|
||||
return STR_INCOMPATIBLE;
|
||||
|
||||
@@ -58,6 +58,7 @@ const char * readYamlFile(const char* fullpath, const YamlParserCalls* calls, vo
|
||||
if (bytes_read == 0)
|
||||
break;
|
||||
|
||||
if (f_eof(&file)) yp.set_eof();
|
||||
if (yp.parse(buffer, bytes_read) != YamlParser::CONTINUE_PARSING)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ void yaml_put_bits(uint8_t* dst, uint32_t i, uint32_t bit_ofs, uint32_t bits)
|
||||
|
||||
if (bit_ofs) {
|
||||
|
||||
*dst &= MASK_LOWER(bit_ofs);
|
||||
*dst &= ~((MASK_LOWER(bits) << bit_ofs) & 0xFF);
|
||||
*(dst++) |= (i << bit_ofs) & 0xFF;
|
||||
|
||||
if (bits <= 8 - bit_ofs)
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
// Use definitions from v220 conversions as long as nothing changes
|
||||
|
||||
namespace yaml_conv_220 {
|
||||
bool w_board(void* user, uint8_t* data, uint32_t bitoffs, yaml_writer_func wf, void* opaque);
|
||||
|
||||
bool in_write_weight(const YamlNode* node, uint32_t val, yaml_writer_func wf, void* opaque);
|
||||
|
||||
bool output_source_1_param(const char* src_prefix, size_t src_len, uint32_t n,
|
||||
@@ -135,10 +137,16 @@ static inline void check_yaml_funcs()
|
||||
#endif
|
||||
}
|
||||
|
||||
#define GVAR_SMALL 128
|
||||
static bool w_board(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
return yaml_conv_220::w_board(user, data, bitoffs, wf, opaque);
|
||||
}
|
||||
|
||||
static uint32_t in_read_weight(const YamlNode* node, const char* val, uint8_t val_len)
|
||||
{
|
||||
int gvar = (node->size > 8 ? GV1_LARGE : GV1_SMALL);
|
||||
|
||||
if ((val_len == 4)
|
||||
&& (val[0] == '-')
|
||||
&& (val[1] == 'G')
|
||||
@@ -146,8 +154,8 @@ static uint32_t in_read_weight(const YamlNode* node, const char* val, uint8_t va
|
||||
&& (val[3] >= '1')
|
||||
&& (val[3] <= '9')) {
|
||||
|
||||
TRACE("%.*s -> %i\n", val_len, val, GVAR_SMALL - (val[3] - '0'));
|
||||
return GVAR_SMALL - (val[3] - '0'); // -GVx => 128 - x
|
||||
TRACE("%.*s -> %i\n", val_len, val, gvar - (val[3] - '0'));
|
||||
return gvar - (val[3] - '1'); // -GVx => 128 - x
|
||||
}
|
||||
|
||||
if ((val_len == 3)
|
||||
@@ -156,8 +164,8 @@ static uint32_t in_read_weight(const YamlNode* node, const char* val, uint8_t va
|
||||
&& (val[2] >= '1')
|
||||
&& (val[2] <= '9')) {
|
||||
|
||||
TRACE("%.*s -> %i\n", val_len, val, -GVAR_SMALL + (val[2] - '1'));
|
||||
return -GVAR_SMALL + (val[2] - '1'); // GVx => -128 + (x-1)
|
||||
TRACE("%.*s -> %i\n", val_len, val, -gvar + (val[2] - '1'));
|
||||
return -gvar + (val[2] - '1'); // GVx => -128 + (x-1)
|
||||
}
|
||||
|
||||
return (uint32_t)yaml_str2int(val, val_len);
|
||||
@@ -455,6 +463,11 @@ static uint32_t r_calib(void* user, const char* val, uint8_t val_len)
|
||||
uint32_t sw = yaml_parse_enum(enum_MixSources, val, val_len);
|
||||
if (sw >= MIXSRC_Rud) return sw - MIXSRC_Rud;
|
||||
|
||||
// detect invalid values
|
||||
if (val_len == 0 || (val[0] < '0') || (val[0] > '9')) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return (uint32_t)yaml_str2int(val, val_len);
|
||||
}
|
||||
|
||||
@@ -1646,8 +1659,8 @@ static void r_modSubtype(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
val++; val_len--;
|
||||
int subtype = yaml_str2uint(val, val_len);
|
||||
|
||||
// convert to OTX format and write to vars
|
||||
convertMultiProtocolToOtx(&type, &subtype);
|
||||
// convert to ETX format and write to vars
|
||||
convertMultiProtocolToEtx(&type, &subtype);
|
||||
if (type > 0) {
|
||||
md->setMultiProtocol(type - 1);
|
||||
md->subType = subtype;
|
||||
|
||||
@@ -357,6 +357,7 @@ static const struct YamlNode struct_OpenTxTheme__PersistentData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 9, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -390,12 +391,10 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "templateSetup", 8 ),
|
||||
YAML_SIGNED( "PPM_Multiplier", 8 ),
|
||||
YAML_SIGNED_CUST( "hapticLength", 8, r_5pos, w_5pos ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_UNSIGNED( "stickReverse", 8 ),
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -466,7 +465,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -477,7 +476,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -490,10 +489,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -512,7 +511,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -364,7 +365,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -430,7 +431,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -441,7 +442,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -454,10 +455,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -476,7 +477,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -364,7 +365,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -430,7 +431,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -441,7 +442,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -454,10 +455,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -476,7 +477,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -364,7 +365,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -430,7 +431,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -441,7 +442,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -454,10 +455,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -476,7 +477,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -336,6 +336,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -372,7 +373,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -436,7 +437,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -447,7 +448,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -460,10 +461,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -482,7 +483,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -364,7 +365,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -430,7 +431,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -441,7 +442,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -454,10 +455,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -476,7 +477,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -380,6 +380,7 @@ static const struct YamlNode struct_OpenTxTheme__PersistentData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 17, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -414,7 +415,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -485,7 +486,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -496,7 +497,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -509,10 +510,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -531,7 +532,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -378,6 +378,7 @@ static const struct YamlNode struct_OpenTxTheme__PersistentData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 15, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -412,7 +413,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -483,7 +484,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -494,7 +495,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -507,10 +508,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -529,7 +530,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -364,7 +365,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -430,7 +431,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -441,7 +442,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -454,10 +455,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -476,7 +477,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -335,6 +335,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 9, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -371,7 +372,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -438,7 +439,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -449,7 +450,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -462,10 +463,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -484,7 +485,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -374,6 +374,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 12, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -410,7 +411,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -477,7 +478,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -488,7 +489,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -501,10 +502,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -523,7 +524,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -315,6 +315,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 5, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -351,7 +352,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -415,7 +416,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -426,7 +427,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -439,10 +440,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -461,7 +462,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -323,6 +323,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 5, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -359,7 +360,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -425,7 +426,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -436,7 +437,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -449,10 +450,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -471,7 +472,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -320,6 +320,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -356,7 +357,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -422,7 +423,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -433,7 +434,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -446,10 +447,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -468,7 +469,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -322,6 +322,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -358,7 +359,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -426,7 +427,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -437,7 +438,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -450,10 +451,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -472,7 +473,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -328,6 +328,7 @@ static const struct YamlNode struct_string_24[] = {
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
@@ -364,7 +365,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED_CUST( "speakerPitch", 8, r_spPitch, w_spPitch ),
|
||||
YAML_SIGNED_CUST( "speakerVolume", 8, r_vol, w_vol ),
|
||||
YAML_SIGNED_CUST( "vBatMin", 8, r_vbat_min, w_vbat_min ),
|
||||
@@ -430,7 +431,7 @@ static const struct YamlNode struct_TimerData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
@@ -441,7 +442,7 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -454,10 +455,10 @@ static const struct YamlNode struct_MixData[] = {
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED_CUST( "min", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "max", 11, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_SIGNED_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
@@ -476,7 +477,7 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
@@ -40,6 +40,7 @@ void YamlParser::init(const YamlParserCalls* parser_calls, void* parser_ctx)
|
||||
calls = parser_calls;
|
||||
ctx = parser_ctx;
|
||||
reset();
|
||||
eof = false;
|
||||
}
|
||||
|
||||
void YamlParser::reset()
|
||||
@@ -311,6 +312,11 @@ YamlParser::parse(const char* buffer, unsigned int size)
|
||||
c++;
|
||||
} // for each char
|
||||
|
||||
if ((state == ps_Val) && eof && node_found) {
|
||||
// TODO: trim spaces at the end?
|
||||
calls->set_attr(ctx, scratch_buf, scratch_len);
|
||||
}
|
||||
|
||||
return CONTINUE_PARSING;
|
||||
}
|
||||
|
||||
|
||||
@@ -73,6 +73,7 @@ class YamlParser
|
||||
uint8_t scratch_len;
|
||||
|
||||
bool node_found;
|
||||
bool eof;
|
||||
|
||||
// tree iterator state
|
||||
const YamlParserCalls* calls;
|
||||
@@ -98,6 +99,8 @@ public:
|
||||
void init(const YamlParserCalls* parser_calls, void* parser_ctx);
|
||||
|
||||
YamlResult parse(const char* buffer, unsigned int size);
|
||||
|
||||
void set_eof() { eof = true; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -301,7 +301,7 @@ bool YamlTreeWalker::toParent()
|
||||
bool YamlTreeWalker::toChild()
|
||||
{
|
||||
const struct YamlNode* attr = getAttr();
|
||||
if (!attr
|
||||
if (!attr || isIdxInvalid()
|
||||
|| (attr->type != YDT_ARRAY
|
||||
&& attr->type != YDT_UNION
|
||||
&& !isArrayElmt())) {
|
||||
|
||||
@@ -34,7 +34,7 @@ if(SIMU_LUA_COMPILER)
|
||||
endif()
|
||||
|
||||
if(Qt5Widgets_FOUND)
|
||||
set(SIMULATOR_FLAVOUR opentx-${FLAVOUR})
|
||||
set(SIMULATOR_FLAVOUR edgetx-${FLAVOUR})
|
||||
set(SIMULATOR_TARGET ${SIMULATOR_FLAVOUR}-simulator)
|
||||
add_definitions(-DSIMULATOR_FLAVOUR="${SIMULATOR_FLAVOUR}")
|
||||
include_directories(${COMPANION_SRC_DIRECTORY} ${COMPANION_SRC_DIRECTORY}/simulation)
|
||||
@@ -52,7 +52,7 @@ if(Qt5Widgets_FOUND)
|
||||
COMMAND ${CMAKE_STRIP} $<TARGET_FILE:${SIMULATOR_TARGET}>)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
|
||||
# Introduced at 2.5 - TODO replace with a code change
|
||||
# When compiled shared simulators using libopenui and Companion have classes named MainWindow
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
#define GET_SWITCH_BOOL(sw__) getSwitch((sw__), 0);
|
||||
|
||||
#define OTXS_DBG qDebug() << "(" << simuTimerMicros() << "us)"
|
||||
#define ETXS_DBG qDebug() << "(" << simuTimerMicros() << "us)"
|
||||
|
||||
int16_t g_anas[Analogs::NUM_ANALOGS];
|
||||
QVector<QIODevice *> OpenTxSimulator::tracebackDevices;
|
||||
@@ -106,7 +106,7 @@ void OpenTxSimulator::init()
|
||||
if (isRunning())
|
||||
return;
|
||||
|
||||
OTXS_DBG;
|
||||
ETXS_DBG;
|
||||
|
||||
if (!m_timer10ms) {
|
||||
// make sure we create & control the timer from current thread
|
||||
@@ -134,7 +134,7 @@ void OpenTxSimulator::start(const char * filename, bool tests)
|
||||
{
|
||||
if (isRunning())
|
||||
return;
|
||||
OTXS_DBG << "file:" << filename << "tests:" << tests;
|
||||
ETXS_DBG << "file:" << filename << "tests:" << tests;
|
||||
|
||||
QMutexLocker lckr(&m_mtxSimuMain);
|
||||
QMutexLocker slckr(&m_mtxSettings);
|
||||
@@ -150,7 +150,7 @@ void OpenTxSimulator::stop()
|
||||
{
|
||||
if (!isRunning())
|
||||
return;
|
||||
OTXS_DBG;
|
||||
ETXS_DBG;
|
||||
|
||||
setStopRequested(true);
|
||||
|
||||
@@ -380,7 +380,7 @@ void OpenTxSimulator::setTrainerTimeout(uint16_t ms)
|
||||
|
||||
void OpenTxSimulator::sendTelemetry(const QByteArray data)
|
||||
{
|
||||
//OTXS_DBG << data;
|
||||
//ETXS_DBG << data;
|
||||
sportProcessTelemetryPacket((uint8_t *)data.constData());
|
||||
}
|
||||
|
||||
|
||||
@@ -124,23 +124,20 @@ bool redirectToSettingsDirectory(const std::string & path)
|
||||
* model (*.bin) files in /MODELS directory
|
||||
*/
|
||||
if (!simuSettingsDirectory.empty()) {
|
||||
#if defined(COLORLCD)
|
||||
if (path == RADIO_MODELSLIST_PATH || path == RADIO_SETTINGS_PATH
|
||||
#if defined(SDCARD_YAML)
|
||||
|| path == MODELSLIST_YAML_PATH || path == RADIO_SETTINGS_YAML_PATH
|
||||
#endif
|
||||
) {
|
||||
#if defined(SDCARD_RAW) || defined(SDCARD_YAML)
|
||||
if (path == MODELS_PATH || path == RADIO_PATH) return true;
|
||||
#if !defined(EEPROM_RLC)
|
||||
if (path == RADIO_MODELSLIST_PATH || path == RADIO_SETTINGS_PATH)
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
if (startsWith(path, "/MODELS")
|
||||
&& (endsWith(path, MODELS_EXT)
|
||||
#if defined(SDCARD_YAML)
|
||||
|| endsWith(path, YAML_EXT)
|
||||
#endif
|
||||
)) {
|
||||
if (startsWith(path, MODELS_PATH) && endsWith(path, MODELS_EXT))
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
#if defined(SDCARD_YAML)
|
||||
if (path == MODELSLIST_YAML_PATH || path == RADIO_SETTINGS_YAML_PATH)
|
||||
return true;
|
||||
if (startsWith(path, MODELS_PATH) && endsWith(path, YAML_EXT)) return true;
|
||||
#endif
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user