refact: ADC, switches and keys
Add "hardware_defs" target to dump hardware defines from hal.h per target Fixed hal.h definitions for switches & ADC inputs Tools to generate hardware definitions from current hal.h generator: add support for EXTx and analog switches WiP Add generated header to hardware_defs target Add support for ADC input direction and index per GPIO port Incredible: it compiles Removed StdPeriph ADC driver Works on QX7 Works on TX16S (VBat missing) Switch driver using generated switches for stm32 targets Switch driver with generated switches for simu Use switch names from switch driver Fixed single conversion handling Fixed horus VBat reading Added switch name Fix warnings about bitfield offsets and GCC 4.4 This is caused by bitfields that cross type boundaries. In this particular case, it happens as the bitfield is not defined the same in `rtc_backup.cpp`. Switches has already been moved to generic driver Jitter measurement for each sample, not just for oversampled values Moved periph clock init to the ADC driver ADC & GPIOs. Add switchInit() to init pins Fix NV14 CMake Fix taranis target Fix NV14 (again) Model audio files: use new interface for switch index Fix X9-lite Fix simu headers Fix getSwitchName() Add support for ADC switches Fix switch warning YAML Test only switches which are defined Conversions tests for QX7 only on QX7 Fix X12S Fix function switch names Enable ADC periph clock before initialising channels NV14: offset inputs for the sticks & fix switches WiP: get rid of VSRCRAW and some more Simu shall use normal ADC driver fix x7 fix nv14 Fix 9x nav fix 212x64 fix xlite fix x9e fix simu lib fix unit tests fix x7 tests PWM stick values should be written directly into adcValues ... just like FlySky sticks. fix x12s fix nv14 Add some support for SPI ADC (only unit tests) Remove `jq` usage fix generate_yaml.py for newer libclang fix pot config fix stick names Some YAML generator improvements Max 16 Pots on COLORLCD Fix some source names Use 10 bits for switches to prevent overflow Removed horus constants for switches & ADC inputs Fix unit tests Fix curve edit Fix libsimulator Fix function switches (tpro) Refine ADC & analog API Moved hardware definitions scripts and templates into own dir cleanup API refine Fix unit tests Mixer: apply calibration only on required inputs Place ADC switches after all other ADC inputs Fix X12S Remove useless TR_POTS_VSRCRAW, TR_SW_VSRCRAW, and TR_VSRCRAW Cleanup redundant generated YAML parsers Fixes Boxer rebase Add boxer to generate-hw-defs.sh Obsolete LUA exports Add boxer ADC_DIRECTION Split generate_hw_defs.py into multiple files Some cleanup (+ LUA switches) Fix AXIS definitions Fixed translation strings declarations Some rebase fixes Remove some useless StdPeriph drivers fix: set pin mode to reset state on usart deinit fix: use canonical names for calibration data fix: ADC driver does not care about unconfigured inputs fix X12S ADC Add support for ADC conversion chaining Better X12S ADC implem Moved X12S ADC driver to HAL/LL Improve ADC driver separation Fixed taranis & nv14 Moved PWM gimbals to HAL/LL Removed useless TR_EXTRA_VSRCRAW Fixed include guards Small fixes Renamed control inputs Moved internal and external module pulse driver def to boards Move more things to the generic_stm32 board Remove STR_VMIXTRIMS Added analog labels Generate main control names Misuse labels / short labels for main controls Backward compatibility: sliders and legacy names New keys driver Let's get rid of StdPeriph headers in simu Add jinja2 to CI workflows Use `grep` instead of `sed` chore: add python jinja2 oto msys setup script Removed more static definitions and use dynamic ones instead Fixes X9E Fix x7 nav too 212 switch display Fix default sliders Removed NUM_STICKS 212 switch display working nicely Surface radio 'stick' replacements fix: switch, trim & rotary pin init Remove old key drivers Removed VKEYS Removed ETX_FOURCC Fixed SURFACE_NAME Removed TR_VSWITCHES & TR_TRIMS_SWITCHES Fix xpot switches Store calibrated analogs in physical order Use getSourceString in drawSource Implement missing YAML read/write Fix isSourceAvailableInInputs() Fix isSourceAvailable() Some surface fixes Fix CLI debug Ported colour UI of analog diagnostics to new ADC API Small fixes Better input mapping Minor tpro fixes Fix trims available Remove TX mode choice on surface radio Rename surface controls Channel order alignement Fix throttle warning Fix checkTrims() Fix pot config casting issue Fix IS_SWITCH_FS() Fixed input mapping Fix fswitch auto-switch Fixed storing / reading function switches in YAML Fix enableVBatBridge() / disableVBatBridge() Fix interesting mode conversion Fix sources issues Fix special funnction list Proper function switch handling 128 GUI improvements Fix compilation Boxer cosmetics 128 hardware screen cosmetic Fix TX12 switches More switches fixes Simplify CPU type handling Fix flash size Fixed page-up / page-down in libopenui
This commit is contained in:
committed by
Malte Langermann
parent
b6dd3a0ef8
commit
2b100e0eb5
@@ -247,7 +247,7 @@ void storageFlushCurrentModel()
|
||||
}
|
||||
|
||||
if (g_model.potsWarnMode == POTS_WARN_AUTO) {
|
||||
for (int i=0; i<NUM_POTS+NUM_SLIDERS; i++) {
|
||||
for (int i=0; i<MAX_POTS; i++) {
|
||||
if (g_model.potsWarnEnabled & (1 << i)) {
|
||||
SAVE_POT_POSITION(i);
|
||||
}
|
||||
|
||||
@@ -21,33 +21,17 @@ elseif(PCB STREQUAL X10)
|
||||
elseif(PCB STREQUAL NV14)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_nv14.cpp)
|
||||
elseif(PCB STREQUAL X7)
|
||||
if(PCBREV STREQUAL T12)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_t12.cpp)
|
||||
elseif(PCBREV STREQUAL TLITE)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_tlite.cpp)
|
||||
elseif(PCBREV STREQUAL TX12)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_tx12.cpp)
|
||||
elseif(PCBREV STREQUAL TX12MK2)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_tx12mk2.cpp)
|
||||
elseif(PCBREV STREQUAL BOXER)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_boxer.cpp)
|
||||
elseif(PCBREV STREQUAL ZORRO)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_zorro.cpp)
|
||||
elseif(PCBREV STREQUAL T8)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_t8.cpp)
|
||||
elseif(PCBREV STREQUAL TPRO)
|
||||
if(PCBREV STREQUAL TPRO)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_tpro.cpp)
|
||||
elseif(PCBREV STREQUAL LR3PRO)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_lr3pro.cpp)
|
||||
else()
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_x7.cpp)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_128x64.cpp)
|
||||
endif()
|
||||
elseif(PCB STREQUAL X9LITE)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_x9lite.cpp)
|
||||
elseif(PCB STREQUAL X9LITES)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_x9lites.cpp)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_128x64.cpp)
|
||||
elseif(PCB STREQUAL XLITE)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_xlite.cpp)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_128x64.cpp)
|
||||
elseif(PCB STREQUAL XLITES)
|
||||
set(YAML_GEN_OUTPUT storage/yaml/yaml_datastructs_xlites.cpp)
|
||||
elseif(PCB STREQUAL X9E)
|
||||
@@ -64,31 +48,29 @@ set(YAML_GEN_TEMPLATE ${RADIO_DIRECTORY}/util/yaml_parser.tmpl)
|
||||
SET(YAML_NODES "\"RadioData,ModelData,PartialModel\"")
|
||||
set(YAML_GEN_ARGS myeeprom.h ${YAML_GEN_TEMPLATE} ${YAML_NODES} -DYAML_GENERATOR)
|
||||
|
||||
get_property(flags DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY COMPILE_DEFINITIONS)
|
||||
foreach(flag ${flags})
|
||||
#message(STATUS "dir='${dir}'")
|
||||
set(YAML_GEN_ARGS ${YAML_GEN_ARGS} -D${flag})
|
||||
endforeach()
|
||||
|
||||
get_property(dirs DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
|
||||
foreach(dir ${dirs})
|
||||
#message(STATUS "dir='${dir}'")
|
||||
set(YAML_GEN_ARGS ${YAML_GEN_ARGS} -I${dir})
|
||||
endforeach()
|
||||
AddCompilerFlags(YAML_GEN_ARGS)
|
||||
|
||||
# Force to build 32 bit binaries (Fix for Apple Silicon M1 hosts)
|
||||
# TODO: find a way to detect APPLE & M1
|
||||
# set(YAML_GEN_ARGS ${YAML_GEN_ARGS} -m32)
|
||||
|
||||
set(YAML_GEN_ARGS ${YAML_GEN_ARGS} -Wno-inconsistent-missing-override)
|
||||
|
||||
#message(STATUS "YAML_GEN_ARGS=${YAML_GEN_ARGS}")
|
||||
set(YAML_GEN_ARGS ${YAML_GEN_ARGS}
|
||||
-Wno-inconsistent-missing-override
|
||||
-Wno-asm-operand-widths
|
||||
${SYSROOT_ARG})
|
||||
|
||||
add_custom_target(yaml_data
|
||||
WORKING_DIRECTORY ${RADIO_DIRECTORY}/src
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${YAML_GEN} ${YAML_GEN_ARGS} ${SYSROOT_ARG} > ${YAML_GEN_OUTPUT}
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${YAML_GEN} ${YAML_GEN_ARGS} > ${YAML_GEN_OUTPUT}
|
||||
DEPENDS ${RADIO_DIRECTORY}/src/datastructs.h
|
||||
${RADIO_DIRECTORY}/src/dataconstants.h
|
||||
${RADIO_DIRECTORY}/src/myeeprom.h
|
||||
${RADIO_DIRECTORY}/util/generate_yaml.py
|
||||
)
|
||||
|
||||
AddHWGenTarget(${HW_DESC_JSON} yaml_inputs yaml_inputs.inc)
|
||||
set(SRC ${SRC} ${CMAKE_CURRENT_BINARY_DIR}/yaml_inputs.inc)
|
||||
|
||||
# helper target for testing purposes
|
||||
add_custom_target(yaml_inputs DEPENDS ${HW_DESC_JSON} yaml_inputs.inc)
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
// Warning: this file must be kept in sync with the CMakeLists.txt
|
||||
// in the same directory.
|
||||
|
||||
#include "yaml_inputs.inc"
|
||||
#include "yaml_datastructs_funcs.cpp"
|
||||
|
||||
#if defined(PCBX12S)
|
||||
@@ -34,33 +35,17 @@
|
||||
#elif defined(PCBNV14)
|
||||
#include "yaml_datastructs_nv14.cpp"
|
||||
#elif defined(PCBX7)
|
||||
#if defined(RADIO_T12)
|
||||
#include "yaml_datastructs_t12.cpp"
|
||||
#elif defined(RADIO_TLITE)
|
||||
#include "yaml_datastructs_tlite.cpp"
|
||||
#elif defined(RADIO_TX12)
|
||||
#include "yaml_datastructs_tx12.cpp"
|
||||
#elif defined(RADIO_TX12MK2)
|
||||
#include "yaml_datastructs_tx12mk2.cpp"
|
||||
#elif defined(RADIO_BOXER)
|
||||
#include "yaml_datastructs_boxer.cpp"
|
||||
#elif defined(RADIO_ZORRO)
|
||||
#include "yaml_datastructs_zorro.cpp"
|
||||
#elif defined(RADIO_T8)
|
||||
#include "yaml_datastructs_t8.cpp"
|
||||
#elif defined(RADIO_TPRO)
|
||||
#if defined(RADIO_TPRO)
|
||||
#include "yaml_datastructs_tpro.cpp"
|
||||
#elif defined(RADIO_LR3PRO)
|
||||
#include "yaml_datastructs_lr3pro.cpp"
|
||||
#else
|
||||
#include "yaml_datastructs_x7.cpp"
|
||||
#include "yaml_datastructs_128x64.cpp"
|
||||
#endif
|
||||
#elif defined(PCBX9LITE) && !defined(PCBX9LITES)
|
||||
#include "yaml_datastructs_x9lite.cpp"
|
||||
#elif defined(PCBX9LITES)
|
||||
#include "yaml_datastructs_x9lites.cpp"
|
||||
#include "yaml_datastructs_128x64.cpp"
|
||||
#elif defined(PCBXLITE) && !defined(PCBXLITES)
|
||||
#include "yaml_datastructs_xlite.cpp"
|
||||
#include "yaml_datastructs_128x64.cpp"
|
||||
#elif defined(PCBXLITES)
|
||||
#include "yaml_datastructs_xlites.cpp"
|
||||
#elif defined(PCBX9E)
|
||||
|
||||
+26
-94
@@ -72,9 +72,7 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
@@ -102,50 +100,16 @@ const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_POT2, "POT2" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SE, "SE" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TrimT5, "TrimT5" },
|
||||
{ MIXSRC_TrimT6, "TrimT6" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
@@ -180,34 +144,6 @@ const struct YamlIdStr enum_SwashType[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SE0, "SE0" },
|
||||
{ SWSRC_SE1, "SE1" },
|
||||
{ SWSRC_SE2, "SE2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
@@ -318,24 +254,19 @@ static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 6, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "manuallyEdited", 1 ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_ARRAY("calib", 48, 12, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_SIGNED( "currModel", 8 ),
|
||||
YAML_UNSIGNED( "contrast", 8 ),
|
||||
@@ -402,14 +333,11 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("sticksConfig", 0, MAX_STICKS, struct_stickConfig, stick_name_valid),
|
||||
YAML_ARRAY("slidersConfig", 0, MAX_POTS, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 4, 8, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("switchConfig", 2, 32, struct_switchConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 8, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 144 ),
|
||||
YAML_PADDING( 144 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
@@ -469,8 +397,8 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "offset", 13, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
@@ -500,10 +428,9 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -528,9 +455,9 @@ static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "andsw", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
@@ -555,10 +482,10 @@ static const struct YamlNode struct_trim_t[] = {
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_ARRAY("trim", 16, 6, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
@@ -723,6 +650,11 @@ static const struct YamlNode struct_ScriptData[] = {
|
||||
YAML_ARRAY("inputs", 16, 6, union_ScriptDataInput, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_14_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
@@ -865,10 +797,10 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_ARRAY("flightModeData", 320, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
@@ -883,8 +815,8 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("trainerData", 40, struct_TrainerModuleData, NULL),
|
||||
YAML_ARRAY("scriptsData", 192, 7, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 24, 32, struct_string_24, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 8, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, struct_TelemetryScreenData, NULL),
|
||||
@@ -1,944 +0,0 @@
|
||||
// generated by generate_yaml.py
|
||||
|
||||
//
|
||||
// Enums first
|
||||
//
|
||||
|
||||
const struct YamlIdStr enum_BacklightMode[] = {
|
||||
{ e_backlight_mode_off, "backlight_mode_off" },
|
||||
{ e_backlight_mode_keys, "backlight_mode_keys" },
|
||||
{ e_backlight_mode_sticks, "backlight_mode_sticks" },
|
||||
{ e_backlight_mode_all, "backlight_mode_all" },
|
||||
{ e_backlight_mode_on, "backlight_mode_on" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_AntennaModes[] = {
|
||||
{ ANTENNA_MODE_INTERNAL, "MODE_INTERNAL" },
|
||||
{ ANTENNA_MODE_ASK, "MODE_ASK" },
|
||||
{ ANTENNA_MODE_PER_MODEL, "MODE_PER_MODEL" },
|
||||
{ ANTENNA_MODE_EXTERNAL, "MODE_EXTERNAL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModuleType[] = {
|
||||
{ MODULE_TYPE_NONE, "TYPE_NONE" },
|
||||
{ MODULE_TYPE_PPM, "TYPE_PPM" },
|
||||
{ MODULE_TYPE_XJT_PXX1, "TYPE_XJT_PXX1" },
|
||||
{ MODULE_TYPE_ISRM_PXX2, "TYPE_ISRM_PXX2" },
|
||||
{ MODULE_TYPE_DSM2, "TYPE_DSM2" },
|
||||
{ MODULE_TYPE_CROSSFIRE, "TYPE_CROSSFIRE" },
|
||||
{ MODULE_TYPE_MULTIMODULE, "TYPE_MULTIMODULE" },
|
||||
{ MODULE_TYPE_R9M_PXX1, "TYPE_R9M_PXX1" },
|
||||
{ MODULE_TYPE_R9M_PXX2, "TYPE_R9M_PXX2" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX1, "TYPE_R9M_LITE_PXX1" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX2, "TYPE_R9M_LITE_PXX2" },
|
||||
{ MODULE_TYPE_GHOST, "TYPE_GHOST" },
|
||||
{ MODULE_TYPE_R9M_LITE_PRO_PXX2, "TYPE_R9M_LITE_PRO_PXX2" },
|
||||
{ MODULE_TYPE_SBUS, "TYPE_SBUS" },
|
||||
{ MODULE_TYPE_XJT_LITE_PXX2, "TYPE_XJT_LITE_PXX2" },
|
||||
{ MODULE_TYPE_FLYSKY, "TYPE_FLYSKY" },
|
||||
{ MODULE_TYPE_LEMON_DSMP, "TYPE_LEMON_DSMP" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TrainerMultiplex[] = {
|
||||
{ TRAINER_OFF, "OFF" },
|
||||
{ TRAINER_ADD, "ADD" },
|
||||
{ TRAINER_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BeeperMode[] = {
|
||||
{ e_mode_quiet, "mode_quiet" },
|
||||
{ e_mode_alarms, "mode_alarms" },
|
||||
{ e_mode_nokeys, "mode_nokeys" },
|
||||
{ e_mode_all, "mode_all" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BluetoothModes[] = {
|
||||
{ BLUETOOTH_OFF, "OFF" },
|
||||
{ BLUETOOTH_TELEMETRY, "TELEMETRY" },
|
||||
{ BLUETOOTH_TRAINER, "TRAINER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_OVERRIDE_CHANNEL, "OVERRIDE_CHANNEL" },
|
||||
{ FUNC_TRAINER, "TRAINER" },
|
||||
{ FUNC_INSTANT_TRIM, "INSTANT_TRIM" },
|
||||
{ FUNC_RESET, "RESET" },
|
||||
{ FUNC_SET_TIMER, "SET_TIMER" },
|
||||
{ FUNC_ADJUST_GVAR, "ADJUST_GVAR" },
|
||||
{ FUNC_VOLUME, "VOLUME" },
|
||||
{ FUNC_SET_FAILSAFE, "SET_FAILSAFE" },
|
||||
{ FUNC_RANGECHECK, "RANGECHECK" },
|
||||
{ FUNC_BIND, "BIND" },
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
{ FUNC_HAPTIC, "HAPTIC" },
|
||||
{ FUNC_LOGS, "LOGS" },
|
||||
{ FUNC_BACKLIGHT, "BACKLIGHT" },
|
||||
{ FUNC_SCREENSHOT, "SCREENSHOT" },
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
{ TMRMODE_START, "START" },
|
||||
{ TMRMODE_THR, "THR" },
|
||||
{ TMRMODE_THR_REL, "THR_REL" },
|
||||
{ TMRMODE_THR_START, "THR_START" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
{ MLTPX_ADD, "ADD" },
|
||||
{ MLTPX_MUL, "MUL" },
|
||||
{ MLTPX_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_POT2, "POT2" },
|
||||
{ MIXSRC_POT3, "POT3" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SE, "SE" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SG, "SG" },
|
||||
{ MIXSRC_SH, "SH" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_NONE, "FUNC_NONE" },
|
||||
{ LS_FUNC_VEQUAL, "FUNC_VEQUAL" },
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
{ LS_FUNC_OR, "FUNC_OR" },
|
||||
{ LS_FUNC_XOR, "FUNC_XOR" },
|
||||
{ LS_FUNC_EDGE, "FUNC_EDGE" },
|
||||
{ LS_FUNC_EQUAL, "FUNC_EQUAL" },
|
||||
{ LS_FUNC_GREATER, "FUNC_GREATER" },
|
||||
{ LS_FUNC_LESS, "FUNC_LESS" },
|
||||
{ LS_FUNC_DIFFEGREATER, "FUNC_DIFFEGREATER" },
|
||||
{ LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" },
|
||||
{ LS_FUNC_TIMER, "FUNC_TIMER" },
|
||||
{ LS_FUNC_STICKY, "FUNC_STICKY" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwashType[] = {
|
||||
{ SWASH_TYPE_NONE, "TYPE_NONE" },
|
||||
{ SWASH_TYPE_120, "TYPE_120" },
|
||||
{ SWASH_TYPE_120X, "TYPE_120X" },
|
||||
{ SWASH_TYPE_140, "TYPE_140" },
|
||||
{ SWASH_TYPE_90, "TYPE_90" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SE0, "SE0" },
|
||||
{ SWSRC_SE1, "SE1" },
|
||||
{ SWSRC_SE2, "SE2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_SG0, "SG0" },
|
||||
{ SWSRC_SG1, "SG1" },
|
||||
{ SWSRC_SG2, "SG2" },
|
||||
{ SWSRC_SH0, "SH0" },
|
||||
{ SWSRC_SH1, "SH1" },
|
||||
{ SWSRC_SH2, "SH2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
{ SWSRC_RADIO_ACTIVITY, "RADIO_ACTIVITY" },
|
||||
{ SWSRC_OFF, "OFF" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_PotsWarnMode[] = {
|
||||
{ POTS_WARN_OFF, "WARN_OFF" },
|
||||
{ POTS_WARN_MANUAL, "WARN_MANUAL" },
|
||||
{ POTS_WARN_AUTO, "WARN_AUTO" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModelOverridableEnable[] = {
|
||||
{ OVERRIDE_GLOBAL, "GLOBAL" },
|
||||
{ OVERRIDE_OFF, "OFF" },
|
||||
{ OVERRIDE_ON, "ON" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_FailsafeModes[] = {
|
||||
{ FAILSAFE_NOT_SET, "NOT_SET" },
|
||||
{ FAILSAFE_HOLD, "HOLD" },
|
||||
{ FAILSAFE_CUSTOM, "CUSTOM" },
|
||||
{ FAILSAFE_NOPULSES, "NOPULSES" },
|
||||
{ FAILSAFE_RECEIVER, "RECEIVER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorFormula[] = {
|
||||
{ TELEM_FORMULA_ADD, "FORMULA_ADD" },
|
||||
{ TELEM_FORMULA_AVERAGE, "FORMULA_AVERAGE" },
|
||||
{ TELEM_FORMULA_MIN, "FORMULA_MIN" },
|
||||
{ TELEM_FORMULA_MAX, "FORMULA_MAX" },
|
||||
{ TELEM_FORMULA_MULTIPLY, "FORMULA_MULTIPLY" },
|
||||
{ TELEM_FORMULA_TOTALIZE, "FORMULA_TOTALIZE" },
|
||||
{ TELEM_FORMULA_CELL, "FORMULA_CELL" },
|
||||
{ TELEM_FORMULA_CONSUMPTION, "FORMULA_CONSUMPTION" },
|
||||
{ TELEM_FORMULA_DIST, "FORMULA_DIST" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorType[] = {
|
||||
{ TELEM_TYPE_CUSTOM, "TYPE_CUSTOM" },
|
||||
{ TELEM_TYPE_CALCULATED, "TYPE_CALCULATED" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickIfMode[] = {
|
||||
{ USBJOYS_JOYSTICK, "JOYSTICK" },
|
||||
{ USBJOYS_GAMEPAD, "GAMEPAD" },
|
||||
{ USBJOYS_MULTIAXIS, "MULTIAXIS" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickCh[] = {
|
||||
{ USBJOYS_CH_NONE, "CH_NONE" },
|
||||
{ USBJOYS_CH_BUTTON, "CH_BUTTON" },
|
||||
{ USBJOYS_CH_AXIS, "CH_AXIS" },
|
||||
{ USBJOYS_CH_SIM, "CH_SIM" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||
YAML_SIGNED( "mid", 16 ),
|
||||
YAML_SIGNED( "spanNeg", 16 ),
|
||||
YAML_SIGNED( "spanPos", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerMix[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "srcChn", 6 ),
|
||||
YAML_ENUM("mode", 2, enum_TrainerMultiplex),
|
||||
YAML_SIGNED( "studWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerData[] = {
|
||||
YAML_ARRAY("calib", 16, 4, struct_signed_16, NULL),
|
||||
YAML_ARRAY("mix", 16, 4, struct_TrainerMix, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_1[] = {
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_2[] = {
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_UNSIGNED( "mode", 8 ),
|
||||
YAML_UNSIGNED( "param", 8 ),
|
||||
YAML_SIGNED( "spare", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_SIGNED( "val2", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
YAML_STRUCT("play", 48, struct_anonymous_1, NULL),
|
||||
YAML_STRUCT("all", 64, struct_anonymous_2, NULL),
|
||||
YAML_STRUCT("clear", 64, struct_anonymous_3, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "manuallyEdited", 1 ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 7, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_SIGNED( "currModel", 8 ),
|
||||
YAML_UNSIGNED( "contrast", 8 ),
|
||||
YAML_UNSIGNED( "vBatWarn", 8 ),
|
||||
YAML_SIGNED( "txVoltageCalibration", 8 ),
|
||||
YAML_ENUM("backlightMode", 3, enum_BacklightMode),
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "fai", 1 ),
|
||||
YAML_SIGNED_CUST( "beepMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_UNSIGNED( "alarmsFlash", 1 ),
|
||||
YAML_UNSIGNED( "disableMemoryWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableAlarmWarning", 1 ),
|
||||
YAML_UNSIGNED( "stickMode", 2 ),
|
||||
YAML_SIGNED( "timezone", 5 ),
|
||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||
YAML_CUSTOM("telemetryBaudrate",r_telemetryBaudrate,nullptr),
|
||||
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||
YAML_SIGNED( "splashMode", 3 ),
|
||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_SIGNED( "switchesDelay", 8 ),
|
||||
YAML_UNSIGNED( "lightAutoOff", 8 ),
|
||||
YAML_UNSIGNED( "templateSetup", 8 ),
|
||||
YAML_SIGNED( "PPM_Multiplier", 8 ),
|
||||
YAML_SIGNED_CUST( "hapticLength", 8, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 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 ),
|
||||
YAML_SIGNED_CUST( "vBatMax", 8, r_vbat_max, w_vbat_max ),
|
||||
YAML_UNSIGNED( "backlightBright", 8 ),
|
||||
YAML_UNSIGNED( "globalTimer", 32 ),
|
||||
YAML_UNSIGNED( "bluetoothBaudrate", 4 ),
|
||||
YAML_ENUM("bluetoothMode", 4, enum_BluetoothModes),
|
||||
YAML_UNSIGNED( "countryCode", 2 ),
|
||||
YAML_SIGNED( "pwrOnSpeed", 3 ),
|
||||
YAML_SIGNED( "pwrOffSpeed", 3 ),
|
||||
YAML_CUSTOM("jitterFilter",r_jitterFilter,nullptr),
|
||||
YAML_UNSIGNED( "noJitterFilter", 1 ),
|
||||
YAML_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "disableRssiPoweroffAlarm", 1 ),
|
||||
YAML_UNSIGNED( "USBMode", 2 ),
|
||||
YAML_UNSIGNED( "jackMode", 2 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("ttsLanguage", 2),
|
||||
YAML_SIGNED_CUST( "beepVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "wavVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "backgroundVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioPitch", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 8, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 192 ),
|
||||
YAML_PADDING( 168 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
YAML_CUSTOM("rotEncDirection",r_rotEncDirection,nullptr),
|
||||
YAML_UNSIGNED( "rotEncMode", 2 ),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "radioGFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "radioTrainerDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelHeliDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelFMDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCurvesDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelGVDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelLSDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelSFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelTelemetryDisabled", 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelHeader[] = {
|
||||
YAML_STRING("name", 10),
|
||||
YAML_ARRAY("modelId", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TimerData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "start", 22 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED( "value", 22 ),
|
||||
YAML_ENUM("mode", 3, enum_TimerModes),
|
||||
YAML_UNSIGNED( "countdownBeep", 2 ),
|
||||
YAML_UNSIGNED( "minuteBeep", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 2 ),
|
||||
YAML_SIGNED( "countdownStart", 2 ),
|
||||
YAML_UNSIGNED( "showElapsed", 1 ),
|
||||
YAML_UNSIGNED( "extraHaptic", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "destCh", 5 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "carryTrim", 1 ),
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
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),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
YAML_UNSIGNED( "delayDown", 8 ),
|
||||
YAML_UNSIGNED( "speedUp", 8 ),
|
||||
YAML_UNSIGNED( "speedDown", 8 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
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_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_SIGNED( "curve", 8 ),
|
||||
YAML_STRING("name", 4),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "scale", 14 ),
|
||||
YAML_CUSTOM("carryTrim",r_carryTrim,nullptr),
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveHeader[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
YAML_UNSIGNED( "smooth", 1 ),
|
||||
YAML_SIGNED( "points", 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("func", 8, enum_LogicalSwitchesFunctions),
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_ENUM("type", 8, enum_SwashType),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED_CUST( "collectiveSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "aileronSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "elevatorSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "collectiveWeight", 8 ),
|
||||
YAML_SIGNED( "aileronWeight", 8 ),
|
||||
YAML_SIGNED( "elevatorWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_trim_t[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "value", 11 ),
|
||||
YAML_UNSIGNED( "mode", 5 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_GVarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("name", 3),
|
||||
YAML_UNSIGNED( "min", 12 ),
|
||||
YAML_UNSIGNED( "max", 12 ),
|
||||
YAML_UNSIGNED( "popup", 1 ),
|
||||
YAML_UNSIGNED( "prec", 1 ),
|
||||
YAML_UNSIGNED( "unit", 2 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_VarioData[] = {
|
||||
YAML_UNSIGNED_CUST( "source", 7, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_UNSIGNED( "centerSilent", 1 ),
|
||||
YAML_SIGNED( "centerMax", 8 ),
|
||||
YAML_SIGNED( "centerMin", 8 ),
|
||||
YAML_SIGNED( "min", 8 ),
|
||||
YAML_SIGNED( "max", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RssiAlarmData[] = {
|
||||
YAML_CUSTOM("disabled",r_rssiDisabled,nullptr),
|
||||
YAML_CUSTOM("warning",r_rssiWarning,nullptr),
|
||||
YAML_CUSTOM("critical",r_rssiCritical,nullptr),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RFAlarmData[] = {
|
||||
YAML_SIGNED( "warning", 8 ),
|
||||
YAML_SIGNED( "critical", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PpmModule[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "power", 2 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_SIGNED( "antennaMode", 2 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "noninverted", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "refreshRate", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_64[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_8[] = {
|
||||
YAML_UNSIGNED( "receivers", 7 ),
|
||||
YAML_UNSIGNED( "racingMode", 1 ),
|
||||
YAML_ARRAY("receiverName", 64, 3, struct_string_64, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_9[] = {
|
||||
YAML_ARRAY("rx_id", 8, 4, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 3 ),
|
||||
YAML_UNSIGNED( "rfPower", 1 ),
|
||||
YAML_UNSIGNED( "reserved", 4 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_10[] = {
|
||||
YAML_UNSIGNED( "emi", 2 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "phyMode", 3 ),
|
||||
YAML_UNSIGNED( "reserved", 2 ),
|
||||
YAML_UNSIGNED( "rfPower", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_11[] = {
|
||||
YAML_UNSIGNED( "raw12bits", 1 ),
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_12[] = {
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_13[] = {
|
||||
YAML_UNSIGNED( "flags", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_PpmModule, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("afhds3", 16, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("ghost", 8, struct_anonymous_11, NULL),
|
||||
YAML_STRUCT("crsf", 8, struct_anonymous_12, NULL),
|
||||
YAML_STRUCT("dsmp", 8, struct_anonymous_13, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 8, enum_ModuleType),
|
||||
YAML_CUSTOM("subType",r_modSubtype,w_modSubtype),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED_CUST( "channelsCount", 8, r_channelsCount, w_channelsCount ),
|
||||
YAML_ENUM("failsafeMode", 4, enum_FailsafeModes),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_UNION("mod", 200, union_anonymous_4_elmts, select_mod_type),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerModuleData[] = {
|
||||
YAML_UNSIGNED_CUST( "mode", 8, r_trainerMode, w_trainerMode ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput_elmts[] = {
|
||||
YAML_SIGNED( "value", 16 ),
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 16, union_ScriptDataInput_elmts, select_script_input),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ScriptData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("file", 6),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_ARRAY("inputs", 16, 6, union_ScriptDataInput, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_14_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_16, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_ENUM("formula", 8, enum_TelemetrySensorFormula),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_21[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_22[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_17_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_20, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_21, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_22, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_14_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_15_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_ENUM("type", 1, enum_TelemetrySensorType),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "unit", 6 ),
|
||||
YAML_UNSIGNED( "prec", 2 ),
|
||||
YAML_UNSIGNED( "autoOffset", 1 ),
|
||||
YAML_UNSIGNED( "filter", 1 ),
|
||||
YAML_UNSIGNED( "logs", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 1 ),
|
||||
YAML_UNSIGNED( "onlyPositive", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNION("cfg", 32, union_anonymous_17_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LineDataSource[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "val", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_LineDataSource, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScriptData[] = {
|
||||
YAML_STRING("file", 6),
|
||||
YAML_ARRAY("inputs", 16, 8, struct_signed_16, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_TelemetryScreenData_u_elmts[] = {
|
||||
YAML_ARRAY("bars", 48, 4, struct_FrSkyBarData, NULL),
|
||||
YAML_ARRAY("lines", 32, 4, struct_FrSkyLineData, NULL),
|
||||
YAML_STRUCT("script", 176, struct_TelemetryScriptData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_CUSTOM("type",r_tele_screen_type,w_tele_screen_type),
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_u_elmts, select_tele_screen_data),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_USBJoystickChData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("mode", 3, enum_USBJoystickCh),
|
||||
YAML_UNSIGNED( "inversion", 1 ),
|
||||
YAML_UNSIGNED( "param", 4 ),
|
||||
YAML_UNSIGNED( "btn_num", 5 ),
|
||||
YAML_UNSIGNED( "switch_npos", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_UNSIGNED( "telemetryProtocol", 3 ),
|
||||
YAML_UNSIGNED( "thrTrim", 1 ),
|
||||
YAML_UNSIGNED( "noGlobalFunctions", 1 ),
|
||||
YAML_UNSIGNED( "displayTrims", 2 ),
|
||||
YAML_UNSIGNED( "ignoreSensorIds", 1 ),
|
||||
YAML_SIGNED( "trimInc", 3 ),
|
||||
YAML_UNSIGNED( "disableThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "displayChecklist", 1 ),
|
||||
YAML_UNSIGNED( "extendedLimits", 1 ),
|
||||
YAML_UNSIGNED( "extendedTrims", 1 ),
|
||||
YAML_UNSIGNED( "throttleReversed", 1 ),
|
||||
YAML_UNSIGNED( "enableCustomThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableTelemetryWarning", 1 ),
|
||||
YAML_UNSIGNED( "showInstanceIds", 1 ),
|
||||
YAML_PADDING( 5 ),
|
||||
YAML_SIGNED( "customThrottleWarningPosition", 8 ),
|
||||
YAML_UNSIGNED( "beepANACenter", 16 ),
|
||||
YAML_ARRAY("mixData", 160, 64, struct_MixData, NULL),
|
||||
YAML_ARRAY("limitData", 88, 32, struct_LimitData, NULL),
|
||||
YAML_ARRAY("expoData", 136, 64, struct_ExpoData, NULL),
|
||||
YAML_ARRAY("curves", 32, 32, struct_CurveHeader, NULL),
|
||||
YAML_ARRAY("points", 8, 512, struct_signed_8, NULL),
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_STRUCT("rssiAlarms", 0, struct_RssiAlarmData, NULL),
|
||||
YAML_STRUCT("rfAlarms", 16, struct_RFAlarmData, NULL),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_ENUM("potsWarnMode", 2, enum_PotsWarnMode),
|
||||
YAML_ENUM("jitterFilter", 2, enum_ModelOverridableEnable),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ARRAY("moduleData", 232, 2, struct_ModuleData, NULL),
|
||||
YAML_ARRAY("failsafeChannels", 16, 32, struct_signed_16, NULL),
|
||||
YAML_STRUCT("trainerData", 40, struct_TrainerModuleData, NULL),
|
||||
YAML_ARRAY("scriptsData", 192, 7, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 24, 32, struct_string_24, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 3, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, struct_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_UNSIGNED( "usbJoystickExtMode", 1 ),
|
||||
YAML_ENUM("usbJoystickIfMode", 3, enum_USBJoystickIfMode),
|
||||
YAML_UNSIGNED( "usbJoystickCircularCut", 4 ),
|
||||
YAML_ARRAY("usbJoystickCh", 16, 26, struct_USBJoystickChData, NULL),
|
||||
YAML_ENUM("radioGFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("radioTrainerDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelHeliDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelFMDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCurvesDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelGVDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelLSDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelSFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCustomScriptsDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelTelemetryDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 29
|
||||
|
||||
static const struct YamlNode __RadioData_root_node = YAML_ROOT( struct_RadioData );
|
||||
|
||||
const YamlNode* get_radiodata_nodes()
|
||||
{
|
||||
return &__RadioData_root_node;
|
||||
}
|
||||
static const struct YamlNode __ModelData_root_node = YAML_ROOT( struct_ModelData );
|
||||
|
||||
const YamlNode* get_modeldata_nodes()
|
||||
{
|
||||
return &__ModelData_root_node;
|
||||
}
|
||||
static const struct YamlNode __PartialModel_root_node = YAML_ROOT( struct_PartialModel );
|
||||
|
||||
const YamlNode* get_partialmodel_nodes()
|
||||
{
|
||||
return &__PartialModel_root_node;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,13 @@
|
||||
#include "yaml_tree_walker.h"
|
||||
|
||||
#include "pulses/multi.h"
|
||||
#include "switches.h"
|
||||
#include "analogs.h"
|
||||
#include "stamp.h"
|
||||
|
||||
#include "hal/switch_driver.h"
|
||||
#include "hal/adc_driver.h"
|
||||
|
||||
//
|
||||
// WARNING:
|
||||
// ========
|
||||
@@ -41,25 +46,6 @@ static inline void check_yaml_funcs()
|
||||
static_assert(offsetof(ModuleData, ppm) == 4,"");
|
||||
check_size<ModuleData, 29>();
|
||||
static_assert(MAX_GVARS == 9,"");
|
||||
#if defined(PCBHORUS)
|
||||
static_assert(offsetof(FlightModeData, gvars) == 26,"");
|
||||
check_size<FlightModeData, 44>();
|
||||
check_size<CustomFunctionData, 9>();
|
||||
#elif defined(PCBNV14)
|
||||
static_assert(offsetof(FlightModeData, gvars) == 22,"");
|
||||
check_size<FlightModeData, 40>();
|
||||
check_size<CustomFunctionData, 9>();
|
||||
#elif defined(PCBX7) || defined(PCBXLITE) || defined(PCBX9LITE)
|
||||
static_assert(offsetof(FlightModeData, gvars) == 18,"");
|
||||
check_size<FlightModeData, 36>();
|
||||
check_size<CustomFunctionData, 11>();
|
||||
check_size<TelemetryScreenData, 24>();
|
||||
#else
|
||||
static_assert(offsetof(FlightModeData, gvars) == 22,"");
|
||||
check_size<FlightModeData, 40>();
|
||||
check_size<CustomFunctionData, 11>();
|
||||
check_size<TelemetryScreenData, 24>();
|
||||
#endif
|
||||
}
|
||||
|
||||
static bool w_semver(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
@@ -120,6 +106,25 @@ bool in_write_weight(const YamlNode* node, uint32_t val, yaml_writer_func wf,
|
||||
return wf(opaque, s, strlen(s));
|
||||
}
|
||||
|
||||
static int _legacy_input_idx(const char* val, uint8_t val_len)
|
||||
{
|
||||
for (uint8_t i = 0; i < DIM(_legacy_inputs); i++){
|
||||
if (!strncmp(_legacy_inputs[i].legacy, val, val_len))
|
||||
return i;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int _legacy_mix_src(const char* val, uint8_t val_len)
|
||||
{
|
||||
auto idx = _legacy_input_idx(val, val_len);
|
||||
if (idx >= 0)
|
||||
return _legacy_inputs[idx].src_raw;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
extern const struct YamlIdStr enum_MixSources[];
|
||||
|
||||
// sources: parse/output
|
||||
@@ -132,6 +137,7 @@ extern const struct YamlIdStr enum_MixSources[];
|
||||
//
|
||||
static uint32_t r_mixSrcRaw(const YamlNode* node, const char* val, uint8_t val_len)
|
||||
{
|
||||
// TODO: parse switch name as well
|
||||
if (val_len > 0 && val[0] == 'I') {
|
||||
return yaml_str2uint(val+1, val_len-1) + MIXSRC_FIRST_INPUT;
|
||||
} else if (val_len > 4 &&
|
||||
@@ -208,8 +214,40 @@ static uint32_t r_mixSrcRaw(const YamlNode* node, const char* val, uint8_t val_l
|
||||
|
||||
// parse int and ignore closing ')'
|
||||
return yaml_str2uint(val, val_len) * 3 + sign + MIXSRC_FIRST_TELEM;
|
||||
|
||||
} else if (val_len > 3 &&
|
||||
val[0] == 'C' &&
|
||||
val[1] == 'Y' &&
|
||||
val[2] == 'C' &&
|
||||
val[3] >= '1' &&
|
||||
val[3] <= '3') {
|
||||
|
||||
return MIXSRC_FIRST_HELI + (val[3] - '1');
|
||||
|
||||
} else if (val_len > 1 &&
|
||||
val[0] == 'T' &&
|
||||
val[1] >= '1' &&
|
||||
val[1] <= '9') {
|
||||
return yaml_str2uint(val + 1, val_len - 1) + MIXSRC_FIRST_TRIM - 1;
|
||||
}
|
||||
|
||||
auto idx = analogLookupCanonicalIdx(ADC_INPUT_MAIN, val, val_len);
|
||||
if (idx >= 0) return idx + MIXSRC_FIRST_STICK;
|
||||
|
||||
idx = analogLookupCanonicalIdx(ADC_INPUT_POT, val, val_len);
|
||||
if (idx >= 0) return idx + MIXSRC_FIRST_POT;
|
||||
|
||||
#if MAX_AXIS > 0
|
||||
idx = analogLookupCanonicalIdx(ADC_INPUT_AXIS, val, val_len);
|
||||
if (idx >= 0) return idx + MIXSRC_FIRST_POT;
|
||||
#endif
|
||||
|
||||
idx = switchLookupIdx(val, val_len);
|
||||
if (idx >= 0) return idx + MIXSRC_FIRST_SWITCH;
|
||||
|
||||
idx = _legacy_mix_src(val, val_len);
|
||||
if (idx >= 0) return idx;
|
||||
|
||||
return yaml_parse_enum(enum_MixSources, val, val_len);
|
||||
}
|
||||
|
||||
@@ -228,8 +266,11 @@ static bool w_mixSrcRaw(const YamlNode* node, uint32_t val, yaml_writer_func wf,
|
||||
{
|
||||
const char* str = nullptr;
|
||||
|
||||
if (val >= MIXSRC_FIRST_INPUT
|
||||
&& val <= MIXSRC_LAST_INPUT) {
|
||||
if (val == MIXSRC_NONE) {
|
||||
|
||||
return wf(opaque, "NONE", 4);
|
||||
|
||||
} else if (val <= MIXSRC_LAST_INPUT) {
|
||||
|
||||
if (!wf(opaque, "I", 1))
|
||||
return false;
|
||||
@@ -237,8 +278,7 @@ static bool w_mixSrcRaw(const YamlNode* node, uint32_t val, yaml_writer_func wf,
|
||||
str = yaml_unsigned2str(val - MIXSRC_FIRST_INPUT);
|
||||
}
|
||||
#if defined(LUA_INPUTS)
|
||||
else if (val >= MIXSRC_FIRST_LUA
|
||||
&& val <= MIXSRC_LAST_LUA) {
|
||||
else if (val <= MIXSRC_LAST_LUA) {
|
||||
|
||||
val -= MIXSRC_FIRST_LUA;
|
||||
uint32_t script = val / MAX_SCRIPT_OUTPUTS;
|
||||
@@ -254,6 +294,31 @@ static bool w_mixSrcRaw(const YamlNode* node, uint32_t val, yaml_writer_func wf,
|
||||
str = closing_parenthesis;
|
||||
}
|
||||
#endif
|
||||
else if (val <= MIXSRC_LAST_STICK) {
|
||||
str = analogGetCanonicalName(ADC_INPUT_MAIN, val - MIXSRC_FIRST_STICK);
|
||||
}
|
||||
else if (val <= MIXSRC_LAST_POT) {
|
||||
str = analogGetCanonicalName(ADC_INPUT_POT, val - MIXSRC_FIRST_POT);
|
||||
}
|
||||
#if MAX_AXIS > 0
|
||||
else if (val <= MIXSRC_LAST_AXIS) {
|
||||
str = analogGetCanonicalName(ADC_INPUT_AXIS, val - MIXSRC_FIRST_AXIS);
|
||||
}
|
||||
#endif
|
||||
else if (val >= MIXSRC_FIRST_HELI
|
||||
&& val <= MIXSRC_LAST_HELI) {
|
||||
if (!wf(opaque, "CYC", 3)) return false;
|
||||
str = yaml_unsigned2str(val - MIXSRC_FIRST_HELI + 1);
|
||||
}
|
||||
else if (val >= MIXSRC_FIRST_TRIM
|
||||
&& val <= MIXSRC_LAST_TRIM) {
|
||||
if (!wf(opaque, "T", 1)) return false;
|
||||
str = yaml_unsigned2str(val - MIXSRC_FIRST_TRIM + 1);
|
||||
}
|
||||
else if (val >= MIXSRC_FIRST_SWITCH
|
||||
&& val <= MIXSRC_LAST_SWITCH) {
|
||||
str = switchGetCanonicalName(val - MIXSRC_FIRST_SWITCH);
|
||||
}
|
||||
else if (val >= MIXSRC_FIRST_LOGICAL_SWITCH
|
||||
&& val <= MIXSRC_LAST_LOGICAL_SWITCH) {
|
||||
|
||||
@@ -517,8 +582,11 @@ static uint32_t r_calib(void* user, const char* val, uint8_t val_len)
|
||||
{
|
||||
(void)user;
|
||||
|
||||
uint32_t sw = yaml_parse_enum(enum_MixSources, val, val_len);
|
||||
if (sw >= MIXSRC_Rud) return sw - MIXSRC_Rud;
|
||||
int idx = adcGetInputIdx(val, val_len);
|
||||
if (idx >= 0) return idx;
|
||||
|
||||
idx = _legacy_input_idx(val, val_len);
|
||||
if (idx >= 0) return idx;
|
||||
|
||||
// detect invalid values
|
||||
if (val_len == 0 || (val[0] < '0') || (val[0] > '9')) {
|
||||
@@ -533,18 +601,102 @@ static bool w_calib(void* user, yaml_writer_func wf, void* opaque)
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts();
|
||||
|
||||
const char* str =
|
||||
yaml_output_enum(idx + MIXSRC_Rud, enum_MixSources);
|
||||
const char* str = adcGetInputName(idx);
|
||||
return str ? wf(opaque, str, strlen(str)) : true;
|
||||
}
|
||||
|
||||
static void _read_analog_name(uint8_t type, void* user, uint8_t* data,
|
||||
uint32_t bitoffs, const char* val,
|
||||
uint8_t val_len)
|
||||
{
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts(1);
|
||||
analogSetCustomLabel(type, idx, val, val_len);
|
||||
}
|
||||
|
||||
static bool _write_analog_name(uint8_t type, void* user, uint8_t* data,
|
||||
uint32_t bitoffs, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts(1);
|
||||
|
||||
const char* name = analogGetCustomLabel(ADC_INPUT_MAIN, idx);
|
||||
if (!wf(opaque, "\"", 1)) return false;
|
||||
if (!wf(opaque, name, strlen(name))) return false;
|
||||
return wf(opaque, "\"", 1);
|
||||
}
|
||||
|
||||
static void r_stick_name(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
const char* val, uint8_t val_len)
|
||||
{
|
||||
_read_analog_name(ADC_INPUT_MAIN, user, data, bitoffs, val, val_len);
|
||||
}
|
||||
|
||||
static bool w_stick_name(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
return _write_analog_name(ADC_INPUT_MAIN, user, data, bitoffs, wf, opaque);
|
||||
}
|
||||
|
||||
static bool stick_name_valid(void* user, uint8_t* data, uint32_t bitoffs)
|
||||
{
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts();
|
||||
return analogHasCustomLabel(ADC_INPUT_MAIN, idx);
|
||||
}
|
||||
|
||||
static const struct YamlNode struct_stickConfig[] = {
|
||||
YAML_IDX,
|
||||
YAML_CUSTOM( "name", r_stick_name, w_stick_name),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
static uint32_t slider_read(void* user, const char* val, uint8_t val_len)
|
||||
{
|
||||
(void)user;
|
||||
auto idx = _legacy_mix_src(val, val_len);
|
||||
if (idx >= 0) return idx - MIXSRC_FIRST_POT;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static const struct YamlIdStr enum_SliderConfig[] = {
|
||||
{ POT_NONE, "none" },
|
||||
{ POT_SLIDER_WITH_DETENT, "with_detent" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static void sl_type_read(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
const char* val, uint8_t val_len)
|
||||
{
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts(1);
|
||||
|
||||
bitoffs += POT_CFG_BITS * idx;
|
||||
data += bitoffs >> 3UL;
|
||||
bitoffs &= 7;
|
||||
|
||||
auto cfg = yaml_parse_enum(enum_SliderConfig, val, val_len);
|
||||
yaml_put_bits(data, cfg, bitoffs, POT_CFG_BITS);
|
||||
}
|
||||
|
||||
static void sl_name_read(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
const char* val, uint8_t val_len)
|
||||
{
|
||||
_read_analog_name(ADC_INPUT_POT, user, data, bitoffs, val, val_len);
|
||||
}
|
||||
|
||||
static const struct YamlNode struct_sliderConfig[] = {
|
||||
YAML_IDX_CUST( "sl", slider_read, nullptr ),
|
||||
YAML_CUSTOM( "type", sl_type_read, nullptr ),
|
||||
YAML_CUSTOM( "name", sl_name_read, nullptr ),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
static uint32_t sw_read(void* user, const char* val, uint8_t val_len)
|
||||
{
|
||||
(void)user;
|
||||
uint32_t sw = yaml_parse_enum(enum_MixSources, val, val_len);
|
||||
if (sw >= MIXSRC_FIRST_SWITCH) return sw - MIXSRC_FIRST_SWITCH;
|
||||
|
||||
return -1;
|
||||
return switchLookupIdx(val, val_len);
|
||||
}
|
||||
|
||||
bool sw_write(void* user, yaml_writer_func wf, void* opaque)
|
||||
@@ -552,65 +704,18 @@ bool sw_write(void* user, yaml_writer_func wf, void* opaque)
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts();
|
||||
|
||||
const char* str =
|
||||
yaml_output_enum(idx + MIXSRC_FIRST_SWITCH, enum_MixSources);
|
||||
const char* str = switchGetCanonicalName(idx);
|
||||
return str ? wf(opaque, str, strlen(str)) : true;
|
||||
}
|
||||
|
||||
static void r_stick_name(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
const char* val, uint8_t val_len)
|
||||
{
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts(1);
|
||||
if (idx >= NUM_STICKS) return;
|
||||
|
||||
data -= offsetof(RadioData, switchConfig);
|
||||
RadioData* rd = reinterpret_cast<RadioData*>(data);
|
||||
strncpy(rd->anaNames[idx], val, std::min<uint8_t>(val_len, LEN_ANA_NAME));
|
||||
}
|
||||
|
||||
static bool w_stick_name(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts(1);
|
||||
|
||||
data -= offsetof(RadioData, switchConfig);
|
||||
RadioData* rd = reinterpret_cast<RadioData*>(data);
|
||||
if (!wf(opaque, "\"", 1)) return false;
|
||||
if (!wf(opaque, rd->anaNames[idx],
|
||||
strnlen(rd->anaNames[idx], LEN_ANA_NAME)))
|
||||
return false;
|
||||
return wf(opaque, "\"", 1);
|
||||
}
|
||||
|
||||
static bool stick_name_valid(void* user, uint8_t* data, uint32_t bitoffs)
|
||||
{
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts();
|
||||
RadioData* rd = reinterpret_cast<RadioData*>(data);
|
||||
return rd->anaNames[idx][0] != '\0';
|
||||
}
|
||||
|
||||
static const struct YamlNode struct_sticksConfig[] = {
|
||||
YAML_IDX,
|
||||
YAML_CUSTOM( "name", r_stick_name, w_stick_name),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
static void sw_name_read(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
const char* val, uint8_t val_len)
|
||||
{
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts(1);
|
||||
|
||||
// data / bitoffs already incremented
|
||||
data -= ((idx + 1) * 2) / 8;
|
||||
data -= offsetof(RadioData, switchConfig);
|
||||
|
||||
RadioData* rd = reinterpret_cast<RadioData*>(data);
|
||||
strncpy(rd->switchNames[idx], val,
|
||||
std::min<uint8_t>(val_len, LEN_SWITCH_NAME));
|
||||
switchSetCustomName(idx, val, val_len);
|
||||
}
|
||||
|
||||
static bool sw_name_write(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
@@ -619,12 +724,8 @@ static bool sw_name_write(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts(1);
|
||||
|
||||
// data / bitoffs already incremented
|
||||
data -= ((idx + 1) * 2) / 8;
|
||||
data -= offsetof(RadioData, switchConfig);
|
||||
|
||||
RadioData* rd = reinterpret_cast<RadioData*>(data);
|
||||
const char* str = rd->switchNames[idx];
|
||||
const char* str = switchGetCustomName(idx);
|
||||
if (!wf(opaque, "\"", 1)) return false;
|
||||
if (!wf(opaque, str, strnlen(str, LEN_SWITCH_NAME)))
|
||||
return false;
|
||||
@@ -649,8 +750,12 @@ static const struct YamlNode struct_switchConfig[] = {
|
||||
static uint32_t pot_read(void* user, const char* val, uint8_t val_len)
|
||||
{
|
||||
(void)user;
|
||||
uint32_t pot = yaml_parse_enum(enum_MixSources, val, val_len);
|
||||
if (pot >= MIXSRC_FIRST_POT) return pot - MIXSRC_FIRST_POT;
|
||||
auto idx = analogLookupPhysicalIdx(ADC_INPUT_POT, val, val_len);
|
||||
if (idx >= 0) return idx;
|
||||
|
||||
idx = _legacy_mix_src(val, val_len);
|
||||
if (idx >= MIXSRC_FIRST_POT && idx <= MIXSRC_LAST_POT)
|
||||
return idx - MIXSRC_FIRST_POT;
|
||||
|
||||
return -1;
|
||||
}
|
||||
@@ -660,42 +765,20 @@ static bool pot_write(void* user, yaml_writer_func wf, void* opaque)
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts();
|
||||
|
||||
const char* str = yaml_output_enum(idx + MIXSRC_FIRST_POT, enum_MixSources);
|
||||
const char* str = analogGetPhysicalName(ADC_INPUT_POT, idx);
|
||||
return str ? wf(opaque, str, strlen(str)) : true;
|
||||
}
|
||||
|
||||
static void pot_name_read(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
const char* val, uint8_t val_len)
|
||||
{
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts(1);
|
||||
|
||||
// data / bitoffs already incremented
|
||||
data -= ((idx + 1) * 2) / 8;
|
||||
data -= offsetof(RadioData, potsConfig);
|
||||
|
||||
RadioData* rd = reinterpret_cast<RadioData*>(data);
|
||||
idx += NUM_STICKS;
|
||||
strncpy(rd->anaNames[idx], val, std::min<uint8_t>(val_len, LEN_ANA_NAME));
|
||||
_read_analog_name(ADC_INPUT_POT, user, data, bitoffs, val, val_len);
|
||||
}
|
||||
|
||||
static bool pot_name_write(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts(1);
|
||||
|
||||
// data / bitoffs already incremented
|
||||
data -= ((idx + 1) * 2) / 8;
|
||||
data -= offsetof(RadioData, potsConfig);
|
||||
|
||||
RadioData* rd = reinterpret_cast<RadioData*>(data);
|
||||
idx += NUM_STICKS;
|
||||
const char* str = rd->anaNames[idx];
|
||||
if (!wf(opaque, "\"", 1)) return false;
|
||||
if (!wf(opaque, str, strnlen(str, LEN_ANA_NAME)))
|
||||
return false;
|
||||
return wf(opaque, "\"", 1);
|
||||
return _write_analog_name(ADC_INPUT_POT, user, data, bitoffs, wf, opaque);
|
||||
}
|
||||
|
||||
static const struct YamlIdStr enum_PotConfig[] = {
|
||||
@@ -703,100 +786,17 @@ static const struct YamlIdStr enum_PotConfig[] = {
|
||||
{ POT_WITH_DETENT, "with_detent" },
|
||||
{ POT_MULTIPOS_SWITCH, "multipos_switch" },
|
||||
{ POT_WITHOUT_DETENT, "without_detent" },
|
||||
{ POT_SLIDER_WITH_DETENT, "slider" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static const struct YamlNode struct_potConfig[] = {
|
||||
YAML_IDX_CUST( "pot", pot_read, pot_write ),
|
||||
YAML_ENUM( "type", 2, enum_PotConfig),
|
||||
YAML_ENUM( "type", POT_CFG_BITS, enum_PotConfig),
|
||||
YAML_CUSTOM( "name", pot_name_read, pot_name_write),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
static uint32_t slider_read(void* user, const char* val, uint8_t val_len)
|
||||
{
|
||||
(void)user;
|
||||
uint32_t sl = yaml_parse_enum(enum_MixSources, val, val_len);
|
||||
if (sl >= MIXSRC_FIRST_SLIDER) return sl - MIXSRC_FIRST_SLIDER;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
static bool slider_write(void* user, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts();
|
||||
|
||||
const char* str =
|
||||
yaml_output_enum(idx + MIXSRC_FIRST_SLIDER, enum_MixSources);
|
||||
return str ? wf(opaque, str, strlen(str)) : true;
|
||||
}
|
||||
|
||||
static void sl_name_read(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
const char* val, uint8_t val_len)
|
||||
{
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts(1);
|
||||
|
||||
// data / bitoffs already incremented
|
||||
#if defined(PCBTARANIS)
|
||||
// Please note:
|
||||
// slidersConfig is defined as a bit-field member,
|
||||
// so let's take the next field and subtract 1
|
||||
//
|
||||
data -= (idx + 4 /* bitsize previous field (auxSerialMode) */ + 1) / 8;
|
||||
data -= offsetof(RadioData, potsConfig) - 1;
|
||||
#else
|
||||
data -= (idx + 1) / 8;
|
||||
data -= offsetof(RadioData, slidersConfig);
|
||||
#endif
|
||||
|
||||
RadioData* rd = reinterpret_cast<RadioData*>(data);
|
||||
idx += NUM_STICKS + STORAGE_NUM_POTS;
|
||||
strncpy(rd->anaNames[idx], val, std::min<uint8_t>(val_len, LEN_ANA_NAME));
|
||||
}
|
||||
|
||||
static bool sl_name_write(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
auto tw = reinterpret_cast<YamlTreeWalker*>(user);
|
||||
uint16_t idx = tw->getElmts(1);
|
||||
|
||||
// data / bitoffs already incremented
|
||||
#if defined(PCBTARANIS)
|
||||
// Please note:
|
||||
// slidersConfig is defined as a bit-field member,
|
||||
// so let's take the next field and subtract 1
|
||||
//
|
||||
data -= (idx + 4 /* bitsize previous field (auxSerialMode) */ + 1) / 8;
|
||||
data -= offsetof(RadioData, potsConfig) - 1;
|
||||
#else
|
||||
data -= (idx + 1) / 8;
|
||||
data -= offsetof(RadioData, slidersConfig);
|
||||
#endif
|
||||
|
||||
RadioData* rd = reinterpret_cast<RadioData*>(data);
|
||||
idx += NUM_STICKS + STORAGE_NUM_POTS;
|
||||
const char* str = rd->anaNames[idx];
|
||||
if (!wf(opaque, "\"", 1)) return false;
|
||||
if (!wf(opaque, str, strnlen(str, LEN_ANA_NAME)))
|
||||
return false;
|
||||
return wf(opaque, "\"", 1);
|
||||
}
|
||||
|
||||
static const struct YamlIdStr enum_SliderConfig[] = {
|
||||
{ SLIDER_NONE, "none" },
|
||||
{ SLIDER_WITH_DETENT, "with_detent" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static const struct YamlNode struct_sliderConfig[] = {
|
||||
YAML_IDX_CUST( "sl", slider_read, slider_write ),
|
||||
YAML_ENUM( "type", 1, enum_SliderConfig),
|
||||
YAML_CUSTOM( "name", sl_name_read, sl_name_write),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
extern const struct YamlIdStr enum_SwitchSources[];
|
||||
|
||||
static uint32_t r_swtchSrc(const YamlNode* node, const char* val, uint8_t val_len)
|
||||
@@ -809,23 +809,46 @@ static uint32_t r_swtchSrc(const YamlNode* node, const char* val, uint8_t val_le
|
||||
val_len--;
|
||||
}
|
||||
|
||||
if (val_len >= 2
|
||||
&& val[0] == 'L'
|
||||
&& (val[1] >= '0' && val[1] <= '9')) {
|
||||
if (val_len > 3 && val[0] == 'S' && val[1] >= 'W'
|
||||
&& val[2] >= '0' && val[2] <= '9'
|
||||
&& val[3] >= '0' && val[2] <= '2') {
|
||||
|
||||
ival = SWSRC_FIRST_LOGICAL_SWITCH + yaml_str2int(val+1, val_len-1) - 1;
|
||||
ival = switchLookupIdx(val, val_len - 1) * 3;
|
||||
ival += yaml_str2int(val + 3, val_len - 2);
|
||||
ival += SWSRC_FIRST_SWITCH;
|
||||
|
||||
} else if (val_len > 2 && val[0] == 'S'
|
||||
&& val[1] >= 'A' && val[1] <= 'Z'
|
||||
&& val[2] >= '0' && val[2] <= '2') {
|
||||
|
||||
ival = switchLookupIdx(val, val_len - 1) * 3;
|
||||
ival += yaml_str2int(val + 2, val_len - 2);
|
||||
ival += SWSRC_FIRST_SWITCH;
|
||||
|
||||
}
|
||||
#if NUM_XPOTS > 0
|
||||
else if (val_len > 3
|
||||
&& val[0] == '6'
|
||||
&& val[1] == 'P'
|
||||
&& (val[2] >= '0' && val[2] <= '9')
|
||||
&& (val[3] >= '0' && val[3] < (XPOTS_MULTIPOS_COUNT + '0'))) {
|
||||
|
||||
ival = (val[2] - '0') * XPOTS_MULTIPOS_COUNT + (val[3] - '0')
|
||||
+ SWSRC_FIRST_MULTIPOS_SWITCH;
|
||||
ival = (val[2] - '0') * XPOTS_MULTIPOS_COUNT + (val[3] - '0')
|
||||
+ SWSRC_FIRST_MULTIPOS_SWITCH;
|
||||
}
|
||||
else if (val_len > 3
|
||||
&& val[0] == 'T' && val[1] == 'R'
|
||||
&& val[2] >= '1' && val[2] <= '9') {
|
||||
|
||||
ival = SWSRC_FIRST_TRIM + yaml_str2int(val + 2, val_len - 3) * 2;
|
||||
if (val[val_len - 1] == '+') ival++;
|
||||
|
||||
}
|
||||
else if (val_len >= 2
|
||||
&& val[0] == 'L'
|
||||
&& (val[1] >= '0' && val[1] <= '9')) {
|
||||
|
||||
ival = SWSRC_FIRST_LOGICAL_SWITCH + yaml_str2int(val+1, val_len-1) - 1;
|
||||
}
|
||||
#endif
|
||||
else if (val_len == 3
|
||||
&& val[0] == 'F'
|
||||
&& val[1] == 'M'
|
||||
@@ -856,46 +879,60 @@ static bool w_swtchSrc_unquoted(const YamlNode* node, uint32_t val,
|
||||
}
|
||||
|
||||
const char* str = NULL;
|
||||
if (sval >= SWSRC_FIRST_LOGICAL_SWITCH
|
||||
&& sval <= SWSRC_LAST_LOGICAL_SWITCH) {
|
||||
|
||||
wf(opaque, "L", 1);
|
||||
str = yaml_unsigned2str(sval - SWSRC_FIRST_LOGICAL_SWITCH + 1);
|
||||
return wf(opaque,str, strlen(str));
|
||||
}
|
||||
#if NUM_XPOTS > 0
|
||||
else if (sval >= SWSRC_FIRST_MULTIPOS_SWITCH
|
||||
&& sval <= SWSRC_LAST_MULTIPOS_SWITCH) {
|
||||
|
||||
wf(opaque, "6P", 2);
|
||||
|
||||
// pot #: start with 6P1
|
||||
sval -= SWSRC_FIRST_MULTIPOS_SWITCH;
|
||||
str = yaml_unsigned2str(sval / XPOTS_MULTIPOS_COUNT);
|
||||
wf(opaque,str, strlen(str));
|
||||
|
||||
// position
|
||||
str = yaml_unsigned2str(sval % XPOTS_MULTIPOS_COUNT);
|
||||
return wf(opaque,str, strlen(str));
|
||||
}
|
||||
#endif
|
||||
else if (sval >= SWSRC_FIRST_FLIGHT_MODE
|
||||
&& sval <= SWSRC_LAST_FLIGHT_MODE) {
|
||||
|
||||
wf(opaque, "FM", 2);
|
||||
str = yaml_unsigned2str(sval - SWSRC_FIRST_FLIGHT_MODE);
|
||||
return wf(opaque,str, strlen(str));
|
||||
}
|
||||
else if (sval >= SWSRC_FIRST_SENSOR
|
||||
&& sval <= SWSRC_LAST_SENSOR) {
|
||||
|
||||
wf(opaque, "T", 1);
|
||||
str = yaml_unsigned2str(sval - SWSRC_FIRST_SENSOR + 1);
|
||||
return wf(opaque,str, strlen(str));
|
||||
}
|
||||
|
||||
str = yaml_output_enum(sval, enum_SwitchSources);
|
||||
return wf(opaque, str, strlen(str));
|
||||
if (str) return wf(opaque, str, strlen(str));
|
||||
|
||||
if (sval <= SWSRC_LAST_SWITCH) {
|
||||
|
||||
auto sw_info = switchInfo(sval);
|
||||
str = switchGetCanonicalName(sw_info.quot);
|
||||
if (!str) return true;
|
||||
wf(opaque, str, strlen(str));
|
||||
str = yaml_unsigned2str(sw_info.rem);
|
||||
return wf(opaque, str, strlen(str));
|
||||
|
||||
} else if (sval <= SWSRC_LAST_MULTIPOS_SWITCH) {
|
||||
|
||||
wf(opaque, "6P", 2);
|
||||
|
||||
// pot #: start with 6P1
|
||||
sval -= SWSRC_FIRST_MULTIPOS_SWITCH;
|
||||
str = yaml_unsigned2str(sval / XPOTS_MULTIPOS_COUNT);
|
||||
wf(opaque,str, strlen(str));
|
||||
|
||||
// position
|
||||
str = yaml_unsigned2str(sval % XPOTS_MULTIPOS_COUNT);
|
||||
return wf(opaque,str, strlen(str));
|
||||
|
||||
} else if (sval <= SWSRC_LAST_TRIM) {
|
||||
|
||||
wf(opaque, "TR", 2);
|
||||
auto trim = (sval - SWSRC_FIRST_TRIM) / 2;
|
||||
str = yaml_unsigned2str(trim + 1);
|
||||
wf(opaque, str, strlen(str));
|
||||
return wf(opaque, sval & 1 ? "+" : "-", 1);
|
||||
|
||||
} else if (sval <= SWSRC_LAST_LOGICAL_SWITCH) {
|
||||
|
||||
wf(opaque, "L", 1);
|
||||
str = yaml_unsigned2str(sval - SWSRC_FIRST_LOGICAL_SWITCH + 1);
|
||||
return wf(opaque,str, strlen(str));
|
||||
}
|
||||
else if (sval <= SWSRC_LAST_FLIGHT_MODE) {
|
||||
|
||||
wf(opaque, "FM", 2);
|
||||
str = yaml_unsigned2str(sval - SWSRC_FIRST_FLIGHT_MODE);
|
||||
return wf(opaque,str, strlen(str));
|
||||
}
|
||||
else if (sval <= SWSRC_LAST_SENSOR) {
|
||||
|
||||
wf(opaque, "T", 1);
|
||||
str = yaml_unsigned2str(sval - SWSRC_FIRST_SENSOR + 1);
|
||||
return wf(opaque,str, strlen(str));
|
||||
}
|
||||
|
||||
return true; // ignore error
|
||||
}
|
||||
|
||||
bool w_swtchSrc(const YamlNode* node, uint32_t val, yaml_writer_func wf, void* opaque)
|
||||
@@ -904,6 +941,7 @@ bool w_swtchSrc(const YamlNode* node, uint32_t val, yaml_writer_func wf, void* o
|
||||
|| !w_swtchSrc_unquoted(node, val, wf, opaque)
|
||||
|| !wf(opaque,"\"",1))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -935,8 +973,8 @@ static bool fmd_is_active(void* user, uint8_t* data, uint32_t bitoffs)
|
||||
|
||||
data += bitoffs >> 3UL;
|
||||
FlightModeData* fmd = (FlightModeData*)(data);
|
||||
for (uint8_t i=0; i<MAX_GVARS; i++) {
|
||||
is_active |= fmd->gvars[i] != GVAR_MAX+1; // FM0 -> default
|
||||
for (uint8_t i = 0; i < MAX_GVARS; i++) {
|
||||
is_active |= fmd->gvars[i] != GVAR_MAX + 1; // FM0 -> default
|
||||
}
|
||||
|
||||
return is_active;
|
||||
@@ -965,7 +1003,7 @@ static void r_swtchWarn(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
swarnstate_t swtchWarn = 0;
|
||||
|
||||
while (val_len--) {
|
||||
signed swtch = getRawSwitchIdx(*(val++));
|
||||
signed swtch = switchLookupIdx(*(val++));
|
||||
if (swtch < 0) break;
|
||||
|
||||
swarnstate_t state = 0;
|
||||
@@ -999,7 +1037,7 @@ static bool w_swtchWarn(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
swarnstate_t states;
|
||||
memcpy(&states, data, sizeof(states));
|
||||
|
||||
for (int i = 0; i < NUM_SWITCHES; i++) {
|
||||
for (uint8_t i = 0; i < switchGetMaxSwitches(); i++) {
|
||||
// TODO: SWITCH_EXISTS() uses the g_eeGeneral stucture, which might not be
|
||||
// avail
|
||||
if (SWITCH_EXISTS(i)) {
|
||||
@@ -1011,7 +1049,7 @@ static bool w_swtchWarn(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
// state == 1 -> UP
|
||||
// state == 2 -> MIDDLE
|
||||
// state == 3 -> DOWN
|
||||
char swtchWarn[2] = {getRawSwitchFromIdx(i), 0};
|
||||
char swtchWarn[2] = {switchGetLetter(i), 0};
|
||||
|
||||
switch (state) {
|
||||
case 0:
|
||||
@@ -1031,7 +1069,7 @@ static bool w_swtchWarn(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
break;
|
||||
}
|
||||
|
||||
if (swtchWarn[1] != 0) {
|
||||
if (swtchWarn[0] >= 'A' && swtchWarn[1] != 0) {
|
||||
if (!wf(opaque, swtchWarn, 2)) {
|
||||
return false;
|
||||
}
|
||||
@@ -1303,11 +1341,11 @@ static void r_customFn(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
&& val[2] == 'a'
|
||||
&& val[3] == 'n'
|
||||
&& val[4] == 's') {
|
||||
CFN_CH_INDEX(cfn) = NUM_STICKS + 1;
|
||||
CFN_CH_INDEX(cfn) = MAX_STICKS + 1;
|
||||
} else {
|
||||
uint32_t stick = yaml_parse_enum(enum_MixSources, val, l_sep);
|
||||
if (stick >= MIXSRC_FIRST_STICK && stick <= MIXSRC_LAST_STICK) {
|
||||
CFN_CH_INDEX(cfn) = stick - MIXSRC_FIRST_STICK + 1;
|
||||
auto stick = analogLookupCanonicalIdx(ADC_INPUT_MAIN, val, val_len);
|
||||
if (stick >= 0) {
|
||||
CFN_CH_INDEX(cfn) = stick + 1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1526,12 +1564,12 @@ static bool w_customFn(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
case 0:
|
||||
if (!wf(opaque, "sticks", 6)) return false;
|
||||
break;
|
||||
case NUM_STICKS + 1:
|
||||
case MAX_STICKS + 1:
|
||||
if (!wf(opaque, "chans", 5)) return false;
|
||||
break;
|
||||
default:
|
||||
if (value > 0 && value < NUM_STICKS + 1) {
|
||||
str = yaml_output_enum(value - 1 + MIXSRC_FIRST_STICK, enum_MixSources);
|
||||
if (value > 0 && value <= MAX_STICKS) {
|
||||
str = analogGetCanonicalName(ADC_INPUT_MAIN, value - 1);
|
||||
if (str && !wf(opaque, str, strlen(str))) return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,943 +0,0 @@
|
||||
// generated by generate_yaml.py
|
||||
|
||||
//
|
||||
// Enums first
|
||||
//
|
||||
|
||||
const struct YamlIdStr enum_BacklightMode[] = {
|
||||
{ e_backlight_mode_off, "backlight_mode_off" },
|
||||
{ e_backlight_mode_keys, "backlight_mode_keys" },
|
||||
{ e_backlight_mode_sticks, "backlight_mode_sticks" },
|
||||
{ e_backlight_mode_all, "backlight_mode_all" },
|
||||
{ e_backlight_mode_on, "backlight_mode_on" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_AntennaModes[] = {
|
||||
{ ANTENNA_MODE_INTERNAL, "MODE_INTERNAL" },
|
||||
{ ANTENNA_MODE_ASK, "MODE_ASK" },
|
||||
{ ANTENNA_MODE_PER_MODEL, "MODE_PER_MODEL" },
|
||||
{ ANTENNA_MODE_EXTERNAL, "MODE_EXTERNAL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModuleType[] = {
|
||||
{ MODULE_TYPE_NONE, "TYPE_NONE" },
|
||||
{ MODULE_TYPE_PPM, "TYPE_PPM" },
|
||||
{ MODULE_TYPE_XJT_PXX1, "TYPE_XJT_PXX1" },
|
||||
{ MODULE_TYPE_ISRM_PXX2, "TYPE_ISRM_PXX2" },
|
||||
{ MODULE_TYPE_DSM2, "TYPE_DSM2" },
|
||||
{ MODULE_TYPE_CROSSFIRE, "TYPE_CROSSFIRE" },
|
||||
{ MODULE_TYPE_MULTIMODULE, "TYPE_MULTIMODULE" },
|
||||
{ MODULE_TYPE_R9M_PXX1, "TYPE_R9M_PXX1" },
|
||||
{ MODULE_TYPE_R9M_PXX2, "TYPE_R9M_PXX2" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX1, "TYPE_R9M_LITE_PXX1" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX2, "TYPE_R9M_LITE_PXX2" },
|
||||
{ MODULE_TYPE_GHOST, "TYPE_GHOST" },
|
||||
{ MODULE_TYPE_R9M_LITE_PRO_PXX2, "TYPE_R9M_LITE_PRO_PXX2" },
|
||||
{ MODULE_TYPE_SBUS, "TYPE_SBUS" },
|
||||
{ MODULE_TYPE_XJT_LITE_PXX2, "TYPE_XJT_LITE_PXX2" },
|
||||
{ MODULE_TYPE_FLYSKY, "TYPE_FLYSKY" },
|
||||
{ MODULE_TYPE_LEMON_DSMP, "TYPE_LEMON_DSMP" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TrainerMultiplex[] = {
|
||||
{ TRAINER_OFF, "OFF" },
|
||||
{ TRAINER_ADD, "ADD" },
|
||||
{ TRAINER_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BeeperMode[] = {
|
||||
{ e_mode_quiet, "mode_quiet" },
|
||||
{ e_mode_alarms, "mode_alarms" },
|
||||
{ e_mode_nokeys, "mode_nokeys" },
|
||||
{ e_mode_all, "mode_all" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BluetoothModes[] = {
|
||||
{ BLUETOOTH_OFF, "OFF" },
|
||||
{ BLUETOOTH_TELEMETRY, "TELEMETRY" },
|
||||
{ BLUETOOTH_TRAINER, "TRAINER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_OVERRIDE_CHANNEL, "OVERRIDE_CHANNEL" },
|
||||
{ FUNC_TRAINER, "TRAINER" },
|
||||
{ FUNC_INSTANT_TRIM, "INSTANT_TRIM" },
|
||||
{ FUNC_RESET, "RESET" },
|
||||
{ FUNC_SET_TIMER, "SET_TIMER" },
|
||||
{ FUNC_ADJUST_GVAR, "ADJUST_GVAR" },
|
||||
{ FUNC_VOLUME, "VOLUME" },
|
||||
{ FUNC_SET_FAILSAFE, "SET_FAILSAFE" },
|
||||
{ FUNC_RANGECHECK, "RANGECHECK" },
|
||||
{ FUNC_BIND, "BIND" },
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
{ FUNC_HAPTIC, "HAPTIC" },
|
||||
{ FUNC_LOGS, "LOGS" },
|
||||
{ FUNC_BACKLIGHT, "BACKLIGHT" },
|
||||
{ FUNC_SCREENSHOT, "SCREENSHOT" },
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
{ TMRMODE_START, "START" },
|
||||
{ TMRMODE_THR, "THR" },
|
||||
{ TMRMODE_THR_REL, "THR_REL" },
|
||||
{ TMRMODE_THR_START, "THR_START" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
{ MLTPX_ADD, "ADD" },
|
||||
{ MLTPX_MUL, "MUL" },
|
||||
{ MLTPX_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_POT2, "POT2" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SH, "SH" },
|
||||
{ MIXSRC_SI, "SI" },
|
||||
{ MIXSRC_SJ, "SJ" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_NONE, "FUNC_NONE" },
|
||||
{ LS_FUNC_VEQUAL, "FUNC_VEQUAL" },
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
{ LS_FUNC_OR, "FUNC_OR" },
|
||||
{ LS_FUNC_XOR, "FUNC_XOR" },
|
||||
{ LS_FUNC_EDGE, "FUNC_EDGE" },
|
||||
{ LS_FUNC_EQUAL, "FUNC_EQUAL" },
|
||||
{ LS_FUNC_GREATER, "FUNC_GREATER" },
|
||||
{ LS_FUNC_LESS, "FUNC_LESS" },
|
||||
{ LS_FUNC_DIFFEGREATER, "FUNC_DIFFEGREATER" },
|
||||
{ LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" },
|
||||
{ LS_FUNC_TIMER, "FUNC_TIMER" },
|
||||
{ LS_FUNC_STICKY, "FUNC_STICKY" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwashType[] = {
|
||||
{ SWASH_TYPE_NONE, "TYPE_NONE" },
|
||||
{ SWASH_TYPE_120, "TYPE_120" },
|
||||
{ SWASH_TYPE_120X, "TYPE_120X" },
|
||||
{ SWASH_TYPE_140, "TYPE_140" },
|
||||
{ SWASH_TYPE_90, "TYPE_90" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_SH0, "SH0" },
|
||||
{ SWSRC_SH1, "SH1" },
|
||||
{ SWSRC_SH2, "SH2" },
|
||||
{ SWSRC_SI0, "SI0" },
|
||||
{ SWSRC_SI1, "SI1" },
|
||||
{ SWSRC_SI2, "SI2" },
|
||||
{ SWSRC_SJ0, "SJ0" },
|
||||
{ SWSRC_SJ1, "SJ1" },
|
||||
{ SWSRC_SJ2, "SJ2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
{ SWSRC_RADIO_ACTIVITY, "RADIO_ACTIVITY" },
|
||||
{ SWSRC_OFF, "OFF" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_PotsWarnMode[] = {
|
||||
{ POTS_WARN_OFF, "WARN_OFF" },
|
||||
{ POTS_WARN_MANUAL, "WARN_MANUAL" },
|
||||
{ POTS_WARN_AUTO, "WARN_AUTO" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModelOverridableEnable[] = {
|
||||
{ OVERRIDE_GLOBAL, "GLOBAL" },
|
||||
{ OVERRIDE_OFF, "OFF" },
|
||||
{ OVERRIDE_ON, "ON" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_FailsafeModes[] = {
|
||||
{ FAILSAFE_NOT_SET, "NOT_SET" },
|
||||
{ FAILSAFE_HOLD, "HOLD" },
|
||||
{ FAILSAFE_CUSTOM, "CUSTOM" },
|
||||
{ FAILSAFE_NOPULSES, "NOPULSES" },
|
||||
{ FAILSAFE_RECEIVER, "RECEIVER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorFormula[] = {
|
||||
{ TELEM_FORMULA_ADD, "FORMULA_ADD" },
|
||||
{ TELEM_FORMULA_AVERAGE, "FORMULA_AVERAGE" },
|
||||
{ TELEM_FORMULA_MIN, "FORMULA_MIN" },
|
||||
{ TELEM_FORMULA_MAX, "FORMULA_MAX" },
|
||||
{ TELEM_FORMULA_MULTIPLY, "FORMULA_MULTIPLY" },
|
||||
{ TELEM_FORMULA_TOTALIZE, "FORMULA_TOTALIZE" },
|
||||
{ TELEM_FORMULA_CELL, "FORMULA_CELL" },
|
||||
{ TELEM_FORMULA_CONSUMPTION, "FORMULA_CONSUMPTION" },
|
||||
{ TELEM_FORMULA_DIST, "FORMULA_DIST" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorType[] = {
|
||||
{ TELEM_TYPE_CUSTOM, "TYPE_CUSTOM" },
|
||||
{ TELEM_TYPE_CALCULATED, "TYPE_CALCULATED" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickIfMode[] = {
|
||||
{ USBJOYS_JOYSTICK, "JOYSTICK" },
|
||||
{ USBJOYS_GAMEPAD, "GAMEPAD" },
|
||||
{ USBJOYS_MULTIAXIS, "MULTIAXIS" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickCh[] = {
|
||||
{ USBJOYS_CH_NONE, "CH_NONE" },
|
||||
{ USBJOYS_CH_BUTTON, "CH_BUTTON" },
|
||||
{ USBJOYS_CH_AXIS, "CH_AXIS" },
|
||||
{ USBJOYS_CH_SIM, "CH_SIM" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||
YAML_SIGNED( "mid", 16 ),
|
||||
YAML_SIGNED( "spanNeg", 16 ),
|
||||
YAML_SIGNED( "spanPos", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerMix[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "srcChn", 6 ),
|
||||
YAML_ENUM("mode", 2, enum_TrainerMultiplex),
|
||||
YAML_SIGNED( "studWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerData[] = {
|
||||
YAML_ARRAY("calib", 16, 4, struct_signed_16, NULL),
|
||||
YAML_ARRAY("mix", 16, 4, struct_TrainerMix, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_1[] = {
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_2[] = {
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_UNSIGNED( "mode", 8 ),
|
||||
YAML_UNSIGNED( "param", 8 ),
|
||||
YAML_SIGNED( "spare", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_SIGNED( "val2", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
YAML_STRUCT("play", 48, struct_anonymous_1, NULL),
|
||||
YAML_STRUCT("all", 64, struct_anonymous_2, NULL),
|
||||
YAML_STRUCT("clear", 64, struct_anonymous_3, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "manuallyEdited", 1 ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_SIGNED( "currModel", 8 ),
|
||||
YAML_UNSIGNED( "contrast", 8 ),
|
||||
YAML_UNSIGNED( "vBatWarn", 8 ),
|
||||
YAML_SIGNED( "txVoltageCalibration", 8 ),
|
||||
YAML_ENUM("backlightMode", 3, enum_BacklightMode),
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "fai", 1 ),
|
||||
YAML_SIGNED_CUST( "beepMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_UNSIGNED( "alarmsFlash", 1 ),
|
||||
YAML_UNSIGNED( "disableMemoryWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableAlarmWarning", 1 ),
|
||||
YAML_UNSIGNED( "stickMode", 2 ),
|
||||
YAML_SIGNED( "timezone", 5 ),
|
||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||
YAML_CUSTOM("telemetryBaudrate",r_telemetryBaudrate,nullptr),
|
||||
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||
YAML_SIGNED( "splashMode", 3 ),
|
||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_SIGNED( "switchesDelay", 8 ),
|
||||
YAML_UNSIGNED( "lightAutoOff", 8 ),
|
||||
YAML_UNSIGNED( "templateSetup", 8 ),
|
||||
YAML_SIGNED( "PPM_Multiplier", 8 ),
|
||||
YAML_SIGNED_CUST( "hapticLength", 8, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 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 ),
|
||||
YAML_SIGNED_CUST( "vBatMax", 8, r_vbat_max, w_vbat_max ),
|
||||
YAML_UNSIGNED( "backlightBright", 8 ),
|
||||
YAML_UNSIGNED( "globalTimer", 32 ),
|
||||
YAML_UNSIGNED( "bluetoothBaudrate", 4 ),
|
||||
YAML_ENUM("bluetoothMode", 4, enum_BluetoothModes),
|
||||
YAML_UNSIGNED( "countryCode", 2 ),
|
||||
YAML_SIGNED( "pwrOnSpeed", 3 ),
|
||||
YAML_SIGNED( "pwrOffSpeed", 3 ),
|
||||
YAML_CUSTOM("jitterFilter",r_jitterFilter,nullptr),
|
||||
YAML_UNSIGNED( "noJitterFilter", 1 ),
|
||||
YAML_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "disableRssiPoweroffAlarm", 1 ),
|
||||
YAML_UNSIGNED( "USBMode", 2 ),
|
||||
YAML_UNSIGNED( "jackMode", 2 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("ttsLanguage", 2),
|
||||
YAML_SIGNED_CUST( "beepVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "wavVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "backgroundVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioPitch", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 8, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 192 ),
|
||||
YAML_PADDING( 144 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
YAML_CUSTOM("rotEncDirection",r_rotEncDirection,nullptr),
|
||||
YAML_UNSIGNED( "rotEncMode", 2 ),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "radioGFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "radioTrainerDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelHeliDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelFMDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCurvesDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelGVDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelLSDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelSFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelTelemetryDisabled", 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelHeader[] = {
|
||||
YAML_STRING("name", 10),
|
||||
YAML_ARRAY("modelId", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TimerData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "start", 22 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED( "value", 22 ),
|
||||
YAML_ENUM("mode", 3, enum_TimerModes),
|
||||
YAML_UNSIGNED( "countdownBeep", 2 ),
|
||||
YAML_UNSIGNED( "minuteBeep", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 2 ),
|
||||
YAML_SIGNED( "countdownStart", 2 ),
|
||||
YAML_UNSIGNED( "showElapsed", 1 ),
|
||||
YAML_UNSIGNED( "extraHaptic", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "destCh", 5 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "carryTrim", 1 ),
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
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),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
YAML_UNSIGNED( "delayDown", 8 ),
|
||||
YAML_UNSIGNED( "speedUp", 8 ),
|
||||
YAML_UNSIGNED( "speedDown", 8 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
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_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_SIGNED( "curve", 8 ),
|
||||
YAML_STRING("name", 4),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "scale", 14 ),
|
||||
YAML_CUSTOM("carryTrim",r_carryTrim,nullptr),
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveHeader[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
YAML_UNSIGNED( "smooth", 1 ),
|
||||
YAML_SIGNED( "points", 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("func", 8, enum_LogicalSwitchesFunctions),
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_ENUM("type", 8, enum_SwashType),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED_CUST( "collectiveSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "aileronSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "elevatorSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "collectiveWeight", 8 ),
|
||||
YAML_SIGNED( "aileronWeight", 8 ),
|
||||
YAML_SIGNED( "elevatorWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_trim_t[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "value", 11 ),
|
||||
YAML_UNSIGNED( "mode", 5 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_GVarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("name", 3),
|
||||
YAML_UNSIGNED( "min", 12 ),
|
||||
YAML_UNSIGNED( "max", 12 ),
|
||||
YAML_UNSIGNED( "popup", 1 ),
|
||||
YAML_UNSIGNED( "prec", 1 ),
|
||||
YAML_UNSIGNED( "unit", 2 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_VarioData[] = {
|
||||
YAML_UNSIGNED_CUST( "source", 7, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_UNSIGNED( "centerSilent", 1 ),
|
||||
YAML_SIGNED( "centerMax", 8 ),
|
||||
YAML_SIGNED( "centerMin", 8 ),
|
||||
YAML_SIGNED( "min", 8 ),
|
||||
YAML_SIGNED( "max", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RssiAlarmData[] = {
|
||||
YAML_CUSTOM("disabled",r_rssiDisabled,nullptr),
|
||||
YAML_CUSTOM("warning",r_rssiWarning,nullptr),
|
||||
YAML_CUSTOM("critical",r_rssiCritical,nullptr),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RFAlarmData[] = {
|
||||
YAML_SIGNED( "warning", 8 ),
|
||||
YAML_SIGNED( "critical", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PpmModule[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "power", 2 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_SIGNED( "antennaMode", 2 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "noninverted", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "refreshRate", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_64[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_8[] = {
|
||||
YAML_UNSIGNED( "receivers", 7 ),
|
||||
YAML_UNSIGNED( "racingMode", 1 ),
|
||||
YAML_ARRAY("receiverName", 64, 3, struct_string_64, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_9[] = {
|
||||
YAML_ARRAY("rx_id", 8, 4, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 3 ),
|
||||
YAML_UNSIGNED( "rfPower", 1 ),
|
||||
YAML_UNSIGNED( "reserved", 4 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_10[] = {
|
||||
YAML_UNSIGNED( "emi", 2 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "phyMode", 3 ),
|
||||
YAML_UNSIGNED( "reserved", 2 ),
|
||||
YAML_UNSIGNED( "rfPower", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_11[] = {
|
||||
YAML_UNSIGNED( "raw12bits", 1 ),
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_12[] = {
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_13[] = {
|
||||
YAML_UNSIGNED( "flags", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_PpmModule, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("afhds3", 16, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("ghost", 8, struct_anonymous_11, NULL),
|
||||
YAML_STRUCT("crsf", 8, struct_anonymous_12, NULL),
|
||||
YAML_STRUCT("dsmp", 8, struct_anonymous_13, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 8, enum_ModuleType),
|
||||
YAML_CUSTOM("subType",r_modSubtype,w_modSubtype),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED_CUST( "channelsCount", 8, r_channelsCount, w_channelsCount ),
|
||||
YAML_ENUM("failsafeMode", 4, enum_FailsafeModes),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_UNION("mod", 200, union_anonymous_4_elmts, select_mod_type),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerModuleData[] = {
|
||||
YAML_UNSIGNED_CUST( "mode", 8, r_trainerMode, w_trainerMode ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput_elmts[] = {
|
||||
YAML_SIGNED( "value", 16 ),
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 16, union_ScriptDataInput_elmts, select_script_input),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ScriptData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("file", 6),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_ARRAY("inputs", 16, 6, union_ScriptDataInput, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_14_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_16, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_ENUM("formula", 8, enum_TelemetrySensorFormula),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_21[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_22[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_17_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_20, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_21, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_22, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_14_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_15_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_ENUM("type", 1, enum_TelemetrySensorType),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "unit", 6 ),
|
||||
YAML_UNSIGNED( "prec", 2 ),
|
||||
YAML_UNSIGNED( "autoOffset", 1 ),
|
||||
YAML_UNSIGNED( "filter", 1 ),
|
||||
YAML_UNSIGNED( "logs", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 1 ),
|
||||
YAML_UNSIGNED( "onlyPositive", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNION("cfg", 32, union_anonymous_17_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LineDataSource[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "val", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_LineDataSource, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScriptData[] = {
|
||||
YAML_STRING("file", 6),
|
||||
YAML_ARRAY("inputs", 16, 8, struct_signed_16, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_TelemetryScreenData_u_elmts[] = {
|
||||
YAML_ARRAY("bars", 48, 4, struct_FrSkyBarData, NULL),
|
||||
YAML_ARRAY("lines", 32, 4, struct_FrSkyLineData, NULL),
|
||||
YAML_STRUCT("script", 176, struct_TelemetryScriptData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_CUSTOM("type",r_tele_screen_type,w_tele_screen_type),
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_u_elmts, select_tele_screen_data),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_USBJoystickChData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("mode", 3, enum_USBJoystickCh),
|
||||
YAML_UNSIGNED( "inversion", 1 ),
|
||||
YAML_UNSIGNED( "param", 4 ),
|
||||
YAML_UNSIGNED( "btn_num", 5 ),
|
||||
YAML_UNSIGNED( "switch_npos", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_UNSIGNED( "telemetryProtocol", 3 ),
|
||||
YAML_UNSIGNED( "thrTrim", 1 ),
|
||||
YAML_UNSIGNED( "noGlobalFunctions", 1 ),
|
||||
YAML_UNSIGNED( "displayTrims", 2 ),
|
||||
YAML_UNSIGNED( "ignoreSensorIds", 1 ),
|
||||
YAML_SIGNED( "trimInc", 3 ),
|
||||
YAML_UNSIGNED( "disableThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "displayChecklist", 1 ),
|
||||
YAML_UNSIGNED( "extendedLimits", 1 ),
|
||||
YAML_UNSIGNED( "extendedTrims", 1 ),
|
||||
YAML_UNSIGNED( "throttleReversed", 1 ),
|
||||
YAML_UNSIGNED( "enableCustomThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableTelemetryWarning", 1 ),
|
||||
YAML_UNSIGNED( "showInstanceIds", 1 ),
|
||||
YAML_PADDING( 5 ),
|
||||
YAML_SIGNED( "customThrottleWarningPosition", 8 ),
|
||||
YAML_UNSIGNED( "beepANACenter", 16 ),
|
||||
YAML_ARRAY("mixData", 160, 64, struct_MixData, NULL),
|
||||
YAML_ARRAY("limitData", 88, 32, struct_LimitData, NULL),
|
||||
YAML_ARRAY("expoData", 136, 64, struct_ExpoData, NULL),
|
||||
YAML_ARRAY("curves", 32, 32, struct_CurveHeader, NULL),
|
||||
YAML_ARRAY("points", 8, 512, struct_signed_8, NULL),
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_STRUCT("rssiAlarms", 0, struct_RssiAlarmData, NULL),
|
||||
YAML_STRUCT("rfAlarms", 16, struct_RFAlarmData, NULL),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_ENUM("potsWarnMode", 2, enum_PotsWarnMode),
|
||||
YAML_ENUM("jitterFilter", 2, enum_ModelOverridableEnable),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ARRAY("moduleData", 232, 2, struct_ModuleData, NULL),
|
||||
YAML_ARRAY("failsafeChannels", 16, 32, struct_signed_16, NULL),
|
||||
YAML_STRUCT("trainerData", 40, struct_TrainerModuleData, NULL),
|
||||
YAML_ARRAY("scriptsData", 192, 7, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 24, 32, struct_string_24, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, struct_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_UNSIGNED( "usbJoystickExtMode", 1 ),
|
||||
YAML_ENUM("usbJoystickIfMode", 3, enum_USBJoystickIfMode),
|
||||
YAML_UNSIGNED( "usbJoystickCircularCut", 4 ),
|
||||
YAML_ARRAY("usbJoystickCh", 16, 26, struct_USBJoystickChData, NULL),
|
||||
YAML_ENUM("radioGFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("radioTrainerDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelHeliDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelFMDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCurvesDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelGVDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelLSDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelSFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCustomScriptsDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelTelemetryDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 29
|
||||
|
||||
static const struct YamlNode __RadioData_root_node = YAML_ROOT( struct_RadioData );
|
||||
|
||||
const YamlNode* get_radiodata_nodes()
|
||||
{
|
||||
return &__RadioData_root_node;
|
||||
}
|
||||
static const struct YamlNode __ModelData_root_node = YAML_ROOT( struct_ModelData );
|
||||
|
||||
const YamlNode* get_modeldata_nodes()
|
||||
{
|
||||
return &__ModelData_root_node;
|
||||
}
|
||||
static const struct YamlNode __PartialModel_root_node = YAML_ROOT( struct_PartialModel );
|
||||
|
||||
const YamlNode* get_partialmodel_nodes()
|
||||
{
|
||||
return &__PartialModel_root_node;
|
||||
}
|
||||
|
||||
@@ -72,9 +72,7 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
@@ -113,52 +111,16 @@ const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_POT2, "POT2" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SE, "SE" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SG, "SG" },
|
||||
{ MIXSRC_SH, "SH" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TrimT5, "TrimT5" },
|
||||
{ MIXSRC_TrimT6, "TrimT6" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
@@ -193,40 +155,6 @@ const struct YamlIdStr enum_SwashType[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SE0, "SE0" },
|
||||
{ SWSRC_SE1, "SE1" },
|
||||
{ SWSRC_SE2, "SE2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_SG0, "SG0" },
|
||||
{ SWSRC_SG1, "SG1" },
|
||||
{ SWSRC_SG2, "SG2" },
|
||||
{ SWSRC_SH0, "SH0" },
|
||||
{ SWSRC_SH1, "SH1" },
|
||||
{ SWSRC_SH2, "SH2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
@@ -337,18 +265,13 @@ static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 6, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 48 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ZoneOptionValue_elmts[] = {
|
||||
YAML_UNSIGNED( "unsignedValue", 32 ),
|
||||
YAML_SIGNED( "signedValue", 32 ),
|
||||
@@ -373,7 +296,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 9, struct_CalibData, NULL),
|
||||
YAML_ARRAY("calib", 48, 22, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_SIGNED( "currModel", 8 ),
|
||||
YAML_UNSIGNED( "contrast", 8 ),
|
||||
@@ -440,12 +363,10 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 16, struct_switchConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 8, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 8, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 192 ),
|
||||
YAML_PADDING( 216 ),
|
||||
YAML_ARRAY("sticksConfig", 0, MAX_STICKS, struct_stickConfig, stick_name_valid),
|
||||
YAML_ARRAY("slidersConfig", 0, MAX_POTS, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 4, 16, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("switchConfig", 2, 32, struct_switchConfig, nullptr),
|
||||
YAML_STRING("currModelFilename", 17),
|
||||
YAML_UNSIGNED( "modelQuickSelect", 1 ),
|
||||
YAML_UNSIGNED( "blOffBright", 7 ),
|
||||
@@ -513,8 +434,8 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "offset", 13, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
@@ -544,10 +465,9 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -572,9 +492,9 @@ static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "andsw", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
@@ -599,10 +519,10 @@ static const struct YamlNode struct_trim_t[] = {
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_ARRAY("trim", 16, 6, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 10),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
@@ -906,10 +826,10 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 72, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 320, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_ARRAY("flightModeData", 352, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
@@ -925,7 +845,7 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_ARRAY("scriptsData", 192, 9, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 32, 32, struct_string_32, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 5, struct_signed_8, NULL),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 16, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 60, struct_TelemetrySensor, NULL),
|
||||
YAML_ARRAY("screenData", 6816, 10, struct_CustomScreenData, NULL),
|
||||
YAML_STRUCT("topbarData", 1248, struct_TopBarPersistentData, NULL),
|
||||
|
||||
@@ -1,943 +0,0 @@
|
||||
// generated by generate_yaml.py
|
||||
|
||||
//
|
||||
// Enums first
|
||||
//
|
||||
|
||||
const struct YamlIdStr enum_BacklightMode[] = {
|
||||
{ e_backlight_mode_off, "backlight_mode_off" },
|
||||
{ e_backlight_mode_keys, "backlight_mode_keys" },
|
||||
{ e_backlight_mode_sticks, "backlight_mode_sticks" },
|
||||
{ e_backlight_mode_all, "backlight_mode_all" },
|
||||
{ e_backlight_mode_on, "backlight_mode_on" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_AntennaModes[] = {
|
||||
{ ANTENNA_MODE_INTERNAL, "MODE_INTERNAL" },
|
||||
{ ANTENNA_MODE_ASK, "MODE_ASK" },
|
||||
{ ANTENNA_MODE_PER_MODEL, "MODE_PER_MODEL" },
|
||||
{ ANTENNA_MODE_EXTERNAL, "MODE_EXTERNAL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModuleType[] = {
|
||||
{ MODULE_TYPE_NONE, "TYPE_NONE" },
|
||||
{ MODULE_TYPE_PPM, "TYPE_PPM" },
|
||||
{ MODULE_TYPE_XJT_PXX1, "TYPE_XJT_PXX1" },
|
||||
{ MODULE_TYPE_ISRM_PXX2, "TYPE_ISRM_PXX2" },
|
||||
{ MODULE_TYPE_DSM2, "TYPE_DSM2" },
|
||||
{ MODULE_TYPE_CROSSFIRE, "TYPE_CROSSFIRE" },
|
||||
{ MODULE_TYPE_MULTIMODULE, "TYPE_MULTIMODULE" },
|
||||
{ MODULE_TYPE_R9M_PXX1, "TYPE_R9M_PXX1" },
|
||||
{ MODULE_TYPE_R9M_PXX2, "TYPE_R9M_PXX2" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX1, "TYPE_R9M_LITE_PXX1" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX2, "TYPE_R9M_LITE_PXX2" },
|
||||
{ MODULE_TYPE_GHOST, "TYPE_GHOST" },
|
||||
{ MODULE_TYPE_R9M_LITE_PRO_PXX2, "TYPE_R9M_LITE_PRO_PXX2" },
|
||||
{ MODULE_TYPE_SBUS, "TYPE_SBUS" },
|
||||
{ MODULE_TYPE_XJT_LITE_PXX2, "TYPE_XJT_LITE_PXX2" },
|
||||
{ MODULE_TYPE_FLYSKY, "TYPE_FLYSKY" },
|
||||
{ MODULE_TYPE_LEMON_DSMP, "TYPE_LEMON_DSMP" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TrainerMultiplex[] = {
|
||||
{ TRAINER_OFF, "OFF" },
|
||||
{ TRAINER_ADD, "ADD" },
|
||||
{ TRAINER_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BeeperMode[] = {
|
||||
{ e_mode_quiet, "mode_quiet" },
|
||||
{ e_mode_alarms, "mode_alarms" },
|
||||
{ e_mode_nokeys, "mode_nokeys" },
|
||||
{ e_mode_all, "mode_all" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BluetoothModes[] = {
|
||||
{ BLUETOOTH_OFF, "OFF" },
|
||||
{ BLUETOOTH_TELEMETRY, "TELEMETRY" },
|
||||
{ BLUETOOTH_TRAINER, "TRAINER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_OVERRIDE_CHANNEL, "OVERRIDE_CHANNEL" },
|
||||
{ FUNC_TRAINER, "TRAINER" },
|
||||
{ FUNC_INSTANT_TRIM, "INSTANT_TRIM" },
|
||||
{ FUNC_RESET, "RESET" },
|
||||
{ FUNC_SET_TIMER, "SET_TIMER" },
|
||||
{ FUNC_ADJUST_GVAR, "ADJUST_GVAR" },
|
||||
{ FUNC_VOLUME, "VOLUME" },
|
||||
{ FUNC_SET_FAILSAFE, "SET_FAILSAFE" },
|
||||
{ FUNC_RANGECHECK, "RANGECHECK" },
|
||||
{ FUNC_BIND, "BIND" },
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
{ FUNC_HAPTIC, "HAPTIC" },
|
||||
{ FUNC_LOGS, "LOGS" },
|
||||
{ FUNC_BACKLIGHT, "BACKLIGHT" },
|
||||
{ FUNC_SCREENSHOT, "SCREENSHOT" },
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
{ TMRMODE_START, "START" },
|
||||
{ TMRMODE_THR, "THR" },
|
||||
{ TMRMODE_THR_REL, "THR_REL" },
|
||||
{ TMRMODE_THR_START, "THR_START" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
{ MLTPX_ADD, "ADD" },
|
||||
{ MLTPX_MUL, "MUL" },
|
||||
{ MLTPX_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_POT2, "POT2" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SG, "SG" },
|
||||
{ MIXSRC_SH, "SH" },
|
||||
{ MIXSRC_SI, "SI" },
|
||||
{ MIXSRC_SJ, "SJ" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_NONE, "FUNC_NONE" },
|
||||
{ LS_FUNC_VEQUAL, "FUNC_VEQUAL" },
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
{ LS_FUNC_OR, "FUNC_OR" },
|
||||
{ LS_FUNC_XOR, "FUNC_XOR" },
|
||||
{ LS_FUNC_EDGE, "FUNC_EDGE" },
|
||||
{ LS_FUNC_EQUAL, "FUNC_EQUAL" },
|
||||
{ LS_FUNC_GREATER, "FUNC_GREATER" },
|
||||
{ LS_FUNC_LESS, "FUNC_LESS" },
|
||||
{ LS_FUNC_DIFFEGREATER, "FUNC_DIFFEGREATER" },
|
||||
{ LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" },
|
||||
{ LS_FUNC_TIMER, "FUNC_TIMER" },
|
||||
{ LS_FUNC_STICKY, "FUNC_STICKY" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwashType[] = {
|
||||
{ SWASH_TYPE_NONE, "TYPE_NONE" },
|
||||
{ SWASH_TYPE_120, "TYPE_120" },
|
||||
{ SWASH_TYPE_120X, "TYPE_120X" },
|
||||
{ SWASH_TYPE_140, "TYPE_140" },
|
||||
{ SWASH_TYPE_90, "TYPE_90" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SG0, "SG0" },
|
||||
{ SWSRC_SG1, "SG1" },
|
||||
{ SWSRC_SG2, "SG2" },
|
||||
{ SWSRC_SH0, "SH0" },
|
||||
{ SWSRC_SH1, "SH1" },
|
||||
{ SWSRC_SH2, "SH2" },
|
||||
{ SWSRC_SI0, "SI0" },
|
||||
{ SWSRC_SI1, "SI1" },
|
||||
{ SWSRC_SI2, "SI2" },
|
||||
{ SWSRC_SJ0, "SJ0" },
|
||||
{ SWSRC_SJ1, "SJ1" },
|
||||
{ SWSRC_SJ2, "SJ2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
{ SWSRC_RADIO_ACTIVITY, "RADIO_ACTIVITY" },
|
||||
{ SWSRC_OFF, "OFF" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_PotsWarnMode[] = {
|
||||
{ POTS_WARN_OFF, "WARN_OFF" },
|
||||
{ POTS_WARN_MANUAL, "WARN_MANUAL" },
|
||||
{ POTS_WARN_AUTO, "WARN_AUTO" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModelOverridableEnable[] = {
|
||||
{ OVERRIDE_GLOBAL, "GLOBAL" },
|
||||
{ OVERRIDE_OFF, "OFF" },
|
||||
{ OVERRIDE_ON, "ON" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_FailsafeModes[] = {
|
||||
{ FAILSAFE_NOT_SET, "NOT_SET" },
|
||||
{ FAILSAFE_HOLD, "HOLD" },
|
||||
{ FAILSAFE_CUSTOM, "CUSTOM" },
|
||||
{ FAILSAFE_NOPULSES, "NOPULSES" },
|
||||
{ FAILSAFE_RECEIVER, "RECEIVER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorFormula[] = {
|
||||
{ TELEM_FORMULA_ADD, "FORMULA_ADD" },
|
||||
{ TELEM_FORMULA_AVERAGE, "FORMULA_AVERAGE" },
|
||||
{ TELEM_FORMULA_MIN, "FORMULA_MIN" },
|
||||
{ TELEM_FORMULA_MAX, "FORMULA_MAX" },
|
||||
{ TELEM_FORMULA_MULTIPLY, "FORMULA_MULTIPLY" },
|
||||
{ TELEM_FORMULA_TOTALIZE, "FORMULA_TOTALIZE" },
|
||||
{ TELEM_FORMULA_CELL, "FORMULA_CELL" },
|
||||
{ TELEM_FORMULA_CONSUMPTION, "FORMULA_CONSUMPTION" },
|
||||
{ TELEM_FORMULA_DIST, "FORMULA_DIST" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorType[] = {
|
||||
{ TELEM_TYPE_CUSTOM, "TYPE_CUSTOM" },
|
||||
{ TELEM_TYPE_CALCULATED, "TYPE_CALCULATED" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickIfMode[] = {
|
||||
{ USBJOYS_JOYSTICK, "JOYSTICK" },
|
||||
{ USBJOYS_GAMEPAD, "GAMEPAD" },
|
||||
{ USBJOYS_MULTIAXIS, "MULTIAXIS" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickCh[] = {
|
||||
{ USBJOYS_CH_NONE, "CH_NONE" },
|
||||
{ USBJOYS_CH_BUTTON, "CH_BUTTON" },
|
||||
{ USBJOYS_CH_AXIS, "CH_AXIS" },
|
||||
{ USBJOYS_CH_SIM, "CH_SIM" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||
YAML_SIGNED( "mid", 16 ),
|
||||
YAML_SIGNED( "spanNeg", 16 ),
|
||||
YAML_SIGNED( "spanPos", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerMix[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "srcChn", 6 ),
|
||||
YAML_ENUM("mode", 2, enum_TrainerMultiplex),
|
||||
YAML_SIGNED( "studWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerData[] = {
|
||||
YAML_ARRAY("calib", 16, 4, struct_signed_16, NULL),
|
||||
YAML_ARRAY("mix", 16, 4, struct_TrainerMix, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_1[] = {
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_2[] = {
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_UNSIGNED( "mode", 8 ),
|
||||
YAML_UNSIGNED( "param", 8 ),
|
||||
YAML_SIGNED( "spare", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_SIGNED( "val2", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
YAML_STRUCT("play", 48, struct_anonymous_1, NULL),
|
||||
YAML_STRUCT("all", 64, struct_anonymous_2, NULL),
|
||||
YAML_STRUCT("clear", 64, struct_anonymous_3, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "manuallyEdited", 1 ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_SIGNED( "currModel", 8 ),
|
||||
YAML_UNSIGNED( "contrast", 8 ),
|
||||
YAML_UNSIGNED( "vBatWarn", 8 ),
|
||||
YAML_SIGNED( "txVoltageCalibration", 8 ),
|
||||
YAML_ENUM("backlightMode", 3, enum_BacklightMode),
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "fai", 1 ),
|
||||
YAML_SIGNED_CUST( "beepMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_UNSIGNED( "alarmsFlash", 1 ),
|
||||
YAML_UNSIGNED( "disableMemoryWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableAlarmWarning", 1 ),
|
||||
YAML_UNSIGNED( "stickMode", 2 ),
|
||||
YAML_SIGNED( "timezone", 5 ),
|
||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||
YAML_CUSTOM("telemetryBaudrate",r_telemetryBaudrate,nullptr),
|
||||
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||
YAML_SIGNED( "splashMode", 3 ),
|
||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_SIGNED( "switchesDelay", 8 ),
|
||||
YAML_UNSIGNED( "lightAutoOff", 8 ),
|
||||
YAML_UNSIGNED( "templateSetup", 8 ),
|
||||
YAML_SIGNED( "PPM_Multiplier", 8 ),
|
||||
YAML_SIGNED_CUST( "hapticLength", 8, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 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 ),
|
||||
YAML_SIGNED_CUST( "vBatMax", 8, r_vbat_max, w_vbat_max ),
|
||||
YAML_UNSIGNED( "backlightBright", 8 ),
|
||||
YAML_UNSIGNED( "globalTimer", 32 ),
|
||||
YAML_UNSIGNED( "bluetoothBaudrate", 4 ),
|
||||
YAML_ENUM("bluetoothMode", 4, enum_BluetoothModes),
|
||||
YAML_UNSIGNED( "countryCode", 2 ),
|
||||
YAML_SIGNED( "pwrOnSpeed", 3 ),
|
||||
YAML_SIGNED( "pwrOffSpeed", 3 ),
|
||||
YAML_CUSTOM("jitterFilter",r_jitterFilter,nullptr),
|
||||
YAML_UNSIGNED( "noJitterFilter", 1 ),
|
||||
YAML_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "disableRssiPoweroffAlarm", 1 ),
|
||||
YAML_UNSIGNED( "USBMode", 2 ),
|
||||
YAML_UNSIGNED( "jackMode", 2 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("ttsLanguage", 2),
|
||||
YAML_SIGNED_CUST( "beepVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "wavVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "backgroundVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioPitch", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 8, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 192 ),
|
||||
YAML_PADDING( 144 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
YAML_CUSTOM("rotEncDirection",r_rotEncDirection,nullptr),
|
||||
YAML_UNSIGNED( "rotEncMode", 2 ),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "radioGFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "radioTrainerDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelHeliDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelFMDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCurvesDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelGVDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelLSDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelSFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelTelemetryDisabled", 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelHeader[] = {
|
||||
YAML_STRING("name", 10),
|
||||
YAML_ARRAY("modelId", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TimerData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "start", 22 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED( "value", 22 ),
|
||||
YAML_ENUM("mode", 3, enum_TimerModes),
|
||||
YAML_UNSIGNED( "countdownBeep", 2 ),
|
||||
YAML_UNSIGNED( "minuteBeep", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 2 ),
|
||||
YAML_SIGNED( "countdownStart", 2 ),
|
||||
YAML_UNSIGNED( "showElapsed", 1 ),
|
||||
YAML_UNSIGNED( "extraHaptic", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "destCh", 5 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "carryTrim", 1 ),
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
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),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
YAML_UNSIGNED( "delayDown", 8 ),
|
||||
YAML_UNSIGNED( "speedUp", 8 ),
|
||||
YAML_UNSIGNED( "speedDown", 8 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
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_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_SIGNED( "curve", 8 ),
|
||||
YAML_STRING("name", 4),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "scale", 14 ),
|
||||
YAML_CUSTOM("carryTrim",r_carryTrim,nullptr),
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveHeader[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
YAML_UNSIGNED( "smooth", 1 ),
|
||||
YAML_SIGNED( "points", 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("func", 8, enum_LogicalSwitchesFunctions),
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_ENUM("type", 8, enum_SwashType),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED_CUST( "collectiveSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "aileronSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "elevatorSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "collectiveWeight", 8 ),
|
||||
YAML_SIGNED( "aileronWeight", 8 ),
|
||||
YAML_SIGNED( "elevatorWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_trim_t[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "value", 11 ),
|
||||
YAML_UNSIGNED( "mode", 5 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_GVarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("name", 3),
|
||||
YAML_UNSIGNED( "min", 12 ),
|
||||
YAML_UNSIGNED( "max", 12 ),
|
||||
YAML_UNSIGNED( "popup", 1 ),
|
||||
YAML_UNSIGNED( "prec", 1 ),
|
||||
YAML_UNSIGNED( "unit", 2 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_VarioData[] = {
|
||||
YAML_UNSIGNED_CUST( "source", 7, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_UNSIGNED( "centerSilent", 1 ),
|
||||
YAML_SIGNED( "centerMax", 8 ),
|
||||
YAML_SIGNED( "centerMin", 8 ),
|
||||
YAML_SIGNED( "min", 8 ),
|
||||
YAML_SIGNED( "max", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RssiAlarmData[] = {
|
||||
YAML_CUSTOM("disabled",r_rssiDisabled,nullptr),
|
||||
YAML_CUSTOM("warning",r_rssiWarning,nullptr),
|
||||
YAML_CUSTOM("critical",r_rssiCritical,nullptr),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RFAlarmData[] = {
|
||||
YAML_SIGNED( "warning", 8 ),
|
||||
YAML_SIGNED( "critical", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PpmModule[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "power", 2 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_SIGNED( "antennaMode", 2 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "noninverted", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "refreshRate", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_64[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_8[] = {
|
||||
YAML_UNSIGNED( "receivers", 7 ),
|
||||
YAML_UNSIGNED( "racingMode", 1 ),
|
||||
YAML_ARRAY("receiverName", 64, 3, struct_string_64, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_9[] = {
|
||||
YAML_ARRAY("rx_id", 8, 4, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 3 ),
|
||||
YAML_UNSIGNED( "rfPower", 1 ),
|
||||
YAML_UNSIGNED( "reserved", 4 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_10[] = {
|
||||
YAML_UNSIGNED( "emi", 2 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "phyMode", 3 ),
|
||||
YAML_UNSIGNED( "reserved", 2 ),
|
||||
YAML_UNSIGNED( "rfPower", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_11[] = {
|
||||
YAML_UNSIGNED( "raw12bits", 1 ),
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_12[] = {
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_13[] = {
|
||||
YAML_UNSIGNED( "flags", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_PpmModule, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("afhds3", 16, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("ghost", 8, struct_anonymous_11, NULL),
|
||||
YAML_STRUCT("crsf", 8, struct_anonymous_12, NULL),
|
||||
YAML_STRUCT("dsmp", 8, struct_anonymous_13, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 8, enum_ModuleType),
|
||||
YAML_CUSTOM("subType",r_modSubtype,w_modSubtype),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED_CUST( "channelsCount", 8, r_channelsCount, w_channelsCount ),
|
||||
YAML_ENUM("failsafeMode", 4, enum_FailsafeModes),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_UNION("mod", 200, union_anonymous_4_elmts, select_mod_type),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerModuleData[] = {
|
||||
YAML_UNSIGNED_CUST( "mode", 8, r_trainerMode, w_trainerMode ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput_elmts[] = {
|
||||
YAML_SIGNED( "value", 16 ),
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 16, union_ScriptDataInput_elmts, select_script_input),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ScriptData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("file", 6),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_ARRAY("inputs", 16, 6, union_ScriptDataInput, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_14_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_16, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_ENUM("formula", 8, enum_TelemetrySensorFormula),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_21[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_22[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_17_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_20, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_21, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_22, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_14_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_15_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_ENUM("type", 1, enum_TelemetrySensorType),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "unit", 6 ),
|
||||
YAML_UNSIGNED( "prec", 2 ),
|
||||
YAML_UNSIGNED( "autoOffset", 1 ),
|
||||
YAML_UNSIGNED( "filter", 1 ),
|
||||
YAML_UNSIGNED( "logs", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 1 ),
|
||||
YAML_UNSIGNED( "onlyPositive", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNION("cfg", 32, union_anonymous_17_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LineDataSource[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "val", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_LineDataSource, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScriptData[] = {
|
||||
YAML_STRING("file", 6),
|
||||
YAML_ARRAY("inputs", 16, 8, struct_signed_16, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_TelemetryScreenData_u_elmts[] = {
|
||||
YAML_ARRAY("bars", 48, 4, struct_FrSkyBarData, NULL),
|
||||
YAML_ARRAY("lines", 32, 4, struct_FrSkyLineData, NULL),
|
||||
YAML_STRUCT("script", 176, struct_TelemetryScriptData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_CUSTOM("type",r_tele_screen_type,w_tele_screen_type),
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_u_elmts, select_tele_screen_data),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_USBJoystickChData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("mode", 3, enum_USBJoystickCh),
|
||||
YAML_UNSIGNED( "inversion", 1 ),
|
||||
YAML_UNSIGNED( "param", 4 ),
|
||||
YAML_UNSIGNED( "btn_num", 5 ),
|
||||
YAML_UNSIGNED( "switch_npos", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_UNSIGNED( "telemetryProtocol", 3 ),
|
||||
YAML_UNSIGNED( "thrTrim", 1 ),
|
||||
YAML_UNSIGNED( "noGlobalFunctions", 1 ),
|
||||
YAML_UNSIGNED( "displayTrims", 2 ),
|
||||
YAML_UNSIGNED( "ignoreSensorIds", 1 ),
|
||||
YAML_SIGNED( "trimInc", 3 ),
|
||||
YAML_UNSIGNED( "disableThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "displayChecklist", 1 ),
|
||||
YAML_UNSIGNED( "extendedLimits", 1 ),
|
||||
YAML_UNSIGNED( "extendedTrims", 1 ),
|
||||
YAML_UNSIGNED( "throttleReversed", 1 ),
|
||||
YAML_UNSIGNED( "enableCustomThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableTelemetryWarning", 1 ),
|
||||
YAML_UNSIGNED( "showInstanceIds", 1 ),
|
||||
YAML_PADDING( 5 ),
|
||||
YAML_SIGNED( "customThrottleWarningPosition", 8 ),
|
||||
YAML_UNSIGNED( "beepANACenter", 16 ),
|
||||
YAML_ARRAY("mixData", 160, 64, struct_MixData, NULL),
|
||||
YAML_ARRAY("limitData", 88, 32, struct_LimitData, NULL),
|
||||
YAML_ARRAY("expoData", 136, 64, struct_ExpoData, NULL),
|
||||
YAML_ARRAY("curves", 32, 32, struct_CurveHeader, NULL),
|
||||
YAML_ARRAY("points", 8, 512, struct_signed_8, NULL),
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_STRUCT("rssiAlarms", 0, struct_RssiAlarmData, NULL),
|
||||
YAML_STRUCT("rfAlarms", 16, struct_RFAlarmData, NULL),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_ENUM("potsWarnMode", 2, enum_PotsWarnMode),
|
||||
YAML_ENUM("jitterFilter", 2, enum_ModelOverridableEnable),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ARRAY("moduleData", 232, 2, struct_ModuleData, NULL),
|
||||
YAML_ARRAY("failsafeChannels", 16, 32, struct_signed_16, NULL),
|
||||
YAML_STRUCT("trainerData", 40, struct_TrainerModuleData, NULL),
|
||||
YAML_ARRAY("scriptsData", 192, 7, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 24, 32, struct_string_24, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, struct_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_UNSIGNED( "usbJoystickExtMode", 1 ),
|
||||
YAML_ENUM("usbJoystickIfMode", 3, enum_USBJoystickIfMode),
|
||||
YAML_UNSIGNED( "usbJoystickCircularCut", 4 ),
|
||||
YAML_ARRAY("usbJoystickCh", 16, 26, struct_USBJoystickChData, NULL),
|
||||
YAML_ENUM("radioGFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("radioTrainerDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelHeliDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelFMDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCurvesDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelGVDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelLSDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelSFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCustomScriptsDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelTelemetryDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 29
|
||||
|
||||
static const struct YamlNode __RadioData_root_node = YAML_ROOT( struct_RadioData );
|
||||
|
||||
const YamlNode* get_radiodata_nodes()
|
||||
{
|
||||
return &__RadioData_root_node;
|
||||
}
|
||||
static const struct YamlNode __ModelData_root_node = YAML_ROOT( struct_ModelData );
|
||||
|
||||
const YamlNode* get_modeldata_nodes()
|
||||
{
|
||||
return &__ModelData_root_node;
|
||||
}
|
||||
static const struct YamlNode __PartialModel_root_node = YAML_ROOT( struct_PartialModel );
|
||||
|
||||
const YamlNode* get_partialmodel_nodes()
|
||||
{
|
||||
return &__PartialModel_root_node;
|
||||
}
|
||||
|
||||
@@ -1,943 +0,0 @@
|
||||
// generated by generate_yaml.py
|
||||
|
||||
//
|
||||
// Enums first
|
||||
//
|
||||
|
||||
const struct YamlIdStr enum_BacklightMode[] = {
|
||||
{ e_backlight_mode_off, "backlight_mode_off" },
|
||||
{ e_backlight_mode_keys, "backlight_mode_keys" },
|
||||
{ e_backlight_mode_sticks, "backlight_mode_sticks" },
|
||||
{ e_backlight_mode_all, "backlight_mode_all" },
|
||||
{ e_backlight_mode_on, "backlight_mode_on" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_AntennaModes[] = {
|
||||
{ ANTENNA_MODE_INTERNAL, "MODE_INTERNAL" },
|
||||
{ ANTENNA_MODE_ASK, "MODE_ASK" },
|
||||
{ ANTENNA_MODE_PER_MODEL, "MODE_PER_MODEL" },
|
||||
{ ANTENNA_MODE_EXTERNAL, "MODE_EXTERNAL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModuleType[] = {
|
||||
{ MODULE_TYPE_NONE, "TYPE_NONE" },
|
||||
{ MODULE_TYPE_PPM, "TYPE_PPM" },
|
||||
{ MODULE_TYPE_XJT_PXX1, "TYPE_XJT_PXX1" },
|
||||
{ MODULE_TYPE_ISRM_PXX2, "TYPE_ISRM_PXX2" },
|
||||
{ MODULE_TYPE_DSM2, "TYPE_DSM2" },
|
||||
{ MODULE_TYPE_CROSSFIRE, "TYPE_CROSSFIRE" },
|
||||
{ MODULE_TYPE_MULTIMODULE, "TYPE_MULTIMODULE" },
|
||||
{ MODULE_TYPE_R9M_PXX1, "TYPE_R9M_PXX1" },
|
||||
{ MODULE_TYPE_R9M_PXX2, "TYPE_R9M_PXX2" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX1, "TYPE_R9M_LITE_PXX1" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX2, "TYPE_R9M_LITE_PXX2" },
|
||||
{ MODULE_TYPE_GHOST, "TYPE_GHOST" },
|
||||
{ MODULE_TYPE_R9M_LITE_PRO_PXX2, "TYPE_R9M_LITE_PRO_PXX2" },
|
||||
{ MODULE_TYPE_SBUS, "TYPE_SBUS" },
|
||||
{ MODULE_TYPE_XJT_LITE_PXX2, "TYPE_XJT_LITE_PXX2" },
|
||||
{ MODULE_TYPE_FLYSKY, "TYPE_FLYSKY" },
|
||||
{ MODULE_TYPE_LEMON_DSMP, "TYPE_LEMON_DSMP" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TrainerMultiplex[] = {
|
||||
{ TRAINER_OFF, "OFF" },
|
||||
{ TRAINER_ADD, "ADD" },
|
||||
{ TRAINER_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BeeperMode[] = {
|
||||
{ e_mode_quiet, "mode_quiet" },
|
||||
{ e_mode_alarms, "mode_alarms" },
|
||||
{ e_mode_nokeys, "mode_nokeys" },
|
||||
{ e_mode_all, "mode_all" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BluetoothModes[] = {
|
||||
{ BLUETOOTH_OFF, "OFF" },
|
||||
{ BLUETOOTH_TELEMETRY, "TELEMETRY" },
|
||||
{ BLUETOOTH_TRAINER, "TRAINER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_OVERRIDE_CHANNEL, "OVERRIDE_CHANNEL" },
|
||||
{ FUNC_TRAINER, "TRAINER" },
|
||||
{ FUNC_INSTANT_TRIM, "INSTANT_TRIM" },
|
||||
{ FUNC_RESET, "RESET" },
|
||||
{ FUNC_SET_TIMER, "SET_TIMER" },
|
||||
{ FUNC_ADJUST_GVAR, "ADJUST_GVAR" },
|
||||
{ FUNC_VOLUME, "VOLUME" },
|
||||
{ FUNC_SET_FAILSAFE, "SET_FAILSAFE" },
|
||||
{ FUNC_RANGECHECK, "RANGECHECK" },
|
||||
{ FUNC_BIND, "BIND" },
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
{ FUNC_HAPTIC, "HAPTIC" },
|
||||
{ FUNC_LOGS, "LOGS" },
|
||||
{ FUNC_BACKLIGHT, "BACKLIGHT" },
|
||||
{ FUNC_SCREENSHOT, "SCREENSHOT" },
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
{ TMRMODE_START, "START" },
|
||||
{ TMRMODE_THR, "THR" },
|
||||
{ TMRMODE_THR_REL, "THR_REL" },
|
||||
{ TMRMODE_THR_START, "THR_START" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
{ MLTPX_ADD, "ADD" },
|
||||
{ MLTPX_MUL, "MUL" },
|
||||
{ MLTPX_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_POT2, "POT2" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SH, "SH" },
|
||||
{ MIXSRC_SI, "SI" },
|
||||
{ MIXSRC_SJ, "SJ" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_NONE, "FUNC_NONE" },
|
||||
{ LS_FUNC_VEQUAL, "FUNC_VEQUAL" },
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
{ LS_FUNC_OR, "FUNC_OR" },
|
||||
{ LS_FUNC_XOR, "FUNC_XOR" },
|
||||
{ LS_FUNC_EDGE, "FUNC_EDGE" },
|
||||
{ LS_FUNC_EQUAL, "FUNC_EQUAL" },
|
||||
{ LS_FUNC_GREATER, "FUNC_GREATER" },
|
||||
{ LS_FUNC_LESS, "FUNC_LESS" },
|
||||
{ LS_FUNC_DIFFEGREATER, "FUNC_DIFFEGREATER" },
|
||||
{ LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" },
|
||||
{ LS_FUNC_TIMER, "FUNC_TIMER" },
|
||||
{ LS_FUNC_STICKY, "FUNC_STICKY" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwashType[] = {
|
||||
{ SWASH_TYPE_NONE, "TYPE_NONE" },
|
||||
{ SWASH_TYPE_120, "TYPE_120" },
|
||||
{ SWASH_TYPE_120X, "TYPE_120X" },
|
||||
{ SWASH_TYPE_140, "TYPE_140" },
|
||||
{ SWASH_TYPE_90, "TYPE_90" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_SH0, "SH0" },
|
||||
{ SWSRC_SH1, "SH1" },
|
||||
{ SWSRC_SH2, "SH2" },
|
||||
{ SWSRC_SI0, "SI0" },
|
||||
{ SWSRC_SI1, "SI1" },
|
||||
{ SWSRC_SI2, "SI2" },
|
||||
{ SWSRC_SJ0, "SJ0" },
|
||||
{ SWSRC_SJ1, "SJ1" },
|
||||
{ SWSRC_SJ2, "SJ2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
{ SWSRC_RADIO_ACTIVITY, "RADIO_ACTIVITY" },
|
||||
{ SWSRC_OFF, "OFF" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_PotsWarnMode[] = {
|
||||
{ POTS_WARN_OFF, "WARN_OFF" },
|
||||
{ POTS_WARN_MANUAL, "WARN_MANUAL" },
|
||||
{ POTS_WARN_AUTO, "WARN_AUTO" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModelOverridableEnable[] = {
|
||||
{ OVERRIDE_GLOBAL, "GLOBAL" },
|
||||
{ OVERRIDE_OFF, "OFF" },
|
||||
{ OVERRIDE_ON, "ON" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_FailsafeModes[] = {
|
||||
{ FAILSAFE_NOT_SET, "NOT_SET" },
|
||||
{ FAILSAFE_HOLD, "HOLD" },
|
||||
{ FAILSAFE_CUSTOM, "CUSTOM" },
|
||||
{ FAILSAFE_NOPULSES, "NOPULSES" },
|
||||
{ FAILSAFE_RECEIVER, "RECEIVER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorFormula[] = {
|
||||
{ TELEM_FORMULA_ADD, "FORMULA_ADD" },
|
||||
{ TELEM_FORMULA_AVERAGE, "FORMULA_AVERAGE" },
|
||||
{ TELEM_FORMULA_MIN, "FORMULA_MIN" },
|
||||
{ TELEM_FORMULA_MAX, "FORMULA_MAX" },
|
||||
{ TELEM_FORMULA_MULTIPLY, "FORMULA_MULTIPLY" },
|
||||
{ TELEM_FORMULA_TOTALIZE, "FORMULA_TOTALIZE" },
|
||||
{ TELEM_FORMULA_CELL, "FORMULA_CELL" },
|
||||
{ TELEM_FORMULA_CONSUMPTION, "FORMULA_CONSUMPTION" },
|
||||
{ TELEM_FORMULA_DIST, "FORMULA_DIST" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorType[] = {
|
||||
{ TELEM_TYPE_CUSTOM, "TYPE_CUSTOM" },
|
||||
{ TELEM_TYPE_CALCULATED, "TYPE_CALCULATED" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickIfMode[] = {
|
||||
{ USBJOYS_JOYSTICK, "JOYSTICK" },
|
||||
{ USBJOYS_GAMEPAD, "GAMEPAD" },
|
||||
{ USBJOYS_MULTIAXIS, "MULTIAXIS" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickCh[] = {
|
||||
{ USBJOYS_CH_NONE, "CH_NONE" },
|
||||
{ USBJOYS_CH_BUTTON, "CH_BUTTON" },
|
||||
{ USBJOYS_CH_AXIS, "CH_AXIS" },
|
||||
{ USBJOYS_CH_SIM, "CH_SIM" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||
YAML_SIGNED( "mid", 16 ),
|
||||
YAML_SIGNED( "spanNeg", 16 ),
|
||||
YAML_SIGNED( "spanPos", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerMix[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "srcChn", 6 ),
|
||||
YAML_ENUM("mode", 2, enum_TrainerMultiplex),
|
||||
YAML_SIGNED( "studWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerData[] = {
|
||||
YAML_ARRAY("calib", 16, 4, struct_signed_16, NULL),
|
||||
YAML_ARRAY("mix", 16, 4, struct_TrainerMix, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_1[] = {
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_2[] = {
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_UNSIGNED( "mode", 8 ),
|
||||
YAML_UNSIGNED( "param", 8 ),
|
||||
YAML_SIGNED( "spare", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_SIGNED( "val2", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
YAML_STRUCT("play", 48, struct_anonymous_1, NULL),
|
||||
YAML_STRUCT("all", 64, struct_anonymous_2, NULL),
|
||||
YAML_STRUCT("clear", 64, struct_anonymous_3, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "manuallyEdited", 1 ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_SIGNED( "currModel", 8 ),
|
||||
YAML_UNSIGNED( "contrast", 8 ),
|
||||
YAML_UNSIGNED( "vBatWarn", 8 ),
|
||||
YAML_SIGNED( "txVoltageCalibration", 8 ),
|
||||
YAML_ENUM("backlightMode", 3, enum_BacklightMode),
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "fai", 1 ),
|
||||
YAML_SIGNED_CUST( "beepMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_UNSIGNED( "alarmsFlash", 1 ),
|
||||
YAML_UNSIGNED( "disableMemoryWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableAlarmWarning", 1 ),
|
||||
YAML_UNSIGNED( "stickMode", 2 ),
|
||||
YAML_SIGNED( "timezone", 5 ),
|
||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||
YAML_CUSTOM("telemetryBaudrate",r_telemetryBaudrate,nullptr),
|
||||
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||
YAML_SIGNED( "splashMode", 3 ),
|
||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_SIGNED( "switchesDelay", 8 ),
|
||||
YAML_UNSIGNED( "lightAutoOff", 8 ),
|
||||
YAML_UNSIGNED( "templateSetup", 8 ),
|
||||
YAML_SIGNED( "PPM_Multiplier", 8 ),
|
||||
YAML_SIGNED_CUST( "hapticLength", 8, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 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 ),
|
||||
YAML_SIGNED_CUST( "vBatMax", 8, r_vbat_max, w_vbat_max ),
|
||||
YAML_UNSIGNED( "backlightBright", 8 ),
|
||||
YAML_UNSIGNED( "globalTimer", 32 ),
|
||||
YAML_UNSIGNED( "bluetoothBaudrate", 4 ),
|
||||
YAML_ENUM("bluetoothMode", 4, enum_BluetoothModes),
|
||||
YAML_UNSIGNED( "countryCode", 2 ),
|
||||
YAML_SIGNED( "pwrOnSpeed", 3 ),
|
||||
YAML_SIGNED( "pwrOffSpeed", 3 ),
|
||||
YAML_CUSTOM("jitterFilter",r_jitterFilter,nullptr),
|
||||
YAML_UNSIGNED( "noJitterFilter", 1 ),
|
||||
YAML_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "disableRssiPoweroffAlarm", 1 ),
|
||||
YAML_UNSIGNED( "USBMode", 2 ),
|
||||
YAML_UNSIGNED( "jackMode", 2 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("ttsLanguage", 2),
|
||||
YAML_SIGNED_CUST( "beepVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "wavVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "backgroundVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioPitch", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 8, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 192 ),
|
||||
YAML_PADDING( 144 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
YAML_CUSTOM("rotEncDirection",r_rotEncDirection,nullptr),
|
||||
YAML_UNSIGNED( "rotEncMode", 2 ),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "radioGFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "radioTrainerDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelHeliDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelFMDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCurvesDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelGVDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelLSDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelSFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelTelemetryDisabled", 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelHeader[] = {
|
||||
YAML_STRING("name", 10),
|
||||
YAML_ARRAY("modelId", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TimerData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "start", 22 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED( "value", 22 ),
|
||||
YAML_ENUM("mode", 3, enum_TimerModes),
|
||||
YAML_UNSIGNED( "countdownBeep", 2 ),
|
||||
YAML_UNSIGNED( "minuteBeep", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 2 ),
|
||||
YAML_SIGNED( "countdownStart", 2 ),
|
||||
YAML_UNSIGNED( "showElapsed", 1 ),
|
||||
YAML_UNSIGNED( "extraHaptic", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "destCh", 5 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "carryTrim", 1 ),
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
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),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
YAML_UNSIGNED( "delayDown", 8 ),
|
||||
YAML_UNSIGNED( "speedUp", 8 ),
|
||||
YAML_UNSIGNED( "speedDown", 8 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
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_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_SIGNED( "curve", 8 ),
|
||||
YAML_STRING("name", 4),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "scale", 14 ),
|
||||
YAML_CUSTOM("carryTrim",r_carryTrim,nullptr),
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveHeader[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
YAML_UNSIGNED( "smooth", 1 ),
|
||||
YAML_SIGNED( "points", 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("func", 8, enum_LogicalSwitchesFunctions),
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_ENUM("type", 8, enum_SwashType),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED_CUST( "collectiveSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "aileronSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "elevatorSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "collectiveWeight", 8 ),
|
||||
YAML_SIGNED( "aileronWeight", 8 ),
|
||||
YAML_SIGNED( "elevatorWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_trim_t[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "value", 11 ),
|
||||
YAML_UNSIGNED( "mode", 5 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_GVarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("name", 3),
|
||||
YAML_UNSIGNED( "min", 12 ),
|
||||
YAML_UNSIGNED( "max", 12 ),
|
||||
YAML_UNSIGNED( "popup", 1 ),
|
||||
YAML_UNSIGNED( "prec", 1 ),
|
||||
YAML_UNSIGNED( "unit", 2 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_VarioData[] = {
|
||||
YAML_UNSIGNED_CUST( "source", 7, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_UNSIGNED( "centerSilent", 1 ),
|
||||
YAML_SIGNED( "centerMax", 8 ),
|
||||
YAML_SIGNED( "centerMin", 8 ),
|
||||
YAML_SIGNED( "min", 8 ),
|
||||
YAML_SIGNED( "max", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RssiAlarmData[] = {
|
||||
YAML_CUSTOM("disabled",r_rssiDisabled,nullptr),
|
||||
YAML_CUSTOM("warning",r_rssiWarning,nullptr),
|
||||
YAML_CUSTOM("critical",r_rssiCritical,nullptr),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RFAlarmData[] = {
|
||||
YAML_SIGNED( "warning", 8 ),
|
||||
YAML_SIGNED( "critical", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PpmModule[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "power", 2 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_SIGNED( "antennaMode", 2 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "noninverted", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "refreshRate", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_64[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_8[] = {
|
||||
YAML_UNSIGNED( "receivers", 7 ),
|
||||
YAML_UNSIGNED( "racingMode", 1 ),
|
||||
YAML_ARRAY("receiverName", 64, 3, struct_string_64, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_9[] = {
|
||||
YAML_ARRAY("rx_id", 8, 4, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 3 ),
|
||||
YAML_UNSIGNED( "rfPower", 1 ),
|
||||
YAML_UNSIGNED( "reserved", 4 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_10[] = {
|
||||
YAML_UNSIGNED( "emi", 2 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "phyMode", 3 ),
|
||||
YAML_UNSIGNED( "reserved", 2 ),
|
||||
YAML_UNSIGNED( "rfPower", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_11[] = {
|
||||
YAML_UNSIGNED( "raw12bits", 1 ),
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_12[] = {
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_13[] = {
|
||||
YAML_UNSIGNED( "flags", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_PpmModule, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("afhds3", 16, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("ghost", 8, struct_anonymous_11, NULL),
|
||||
YAML_STRUCT("crsf", 8, struct_anonymous_12, NULL),
|
||||
YAML_STRUCT("dsmp", 8, struct_anonymous_13, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 8, enum_ModuleType),
|
||||
YAML_CUSTOM("subType",r_modSubtype,w_modSubtype),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED_CUST( "channelsCount", 8, r_channelsCount, w_channelsCount ),
|
||||
YAML_ENUM("failsafeMode", 4, enum_FailsafeModes),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_UNION("mod", 200, union_anonymous_4_elmts, select_mod_type),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerModuleData[] = {
|
||||
YAML_UNSIGNED_CUST( "mode", 8, r_trainerMode, w_trainerMode ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput_elmts[] = {
|
||||
YAML_SIGNED( "value", 16 ),
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 16, union_ScriptDataInput_elmts, select_script_input),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ScriptData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("file", 6),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_ARRAY("inputs", 16, 6, union_ScriptDataInput, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_14_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_16, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_ENUM("formula", 8, enum_TelemetrySensorFormula),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_21[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_22[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_17_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_20, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_21, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_22, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_14_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_15_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_ENUM("type", 1, enum_TelemetrySensorType),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "unit", 6 ),
|
||||
YAML_UNSIGNED( "prec", 2 ),
|
||||
YAML_UNSIGNED( "autoOffset", 1 ),
|
||||
YAML_UNSIGNED( "filter", 1 ),
|
||||
YAML_UNSIGNED( "logs", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 1 ),
|
||||
YAML_UNSIGNED( "onlyPositive", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNION("cfg", 32, union_anonymous_17_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LineDataSource[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "val", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_LineDataSource, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScriptData[] = {
|
||||
YAML_STRING("file", 6),
|
||||
YAML_ARRAY("inputs", 16, 8, struct_signed_16, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_TelemetryScreenData_u_elmts[] = {
|
||||
YAML_ARRAY("bars", 48, 4, struct_FrSkyBarData, NULL),
|
||||
YAML_ARRAY("lines", 32, 4, struct_FrSkyLineData, NULL),
|
||||
YAML_STRUCT("script", 176, struct_TelemetryScriptData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_CUSTOM("type",r_tele_screen_type,w_tele_screen_type),
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_u_elmts, select_tele_screen_data),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_USBJoystickChData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("mode", 3, enum_USBJoystickCh),
|
||||
YAML_UNSIGNED( "inversion", 1 ),
|
||||
YAML_UNSIGNED( "param", 4 ),
|
||||
YAML_UNSIGNED( "btn_num", 5 ),
|
||||
YAML_UNSIGNED( "switch_npos", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_UNSIGNED( "telemetryProtocol", 3 ),
|
||||
YAML_UNSIGNED( "thrTrim", 1 ),
|
||||
YAML_UNSIGNED( "noGlobalFunctions", 1 ),
|
||||
YAML_UNSIGNED( "displayTrims", 2 ),
|
||||
YAML_UNSIGNED( "ignoreSensorIds", 1 ),
|
||||
YAML_SIGNED( "trimInc", 3 ),
|
||||
YAML_UNSIGNED( "disableThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "displayChecklist", 1 ),
|
||||
YAML_UNSIGNED( "extendedLimits", 1 ),
|
||||
YAML_UNSIGNED( "extendedTrims", 1 ),
|
||||
YAML_UNSIGNED( "throttleReversed", 1 ),
|
||||
YAML_UNSIGNED( "enableCustomThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableTelemetryWarning", 1 ),
|
||||
YAML_UNSIGNED( "showInstanceIds", 1 ),
|
||||
YAML_PADDING( 5 ),
|
||||
YAML_SIGNED( "customThrottleWarningPosition", 8 ),
|
||||
YAML_UNSIGNED( "beepANACenter", 16 ),
|
||||
YAML_ARRAY("mixData", 160, 64, struct_MixData, NULL),
|
||||
YAML_ARRAY("limitData", 88, 32, struct_LimitData, NULL),
|
||||
YAML_ARRAY("expoData", 136, 64, struct_ExpoData, NULL),
|
||||
YAML_ARRAY("curves", 32, 32, struct_CurveHeader, NULL),
|
||||
YAML_ARRAY("points", 8, 512, struct_signed_8, NULL),
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_STRUCT("rssiAlarms", 0, struct_RssiAlarmData, NULL),
|
||||
YAML_STRUCT("rfAlarms", 16, struct_RFAlarmData, NULL),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_ENUM("potsWarnMode", 2, enum_PotsWarnMode),
|
||||
YAML_ENUM("jitterFilter", 2, enum_ModelOverridableEnable),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ARRAY("moduleData", 232, 2, struct_ModuleData, NULL),
|
||||
YAML_ARRAY("failsafeChannels", 16, 32, struct_signed_16, NULL),
|
||||
YAML_STRUCT("trainerData", 40, struct_TrainerModuleData, NULL),
|
||||
YAML_ARRAY("scriptsData", 192, 7, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 24, 32, struct_string_24, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, struct_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_UNSIGNED( "usbJoystickExtMode", 1 ),
|
||||
YAML_ENUM("usbJoystickIfMode", 3, enum_USBJoystickIfMode),
|
||||
YAML_UNSIGNED( "usbJoystickCircularCut", 4 ),
|
||||
YAML_ARRAY("usbJoystickCh", 16, 26, struct_USBJoystickChData, NULL),
|
||||
YAML_ENUM("radioGFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("radioTrainerDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelHeliDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelFMDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCurvesDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelGVDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelLSDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelSFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCustomScriptsDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelTelemetryDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 29
|
||||
|
||||
static const struct YamlNode __RadioData_root_node = YAML_ROOT( struct_RadioData );
|
||||
|
||||
const YamlNode* get_radiodata_nodes()
|
||||
{
|
||||
return &__RadioData_root_node;
|
||||
}
|
||||
static const struct YamlNode __ModelData_root_node = YAML_ROOT( struct_ModelData );
|
||||
|
||||
const YamlNode* get_modeldata_nodes()
|
||||
{
|
||||
return &__ModelData_root_node;
|
||||
}
|
||||
static const struct YamlNode __PartialModel_root_node = YAML_ROOT( struct_PartialModel );
|
||||
|
||||
const YamlNode* get_partialmodel_nodes()
|
||||
{
|
||||
return &__PartialModel_root_node;
|
||||
}
|
||||
|
||||
@@ -1,943 +0,0 @@
|
||||
// generated by generate_yaml.py
|
||||
|
||||
//
|
||||
// Enums first
|
||||
//
|
||||
|
||||
const struct YamlIdStr enum_BacklightMode[] = {
|
||||
{ e_backlight_mode_off, "backlight_mode_off" },
|
||||
{ e_backlight_mode_keys, "backlight_mode_keys" },
|
||||
{ e_backlight_mode_sticks, "backlight_mode_sticks" },
|
||||
{ e_backlight_mode_all, "backlight_mode_all" },
|
||||
{ e_backlight_mode_on, "backlight_mode_on" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_AntennaModes[] = {
|
||||
{ ANTENNA_MODE_INTERNAL, "MODE_INTERNAL" },
|
||||
{ ANTENNA_MODE_ASK, "MODE_ASK" },
|
||||
{ ANTENNA_MODE_PER_MODEL, "MODE_PER_MODEL" },
|
||||
{ ANTENNA_MODE_EXTERNAL, "MODE_EXTERNAL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModuleType[] = {
|
||||
{ MODULE_TYPE_NONE, "TYPE_NONE" },
|
||||
{ MODULE_TYPE_PPM, "TYPE_PPM" },
|
||||
{ MODULE_TYPE_XJT_PXX1, "TYPE_XJT_PXX1" },
|
||||
{ MODULE_TYPE_ISRM_PXX2, "TYPE_ISRM_PXX2" },
|
||||
{ MODULE_TYPE_DSM2, "TYPE_DSM2" },
|
||||
{ MODULE_TYPE_CROSSFIRE, "TYPE_CROSSFIRE" },
|
||||
{ MODULE_TYPE_MULTIMODULE, "TYPE_MULTIMODULE" },
|
||||
{ MODULE_TYPE_R9M_PXX1, "TYPE_R9M_PXX1" },
|
||||
{ MODULE_TYPE_R9M_PXX2, "TYPE_R9M_PXX2" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX1, "TYPE_R9M_LITE_PXX1" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX2, "TYPE_R9M_LITE_PXX2" },
|
||||
{ MODULE_TYPE_GHOST, "TYPE_GHOST" },
|
||||
{ MODULE_TYPE_R9M_LITE_PRO_PXX2, "TYPE_R9M_LITE_PRO_PXX2" },
|
||||
{ MODULE_TYPE_SBUS, "TYPE_SBUS" },
|
||||
{ MODULE_TYPE_XJT_LITE_PXX2, "TYPE_XJT_LITE_PXX2" },
|
||||
{ MODULE_TYPE_FLYSKY, "TYPE_FLYSKY" },
|
||||
{ MODULE_TYPE_LEMON_DSMP, "TYPE_LEMON_DSMP" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TrainerMultiplex[] = {
|
||||
{ TRAINER_OFF, "OFF" },
|
||||
{ TRAINER_ADD, "ADD" },
|
||||
{ TRAINER_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BeeperMode[] = {
|
||||
{ e_mode_quiet, "mode_quiet" },
|
||||
{ e_mode_alarms, "mode_alarms" },
|
||||
{ e_mode_nokeys, "mode_nokeys" },
|
||||
{ e_mode_all, "mode_all" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BluetoothModes[] = {
|
||||
{ BLUETOOTH_OFF, "OFF" },
|
||||
{ BLUETOOTH_TELEMETRY, "TELEMETRY" },
|
||||
{ BLUETOOTH_TRAINER, "TRAINER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_OVERRIDE_CHANNEL, "OVERRIDE_CHANNEL" },
|
||||
{ FUNC_TRAINER, "TRAINER" },
|
||||
{ FUNC_INSTANT_TRIM, "INSTANT_TRIM" },
|
||||
{ FUNC_RESET, "RESET" },
|
||||
{ FUNC_SET_TIMER, "SET_TIMER" },
|
||||
{ FUNC_ADJUST_GVAR, "ADJUST_GVAR" },
|
||||
{ FUNC_VOLUME, "VOLUME" },
|
||||
{ FUNC_SET_FAILSAFE, "SET_FAILSAFE" },
|
||||
{ FUNC_RANGECHECK, "RANGECHECK" },
|
||||
{ FUNC_BIND, "BIND" },
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
{ FUNC_HAPTIC, "HAPTIC" },
|
||||
{ FUNC_LOGS, "LOGS" },
|
||||
{ FUNC_BACKLIGHT, "BACKLIGHT" },
|
||||
{ FUNC_SCREENSHOT, "SCREENSHOT" },
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
{ TMRMODE_START, "START" },
|
||||
{ TMRMODE_THR, "THR" },
|
||||
{ TMRMODE_THR_REL, "THR_REL" },
|
||||
{ TMRMODE_THR_START, "THR_START" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
{ MLTPX_ADD, "ADD" },
|
||||
{ MLTPX_MUL, "MUL" },
|
||||
{ MLTPX_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_POT2, "POT2" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SH, "SH" },
|
||||
{ MIXSRC_SI, "SI" },
|
||||
{ MIXSRC_SJ, "SJ" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_NONE, "FUNC_NONE" },
|
||||
{ LS_FUNC_VEQUAL, "FUNC_VEQUAL" },
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
{ LS_FUNC_OR, "FUNC_OR" },
|
||||
{ LS_FUNC_XOR, "FUNC_XOR" },
|
||||
{ LS_FUNC_EDGE, "FUNC_EDGE" },
|
||||
{ LS_FUNC_EQUAL, "FUNC_EQUAL" },
|
||||
{ LS_FUNC_GREATER, "FUNC_GREATER" },
|
||||
{ LS_FUNC_LESS, "FUNC_LESS" },
|
||||
{ LS_FUNC_DIFFEGREATER, "FUNC_DIFFEGREATER" },
|
||||
{ LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" },
|
||||
{ LS_FUNC_TIMER, "FUNC_TIMER" },
|
||||
{ LS_FUNC_STICKY, "FUNC_STICKY" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwashType[] = {
|
||||
{ SWASH_TYPE_NONE, "TYPE_NONE" },
|
||||
{ SWASH_TYPE_120, "TYPE_120" },
|
||||
{ SWASH_TYPE_120X, "TYPE_120X" },
|
||||
{ SWASH_TYPE_140, "TYPE_140" },
|
||||
{ SWASH_TYPE_90, "TYPE_90" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_SH0, "SH0" },
|
||||
{ SWSRC_SH1, "SH1" },
|
||||
{ SWSRC_SH2, "SH2" },
|
||||
{ SWSRC_SI0, "SI0" },
|
||||
{ SWSRC_SI1, "SI1" },
|
||||
{ SWSRC_SI2, "SI2" },
|
||||
{ SWSRC_SJ0, "SJ0" },
|
||||
{ SWSRC_SJ1, "SJ1" },
|
||||
{ SWSRC_SJ2, "SJ2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
{ SWSRC_RADIO_ACTIVITY, "RADIO_ACTIVITY" },
|
||||
{ SWSRC_OFF, "OFF" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_PotsWarnMode[] = {
|
||||
{ POTS_WARN_OFF, "WARN_OFF" },
|
||||
{ POTS_WARN_MANUAL, "WARN_MANUAL" },
|
||||
{ POTS_WARN_AUTO, "WARN_AUTO" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModelOverridableEnable[] = {
|
||||
{ OVERRIDE_GLOBAL, "GLOBAL" },
|
||||
{ OVERRIDE_OFF, "OFF" },
|
||||
{ OVERRIDE_ON, "ON" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_FailsafeModes[] = {
|
||||
{ FAILSAFE_NOT_SET, "NOT_SET" },
|
||||
{ FAILSAFE_HOLD, "HOLD" },
|
||||
{ FAILSAFE_CUSTOM, "CUSTOM" },
|
||||
{ FAILSAFE_NOPULSES, "NOPULSES" },
|
||||
{ FAILSAFE_RECEIVER, "RECEIVER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorFormula[] = {
|
||||
{ TELEM_FORMULA_ADD, "FORMULA_ADD" },
|
||||
{ TELEM_FORMULA_AVERAGE, "FORMULA_AVERAGE" },
|
||||
{ TELEM_FORMULA_MIN, "FORMULA_MIN" },
|
||||
{ TELEM_FORMULA_MAX, "FORMULA_MAX" },
|
||||
{ TELEM_FORMULA_MULTIPLY, "FORMULA_MULTIPLY" },
|
||||
{ TELEM_FORMULA_TOTALIZE, "FORMULA_TOTALIZE" },
|
||||
{ TELEM_FORMULA_CELL, "FORMULA_CELL" },
|
||||
{ TELEM_FORMULA_CONSUMPTION, "FORMULA_CONSUMPTION" },
|
||||
{ TELEM_FORMULA_DIST, "FORMULA_DIST" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorType[] = {
|
||||
{ TELEM_TYPE_CUSTOM, "TYPE_CUSTOM" },
|
||||
{ TELEM_TYPE_CALCULATED, "TYPE_CALCULATED" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickIfMode[] = {
|
||||
{ USBJOYS_JOYSTICK, "JOYSTICK" },
|
||||
{ USBJOYS_GAMEPAD, "GAMEPAD" },
|
||||
{ USBJOYS_MULTIAXIS, "MULTIAXIS" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickCh[] = {
|
||||
{ USBJOYS_CH_NONE, "CH_NONE" },
|
||||
{ USBJOYS_CH_BUTTON, "CH_BUTTON" },
|
||||
{ USBJOYS_CH_AXIS, "CH_AXIS" },
|
||||
{ USBJOYS_CH_SIM, "CH_SIM" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||
YAML_SIGNED( "mid", 16 ),
|
||||
YAML_SIGNED( "spanNeg", 16 ),
|
||||
YAML_SIGNED( "spanPos", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerMix[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "srcChn", 6 ),
|
||||
YAML_ENUM("mode", 2, enum_TrainerMultiplex),
|
||||
YAML_SIGNED( "studWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerData[] = {
|
||||
YAML_ARRAY("calib", 16, 4, struct_signed_16, NULL),
|
||||
YAML_ARRAY("mix", 16, 4, struct_TrainerMix, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_1[] = {
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_2[] = {
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_UNSIGNED( "mode", 8 ),
|
||||
YAML_UNSIGNED( "param", 8 ),
|
||||
YAML_SIGNED( "spare", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_SIGNED( "val2", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
YAML_STRUCT("play", 48, struct_anonymous_1, NULL),
|
||||
YAML_STRUCT("all", 64, struct_anonymous_2, NULL),
|
||||
YAML_STRUCT("clear", 64, struct_anonymous_3, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "manuallyEdited", 1 ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_SIGNED( "currModel", 8 ),
|
||||
YAML_UNSIGNED( "contrast", 8 ),
|
||||
YAML_UNSIGNED( "vBatWarn", 8 ),
|
||||
YAML_SIGNED( "txVoltageCalibration", 8 ),
|
||||
YAML_ENUM("backlightMode", 3, enum_BacklightMode),
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "fai", 1 ),
|
||||
YAML_SIGNED_CUST( "beepMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_UNSIGNED( "alarmsFlash", 1 ),
|
||||
YAML_UNSIGNED( "disableMemoryWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableAlarmWarning", 1 ),
|
||||
YAML_UNSIGNED( "stickMode", 2 ),
|
||||
YAML_SIGNED( "timezone", 5 ),
|
||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||
YAML_CUSTOM("telemetryBaudrate",r_telemetryBaudrate,nullptr),
|
||||
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||
YAML_SIGNED( "splashMode", 3 ),
|
||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_SIGNED( "switchesDelay", 8 ),
|
||||
YAML_UNSIGNED( "lightAutoOff", 8 ),
|
||||
YAML_UNSIGNED( "templateSetup", 8 ),
|
||||
YAML_SIGNED( "PPM_Multiplier", 8 ),
|
||||
YAML_SIGNED_CUST( "hapticLength", 8, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 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 ),
|
||||
YAML_SIGNED_CUST( "vBatMax", 8, r_vbat_max, w_vbat_max ),
|
||||
YAML_UNSIGNED( "backlightBright", 8 ),
|
||||
YAML_UNSIGNED( "globalTimer", 32 ),
|
||||
YAML_UNSIGNED( "bluetoothBaudrate", 4 ),
|
||||
YAML_ENUM("bluetoothMode", 4, enum_BluetoothModes),
|
||||
YAML_UNSIGNED( "countryCode", 2 ),
|
||||
YAML_SIGNED( "pwrOnSpeed", 3 ),
|
||||
YAML_SIGNED( "pwrOffSpeed", 3 ),
|
||||
YAML_CUSTOM("jitterFilter",r_jitterFilter,nullptr),
|
||||
YAML_UNSIGNED( "noJitterFilter", 1 ),
|
||||
YAML_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "disableRssiPoweroffAlarm", 1 ),
|
||||
YAML_UNSIGNED( "USBMode", 2 ),
|
||||
YAML_UNSIGNED( "jackMode", 2 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("ttsLanguage", 2),
|
||||
YAML_SIGNED_CUST( "beepVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "wavVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "backgroundVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioPitch", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 8, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 192 ),
|
||||
YAML_PADDING( 144 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
YAML_CUSTOM("rotEncDirection",r_rotEncDirection,nullptr),
|
||||
YAML_UNSIGNED( "rotEncMode", 2 ),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "radioGFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "radioTrainerDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelHeliDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelFMDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCurvesDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelGVDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelLSDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelSFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelTelemetryDisabled", 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelHeader[] = {
|
||||
YAML_STRING("name", 10),
|
||||
YAML_ARRAY("modelId", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TimerData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "start", 22 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED( "value", 22 ),
|
||||
YAML_ENUM("mode", 3, enum_TimerModes),
|
||||
YAML_UNSIGNED( "countdownBeep", 2 ),
|
||||
YAML_UNSIGNED( "minuteBeep", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 2 ),
|
||||
YAML_SIGNED( "countdownStart", 2 ),
|
||||
YAML_UNSIGNED( "showElapsed", 1 ),
|
||||
YAML_UNSIGNED( "extraHaptic", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "destCh", 5 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "carryTrim", 1 ),
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
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),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
YAML_UNSIGNED( "delayDown", 8 ),
|
||||
YAML_UNSIGNED( "speedUp", 8 ),
|
||||
YAML_UNSIGNED( "speedDown", 8 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
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_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_SIGNED( "curve", 8 ),
|
||||
YAML_STRING("name", 4),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "scale", 14 ),
|
||||
YAML_CUSTOM("carryTrim",r_carryTrim,nullptr),
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveHeader[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
YAML_UNSIGNED( "smooth", 1 ),
|
||||
YAML_SIGNED( "points", 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("func", 8, enum_LogicalSwitchesFunctions),
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_ENUM("type", 8, enum_SwashType),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED_CUST( "collectiveSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "aileronSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "elevatorSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "collectiveWeight", 8 ),
|
||||
YAML_SIGNED( "aileronWeight", 8 ),
|
||||
YAML_SIGNED( "elevatorWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_trim_t[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "value", 11 ),
|
||||
YAML_UNSIGNED( "mode", 5 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_GVarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("name", 3),
|
||||
YAML_UNSIGNED( "min", 12 ),
|
||||
YAML_UNSIGNED( "max", 12 ),
|
||||
YAML_UNSIGNED( "popup", 1 ),
|
||||
YAML_UNSIGNED( "prec", 1 ),
|
||||
YAML_UNSIGNED( "unit", 2 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_VarioData[] = {
|
||||
YAML_UNSIGNED_CUST( "source", 7, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_UNSIGNED( "centerSilent", 1 ),
|
||||
YAML_SIGNED( "centerMax", 8 ),
|
||||
YAML_SIGNED( "centerMin", 8 ),
|
||||
YAML_SIGNED( "min", 8 ),
|
||||
YAML_SIGNED( "max", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RssiAlarmData[] = {
|
||||
YAML_CUSTOM("disabled",r_rssiDisabled,nullptr),
|
||||
YAML_CUSTOM("warning",r_rssiWarning,nullptr),
|
||||
YAML_CUSTOM("critical",r_rssiCritical,nullptr),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RFAlarmData[] = {
|
||||
YAML_SIGNED( "warning", 8 ),
|
||||
YAML_SIGNED( "critical", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PpmModule[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "power", 2 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_SIGNED( "antennaMode", 2 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "noninverted", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "refreshRate", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_64[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_8[] = {
|
||||
YAML_UNSIGNED( "receivers", 7 ),
|
||||
YAML_UNSIGNED( "racingMode", 1 ),
|
||||
YAML_ARRAY("receiverName", 64, 3, struct_string_64, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_9[] = {
|
||||
YAML_ARRAY("rx_id", 8, 4, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 3 ),
|
||||
YAML_UNSIGNED( "rfPower", 1 ),
|
||||
YAML_UNSIGNED( "reserved", 4 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_10[] = {
|
||||
YAML_UNSIGNED( "emi", 2 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "phyMode", 3 ),
|
||||
YAML_UNSIGNED( "reserved", 2 ),
|
||||
YAML_UNSIGNED( "rfPower", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_11[] = {
|
||||
YAML_UNSIGNED( "raw12bits", 1 ),
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_12[] = {
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_13[] = {
|
||||
YAML_UNSIGNED( "flags", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_PpmModule, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("afhds3", 16, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("ghost", 8, struct_anonymous_11, NULL),
|
||||
YAML_STRUCT("crsf", 8, struct_anonymous_12, NULL),
|
||||
YAML_STRUCT("dsmp", 8, struct_anonymous_13, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 8, enum_ModuleType),
|
||||
YAML_CUSTOM("subType",r_modSubtype,w_modSubtype),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED_CUST( "channelsCount", 8, r_channelsCount, w_channelsCount ),
|
||||
YAML_ENUM("failsafeMode", 4, enum_FailsafeModes),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_UNION("mod", 200, union_anonymous_4_elmts, select_mod_type),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerModuleData[] = {
|
||||
YAML_UNSIGNED_CUST( "mode", 8, r_trainerMode, w_trainerMode ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput_elmts[] = {
|
||||
YAML_SIGNED( "value", 16 ),
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 16, union_ScriptDataInput_elmts, select_script_input),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ScriptData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("file", 6),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_ARRAY("inputs", 16, 6, union_ScriptDataInput, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_14_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_16, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_ENUM("formula", 8, enum_TelemetrySensorFormula),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_21[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_22[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_17_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_20, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_21, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_22, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_14_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_15_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_ENUM("type", 1, enum_TelemetrySensorType),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "unit", 6 ),
|
||||
YAML_UNSIGNED( "prec", 2 ),
|
||||
YAML_UNSIGNED( "autoOffset", 1 ),
|
||||
YAML_UNSIGNED( "filter", 1 ),
|
||||
YAML_UNSIGNED( "logs", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 1 ),
|
||||
YAML_UNSIGNED( "onlyPositive", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNION("cfg", 32, union_anonymous_17_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LineDataSource[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "val", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_LineDataSource, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScriptData[] = {
|
||||
YAML_STRING("file", 6),
|
||||
YAML_ARRAY("inputs", 16, 8, struct_signed_16, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_TelemetryScreenData_u_elmts[] = {
|
||||
YAML_ARRAY("bars", 48, 4, struct_FrSkyBarData, NULL),
|
||||
YAML_ARRAY("lines", 32, 4, struct_FrSkyLineData, NULL),
|
||||
YAML_STRUCT("script", 176, struct_TelemetryScriptData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_CUSTOM("type",r_tele_screen_type,w_tele_screen_type),
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_u_elmts, select_tele_screen_data),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_USBJoystickChData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("mode", 3, enum_USBJoystickCh),
|
||||
YAML_UNSIGNED( "inversion", 1 ),
|
||||
YAML_UNSIGNED( "param", 4 ),
|
||||
YAML_UNSIGNED( "btn_num", 5 ),
|
||||
YAML_UNSIGNED( "switch_npos", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_UNSIGNED( "telemetryProtocol", 3 ),
|
||||
YAML_UNSIGNED( "thrTrim", 1 ),
|
||||
YAML_UNSIGNED( "noGlobalFunctions", 1 ),
|
||||
YAML_UNSIGNED( "displayTrims", 2 ),
|
||||
YAML_UNSIGNED( "ignoreSensorIds", 1 ),
|
||||
YAML_SIGNED( "trimInc", 3 ),
|
||||
YAML_UNSIGNED( "disableThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "displayChecklist", 1 ),
|
||||
YAML_UNSIGNED( "extendedLimits", 1 ),
|
||||
YAML_UNSIGNED( "extendedTrims", 1 ),
|
||||
YAML_UNSIGNED( "throttleReversed", 1 ),
|
||||
YAML_UNSIGNED( "enableCustomThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableTelemetryWarning", 1 ),
|
||||
YAML_UNSIGNED( "showInstanceIds", 1 ),
|
||||
YAML_PADDING( 5 ),
|
||||
YAML_SIGNED( "customThrottleWarningPosition", 8 ),
|
||||
YAML_UNSIGNED( "beepANACenter", 16 ),
|
||||
YAML_ARRAY("mixData", 160, 64, struct_MixData, NULL),
|
||||
YAML_ARRAY("limitData", 88, 32, struct_LimitData, NULL),
|
||||
YAML_ARRAY("expoData", 136, 64, struct_ExpoData, NULL),
|
||||
YAML_ARRAY("curves", 32, 32, struct_CurveHeader, NULL),
|
||||
YAML_ARRAY("points", 8, 512, struct_signed_8, NULL),
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_STRUCT("rssiAlarms", 0, struct_RssiAlarmData, NULL),
|
||||
YAML_STRUCT("rfAlarms", 16, struct_RFAlarmData, NULL),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_ENUM("potsWarnMode", 2, enum_PotsWarnMode),
|
||||
YAML_ENUM("jitterFilter", 2, enum_ModelOverridableEnable),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ARRAY("moduleData", 232, 2, struct_ModuleData, NULL),
|
||||
YAML_ARRAY("failsafeChannels", 16, 32, struct_signed_16, NULL),
|
||||
YAML_STRUCT("trainerData", 40, struct_TrainerModuleData, NULL),
|
||||
YAML_ARRAY("scriptsData", 192, 7, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 24, 32, struct_string_24, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, struct_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_UNSIGNED( "usbJoystickExtMode", 1 ),
|
||||
YAML_ENUM("usbJoystickIfMode", 3, enum_USBJoystickIfMode),
|
||||
YAML_UNSIGNED( "usbJoystickCircularCut", 4 ),
|
||||
YAML_ARRAY("usbJoystickCh", 16, 26, struct_USBJoystickChData, NULL),
|
||||
YAML_ENUM("radioGFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("radioTrainerDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelHeliDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelFMDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCurvesDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelGVDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelLSDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelSFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCustomScriptsDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelTelemetryDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 29
|
||||
|
||||
static const struct YamlNode __RadioData_root_node = YAML_ROOT( struct_RadioData );
|
||||
|
||||
const YamlNode* get_radiodata_nodes()
|
||||
{
|
||||
return &__RadioData_root_node;
|
||||
}
|
||||
static const struct YamlNode __ModelData_root_node = YAML_ROOT( struct_ModelData );
|
||||
|
||||
const YamlNode* get_modeldata_nodes()
|
||||
{
|
||||
return &__ModelData_root_node;
|
||||
}
|
||||
static const struct YamlNode __PartialModel_root_node = YAML_ROOT( struct_PartialModel );
|
||||
|
||||
const YamlNode* get_partialmodel_nodes()
|
||||
{
|
||||
return &__PartialModel_root_node;
|
||||
}
|
||||
|
||||
@@ -72,9 +72,7 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
@@ -102,54 +100,16 @@ const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_POT2, "POT2" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SE, "SE" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SG, "SG" },
|
||||
{ MIXSRC_SH, "SH" },
|
||||
{ MIXSRC_SI, "SI" },
|
||||
{ MIXSRC_SJ, "SJ" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TrimT5, "TrimT5" },
|
||||
{ MIXSRC_TrimT6, "TrimT6" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
@@ -184,46 +144,6 @@ const struct YamlIdStr enum_SwashType[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SE0, "SE0" },
|
||||
{ SWSRC_SE1, "SE1" },
|
||||
{ SWSRC_SE2, "SE2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_SG0, "SG0" },
|
||||
{ SWSRC_SG1, "SG1" },
|
||||
{ SWSRC_SG2, "SG2" },
|
||||
{ SWSRC_SH0, "SH0" },
|
||||
{ SWSRC_SH1, "SH1" },
|
||||
{ SWSRC_SH2, "SH2" },
|
||||
{ SWSRC_SI0, "SI0" },
|
||||
{ SWSRC_SI1, "SI1" },
|
||||
{ SWSRC_SI2, "SI2" },
|
||||
{ SWSRC_SJ0, "SJ0" },
|
||||
{ SWSRC_SJ1, "SJ1" },
|
||||
{ SWSRC_SJ2, "SJ2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
@@ -334,24 +254,19 @@ static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 6, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "manuallyEdited", 1 ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_ARRAY("calib", 48, 12, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_SIGNED( "currModel", 8 ),
|
||||
YAML_UNSIGNED( "contrast", 8 ),
|
||||
@@ -418,14 +333,11 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("sticksConfig", 0, MAX_STICKS, struct_stickConfig, stick_name_valid),
|
||||
YAML_ARRAY("slidersConfig", 0, MAX_POTS, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 4, 8, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("switchConfig", 2, 32, struct_switchConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 8, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 96 ),
|
||||
YAML_PADDING( 144 ),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
YAML_CUSTOM("rotEncDirection",r_rotEncDirection,nullptr),
|
||||
YAML_UNSIGNED( "rotEncMode", 2 ),
|
||||
@@ -483,8 +395,8 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "offset", 13, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
@@ -514,10 +426,9 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -542,9 +453,9 @@ static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "andsw", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
@@ -569,10 +480,10 @@ static const struct YamlNode struct_trim_t[] = {
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_ARRAY("trim", 16, 6, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
@@ -737,6 +648,11 @@ static const struct YamlNode struct_ScriptData[] = {
|
||||
YAML_ARRAY("inputs", 16, 6, union_ScriptDataInput, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_14_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
@@ -879,10 +795,10 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_ARRAY("flightModeData", 320, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
@@ -897,8 +813,8 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("trainerData", 40, struct_TrainerModuleData, NULL),
|
||||
YAML_ARRAY("scriptsData", 192, 7, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 24, 32, struct_string_24, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 8, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, struct_TelemetryScreenData, NULL),
|
||||
|
||||
@@ -1,943 +0,0 @@
|
||||
// generated by generate_yaml.py
|
||||
|
||||
//
|
||||
// Enums first
|
||||
//
|
||||
|
||||
const struct YamlIdStr enum_BacklightMode[] = {
|
||||
{ e_backlight_mode_off, "backlight_mode_off" },
|
||||
{ e_backlight_mode_keys, "backlight_mode_keys" },
|
||||
{ e_backlight_mode_sticks, "backlight_mode_sticks" },
|
||||
{ e_backlight_mode_all, "backlight_mode_all" },
|
||||
{ e_backlight_mode_on, "backlight_mode_on" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_AntennaModes[] = {
|
||||
{ ANTENNA_MODE_INTERNAL, "MODE_INTERNAL" },
|
||||
{ ANTENNA_MODE_ASK, "MODE_ASK" },
|
||||
{ ANTENNA_MODE_PER_MODEL, "MODE_PER_MODEL" },
|
||||
{ ANTENNA_MODE_EXTERNAL, "MODE_EXTERNAL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModuleType[] = {
|
||||
{ MODULE_TYPE_NONE, "TYPE_NONE" },
|
||||
{ MODULE_TYPE_PPM, "TYPE_PPM" },
|
||||
{ MODULE_TYPE_XJT_PXX1, "TYPE_XJT_PXX1" },
|
||||
{ MODULE_TYPE_ISRM_PXX2, "TYPE_ISRM_PXX2" },
|
||||
{ MODULE_TYPE_DSM2, "TYPE_DSM2" },
|
||||
{ MODULE_TYPE_CROSSFIRE, "TYPE_CROSSFIRE" },
|
||||
{ MODULE_TYPE_MULTIMODULE, "TYPE_MULTIMODULE" },
|
||||
{ MODULE_TYPE_R9M_PXX1, "TYPE_R9M_PXX1" },
|
||||
{ MODULE_TYPE_R9M_PXX2, "TYPE_R9M_PXX2" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX1, "TYPE_R9M_LITE_PXX1" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX2, "TYPE_R9M_LITE_PXX2" },
|
||||
{ MODULE_TYPE_GHOST, "TYPE_GHOST" },
|
||||
{ MODULE_TYPE_R9M_LITE_PRO_PXX2, "TYPE_R9M_LITE_PRO_PXX2" },
|
||||
{ MODULE_TYPE_SBUS, "TYPE_SBUS" },
|
||||
{ MODULE_TYPE_XJT_LITE_PXX2, "TYPE_XJT_LITE_PXX2" },
|
||||
{ MODULE_TYPE_FLYSKY, "TYPE_FLYSKY" },
|
||||
{ MODULE_TYPE_LEMON_DSMP, "TYPE_LEMON_DSMP" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TrainerMultiplex[] = {
|
||||
{ TRAINER_OFF, "OFF" },
|
||||
{ TRAINER_ADD, "ADD" },
|
||||
{ TRAINER_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BeeperMode[] = {
|
||||
{ e_mode_quiet, "mode_quiet" },
|
||||
{ e_mode_alarms, "mode_alarms" },
|
||||
{ e_mode_nokeys, "mode_nokeys" },
|
||||
{ e_mode_all, "mode_all" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BluetoothModes[] = {
|
||||
{ BLUETOOTH_OFF, "OFF" },
|
||||
{ BLUETOOTH_TELEMETRY, "TELEMETRY" },
|
||||
{ BLUETOOTH_TRAINER, "TRAINER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_OVERRIDE_CHANNEL, "OVERRIDE_CHANNEL" },
|
||||
{ FUNC_TRAINER, "TRAINER" },
|
||||
{ FUNC_INSTANT_TRIM, "INSTANT_TRIM" },
|
||||
{ FUNC_RESET, "RESET" },
|
||||
{ FUNC_SET_TIMER, "SET_TIMER" },
|
||||
{ FUNC_ADJUST_GVAR, "ADJUST_GVAR" },
|
||||
{ FUNC_VOLUME, "VOLUME" },
|
||||
{ FUNC_SET_FAILSAFE, "SET_FAILSAFE" },
|
||||
{ FUNC_RANGECHECK, "RANGECHECK" },
|
||||
{ FUNC_BIND, "BIND" },
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
{ FUNC_HAPTIC, "HAPTIC" },
|
||||
{ FUNC_LOGS, "LOGS" },
|
||||
{ FUNC_BACKLIGHT, "BACKLIGHT" },
|
||||
{ FUNC_SCREENSHOT, "SCREENSHOT" },
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
{ TMRMODE_START, "START" },
|
||||
{ TMRMODE_THR, "THR" },
|
||||
{ TMRMODE_THR_REL, "THR_REL" },
|
||||
{ TMRMODE_THR_START, "THR_START" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
{ MLTPX_ADD, "ADD" },
|
||||
{ MLTPX_MUL, "MUL" },
|
||||
{ MLTPX_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_POT2, "POT2" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SE, "SE" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SI, "SI" },
|
||||
{ MIXSRC_SJ, "SJ" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_NONE, "FUNC_NONE" },
|
||||
{ LS_FUNC_VEQUAL, "FUNC_VEQUAL" },
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
{ LS_FUNC_OR, "FUNC_OR" },
|
||||
{ LS_FUNC_XOR, "FUNC_XOR" },
|
||||
{ LS_FUNC_EDGE, "FUNC_EDGE" },
|
||||
{ LS_FUNC_EQUAL, "FUNC_EQUAL" },
|
||||
{ LS_FUNC_GREATER, "FUNC_GREATER" },
|
||||
{ LS_FUNC_LESS, "FUNC_LESS" },
|
||||
{ LS_FUNC_DIFFEGREATER, "FUNC_DIFFEGREATER" },
|
||||
{ LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" },
|
||||
{ LS_FUNC_TIMER, "FUNC_TIMER" },
|
||||
{ LS_FUNC_STICKY, "FUNC_STICKY" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwashType[] = {
|
||||
{ SWASH_TYPE_NONE, "TYPE_NONE" },
|
||||
{ SWASH_TYPE_120, "TYPE_120" },
|
||||
{ SWASH_TYPE_120X, "TYPE_120X" },
|
||||
{ SWASH_TYPE_140, "TYPE_140" },
|
||||
{ SWASH_TYPE_90, "TYPE_90" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SE0, "SE0" },
|
||||
{ SWSRC_SE1, "SE1" },
|
||||
{ SWSRC_SE2, "SE2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_SI0, "SI0" },
|
||||
{ SWSRC_SI1, "SI1" },
|
||||
{ SWSRC_SI2, "SI2" },
|
||||
{ SWSRC_SJ0, "SJ0" },
|
||||
{ SWSRC_SJ1, "SJ1" },
|
||||
{ SWSRC_SJ2, "SJ2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
{ SWSRC_RADIO_ACTIVITY, "RADIO_ACTIVITY" },
|
||||
{ SWSRC_OFF, "OFF" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_PotsWarnMode[] = {
|
||||
{ POTS_WARN_OFF, "WARN_OFF" },
|
||||
{ POTS_WARN_MANUAL, "WARN_MANUAL" },
|
||||
{ POTS_WARN_AUTO, "WARN_AUTO" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModelOverridableEnable[] = {
|
||||
{ OVERRIDE_GLOBAL, "GLOBAL" },
|
||||
{ OVERRIDE_OFF, "OFF" },
|
||||
{ OVERRIDE_ON, "ON" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_FailsafeModes[] = {
|
||||
{ FAILSAFE_NOT_SET, "NOT_SET" },
|
||||
{ FAILSAFE_HOLD, "HOLD" },
|
||||
{ FAILSAFE_CUSTOM, "CUSTOM" },
|
||||
{ FAILSAFE_NOPULSES, "NOPULSES" },
|
||||
{ FAILSAFE_RECEIVER, "RECEIVER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorFormula[] = {
|
||||
{ TELEM_FORMULA_ADD, "FORMULA_ADD" },
|
||||
{ TELEM_FORMULA_AVERAGE, "FORMULA_AVERAGE" },
|
||||
{ TELEM_FORMULA_MIN, "FORMULA_MIN" },
|
||||
{ TELEM_FORMULA_MAX, "FORMULA_MAX" },
|
||||
{ TELEM_FORMULA_MULTIPLY, "FORMULA_MULTIPLY" },
|
||||
{ TELEM_FORMULA_TOTALIZE, "FORMULA_TOTALIZE" },
|
||||
{ TELEM_FORMULA_CELL, "FORMULA_CELL" },
|
||||
{ TELEM_FORMULA_CONSUMPTION, "FORMULA_CONSUMPTION" },
|
||||
{ TELEM_FORMULA_DIST, "FORMULA_DIST" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorType[] = {
|
||||
{ TELEM_TYPE_CUSTOM, "TYPE_CUSTOM" },
|
||||
{ TELEM_TYPE_CALCULATED, "TYPE_CALCULATED" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickIfMode[] = {
|
||||
{ USBJOYS_JOYSTICK, "JOYSTICK" },
|
||||
{ USBJOYS_GAMEPAD, "GAMEPAD" },
|
||||
{ USBJOYS_MULTIAXIS, "MULTIAXIS" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickCh[] = {
|
||||
{ USBJOYS_CH_NONE, "CH_NONE" },
|
||||
{ USBJOYS_CH_BUTTON, "CH_BUTTON" },
|
||||
{ USBJOYS_CH_AXIS, "CH_AXIS" },
|
||||
{ USBJOYS_CH_SIM, "CH_SIM" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||
YAML_SIGNED( "mid", 16 ),
|
||||
YAML_SIGNED( "spanNeg", 16 ),
|
||||
YAML_SIGNED( "spanPos", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerMix[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "srcChn", 6 ),
|
||||
YAML_ENUM("mode", 2, enum_TrainerMultiplex),
|
||||
YAML_SIGNED( "studWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerData[] = {
|
||||
YAML_ARRAY("calib", 16, 4, struct_signed_16, NULL),
|
||||
YAML_ARRAY("mix", 16, 4, struct_TrainerMix, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_1[] = {
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_2[] = {
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_UNSIGNED( "mode", 8 ),
|
||||
YAML_UNSIGNED( "param", 8 ),
|
||||
YAML_SIGNED( "spare", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_SIGNED( "val2", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
YAML_STRUCT("play", 48, struct_anonymous_1, NULL),
|
||||
YAML_STRUCT("all", 64, struct_anonymous_2, NULL),
|
||||
YAML_STRUCT("clear", 64, struct_anonymous_3, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "manuallyEdited", 1 ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_SIGNED( "currModel", 8 ),
|
||||
YAML_UNSIGNED( "contrast", 8 ),
|
||||
YAML_UNSIGNED( "vBatWarn", 8 ),
|
||||
YAML_SIGNED( "txVoltageCalibration", 8 ),
|
||||
YAML_ENUM("backlightMode", 3, enum_BacklightMode),
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "fai", 1 ),
|
||||
YAML_SIGNED_CUST( "beepMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_UNSIGNED( "alarmsFlash", 1 ),
|
||||
YAML_UNSIGNED( "disableMemoryWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableAlarmWarning", 1 ),
|
||||
YAML_UNSIGNED( "stickMode", 2 ),
|
||||
YAML_SIGNED( "timezone", 5 ),
|
||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||
YAML_CUSTOM("telemetryBaudrate",r_telemetryBaudrate,nullptr),
|
||||
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||
YAML_SIGNED( "splashMode", 3 ),
|
||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_SIGNED( "switchesDelay", 8 ),
|
||||
YAML_UNSIGNED( "lightAutoOff", 8 ),
|
||||
YAML_UNSIGNED( "templateSetup", 8 ),
|
||||
YAML_SIGNED( "PPM_Multiplier", 8 ),
|
||||
YAML_SIGNED_CUST( "hapticLength", 8, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 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 ),
|
||||
YAML_SIGNED_CUST( "vBatMax", 8, r_vbat_max, w_vbat_max ),
|
||||
YAML_UNSIGNED( "backlightBright", 8 ),
|
||||
YAML_UNSIGNED( "globalTimer", 32 ),
|
||||
YAML_UNSIGNED( "bluetoothBaudrate", 4 ),
|
||||
YAML_ENUM("bluetoothMode", 4, enum_BluetoothModes),
|
||||
YAML_UNSIGNED( "countryCode", 2 ),
|
||||
YAML_SIGNED( "pwrOnSpeed", 3 ),
|
||||
YAML_SIGNED( "pwrOffSpeed", 3 ),
|
||||
YAML_CUSTOM("jitterFilter",r_jitterFilter,nullptr),
|
||||
YAML_UNSIGNED( "noJitterFilter", 1 ),
|
||||
YAML_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "disableRssiPoweroffAlarm", 1 ),
|
||||
YAML_UNSIGNED( "USBMode", 2 ),
|
||||
YAML_UNSIGNED( "jackMode", 2 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("ttsLanguage", 2),
|
||||
YAML_SIGNED_CUST( "beepVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "wavVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "backgroundVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioPitch", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 8, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 192 ),
|
||||
YAML_PADDING( 144 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
YAML_CUSTOM("rotEncDirection",r_rotEncDirection,nullptr),
|
||||
YAML_UNSIGNED( "rotEncMode", 2 ),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "radioGFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "radioTrainerDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelHeliDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelFMDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCurvesDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelGVDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelLSDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelSFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelTelemetryDisabled", 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelHeader[] = {
|
||||
YAML_STRING("name", 10),
|
||||
YAML_ARRAY("modelId", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TimerData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "start", 22 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED( "value", 22 ),
|
||||
YAML_ENUM("mode", 3, enum_TimerModes),
|
||||
YAML_UNSIGNED( "countdownBeep", 2 ),
|
||||
YAML_UNSIGNED( "minuteBeep", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 2 ),
|
||||
YAML_SIGNED( "countdownStart", 2 ),
|
||||
YAML_UNSIGNED( "showElapsed", 1 ),
|
||||
YAML_UNSIGNED( "extraHaptic", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "destCh", 5 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "carryTrim", 1 ),
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
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),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
YAML_UNSIGNED( "delayDown", 8 ),
|
||||
YAML_UNSIGNED( "speedUp", 8 ),
|
||||
YAML_UNSIGNED( "speedDown", 8 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
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_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_SIGNED( "curve", 8 ),
|
||||
YAML_STRING("name", 4),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "scale", 14 ),
|
||||
YAML_CUSTOM("carryTrim",r_carryTrim,nullptr),
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveHeader[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
YAML_UNSIGNED( "smooth", 1 ),
|
||||
YAML_SIGNED( "points", 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("func", 8, enum_LogicalSwitchesFunctions),
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_ENUM("type", 8, enum_SwashType),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED_CUST( "collectiveSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "aileronSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "elevatorSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "collectiveWeight", 8 ),
|
||||
YAML_SIGNED( "aileronWeight", 8 ),
|
||||
YAML_SIGNED( "elevatorWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_trim_t[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "value", 11 ),
|
||||
YAML_UNSIGNED( "mode", 5 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_GVarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("name", 3),
|
||||
YAML_UNSIGNED( "min", 12 ),
|
||||
YAML_UNSIGNED( "max", 12 ),
|
||||
YAML_UNSIGNED( "popup", 1 ),
|
||||
YAML_UNSIGNED( "prec", 1 ),
|
||||
YAML_UNSIGNED( "unit", 2 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_VarioData[] = {
|
||||
YAML_UNSIGNED_CUST( "source", 7, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_UNSIGNED( "centerSilent", 1 ),
|
||||
YAML_SIGNED( "centerMax", 8 ),
|
||||
YAML_SIGNED( "centerMin", 8 ),
|
||||
YAML_SIGNED( "min", 8 ),
|
||||
YAML_SIGNED( "max", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RssiAlarmData[] = {
|
||||
YAML_CUSTOM("disabled",r_rssiDisabled,nullptr),
|
||||
YAML_CUSTOM("warning",r_rssiWarning,nullptr),
|
||||
YAML_CUSTOM("critical",r_rssiCritical,nullptr),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RFAlarmData[] = {
|
||||
YAML_SIGNED( "warning", 8 ),
|
||||
YAML_SIGNED( "critical", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PpmModule[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "power", 2 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_SIGNED( "antennaMode", 2 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "noninverted", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "refreshRate", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_64[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_8[] = {
|
||||
YAML_UNSIGNED( "receivers", 7 ),
|
||||
YAML_UNSIGNED( "racingMode", 1 ),
|
||||
YAML_ARRAY("receiverName", 64, 3, struct_string_64, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_9[] = {
|
||||
YAML_ARRAY("rx_id", 8, 4, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 3 ),
|
||||
YAML_UNSIGNED( "rfPower", 1 ),
|
||||
YAML_UNSIGNED( "reserved", 4 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_10[] = {
|
||||
YAML_UNSIGNED( "emi", 2 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "phyMode", 3 ),
|
||||
YAML_UNSIGNED( "reserved", 2 ),
|
||||
YAML_UNSIGNED( "rfPower", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_11[] = {
|
||||
YAML_UNSIGNED( "raw12bits", 1 ),
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_12[] = {
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_13[] = {
|
||||
YAML_UNSIGNED( "flags", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_PpmModule, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("afhds3", 16, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("ghost", 8, struct_anonymous_11, NULL),
|
||||
YAML_STRUCT("crsf", 8, struct_anonymous_12, NULL),
|
||||
YAML_STRUCT("dsmp", 8, struct_anonymous_13, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 8, enum_ModuleType),
|
||||
YAML_CUSTOM("subType",r_modSubtype,w_modSubtype),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED_CUST( "channelsCount", 8, r_channelsCount, w_channelsCount ),
|
||||
YAML_ENUM("failsafeMode", 4, enum_FailsafeModes),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_UNION("mod", 200, union_anonymous_4_elmts, select_mod_type),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerModuleData[] = {
|
||||
YAML_UNSIGNED_CUST( "mode", 8, r_trainerMode, w_trainerMode ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput_elmts[] = {
|
||||
YAML_SIGNED( "value", 16 ),
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 16, union_ScriptDataInput_elmts, select_script_input),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ScriptData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("file", 6),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_ARRAY("inputs", 16, 6, union_ScriptDataInput, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_14_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_16, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_ENUM("formula", 8, enum_TelemetrySensorFormula),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_21[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_22[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_17_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_20, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_21, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_22, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_14_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_15_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_ENUM("type", 1, enum_TelemetrySensorType),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "unit", 6 ),
|
||||
YAML_UNSIGNED( "prec", 2 ),
|
||||
YAML_UNSIGNED( "autoOffset", 1 ),
|
||||
YAML_UNSIGNED( "filter", 1 ),
|
||||
YAML_UNSIGNED( "logs", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 1 ),
|
||||
YAML_UNSIGNED( "onlyPositive", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNION("cfg", 32, union_anonymous_17_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LineDataSource[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "val", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_LineDataSource, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScriptData[] = {
|
||||
YAML_STRING("file", 6),
|
||||
YAML_ARRAY("inputs", 16, 8, struct_signed_16, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_TelemetryScreenData_u_elmts[] = {
|
||||
YAML_ARRAY("bars", 48, 4, struct_FrSkyBarData, NULL),
|
||||
YAML_ARRAY("lines", 32, 4, struct_FrSkyLineData, NULL),
|
||||
YAML_STRUCT("script", 176, struct_TelemetryScriptData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_CUSTOM("type",r_tele_screen_type,w_tele_screen_type),
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_u_elmts, select_tele_screen_data),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_USBJoystickChData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("mode", 3, enum_USBJoystickCh),
|
||||
YAML_UNSIGNED( "inversion", 1 ),
|
||||
YAML_UNSIGNED( "param", 4 ),
|
||||
YAML_UNSIGNED( "btn_num", 5 ),
|
||||
YAML_UNSIGNED( "switch_npos", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_UNSIGNED( "telemetryProtocol", 3 ),
|
||||
YAML_UNSIGNED( "thrTrim", 1 ),
|
||||
YAML_UNSIGNED( "noGlobalFunctions", 1 ),
|
||||
YAML_UNSIGNED( "displayTrims", 2 ),
|
||||
YAML_UNSIGNED( "ignoreSensorIds", 1 ),
|
||||
YAML_SIGNED( "trimInc", 3 ),
|
||||
YAML_UNSIGNED( "disableThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "displayChecklist", 1 ),
|
||||
YAML_UNSIGNED( "extendedLimits", 1 ),
|
||||
YAML_UNSIGNED( "extendedTrims", 1 ),
|
||||
YAML_UNSIGNED( "throttleReversed", 1 ),
|
||||
YAML_UNSIGNED( "enableCustomThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableTelemetryWarning", 1 ),
|
||||
YAML_UNSIGNED( "showInstanceIds", 1 ),
|
||||
YAML_PADDING( 5 ),
|
||||
YAML_SIGNED( "customThrottleWarningPosition", 8 ),
|
||||
YAML_UNSIGNED( "beepANACenter", 16 ),
|
||||
YAML_ARRAY("mixData", 160, 64, struct_MixData, NULL),
|
||||
YAML_ARRAY("limitData", 88, 32, struct_LimitData, NULL),
|
||||
YAML_ARRAY("expoData", 136, 64, struct_ExpoData, NULL),
|
||||
YAML_ARRAY("curves", 32, 32, struct_CurveHeader, NULL),
|
||||
YAML_ARRAY("points", 8, 512, struct_signed_8, NULL),
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_STRUCT("rssiAlarms", 0, struct_RssiAlarmData, NULL),
|
||||
YAML_STRUCT("rfAlarms", 16, struct_RFAlarmData, NULL),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_ENUM("potsWarnMode", 2, enum_PotsWarnMode),
|
||||
YAML_ENUM("jitterFilter", 2, enum_ModelOverridableEnable),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ARRAY("moduleData", 232, 2, struct_ModuleData, NULL),
|
||||
YAML_ARRAY("failsafeChannels", 16, 32, struct_signed_16, NULL),
|
||||
YAML_STRUCT("trainerData", 40, struct_TrainerModuleData, NULL),
|
||||
YAML_ARRAY("scriptsData", 192, 7, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 24, 32, struct_string_24, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, struct_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_UNSIGNED( "usbJoystickExtMode", 1 ),
|
||||
YAML_ENUM("usbJoystickIfMode", 3, enum_USBJoystickIfMode),
|
||||
YAML_UNSIGNED( "usbJoystickCircularCut", 4 ),
|
||||
YAML_ARRAY("usbJoystickCh", 16, 26, struct_USBJoystickChData, NULL),
|
||||
YAML_ENUM("radioGFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("radioTrainerDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelHeliDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelFMDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCurvesDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelGVDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelLSDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelSFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCustomScriptsDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelTelemetryDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 29
|
||||
|
||||
static const struct YamlNode __RadioData_root_node = YAML_ROOT( struct_RadioData );
|
||||
|
||||
const YamlNode* get_radiodata_nodes()
|
||||
{
|
||||
return &__RadioData_root_node;
|
||||
}
|
||||
static const struct YamlNode __ModelData_root_node = YAML_ROOT( struct_ModelData );
|
||||
|
||||
const YamlNode* get_modeldata_nodes()
|
||||
{
|
||||
return &__ModelData_root_node;
|
||||
}
|
||||
static const struct YamlNode __PartialModel_root_node = YAML_ROOT( struct_PartialModel );
|
||||
|
||||
const YamlNode* get_partialmodel_nodes()
|
||||
{
|
||||
return &__PartialModel_root_node;
|
||||
}
|
||||
|
||||
@@ -1,943 +0,0 @@
|
||||
// generated by generate_yaml.py
|
||||
|
||||
//
|
||||
// Enums first
|
||||
//
|
||||
|
||||
const struct YamlIdStr enum_BacklightMode[] = {
|
||||
{ e_backlight_mode_off, "backlight_mode_off" },
|
||||
{ e_backlight_mode_keys, "backlight_mode_keys" },
|
||||
{ e_backlight_mode_sticks, "backlight_mode_sticks" },
|
||||
{ e_backlight_mode_all, "backlight_mode_all" },
|
||||
{ e_backlight_mode_on, "backlight_mode_on" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_AntennaModes[] = {
|
||||
{ ANTENNA_MODE_INTERNAL, "MODE_INTERNAL" },
|
||||
{ ANTENNA_MODE_ASK, "MODE_ASK" },
|
||||
{ ANTENNA_MODE_PER_MODEL, "MODE_PER_MODEL" },
|
||||
{ ANTENNA_MODE_EXTERNAL, "MODE_EXTERNAL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModuleType[] = {
|
||||
{ MODULE_TYPE_NONE, "TYPE_NONE" },
|
||||
{ MODULE_TYPE_PPM, "TYPE_PPM" },
|
||||
{ MODULE_TYPE_XJT_PXX1, "TYPE_XJT_PXX1" },
|
||||
{ MODULE_TYPE_ISRM_PXX2, "TYPE_ISRM_PXX2" },
|
||||
{ MODULE_TYPE_DSM2, "TYPE_DSM2" },
|
||||
{ MODULE_TYPE_CROSSFIRE, "TYPE_CROSSFIRE" },
|
||||
{ MODULE_TYPE_MULTIMODULE, "TYPE_MULTIMODULE" },
|
||||
{ MODULE_TYPE_R9M_PXX1, "TYPE_R9M_PXX1" },
|
||||
{ MODULE_TYPE_R9M_PXX2, "TYPE_R9M_PXX2" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX1, "TYPE_R9M_LITE_PXX1" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX2, "TYPE_R9M_LITE_PXX2" },
|
||||
{ MODULE_TYPE_GHOST, "TYPE_GHOST" },
|
||||
{ MODULE_TYPE_R9M_LITE_PRO_PXX2, "TYPE_R9M_LITE_PRO_PXX2" },
|
||||
{ MODULE_TYPE_SBUS, "TYPE_SBUS" },
|
||||
{ MODULE_TYPE_XJT_LITE_PXX2, "TYPE_XJT_LITE_PXX2" },
|
||||
{ MODULE_TYPE_FLYSKY, "TYPE_FLYSKY" },
|
||||
{ MODULE_TYPE_LEMON_DSMP, "TYPE_LEMON_DSMP" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TrainerMultiplex[] = {
|
||||
{ TRAINER_OFF, "OFF" },
|
||||
{ TRAINER_ADD, "ADD" },
|
||||
{ TRAINER_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BeeperMode[] = {
|
||||
{ e_mode_quiet, "mode_quiet" },
|
||||
{ e_mode_alarms, "mode_alarms" },
|
||||
{ e_mode_nokeys, "mode_nokeys" },
|
||||
{ e_mode_all, "mode_all" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BluetoothModes[] = {
|
||||
{ BLUETOOTH_OFF, "OFF" },
|
||||
{ BLUETOOTH_TELEMETRY, "TELEMETRY" },
|
||||
{ BLUETOOTH_TRAINER, "TRAINER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_OVERRIDE_CHANNEL, "OVERRIDE_CHANNEL" },
|
||||
{ FUNC_TRAINER, "TRAINER" },
|
||||
{ FUNC_INSTANT_TRIM, "INSTANT_TRIM" },
|
||||
{ FUNC_RESET, "RESET" },
|
||||
{ FUNC_SET_TIMER, "SET_TIMER" },
|
||||
{ FUNC_ADJUST_GVAR, "ADJUST_GVAR" },
|
||||
{ FUNC_VOLUME, "VOLUME" },
|
||||
{ FUNC_SET_FAILSAFE, "SET_FAILSAFE" },
|
||||
{ FUNC_RANGECHECK, "RANGECHECK" },
|
||||
{ FUNC_BIND, "BIND" },
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
{ FUNC_HAPTIC, "HAPTIC" },
|
||||
{ FUNC_LOGS, "LOGS" },
|
||||
{ FUNC_BACKLIGHT, "BACKLIGHT" },
|
||||
{ FUNC_SCREENSHOT, "SCREENSHOT" },
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
{ TMRMODE_START, "START" },
|
||||
{ TMRMODE_THR, "THR" },
|
||||
{ TMRMODE_THR_REL, "THR_REL" },
|
||||
{ TMRMODE_THR_START, "THR_START" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
{ MLTPX_ADD, "ADD" },
|
||||
{ MLTPX_MUL, "MUL" },
|
||||
{ MLTPX_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_POT2, "POT2" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SE, "SE" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SG, "SG" },
|
||||
{ MIXSRC_SH, "SH" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_NONE, "FUNC_NONE" },
|
||||
{ LS_FUNC_VEQUAL, "FUNC_VEQUAL" },
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
{ LS_FUNC_OR, "FUNC_OR" },
|
||||
{ LS_FUNC_XOR, "FUNC_XOR" },
|
||||
{ LS_FUNC_EDGE, "FUNC_EDGE" },
|
||||
{ LS_FUNC_EQUAL, "FUNC_EQUAL" },
|
||||
{ LS_FUNC_GREATER, "FUNC_GREATER" },
|
||||
{ LS_FUNC_LESS, "FUNC_LESS" },
|
||||
{ LS_FUNC_DIFFEGREATER, "FUNC_DIFFEGREATER" },
|
||||
{ LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" },
|
||||
{ LS_FUNC_TIMER, "FUNC_TIMER" },
|
||||
{ LS_FUNC_STICKY, "FUNC_STICKY" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwashType[] = {
|
||||
{ SWASH_TYPE_NONE, "TYPE_NONE" },
|
||||
{ SWASH_TYPE_120, "TYPE_120" },
|
||||
{ SWASH_TYPE_120X, "TYPE_120X" },
|
||||
{ SWASH_TYPE_140, "TYPE_140" },
|
||||
{ SWASH_TYPE_90, "TYPE_90" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SE0, "SE0" },
|
||||
{ SWSRC_SE1, "SE1" },
|
||||
{ SWSRC_SE2, "SE2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_SG0, "SG0" },
|
||||
{ SWSRC_SG1, "SG1" },
|
||||
{ SWSRC_SG2, "SG2" },
|
||||
{ SWSRC_SH0, "SH0" },
|
||||
{ SWSRC_SH1, "SH1" },
|
||||
{ SWSRC_SH2, "SH2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
{ SWSRC_RADIO_ACTIVITY, "RADIO_ACTIVITY" },
|
||||
{ SWSRC_OFF, "OFF" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_PotsWarnMode[] = {
|
||||
{ POTS_WARN_OFF, "WARN_OFF" },
|
||||
{ POTS_WARN_MANUAL, "WARN_MANUAL" },
|
||||
{ POTS_WARN_AUTO, "WARN_AUTO" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModelOverridableEnable[] = {
|
||||
{ OVERRIDE_GLOBAL, "GLOBAL" },
|
||||
{ OVERRIDE_OFF, "OFF" },
|
||||
{ OVERRIDE_ON, "ON" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_FailsafeModes[] = {
|
||||
{ FAILSAFE_NOT_SET, "NOT_SET" },
|
||||
{ FAILSAFE_HOLD, "HOLD" },
|
||||
{ FAILSAFE_CUSTOM, "CUSTOM" },
|
||||
{ FAILSAFE_NOPULSES, "NOPULSES" },
|
||||
{ FAILSAFE_RECEIVER, "RECEIVER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorFormula[] = {
|
||||
{ TELEM_FORMULA_ADD, "FORMULA_ADD" },
|
||||
{ TELEM_FORMULA_AVERAGE, "FORMULA_AVERAGE" },
|
||||
{ TELEM_FORMULA_MIN, "FORMULA_MIN" },
|
||||
{ TELEM_FORMULA_MAX, "FORMULA_MAX" },
|
||||
{ TELEM_FORMULA_MULTIPLY, "FORMULA_MULTIPLY" },
|
||||
{ TELEM_FORMULA_TOTALIZE, "FORMULA_TOTALIZE" },
|
||||
{ TELEM_FORMULA_CELL, "FORMULA_CELL" },
|
||||
{ TELEM_FORMULA_CONSUMPTION, "FORMULA_CONSUMPTION" },
|
||||
{ TELEM_FORMULA_DIST, "FORMULA_DIST" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorType[] = {
|
||||
{ TELEM_TYPE_CUSTOM, "TYPE_CUSTOM" },
|
||||
{ TELEM_TYPE_CALCULATED, "TYPE_CALCULATED" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickIfMode[] = {
|
||||
{ USBJOYS_JOYSTICK, "JOYSTICK" },
|
||||
{ USBJOYS_GAMEPAD, "GAMEPAD" },
|
||||
{ USBJOYS_MULTIAXIS, "MULTIAXIS" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickCh[] = {
|
||||
{ USBJOYS_CH_NONE, "CH_NONE" },
|
||||
{ USBJOYS_CH_BUTTON, "CH_BUTTON" },
|
||||
{ USBJOYS_CH_AXIS, "CH_AXIS" },
|
||||
{ USBJOYS_CH_SIM, "CH_SIM" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||
YAML_SIGNED( "mid", 16 ),
|
||||
YAML_SIGNED( "spanNeg", 16 ),
|
||||
YAML_SIGNED( "spanPos", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerMix[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "srcChn", 6 ),
|
||||
YAML_ENUM("mode", 2, enum_TrainerMultiplex),
|
||||
YAML_SIGNED( "studWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerData[] = {
|
||||
YAML_ARRAY("calib", 16, 4, struct_signed_16, NULL),
|
||||
YAML_ARRAY("mix", 16, 4, struct_TrainerMix, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_1[] = {
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_2[] = {
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_UNSIGNED( "mode", 8 ),
|
||||
YAML_UNSIGNED( "param", 8 ),
|
||||
YAML_SIGNED( "spare", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_SIGNED( "val2", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
YAML_STRUCT("play", 48, struct_anonymous_1, NULL),
|
||||
YAML_STRUCT("all", 64, struct_anonymous_2, NULL),
|
||||
YAML_STRUCT("clear", 64, struct_anonymous_3, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "manuallyEdited", 1 ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_SIGNED( "currModel", 8 ),
|
||||
YAML_UNSIGNED( "contrast", 8 ),
|
||||
YAML_UNSIGNED( "vBatWarn", 8 ),
|
||||
YAML_SIGNED( "txVoltageCalibration", 8 ),
|
||||
YAML_ENUM("backlightMode", 3, enum_BacklightMode),
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "fai", 1 ),
|
||||
YAML_SIGNED_CUST( "beepMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_UNSIGNED( "alarmsFlash", 1 ),
|
||||
YAML_UNSIGNED( "disableMemoryWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableAlarmWarning", 1 ),
|
||||
YAML_UNSIGNED( "stickMode", 2 ),
|
||||
YAML_SIGNED( "timezone", 5 ),
|
||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||
YAML_CUSTOM("telemetryBaudrate",r_telemetryBaudrate,nullptr),
|
||||
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||
YAML_SIGNED( "splashMode", 3 ),
|
||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_SIGNED( "switchesDelay", 8 ),
|
||||
YAML_UNSIGNED( "lightAutoOff", 8 ),
|
||||
YAML_UNSIGNED( "templateSetup", 8 ),
|
||||
YAML_SIGNED( "PPM_Multiplier", 8 ),
|
||||
YAML_SIGNED_CUST( "hapticLength", 8, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 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 ),
|
||||
YAML_SIGNED_CUST( "vBatMax", 8, r_vbat_max, w_vbat_max ),
|
||||
YAML_UNSIGNED( "backlightBright", 8 ),
|
||||
YAML_UNSIGNED( "globalTimer", 32 ),
|
||||
YAML_UNSIGNED( "bluetoothBaudrate", 4 ),
|
||||
YAML_ENUM("bluetoothMode", 4, enum_BluetoothModes),
|
||||
YAML_UNSIGNED( "countryCode", 2 ),
|
||||
YAML_SIGNED( "pwrOnSpeed", 3 ),
|
||||
YAML_SIGNED( "pwrOffSpeed", 3 ),
|
||||
YAML_CUSTOM("jitterFilter",r_jitterFilter,nullptr),
|
||||
YAML_UNSIGNED( "noJitterFilter", 1 ),
|
||||
YAML_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "disableRssiPoweroffAlarm", 1 ),
|
||||
YAML_UNSIGNED( "USBMode", 2 ),
|
||||
YAML_UNSIGNED( "jackMode", 2 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("ttsLanguage", 2),
|
||||
YAML_SIGNED_CUST( "beepVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "wavVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "backgroundVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioPitch", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 8, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 192 ),
|
||||
YAML_PADDING( 144 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
YAML_CUSTOM("rotEncDirection",r_rotEncDirection,nullptr),
|
||||
YAML_UNSIGNED( "rotEncMode", 2 ),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "radioGFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "radioTrainerDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelHeliDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelFMDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCurvesDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelGVDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelLSDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelSFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelTelemetryDisabled", 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelHeader[] = {
|
||||
YAML_STRING("name", 10),
|
||||
YAML_ARRAY("modelId", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TimerData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "start", 22 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED( "value", 22 ),
|
||||
YAML_ENUM("mode", 3, enum_TimerModes),
|
||||
YAML_UNSIGNED( "countdownBeep", 2 ),
|
||||
YAML_UNSIGNED( "minuteBeep", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 2 ),
|
||||
YAML_SIGNED( "countdownStart", 2 ),
|
||||
YAML_UNSIGNED( "showElapsed", 1 ),
|
||||
YAML_UNSIGNED( "extraHaptic", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "destCh", 5 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "carryTrim", 1 ),
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
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),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
YAML_UNSIGNED( "delayDown", 8 ),
|
||||
YAML_UNSIGNED( "speedUp", 8 ),
|
||||
YAML_UNSIGNED( "speedDown", 8 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
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_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_SIGNED( "curve", 8 ),
|
||||
YAML_STRING("name", 4),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "scale", 14 ),
|
||||
YAML_CUSTOM("carryTrim",r_carryTrim,nullptr),
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveHeader[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
YAML_UNSIGNED( "smooth", 1 ),
|
||||
YAML_SIGNED( "points", 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("func", 8, enum_LogicalSwitchesFunctions),
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_ENUM("type", 8, enum_SwashType),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED_CUST( "collectiveSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "aileronSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "elevatorSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "collectiveWeight", 8 ),
|
||||
YAML_SIGNED( "aileronWeight", 8 ),
|
||||
YAML_SIGNED( "elevatorWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_trim_t[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "value", 11 ),
|
||||
YAML_UNSIGNED( "mode", 5 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_GVarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("name", 3),
|
||||
YAML_UNSIGNED( "min", 12 ),
|
||||
YAML_UNSIGNED( "max", 12 ),
|
||||
YAML_UNSIGNED( "popup", 1 ),
|
||||
YAML_UNSIGNED( "prec", 1 ),
|
||||
YAML_UNSIGNED( "unit", 2 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_VarioData[] = {
|
||||
YAML_UNSIGNED_CUST( "source", 7, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_UNSIGNED( "centerSilent", 1 ),
|
||||
YAML_SIGNED( "centerMax", 8 ),
|
||||
YAML_SIGNED( "centerMin", 8 ),
|
||||
YAML_SIGNED( "min", 8 ),
|
||||
YAML_SIGNED( "max", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RssiAlarmData[] = {
|
||||
YAML_CUSTOM("disabled",r_rssiDisabled,nullptr),
|
||||
YAML_CUSTOM("warning",r_rssiWarning,nullptr),
|
||||
YAML_CUSTOM("critical",r_rssiCritical,nullptr),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RFAlarmData[] = {
|
||||
YAML_SIGNED( "warning", 8 ),
|
||||
YAML_SIGNED( "critical", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PpmModule[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "power", 2 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_SIGNED( "antennaMode", 2 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "noninverted", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "refreshRate", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_64[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_8[] = {
|
||||
YAML_UNSIGNED( "receivers", 7 ),
|
||||
YAML_UNSIGNED( "racingMode", 1 ),
|
||||
YAML_ARRAY("receiverName", 64, 3, struct_string_64, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_9[] = {
|
||||
YAML_ARRAY("rx_id", 8, 4, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 3 ),
|
||||
YAML_UNSIGNED( "rfPower", 1 ),
|
||||
YAML_UNSIGNED( "reserved", 4 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_10[] = {
|
||||
YAML_UNSIGNED( "emi", 2 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "phyMode", 3 ),
|
||||
YAML_UNSIGNED( "reserved", 2 ),
|
||||
YAML_UNSIGNED( "rfPower", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_11[] = {
|
||||
YAML_UNSIGNED( "raw12bits", 1 ),
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_12[] = {
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_13[] = {
|
||||
YAML_UNSIGNED( "flags", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_PpmModule, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("afhds3", 16, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("ghost", 8, struct_anonymous_11, NULL),
|
||||
YAML_STRUCT("crsf", 8, struct_anonymous_12, NULL),
|
||||
YAML_STRUCT("dsmp", 8, struct_anonymous_13, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 8, enum_ModuleType),
|
||||
YAML_CUSTOM("subType",r_modSubtype,w_modSubtype),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED_CUST( "channelsCount", 8, r_channelsCount, w_channelsCount ),
|
||||
YAML_ENUM("failsafeMode", 4, enum_FailsafeModes),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_UNION("mod", 200, union_anonymous_4_elmts, select_mod_type),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerModuleData[] = {
|
||||
YAML_UNSIGNED_CUST( "mode", 8, r_trainerMode, w_trainerMode ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput_elmts[] = {
|
||||
YAML_SIGNED( "value", 16 ),
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 16, union_ScriptDataInput_elmts, select_script_input),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ScriptData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("file", 6),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_ARRAY("inputs", 16, 6, union_ScriptDataInput, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_14_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_16, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_ENUM("formula", 8, enum_TelemetrySensorFormula),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_21[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_22[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_17_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_20, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_21, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_22, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_14_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_15_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_ENUM("type", 1, enum_TelemetrySensorType),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "unit", 6 ),
|
||||
YAML_UNSIGNED( "prec", 2 ),
|
||||
YAML_UNSIGNED( "autoOffset", 1 ),
|
||||
YAML_UNSIGNED( "filter", 1 ),
|
||||
YAML_UNSIGNED( "logs", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 1 ),
|
||||
YAML_UNSIGNED( "onlyPositive", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNION("cfg", 32, union_anonymous_17_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LineDataSource[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "val", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_LineDataSource, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScriptData[] = {
|
||||
YAML_STRING("file", 6),
|
||||
YAML_ARRAY("inputs", 16, 8, struct_signed_16, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_TelemetryScreenData_u_elmts[] = {
|
||||
YAML_ARRAY("bars", 48, 4, struct_FrSkyBarData, NULL),
|
||||
YAML_ARRAY("lines", 32, 4, struct_FrSkyLineData, NULL),
|
||||
YAML_STRUCT("script", 176, struct_TelemetryScriptData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_CUSTOM("type",r_tele_screen_type,w_tele_screen_type),
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_u_elmts, select_tele_screen_data),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_USBJoystickChData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("mode", 3, enum_USBJoystickCh),
|
||||
YAML_UNSIGNED( "inversion", 1 ),
|
||||
YAML_UNSIGNED( "param", 4 ),
|
||||
YAML_UNSIGNED( "btn_num", 5 ),
|
||||
YAML_UNSIGNED( "switch_npos", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_UNSIGNED( "telemetryProtocol", 3 ),
|
||||
YAML_UNSIGNED( "thrTrim", 1 ),
|
||||
YAML_UNSIGNED( "noGlobalFunctions", 1 ),
|
||||
YAML_UNSIGNED( "displayTrims", 2 ),
|
||||
YAML_UNSIGNED( "ignoreSensorIds", 1 ),
|
||||
YAML_SIGNED( "trimInc", 3 ),
|
||||
YAML_UNSIGNED( "disableThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "displayChecklist", 1 ),
|
||||
YAML_UNSIGNED( "extendedLimits", 1 ),
|
||||
YAML_UNSIGNED( "extendedTrims", 1 ),
|
||||
YAML_UNSIGNED( "throttleReversed", 1 ),
|
||||
YAML_UNSIGNED( "enableCustomThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableTelemetryWarning", 1 ),
|
||||
YAML_UNSIGNED( "showInstanceIds", 1 ),
|
||||
YAML_PADDING( 5 ),
|
||||
YAML_SIGNED( "customThrottleWarningPosition", 8 ),
|
||||
YAML_UNSIGNED( "beepANACenter", 16 ),
|
||||
YAML_ARRAY("mixData", 160, 64, struct_MixData, NULL),
|
||||
YAML_ARRAY("limitData", 88, 32, struct_LimitData, NULL),
|
||||
YAML_ARRAY("expoData", 136, 64, struct_ExpoData, NULL),
|
||||
YAML_ARRAY("curves", 32, 32, struct_CurveHeader, NULL),
|
||||
YAML_ARRAY("points", 8, 512, struct_signed_8, NULL),
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_STRUCT("rssiAlarms", 0, struct_RssiAlarmData, NULL),
|
||||
YAML_STRUCT("rfAlarms", 16, struct_RFAlarmData, NULL),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_ENUM("potsWarnMode", 2, enum_PotsWarnMode),
|
||||
YAML_ENUM("jitterFilter", 2, enum_ModelOverridableEnable),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ARRAY("moduleData", 232, 2, struct_ModuleData, NULL),
|
||||
YAML_ARRAY("failsafeChannels", 16, 32, struct_signed_16, NULL),
|
||||
YAML_STRUCT("trainerData", 40, struct_TrainerModuleData, NULL),
|
||||
YAML_ARRAY("scriptsData", 192, 7, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 24, 32, struct_string_24, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, struct_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_UNSIGNED( "usbJoystickExtMode", 1 ),
|
||||
YAML_ENUM("usbJoystickIfMode", 3, enum_USBJoystickIfMode),
|
||||
YAML_UNSIGNED( "usbJoystickCircularCut", 4 ),
|
||||
YAML_ARRAY("usbJoystickCh", 16, 26, struct_USBJoystickChData, NULL),
|
||||
YAML_ENUM("radioGFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("radioTrainerDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelHeliDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelFMDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCurvesDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelGVDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelLSDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelSFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCustomScriptsDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelTelemetryDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 29
|
||||
|
||||
static const struct YamlNode __RadioData_root_node = YAML_ROOT( struct_RadioData );
|
||||
|
||||
const YamlNode* get_radiodata_nodes()
|
||||
{
|
||||
return &__RadioData_root_node;
|
||||
}
|
||||
static const struct YamlNode __ModelData_root_node = YAML_ROOT( struct_ModelData );
|
||||
|
||||
const YamlNode* get_modeldata_nodes()
|
||||
{
|
||||
return &__ModelData_root_node;
|
||||
}
|
||||
static const struct YamlNode __PartialModel_root_node = YAML_ROOT( struct_PartialModel );
|
||||
|
||||
const YamlNode* get_partialmodel_nodes()
|
||||
{
|
||||
return &__PartialModel_root_node;
|
||||
}
|
||||
|
||||
@@ -72,9 +72,7 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
@@ -113,21 +111,6 @@ const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_S1, "S1" },
|
||||
{ MIXSRC_6POS, "6POS" },
|
||||
{ MIXSRC_S2, "S2" },
|
||||
{ MIXSRC_EXT1, "EXT1" },
|
||||
{ MIXSRC_EXT2, "EXT2" },
|
||||
{ MIXSRC_EXT3, "EXT3" },
|
||||
{ MIXSRC_EXT4, "EXT4" },
|
||||
{ MIXSRC_LS, "LS" },
|
||||
{ MIXSRC_RS, "RS" },
|
||||
{ MIXSRC_MOUSE1, "MOUSE1" },
|
||||
{ MIXSRC_MOUSE2, "MOUSE2" },
|
||||
{ MIXSRC_TILT_X, "TILT_X" },
|
||||
{ MIXSRC_TILT_Y, "TILT_Y" },
|
||||
{ MIXSRC_SPACEMOUSE_A, "SPACEMOUSE_A" },
|
||||
@@ -137,49 +120,15 @@ const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_SPACEMOUSE_E, "SPACEMOUSE_E" },
|
||||
{ MIXSRC_SPACEMOUSE_F, "SPACEMOUSE_F" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_TrimT5, "TrimT5" },
|
||||
{ MIXSRC_TrimT6, "TrimT6" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SE, "SE" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SG, "SG" },
|
||||
{ MIXSRC_SH, "SH" },
|
||||
{ MIXSRC_SI, "SI" },
|
||||
{ MIXSRC_SJ, "SJ" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
@@ -214,50 +163,6 @@ const struct YamlIdStr enum_SwashType[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SE0, "SE0" },
|
||||
{ SWSRC_SE1, "SE1" },
|
||||
{ SWSRC_SE2, "SE2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_SG0, "SG0" },
|
||||
{ SWSRC_SG1, "SG1" },
|
||||
{ SWSRC_SG2, "SG2" },
|
||||
{ SWSRC_SH0, "SH0" },
|
||||
{ SWSRC_SH1, "SH1" },
|
||||
{ SWSRC_SH2, "SH2" },
|
||||
{ SWSRC_SI0, "SI0" },
|
||||
{ SWSRC_SI1, "SI1" },
|
||||
{ SWSRC_SI2, "SI2" },
|
||||
{ SWSRC_SJ0, "SJ0" },
|
||||
{ SWSRC_SJ1, "SJ1" },
|
||||
{ SWSRC_SJ2, "SJ2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_TrimT5Down, "TrimT5Down" },
|
||||
{ SWSRC_TrimT5Up, "TrimT5Up" },
|
||||
{ SWSRC_TrimT6Down, "TrimT6Down" },
|
||||
{ SWSRC_TrimT6Up, "TrimT6Up" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
@@ -368,18 +273,13 @@ static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 6, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 48 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ZoneOptionValue_elmts[] = {
|
||||
YAML_UNSIGNED( "unsignedValue", 32 ),
|
||||
YAML_SIGNED( "signedValue", 32 ),
|
||||
@@ -404,7 +304,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 17, struct_CalibData, NULL),
|
||||
YAML_ARRAY("calib", 48, 22, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "vBatWarn", 8 ),
|
||||
YAML_SIGNED( "txVoltageCalibration", 8 ),
|
||||
@@ -469,12 +369,10 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 16, struct_switchConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 8, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 8, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 240 ),
|
||||
YAML_PADDING( 360 ),
|
||||
YAML_ARRAY("sticksConfig", 0, MAX_STICKS, struct_stickConfig, stick_name_valid),
|
||||
YAML_ARRAY("slidersConfig", 0, MAX_POTS, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 4, 16, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("switchConfig", 2, 32, struct_switchConfig, nullptr),
|
||||
YAML_STRING("currModelFilename", 17),
|
||||
YAML_UNSIGNED( "modelQuickSelect", 1 ),
|
||||
YAML_UNSIGNED( "blOffBright", 7 ),
|
||||
@@ -544,8 +442,8 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "offset", 13, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
@@ -575,10 +473,9 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -603,9 +500,9 @@ static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "andsw", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
@@ -632,8 +529,8 @@ static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 6, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 10),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
@@ -940,7 +837,7 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_ARRAY("flightModeData", 352, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
@@ -956,7 +853,7 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_ARRAY("scriptsData", 192, 9, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 32, 32, struct_string_32, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 11, struct_signed_8, NULL),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 16, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 60, struct_TelemetrySensor, NULL),
|
||||
YAML_ARRAY("screenData", 6816, 10, struct_CustomScreenData, NULL),
|
||||
YAML_STRUCT("topbarData", 2400, struct_TopBarPersistentData, NULL),
|
||||
|
||||
@@ -72,9 +72,7 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
@@ -113,19 +111,6 @@ const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_S1, "S1" },
|
||||
{ MIXSRC_6POS, "6POS" },
|
||||
{ MIXSRC_S2, "S2" },
|
||||
{ MIXSRC_S3, "S3" },
|
||||
{ MIXSRC_S4, "S4" },
|
||||
{ MIXSRC_LS, "LS" },
|
||||
{ MIXSRC_RS, "RS" },
|
||||
{ MIXSRC_MOUSE1, "MOUSE1" },
|
||||
{ MIXSRC_MOUSE2, "MOUSE2" },
|
||||
{ MIXSRC_TILT_X, "TILT_X" },
|
||||
{ MIXSRC_TILT_Y, "TILT_Y" },
|
||||
{ MIXSRC_SPACEMOUSE_A, "SPACEMOUSE_A" },
|
||||
@@ -135,49 +120,15 @@ const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_SPACEMOUSE_E, "SPACEMOUSE_E" },
|
||||
{ MIXSRC_SPACEMOUSE_F, "SPACEMOUSE_F" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_TrimT5, "TrimT5" },
|
||||
{ MIXSRC_TrimT6, "TrimT6" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SE, "SE" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SG, "SG" },
|
||||
{ MIXSRC_SH, "SH" },
|
||||
{ MIXSRC_SI, "SI" },
|
||||
{ MIXSRC_SJ, "SJ" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
@@ -212,50 +163,6 @@ const struct YamlIdStr enum_SwashType[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SE0, "SE0" },
|
||||
{ SWSRC_SE1, "SE1" },
|
||||
{ SWSRC_SE2, "SE2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_SG0, "SG0" },
|
||||
{ SWSRC_SG1, "SG1" },
|
||||
{ SWSRC_SG2, "SG2" },
|
||||
{ SWSRC_SH0, "SH0" },
|
||||
{ SWSRC_SH1, "SH1" },
|
||||
{ SWSRC_SH2, "SH2" },
|
||||
{ SWSRC_SI0, "SI0" },
|
||||
{ SWSRC_SI1, "SI1" },
|
||||
{ SWSRC_SI2, "SI2" },
|
||||
{ SWSRC_SJ0, "SJ0" },
|
||||
{ SWSRC_SJ1, "SJ1" },
|
||||
{ SWSRC_SJ2, "SJ2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_TrimT5Down, "TrimT5Down" },
|
||||
{ SWSRC_TrimT5Up, "TrimT5Up" },
|
||||
{ SWSRC_TrimT6Down, "TrimT6Down" },
|
||||
{ SWSRC_TrimT6Up, "TrimT6Up" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
@@ -366,18 +273,13 @@ static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 6, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 48 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ZoneOptionValue_elmts[] = {
|
||||
YAML_UNSIGNED( "unsignedValue", 32 ),
|
||||
YAML_SIGNED( "signedValue", 32 ),
|
||||
@@ -402,7 +304,7 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 15, struct_CalibData, NULL),
|
||||
YAML_ARRAY("calib", 48, 22, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "vBatWarn", 8 ),
|
||||
YAML_SIGNED( "txVoltageCalibration", 8 ),
|
||||
@@ -467,12 +369,10 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 16, struct_switchConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 8, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 8, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 240 ),
|
||||
YAML_PADDING( 312 ),
|
||||
YAML_ARRAY("sticksConfig", 0, MAX_STICKS, struct_stickConfig, stick_name_valid),
|
||||
YAML_ARRAY("slidersConfig", 0, MAX_POTS, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 4, 16, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("switchConfig", 2, 32, struct_switchConfig, nullptr),
|
||||
YAML_STRING("currModelFilename", 17),
|
||||
YAML_UNSIGNED( "modelQuickSelect", 1 ),
|
||||
YAML_UNSIGNED( "blOffBright", 7 ),
|
||||
@@ -542,8 +442,8 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "offset", 13, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
@@ -573,10 +473,9 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -601,9 +500,9 @@ static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "andsw", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
@@ -630,8 +529,8 @@ static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 6, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 10),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
@@ -938,7 +837,7 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_ARRAY("flightModeData", 352, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
@@ -954,7 +853,7 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_ARRAY("scriptsData", 192, 9, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 32, 32, struct_string_32, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 9, struct_signed_8, NULL),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 16, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 60, struct_TelemetrySensor, NULL),
|
||||
YAML_ARRAY("screenData", 6816, 10, struct_CustomScreenData, NULL),
|
||||
YAML_STRUCT("topbarData", 2400, struct_TopBarPersistentData, NULL),
|
||||
|
||||
@@ -1,943 +0,0 @@
|
||||
// generated by generate_yaml.py
|
||||
|
||||
//
|
||||
// Enums first
|
||||
//
|
||||
|
||||
const struct YamlIdStr enum_BacklightMode[] = {
|
||||
{ e_backlight_mode_off, "backlight_mode_off" },
|
||||
{ e_backlight_mode_keys, "backlight_mode_keys" },
|
||||
{ e_backlight_mode_sticks, "backlight_mode_sticks" },
|
||||
{ e_backlight_mode_all, "backlight_mode_all" },
|
||||
{ e_backlight_mode_on, "backlight_mode_on" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_AntennaModes[] = {
|
||||
{ ANTENNA_MODE_INTERNAL, "MODE_INTERNAL" },
|
||||
{ ANTENNA_MODE_ASK, "MODE_ASK" },
|
||||
{ ANTENNA_MODE_PER_MODEL, "MODE_PER_MODEL" },
|
||||
{ ANTENNA_MODE_EXTERNAL, "MODE_EXTERNAL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModuleType[] = {
|
||||
{ MODULE_TYPE_NONE, "TYPE_NONE" },
|
||||
{ MODULE_TYPE_PPM, "TYPE_PPM" },
|
||||
{ MODULE_TYPE_XJT_PXX1, "TYPE_XJT_PXX1" },
|
||||
{ MODULE_TYPE_ISRM_PXX2, "TYPE_ISRM_PXX2" },
|
||||
{ MODULE_TYPE_DSM2, "TYPE_DSM2" },
|
||||
{ MODULE_TYPE_CROSSFIRE, "TYPE_CROSSFIRE" },
|
||||
{ MODULE_TYPE_MULTIMODULE, "TYPE_MULTIMODULE" },
|
||||
{ MODULE_TYPE_R9M_PXX1, "TYPE_R9M_PXX1" },
|
||||
{ MODULE_TYPE_R9M_PXX2, "TYPE_R9M_PXX2" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX1, "TYPE_R9M_LITE_PXX1" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX2, "TYPE_R9M_LITE_PXX2" },
|
||||
{ MODULE_TYPE_GHOST, "TYPE_GHOST" },
|
||||
{ MODULE_TYPE_R9M_LITE_PRO_PXX2, "TYPE_R9M_LITE_PRO_PXX2" },
|
||||
{ MODULE_TYPE_SBUS, "TYPE_SBUS" },
|
||||
{ MODULE_TYPE_XJT_LITE_PXX2, "TYPE_XJT_LITE_PXX2" },
|
||||
{ MODULE_TYPE_FLYSKY, "TYPE_FLYSKY" },
|
||||
{ MODULE_TYPE_LEMON_DSMP, "TYPE_LEMON_DSMP" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TrainerMultiplex[] = {
|
||||
{ TRAINER_OFF, "OFF" },
|
||||
{ TRAINER_ADD, "ADD" },
|
||||
{ TRAINER_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BeeperMode[] = {
|
||||
{ e_mode_quiet, "mode_quiet" },
|
||||
{ e_mode_alarms, "mode_alarms" },
|
||||
{ e_mode_nokeys, "mode_nokeys" },
|
||||
{ e_mode_all, "mode_all" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BluetoothModes[] = {
|
||||
{ BLUETOOTH_OFF, "OFF" },
|
||||
{ BLUETOOTH_TELEMETRY, "TELEMETRY" },
|
||||
{ BLUETOOTH_TRAINER, "TRAINER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_OVERRIDE_CHANNEL, "OVERRIDE_CHANNEL" },
|
||||
{ FUNC_TRAINER, "TRAINER" },
|
||||
{ FUNC_INSTANT_TRIM, "INSTANT_TRIM" },
|
||||
{ FUNC_RESET, "RESET" },
|
||||
{ FUNC_SET_TIMER, "SET_TIMER" },
|
||||
{ FUNC_ADJUST_GVAR, "ADJUST_GVAR" },
|
||||
{ FUNC_VOLUME, "VOLUME" },
|
||||
{ FUNC_SET_FAILSAFE, "SET_FAILSAFE" },
|
||||
{ FUNC_RANGECHECK, "RANGECHECK" },
|
||||
{ FUNC_BIND, "BIND" },
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
{ FUNC_HAPTIC, "HAPTIC" },
|
||||
{ FUNC_LOGS, "LOGS" },
|
||||
{ FUNC_BACKLIGHT, "BACKLIGHT" },
|
||||
{ FUNC_SCREENSHOT, "SCREENSHOT" },
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
{ TMRMODE_START, "START" },
|
||||
{ TMRMODE_THR, "THR" },
|
||||
{ TMRMODE_THR_REL, "THR_REL" },
|
||||
{ TMRMODE_THR_START, "THR_START" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
{ MLTPX_ADD, "ADD" },
|
||||
{ MLTPX_MUL, "MUL" },
|
||||
{ MLTPX_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_POT2, "POT2" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SH, "SH" },
|
||||
{ MIXSRC_SI, "SI" },
|
||||
{ MIXSRC_SJ, "SJ" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_NONE, "FUNC_NONE" },
|
||||
{ LS_FUNC_VEQUAL, "FUNC_VEQUAL" },
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
{ LS_FUNC_OR, "FUNC_OR" },
|
||||
{ LS_FUNC_XOR, "FUNC_XOR" },
|
||||
{ LS_FUNC_EDGE, "FUNC_EDGE" },
|
||||
{ LS_FUNC_EQUAL, "FUNC_EQUAL" },
|
||||
{ LS_FUNC_GREATER, "FUNC_GREATER" },
|
||||
{ LS_FUNC_LESS, "FUNC_LESS" },
|
||||
{ LS_FUNC_DIFFEGREATER, "FUNC_DIFFEGREATER" },
|
||||
{ LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" },
|
||||
{ LS_FUNC_TIMER, "FUNC_TIMER" },
|
||||
{ LS_FUNC_STICKY, "FUNC_STICKY" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwashType[] = {
|
||||
{ SWASH_TYPE_NONE, "TYPE_NONE" },
|
||||
{ SWASH_TYPE_120, "TYPE_120" },
|
||||
{ SWASH_TYPE_120X, "TYPE_120X" },
|
||||
{ SWASH_TYPE_140, "TYPE_140" },
|
||||
{ SWASH_TYPE_90, "TYPE_90" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_SH0, "SH0" },
|
||||
{ SWSRC_SH1, "SH1" },
|
||||
{ SWSRC_SH2, "SH2" },
|
||||
{ SWSRC_SI0, "SI0" },
|
||||
{ SWSRC_SI1, "SI1" },
|
||||
{ SWSRC_SI2, "SI2" },
|
||||
{ SWSRC_SJ0, "SJ0" },
|
||||
{ SWSRC_SJ1, "SJ1" },
|
||||
{ SWSRC_SJ2, "SJ2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
{ SWSRC_RADIO_ACTIVITY, "RADIO_ACTIVITY" },
|
||||
{ SWSRC_OFF, "OFF" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_PotsWarnMode[] = {
|
||||
{ POTS_WARN_OFF, "WARN_OFF" },
|
||||
{ POTS_WARN_MANUAL, "WARN_MANUAL" },
|
||||
{ POTS_WARN_AUTO, "WARN_AUTO" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModelOverridableEnable[] = {
|
||||
{ OVERRIDE_GLOBAL, "GLOBAL" },
|
||||
{ OVERRIDE_OFF, "OFF" },
|
||||
{ OVERRIDE_ON, "ON" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_FailsafeModes[] = {
|
||||
{ FAILSAFE_NOT_SET, "NOT_SET" },
|
||||
{ FAILSAFE_HOLD, "HOLD" },
|
||||
{ FAILSAFE_CUSTOM, "CUSTOM" },
|
||||
{ FAILSAFE_NOPULSES, "NOPULSES" },
|
||||
{ FAILSAFE_RECEIVER, "RECEIVER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorFormula[] = {
|
||||
{ TELEM_FORMULA_ADD, "FORMULA_ADD" },
|
||||
{ TELEM_FORMULA_AVERAGE, "FORMULA_AVERAGE" },
|
||||
{ TELEM_FORMULA_MIN, "FORMULA_MIN" },
|
||||
{ TELEM_FORMULA_MAX, "FORMULA_MAX" },
|
||||
{ TELEM_FORMULA_MULTIPLY, "FORMULA_MULTIPLY" },
|
||||
{ TELEM_FORMULA_TOTALIZE, "FORMULA_TOTALIZE" },
|
||||
{ TELEM_FORMULA_CELL, "FORMULA_CELL" },
|
||||
{ TELEM_FORMULA_CONSUMPTION, "FORMULA_CONSUMPTION" },
|
||||
{ TELEM_FORMULA_DIST, "FORMULA_DIST" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorType[] = {
|
||||
{ TELEM_TYPE_CUSTOM, "TYPE_CUSTOM" },
|
||||
{ TELEM_TYPE_CALCULATED, "TYPE_CALCULATED" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickIfMode[] = {
|
||||
{ USBJOYS_JOYSTICK, "JOYSTICK" },
|
||||
{ USBJOYS_GAMEPAD, "GAMEPAD" },
|
||||
{ USBJOYS_MULTIAXIS, "MULTIAXIS" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickCh[] = {
|
||||
{ USBJOYS_CH_NONE, "CH_NONE" },
|
||||
{ USBJOYS_CH_BUTTON, "CH_BUTTON" },
|
||||
{ USBJOYS_CH_AXIS, "CH_AXIS" },
|
||||
{ USBJOYS_CH_SIM, "CH_SIM" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||
YAML_SIGNED( "mid", 16 ),
|
||||
YAML_SIGNED( "spanNeg", 16 ),
|
||||
YAML_SIGNED( "spanPos", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerMix[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "srcChn", 6 ),
|
||||
YAML_ENUM("mode", 2, enum_TrainerMultiplex),
|
||||
YAML_SIGNED( "studWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerData[] = {
|
||||
YAML_ARRAY("calib", 16, 4, struct_signed_16, NULL),
|
||||
YAML_ARRAY("mix", 16, 4, struct_TrainerMix, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_1[] = {
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_2[] = {
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_UNSIGNED( "mode", 8 ),
|
||||
YAML_UNSIGNED( "param", 8 ),
|
||||
YAML_SIGNED( "spare", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_SIGNED( "val2", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
YAML_STRUCT("play", 48, struct_anonymous_1, NULL),
|
||||
YAML_STRUCT("all", 64, struct_anonymous_2, NULL),
|
||||
YAML_STRUCT("clear", 64, struct_anonymous_3, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "manuallyEdited", 1 ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_SIGNED( "currModel", 8 ),
|
||||
YAML_UNSIGNED( "contrast", 8 ),
|
||||
YAML_UNSIGNED( "vBatWarn", 8 ),
|
||||
YAML_SIGNED( "txVoltageCalibration", 8 ),
|
||||
YAML_ENUM("backlightMode", 3, enum_BacklightMode),
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "fai", 1 ),
|
||||
YAML_SIGNED_CUST( "beepMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_UNSIGNED( "alarmsFlash", 1 ),
|
||||
YAML_UNSIGNED( "disableMemoryWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableAlarmWarning", 1 ),
|
||||
YAML_UNSIGNED( "stickMode", 2 ),
|
||||
YAML_SIGNED( "timezone", 5 ),
|
||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||
YAML_CUSTOM("telemetryBaudrate",r_telemetryBaudrate,nullptr),
|
||||
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||
YAML_SIGNED( "splashMode", 3 ),
|
||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_SIGNED( "switchesDelay", 8 ),
|
||||
YAML_UNSIGNED( "lightAutoOff", 8 ),
|
||||
YAML_UNSIGNED( "templateSetup", 8 ),
|
||||
YAML_SIGNED( "PPM_Multiplier", 8 ),
|
||||
YAML_SIGNED_CUST( "hapticLength", 8, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 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 ),
|
||||
YAML_SIGNED_CUST( "vBatMax", 8, r_vbat_max, w_vbat_max ),
|
||||
YAML_UNSIGNED( "backlightBright", 8 ),
|
||||
YAML_UNSIGNED( "globalTimer", 32 ),
|
||||
YAML_UNSIGNED( "bluetoothBaudrate", 4 ),
|
||||
YAML_ENUM("bluetoothMode", 4, enum_BluetoothModes),
|
||||
YAML_UNSIGNED( "countryCode", 2 ),
|
||||
YAML_SIGNED( "pwrOnSpeed", 3 ),
|
||||
YAML_SIGNED( "pwrOffSpeed", 3 ),
|
||||
YAML_CUSTOM("jitterFilter",r_jitterFilter,nullptr),
|
||||
YAML_UNSIGNED( "noJitterFilter", 1 ),
|
||||
YAML_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "disableRssiPoweroffAlarm", 1 ),
|
||||
YAML_UNSIGNED( "USBMode", 2 ),
|
||||
YAML_UNSIGNED( "jackMode", 2 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("ttsLanguage", 2),
|
||||
YAML_SIGNED_CUST( "beepVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "wavVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "backgroundVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioPitch", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 8, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 192 ),
|
||||
YAML_PADDING( 144 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
YAML_CUSTOM("rotEncDirection",r_rotEncDirection,nullptr),
|
||||
YAML_UNSIGNED( "rotEncMode", 2 ),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "radioGFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "radioTrainerDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelHeliDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelFMDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCurvesDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelGVDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelLSDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelSFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelTelemetryDisabled", 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelHeader[] = {
|
||||
YAML_STRING("name", 10),
|
||||
YAML_ARRAY("modelId", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TimerData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "start", 22 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED( "value", 22 ),
|
||||
YAML_ENUM("mode", 3, enum_TimerModes),
|
||||
YAML_UNSIGNED( "countdownBeep", 2 ),
|
||||
YAML_UNSIGNED( "minuteBeep", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 2 ),
|
||||
YAML_SIGNED( "countdownStart", 2 ),
|
||||
YAML_UNSIGNED( "showElapsed", 1 ),
|
||||
YAML_UNSIGNED( "extraHaptic", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "destCh", 5 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "carryTrim", 1 ),
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
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),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
YAML_UNSIGNED( "delayDown", 8 ),
|
||||
YAML_UNSIGNED( "speedUp", 8 ),
|
||||
YAML_UNSIGNED( "speedDown", 8 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
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_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_SIGNED( "curve", 8 ),
|
||||
YAML_STRING("name", 4),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "scale", 14 ),
|
||||
YAML_CUSTOM("carryTrim",r_carryTrim,nullptr),
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveHeader[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
YAML_UNSIGNED( "smooth", 1 ),
|
||||
YAML_SIGNED( "points", 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("func", 8, enum_LogicalSwitchesFunctions),
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_ENUM("type", 8, enum_SwashType),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED_CUST( "collectiveSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "aileronSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "elevatorSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "collectiveWeight", 8 ),
|
||||
YAML_SIGNED( "aileronWeight", 8 ),
|
||||
YAML_SIGNED( "elevatorWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_trim_t[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "value", 11 ),
|
||||
YAML_UNSIGNED( "mode", 5 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_GVarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("name", 3),
|
||||
YAML_UNSIGNED( "min", 12 ),
|
||||
YAML_UNSIGNED( "max", 12 ),
|
||||
YAML_UNSIGNED( "popup", 1 ),
|
||||
YAML_UNSIGNED( "prec", 1 ),
|
||||
YAML_UNSIGNED( "unit", 2 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_VarioData[] = {
|
||||
YAML_UNSIGNED_CUST( "source", 7, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_UNSIGNED( "centerSilent", 1 ),
|
||||
YAML_SIGNED( "centerMax", 8 ),
|
||||
YAML_SIGNED( "centerMin", 8 ),
|
||||
YAML_SIGNED( "min", 8 ),
|
||||
YAML_SIGNED( "max", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RssiAlarmData[] = {
|
||||
YAML_CUSTOM("disabled",r_rssiDisabled,nullptr),
|
||||
YAML_CUSTOM("warning",r_rssiWarning,nullptr),
|
||||
YAML_CUSTOM("critical",r_rssiCritical,nullptr),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RFAlarmData[] = {
|
||||
YAML_SIGNED( "warning", 8 ),
|
||||
YAML_SIGNED( "critical", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PpmModule[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "power", 2 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_SIGNED( "antennaMode", 2 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "noninverted", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "refreshRate", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_64[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_8[] = {
|
||||
YAML_UNSIGNED( "receivers", 7 ),
|
||||
YAML_UNSIGNED( "racingMode", 1 ),
|
||||
YAML_ARRAY("receiverName", 64, 3, struct_string_64, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_9[] = {
|
||||
YAML_ARRAY("rx_id", 8, 4, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 3 ),
|
||||
YAML_UNSIGNED( "rfPower", 1 ),
|
||||
YAML_UNSIGNED( "reserved", 4 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_10[] = {
|
||||
YAML_UNSIGNED( "emi", 2 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "phyMode", 3 ),
|
||||
YAML_UNSIGNED( "reserved", 2 ),
|
||||
YAML_UNSIGNED( "rfPower", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_11[] = {
|
||||
YAML_UNSIGNED( "raw12bits", 1 ),
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_12[] = {
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_13[] = {
|
||||
YAML_UNSIGNED( "flags", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_PpmModule, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("afhds3", 16, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("ghost", 8, struct_anonymous_11, NULL),
|
||||
YAML_STRUCT("crsf", 8, struct_anonymous_12, NULL),
|
||||
YAML_STRUCT("dsmp", 8, struct_anonymous_13, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 8, enum_ModuleType),
|
||||
YAML_CUSTOM("subType",r_modSubtype,w_modSubtype),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED_CUST( "channelsCount", 8, r_channelsCount, w_channelsCount ),
|
||||
YAML_ENUM("failsafeMode", 4, enum_FailsafeModes),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_UNION("mod", 200, union_anonymous_4_elmts, select_mod_type),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerModuleData[] = {
|
||||
YAML_UNSIGNED_CUST( "mode", 8, r_trainerMode, w_trainerMode ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput_elmts[] = {
|
||||
YAML_SIGNED( "value", 16 ),
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 16, union_ScriptDataInput_elmts, select_script_input),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ScriptData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("file", 6),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_ARRAY("inputs", 16, 6, union_ScriptDataInput, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_14_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_16, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_ENUM("formula", 8, enum_TelemetrySensorFormula),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_21[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_22[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_17_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_20, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_21, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_22, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_14_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_15_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_ENUM("type", 1, enum_TelemetrySensorType),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "unit", 6 ),
|
||||
YAML_UNSIGNED( "prec", 2 ),
|
||||
YAML_UNSIGNED( "autoOffset", 1 ),
|
||||
YAML_UNSIGNED( "filter", 1 ),
|
||||
YAML_UNSIGNED( "logs", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 1 ),
|
||||
YAML_UNSIGNED( "onlyPositive", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNION("cfg", 32, union_anonymous_17_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LineDataSource[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "val", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_LineDataSource, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScriptData[] = {
|
||||
YAML_STRING("file", 6),
|
||||
YAML_ARRAY("inputs", 16, 8, struct_signed_16, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_TelemetryScreenData_u_elmts[] = {
|
||||
YAML_ARRAY("bars", 48, 4, struct_FrSkyBarData, NULL),
|
||||
YAML_ARRAY("lines", 32, 4, struct_FrSkyLineData, NULL),
|
||||
YAML_STRUCT("script", 176, struct_TelemetryScriptData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_CUSTOM("type",r_tele_screen_type,w_tele_screen_type),
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_u_elmts, select_tele_screen_data),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_USBJoystickChData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("mode", 3, enum_USBJoystickCh),
|
||||
YAML_UNSIGNED( "inversion", 1 ),
|
||||
YAML_UNSIGNED( "param", 4 ),
|
||||
YAML_UNSIGNED( "btn_num", 5 ),
|
||||
YAML_UNSIGNED( "switch_npos", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_UNSIGNED( "telemetryProtocol", 3 ),
|
||||
YAML_UNSIGNED( "thrTrim", 1 ),
|
||||
YAML_UNSIGNED( "noGlobalFunctions", 1 ),
|
||||
YAML_UNSIGNED( "displayTrims", 2 ),
|
||||
YAML_UNSIGNED( "ignoreSensorIds", 1 ),
|
||||
YAML_SIGNED( "trimInc", 3 ),
|
||||
YAML_UNSIGNED( "disableThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "displayChecklist", 1 ),
|
||||
YAML_UNSIGNED( "extendedLimits", 1 ),
|
||||
YAML_UNSIGNED( "extendedTrims", 1 ),
|
||||
YAML_UNSIGNED( "throttleReversed", 1 ),
|
||||
YAML_UNSIGNED( "enableCustomThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableTelemetryWarning", 1 ),
|
||||
YAML_UNSIGNED( "showInstanceIds", 1 ),
|
||||
YAML_PADDING( 5 ),
|
||||
YAML_SIGNED( "customThrottleWarningPosition", 8 ),
|
||||
YAML_UNSIGNED( "beepANACenter", 16 ),
|
||||
YAML_ARRAY("mixData", 160, 64, struct_MixData, NULL),
|
||||
YAML_ARRAY("limitData", 88, 32, struct_LimitData, NULL),
|
||||
YAML_ARRAY("expoData", 136, 64, struct_ExpoData, NULL),
|
||||
YAML_ARRAY("curves", 32, 32, struct_CurveHeader, NULL),
|
||||
YAML_ARRAY("points", 8, 512, struct_signed_8, NULL),
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_STRUCT("rssiAlarms", 0, struct_RssiAlarmData, NULL),
|
||||
YAML_STRUCT("rfAlarms", 16, struct_RFAlarmData, NULL),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_ENUM("potsWarnMode", 2, enum_PotsWarnMode),
|
||||
YAML_ENUM("jitterFilter", 2, enum_ModelOverridableEnable),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ARRAY("moduleData", 232, 2, struct_ModuleData, NULL),
|
||||
YAML_ARRAY("failsafeChannels", 16, 32, struct_signed_16, NULL),
|
||||
YAML_STRUCT("trainerData", 40, struct_TrainerModuleData, NULL),
|
||||
YAML_ARRAY("scriptsData", 192, 7, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 24, 32, struct_string_24, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, struct_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_UNSIGNED( "usbJoystickExtMode", 1 ),
|
||||
YAML_ENUM("usbJoystickIfMode", 3, enum_USBJoystickIfMode),
|
||||
YAML_UNSIGNED( "usbJoystickCircularCut", 4 ),
|
||||
YAML_ARRAY("usbJoystickCh", 16, 26, struct_USBJoystickChData, NULL),
|
||||
YAML_ENUM("radioGFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("radioTrainerDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelHeliDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelFMDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCurvesDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelGVDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelLSDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelSFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCustomScriptsDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelTelemetryDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 29
|
||||
|
||||
static const struct YamlNode __RadioData_root_node = YAML_ROOT( struct_RadioData );
|
||||
|
||||
const YamlNode* get_radiodata_nodes()
|
||||
{
|
||||
return &__RadioData_root_node;
|
||||
}
|
||||
static const struct YamlNode __ModelData_root_node = YAML_ROOT( struct_ModelData );
|
||||
|
||||
const YamlNode* get_modeldata_nodes()
|
||||
{
|
||||
return &__ModelData_root_node;
|
||||
}
|
||||
static const struct YamlNode __PartialModel_root_node = YAML_ROOT( struct_PartialModel );
|
||||
|
||||
const YamlNode* get_partialmodel_nodes()
|
||||
{
|
||||
return &__PartialModel_root_node;
|
||||
}
|
||||
|
||||
@@ -72,9 +72,7 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
@@ -102,56 +100,16 @@ const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_POT2, "POT2" },
|
||||
{ MIXSRC_POT3, "POT3" },
|
||||
{ MIXSRC_SLIDER1, "SLIDER1" },
|
||||
{ MIXSRC_SLIDER2, "SLIDER2" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SE, "SE" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SG, "SG" },
|
||||
{ MIXSRC_SH, "SH" },
|
||||
{ MIXSRC_SI, "SI" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TrimT5, "TrimT5" },
|
||||
{ MIXSRC_TrimT6, "TrimT6" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
@@ -186,43 +144,6 @@ const struct YamlIdStr enum_SwashType[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SE0, "SE0" },
|
||||
{ SWSRC_SE1, "SE1" },
|
||||
{ SWSRC_SE2, "SE2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_SG0, "SG0" },
|
||||
{ SWSRC_SG1, "SG1" },
|
||||
{ SWSRC_SG2, "SG2" },
|
||||
{ SWSRC_SH0, "SH0" },
|
||||
{ SWSRC_SH1, "SH1" },
|
||||
{ SWSRC_SH2, "SH2" },
|
||||
{ SWSRC_SI0, "SI0" },
|
||||
{ SWSRC_SI1, "SI1" },
|
||||
{ SWSRC_SI2, "SI2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
@@ -333,24 +254,19 @@ static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 6, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "manuallyEdited", 1 ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 9, struct_CalibData, NULL),
|
||||
YAML_ARRAY("calib", 48, 12, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_SIGNED( "currModel", 8 ),
|
||||
YAML_UNSIGNED( "contrast", 8 ),
|
||||
@@ -417,14 +333,11 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("sticksConfig", 0, MAX_STICKS, struct_stickConfig, stick_name_valid),
|
||||
YAML_ARRAY("slidersConfig", 0, MAX_POTS, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 4, 8, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("switchConfig", 2, 32, struct_switchConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 16, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 216 ),
|
||||
YAML_PADDING( 216 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
@@ -485,8 +398,8 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "offset", 13, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
@@ -516,10 +429,9 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -544,9 +456,9 @@ static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "andsw", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
@@ -571,10 +483,10 @@ static const struct YamlNode struct_trim_t[] = {
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_ARRAY("trim", 16, 6, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 10),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
@@ -886,10 +798,10 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 320, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_ARRAY("flightModeData", 352, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
@@ -906,8 +818,8 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("trainerData", 40, struct_TrainerModuleData, NULL),
|
||||
YAML_ARRAY("scriptsData", 192, 7, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 32, 32, struct_string_32, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 5, struct_signed_8, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 8, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 60, struct_TelemetrySensor, NULL),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, struct_TelemetryScreenData, NULL),
|
||||
|
||||
@@ -72,9 +72,7 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
@@ -102,68 +100,16 @@ const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_POT2, "POT2" },
|
||||
{ MIXSRC_POT3, "POT3" },
|
||||
{ MIXSRC_POT4, "POT4" },
|
||||
{ MIXSRC_SLIDER1, "SLIDER1" },
|
||||
{ MIXSRC_SLIDER2, "SLIDER2" },
|
||||
{ MIXSRC_SLIDER3, "SLIDER3" },
|
||||
{ MIXSRC_SLIDER4, "SLIDER4" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SE, "SE" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SG, "SG" },
|
||||
{ MIXSRC_SH, "SH" },
|
||||
{ MIXSRC_SI, "SI" },
|
||||
{ MIXSRC_SJ, "SJ" },
|
||||
{ MIXSRC_SK, "SK" },
|
||||
{ MIXSRC_SL, "SL" },
|
||||
{ MIXSRC_SM, "SM" },
|
||||
{ MIXSRC_SN, "SN" },
|
||||
{ MIXSRC_SO, "SO" },
|
||||
{ MIXSRC_SP, "SP" },
|
||||
{ MIXSRC_SQ, "SQ" },
|
||||
{ MIXSRC_SR, "SR" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TrimT5, "TrimT5" },
|
||||
{ MIXSRC_TrimT6, "TrimT6" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
@@ -198,70 +144,6 @@ const struct YamlIdStr enum_SwashType[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SE0, "SE0" },
|
||||
{ SWSRC_SE1, "SE1" },
|
||||
{ SWSRC_SE2, "SE2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_SG0, "SG0" },
|
||||
{ SWSRC_SG1, "SG1" },
|
||||
{ SWSRC_SG2, "SG2" },
|
||||
{ SWSRC_SH0, "SH0" },
|
||||
{ SWSRC_SH1, "SH1" },
|
||||
{ SWSRC_SH2, "SH2" },
|
||||
{ SWSRC_SI0, "SI0" },
|
||||
{ SWSRC_SI1, "SI1" },
|
||||
{ SWSRC_SI2, "SI2" },
|
||||
{ SWSRC_SJ0, "SJ0" },
|
||||
{ SWSRC_SJ1, "SJ1" },
|
||||
{ SWSRC_SJ2, "SJ2" },
|
||||
{ SWSRC_SK0, "SK0" },
|
||||
{ SWSRC_SK1, "SK1" },
|
||||
{ SWSRC_SK2, "SK2" },
|
||||
{ SWSRC_SL0, "SL0" },
|
||||
{ SWSRC_SL1, "SL1" },
|
||||
{ SWSRC_SL2, "SL2" },
|
||||
{ SWSRC_SM0, "SM0" },
|
||||
{ SWSRC_SM1, "SM1" },
|
||||
{ SWSRC_SM2, "SM2" },
|
||||
{ SWSRC_SN0, "SN0" },
|
||||
{ SWSRC_SN1, "SN1" },
|
||||
{ SWSRC_SN2, "SN2" },
|
||||
{ SWSRC_SO0, "SO0" },
|
||||
{ SWSRC_SO1, "SO1" },
|
||||
{ SWSRC_SO2, "SO2" },
|
||||
{ SWSRC_SP0, "SP0" },
|
||||
{ SWSRC_SP1, "SP1" },
|
||||
{ SWSRC_SP2, "SP2" },
|
||||
{ SWSRC_SQ0, "SQ0" },
|
||||
{ SWSRC_SQ1, "SQ1" },
|
||||
{ SWSRC_SQ2, "SQ2" },
|
||||
{ SWSRC_SR0, "SR0" },
|
||||
{ SWSRC_SR1, "SR1" },
|
||||
{ SWSRC_SR2, "SR2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
@@ -372,18 +254,13 @@ static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 6, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "manuallyEdited", 1 ),
|
||||
YAML_PADDING( 7 ),
|
||||
@@ -456,14 +333,11 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("sticksConfig", 0, MAX_STICKS, struct_stickConfig, stick_name_valid),
|
||||
YAML_ARRAY("slidersConfig", 0, MAX_POTS, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 4, 8, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("switchConfig", 2, 32, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 432 ),
|
||||
YAML_PADDING( 288 ),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
@@ -524,8 +398,8 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "offset", 13, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
@@ -555,10 +429,9 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -583,9 +456,9 @@ static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "andsw", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
@@ -610,10 +483,10 @@ static const struct YamlNode struct_trim_t[] = {
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_ARRAY("trim", 16, 6, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 10),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
@@ -925,7 +798,7 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 320, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_ARRAY("flightModeData", 352, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 64 ),
|
||||
@@ -945,7 +818,7 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("trainerData", 40, struct_TrainerModuleData, NULL),
|
||||
YAML_ARRAY("scriptsData", 192, 7, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 32, 32, struct_string_32, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 8, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 60, struct_TelemetrySensor, NULL),
|
||||
YAML_UNSIGNED( "toplcdTimer", 8 ),
|
||||
|
||||
@@ -72,9 +72,7 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
@@ -102,48 +100,16 @@ const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SE, "SE" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TrimT5, "TrimT5" },
|
||||
{ MIXSRC_TrimT6, "TrimT6" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
@@ -178,31 +144,6 @@ const struct YamlIdStr enum_SwashType[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SE0, "SE0" },
|
||||
{ SWSRC_SE1, "SE1" },
|
||||
{ SWSRC_SE2, "SE2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
@@ -313,24 +254,19 @@ static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 6, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "manuallyEdited", 1 ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 5, struct_CalibData, NULL),
|
||||
YAML_ARRAY("calib", 48, 12, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_SIGNED( "currModel", 8 ),
|
||||
YAML_UNSIGNED( "contrast", 8 ),
|
||||
@@ -397,14 +333,11 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("sticksConfig", 0, MAX_STICKS, struct_stickConfig, stick_name_valid),
|
||||
YAML_ARRAY("slidersConfig", 0, MAX_POTS, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 4, 8, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("switchConfig", 2, 32, struct_switchConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 8, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 120 ),
|
||||
YAML_PADDING( 120 ),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
YAML_CUSTOM("rotEncDirection",r_rotEncDirection,nullptr),
|
||||
YAML_UNSIGNED( "rotEncMode", 2 ),
|
||||
@@ -462,8 +395,8 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "offset", 13, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
@@ -493,10 +426,9 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -521,9 +453,9 @@ static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "andsw", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
@@ -548,10 +480,10 @@ static const struct YamlNode struct_trim_t[] = {
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_ARRAY("trim", 16, 6, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
@@ -716,6 +648,11 @@ static const struct YamlNode struct_ScriptData[] = {
|
||||
YAML_ARRAY("inputs", 16, 6, union_ScriptDataInput, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_14_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
@@ -858,10 +795,10 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_ARRAY("flightModeData", 320, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
@@ -876,8 +813,8 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("trainerData", 40, struct_TrainerModuleData, NULL),
|
||||
YAML_ARRAY("scriptsData", 192, 7, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 24, 32, struct_string_24, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 1, struct_signed_8, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 8, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, struct_TelemetryScreenData, NULL),
|
||||
|
||||
@@ -1,938 +0,0 @@
|
||||
// generated by generate_yaml.py
|
||||
|
||||
//
|
||||
// Enums first
|
||||
//
|
||||
|
||||
const struct YamlIdStr enum_BacklightMode[] = {
|
||||
{ e_backlight_mode_off, "backlight_mode_off" },
|
||||
{ e_backlight_mode_keys, "backlight_mode_keys" },
|
||||
{ e_backlight_mode_sticks, "backlight_mode_sticks" },
|
||||
{ e_backlight_mode_all, "backlight_mode_all" },
|
||||
{ e_backlight_mode_on, "backlight_mode_on" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_AntennaModes[] = {
|
||||
{ ANTENNA_MODE_INTERNAL, "MODE_INTERNAL" },
|
||||
{ ANTENNA_MODE_ASK, "MODE_ASK" },
|
||||
{ ANTENNA_MODE_PER_MODEL, "MODE_PER_MODEL" },
|
||||
{ ANTENNA_MODE_EXTERNAL, "MODE_EXTERNAL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModuleType[] = {
|
||||
{ MODULE_TYPE_NONE, "TYPE_NONE" },
|
||||
{ MODULE_TYPE_PPM, "TYPE_PPM" },
|
||||
{ MODULE_TYPE_XJT_PXX1, "TYPE_XJT_PXX1" },
|
||||
{ MODULE_TYPE_ISRM_PXX2, "TYPE_ISRM_PXX2" },
|
||||
{ MODULE_TYPE_DSM2, "TYPE_DSM2" },
|
||||
{ MODULE_TYPE_CROSSFIRE, "TYPE_CROSSFIRE" },
|
||||
{ MODULE_TYPE_MULTIMODULE, "TYPE_MULTIMODULE" },
|
||||
{ MODULE_TYPE_R9M_PXX1, "TYPE_R9M_PXX1" },
|
||||
{ MODULE_TYPE_R9M_PXX2, "TYPE_R9M_PXX2" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX1, "TYPE_R9M_LITE_PXX1" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX2, "TYPE_R9M_LITE_PXX2" },
|
||||
{ MODULE_TYPE_GHOST, "TYPE_GHOST" },
|
||||
{ MODULE_TYPE_R9M_LITE_PRO_PXX2, "TYPE_R9M_LITE_PRO_PXX2" },
|
||||
{ MODULE_TYPE_SBUS, "TYPE_SBUS" },
|
||||
{ MODULE_TYPE_XJT_LITE_PXX2, "TYPE_XJT_LITE_PXX2" },
|
||||
{ MODULE_TYPE_FLYSKY, "TYPE_FLYSKY" },
|
||||
{ MODULE_TYPE_LEMON_DSMP, "TYPE_LEMON_DSMP" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TrainerMultiplex[] = {
|
||||
{ TRAINER_OFF, "OFF" },
|
||||
{ TRAINER_ADD, "ADD" },
|
||||
{ TRAINER_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BeeperMode[] = {
|
||||
{ e_mode_quiet, "mode_quiet" },
|
||||
{ e_mode_alarms, "mode_alarms" },
|
||||
{ e_mode_nokeys, "mode_nokeys" },
|
||||
{ e_mode_all, "mode_all" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BluetoothModes[] = {
|
||||
{ BLUETOOTH_OFF, "OFF" },
|
||||
{ BLUETOOTH_TELEMETRY, "TELEMETRY" },
|
||||
{ BLUETOOTH_TRAINER, "TRAINER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_OVERRIDE_CHANNEL, "OVERRIDE_CHANNEL" },
|
||||
{ FUNC_TRAINER, "TRAINER" },
|
||||
{ FUNC_INSTANT_TRIM, "INSTANT_TRIM" },
|
||||
{ FUNC_RESET, "RESET" },
|
||||
{ FUNC_SET_TIMER, "SET_TIMER" },
|
||||
{ FUNC_ADJUST_GVAR, "ADJUST_GVAR" },
|
||||
{ FUNC_VOLUME, "VOLUME" },
|
||||
{ FUNC_SET_FAILSAFE, "SET_FAILSAFE" },
|
||||
{ FUNC_RANGECHECK, "RANGECHECK" },
|
||||
{ FUNC_BIND, "BIND" },
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
{ FUNC_HAPTIC, "HAPTIC" },
|
||||
{ FUNC_LOGS, "LOGS" },
|
||||
{ FUNC_BACKLIGHT, "BACKLIGHT" },
|
||||
{ FUNC_SCREENSHOT, "SCREENSHOT" },
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
{ TMRMODE_START, "START" },
|
||||
{ TMRMODE_THR, "THR" },
|
||||
{ TMRMODE_THR_REL, "THR_REL" },
|
||||
{ TMRMODE_THR_START, "THR_START" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
{ MLTPX_ADD, "ADD" },
|
||||
{ MLTPX_MUL, "MUL" },
|
||||
{ MLTPX_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SE, "SE" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SG, "SG" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_NONE, "FUNC_NONE" },
|
||||
{ LS_FUNC_VEQUAL, "FUNC_VEQUAL" },
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
{ LS_FUNC_OR, "FUNC_OR" },
|
||||
{ LS_FUNC_XOR, "FUNC_XOR" },
|
||||
{ LS_FUNC_EDGE, "FUNC_EDGE" },
|
||||
{ LS_FUNC_EQUAL, "FUNC_EQUAL" },
|
||||
{ LS_FUNC_GREATER, "FUNC_GREATER" },
|
||||
{ LS_FUNC_LESS, "FUNC_LESS" },
|
||||
{ LS_FUNC_DIFFEGREATER, "FUNC_DIFFEGREATER" },
|
||||
{ LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" },
|
||||
{ LS_FUNC_TIMER, "FUNC_TIMER" },
|
||||
{ LS_FUNC_STICKY, "FUNC_STICKY" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwashType[] = {
|
||||
{ SWASH_TYPE_NONE, "TYPE_NONE" },
|
||||
{ SWASH_TYPE_120, "TYPE_120" },
|
||||
{ SWASH_TYPE_120X, "TYPE_120X" },
|
||||
{ SWASH_TYPE_140, "TYPE_140" },
|
||||
{ SWASH_TYPE_90, "TYPE_90" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SE0, "SE0" },
|
||||
{ SWSRC_SE1, "SE1" },
|
||||
{ SWSRC_SE2, "SE2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_SG0, "SG0" },
|
||||
{ SWSRC_SG1, "SG1" },
|
||||
{ SWSRC_SG2, "SG2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
{ SWSRC_RADIO_ACTIVITY, "RADIO_ACTIVITY" },
|
||||
{ SWSRC_OFF, "OFF" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_PotsWarnMode[] = {
|
||||
{ POTS_WARN_OFF, "WARN_OFF" },
|
||||
{ POTS_WARN_MANUAL, "WARN_MANUAL" },
|
||||
{ POTS_WARN_AUTO, "WARN_AUTO" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModelOverridableEnable[] = {
|
||||
{ OVERRIDE_GLOBAL, "GLOBAL" },
|
||||
{ OVERRIDE_OFF, "OFF" },
|
||||
{ OVERRIDE_ON, "ON" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_FailsafeModes[] = {
|
||||
{ FAILSAFE_NOT_SET, "NOT_SET" },
|
||||
{ FAILSAFE_HOLD, "HOLD" },
|
||||
{ FAILSAFE_CUSTOM, "CUSTOM" },
|
||||
{ FAILSAFE_NOPULSES, "NOPULSES" },
|
||||
{ FAILSAFE_RECEIVER, "RECEIVER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorFormula[] = {
|
||||
{ TELEM_FORMULA_ADD, "FORMULA_ADD" },
|
||||
{ TELEM_FORMULA_AVERAGE, "FORMULA_AVERAGE" },
|
||||
{ TELEM_FORMULA_MIN, "FORMULA_MIN" },
|
||||
{ TELEM_FORMULA_MAX, "FORMULA_MAX" },
|
||||
{ TELEM_FORMULA_MULTIPLY, "FORMULA_MULTIPLY" },
|
||||
{ TELEM_FORMULA_TOTALIZE, "FORMULA_TOTALIZE" },
|
||||
{ TELEM_FORMULA_CELL, "FORMULA_CELL" },
|
||||
{ TELEM_FORMULA_CONSUMPTION, "FORMULA_CONSUMPTION" },
|
||||
{ TELEM_FORMULA_DIST, "FORMULA_DIST" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorType[] = {
|
||||
{ TELEM_TYPE_CUSTOM, "TYPE_CUSTOM" },
|
||||
{ TELEM_TYPE_CALCULATED, "TYPE_CALCULATED" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickIfMode[] = {
|
||||
{ USBJOYS_JOYSTICK, "JOYSTICK" },
|
||||
{ USBJOYS_GAMEPAD, "GAMEPAD" },
|
||||
{ USBJOYS_MULTIAXIS, "MULTIAXIS" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickCh[] = {
|
||||
{ USBJOYS_CH_NONE, "CH_NONE" },
|
||||
{ USBJOYS_CH_BUTTON, "CH_BUTTON" },
|
||||
{ USBJOYS_CH_AXIS, "CH_AXIS" },
|
||||
{ USBJOYS_CH_SIM, "CH_SIM" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||
YAML_SIGNED( "mid", 16 ),
|
||||
YAML_SIGNED( "spanNeg", 16 ),
|
||||
YAML_SIGNED( "spanPos", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerMix[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "srcChn", 6 ),
|
||||
YAML_ENUM("mode", 2, enum_TrainerMultiplex),
|
||||
YAML_SIGNED( "studWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerData[] = {
|
||||
YAML_ARRAY("calib", 16, 4, struct_signed_16, NULL),
|
||||
YAML_ARRAY("mix", 16, 4, struct_TrainerMix, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_1[] = {
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_2[] = {
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_UNSIGNED( "mode", 8 ),
|
||||
YAML_UNSIGNED( "param", 8 ),
|
||||
YAML_SIGNED( "spare", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_SIGNED( "val2", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
YAML_STRUCT("play", 48, struct_anonymous_1, NULL),
|
||||
YAML_STRUCT("all", 64, struct_anonymous_2, NULL),
|
||||
YAML_STRUCT("clear", 64, struct_anonymous_3, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "manuallyEdited", 1 ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 5, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_SIGNED( "currModel", 8 ),
|
||||
YAML_UNSIGNED( "contrast", 8 ),
|
||||
YAML_UNSIGNED( "vBatWarn", 8 ),
|
||||
YAML_SIGNED( "txVoltageCalibration", 8 ),
|
||||
YAML_ENUM("backlightMode", 3, enum_BacklightMode),
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "fai", 1 ),
|
||||
YAML_SIGNED_CUST( "beepMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_UNSIGNED( "alarmsFlash", 1 ),
|
||||
YAML_UNSIGNED( "disableMemoryWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableAlarmWarning", 1 ),
|
||||
YAML_UNSIGNED( "stickMode", 2 ),
|
||||
YAML_SIGNED( "timezone", 5 ),
|
||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||
YAML_CUSTOM("telemetryBaudrate",r_telemetryBaudrate,nullptr),
|
||||
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||
YAML_SIGNED( "splashMode", 3 ),
|
||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_SIGNED( "switchesDelay", 8 ),
|
||||
YAML_UNSIGNED( "lightAutoOff", 8 ),
|
||||
YAML_UNSIGNED( "templateSetup", 8 ),
|
||||
YAML_SIGNED( "PPM_Multiplier", 8 ),
|
||||
YAML_SIGNED_CUST( "hapticLength", 8, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 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 ),
|
||||
YAML_SIGNED_CUST( "vBatMax", 8, r_vbat_max, w_vbat_max ),
|
||||
YAML_UNSIGNED( "backlightBright", 8 ),
|
||||
YAML_UNSIGNED( "globalTimer", 32 ),
|
||||
YAML_UNSIGNED( "bluetoothBaudrate", 4 ),
|
||||
YAML_ENUM("bluetoothMode", 4, enum_BluetoothModes),
|
||||
YAML_UNSIGNED( "countryCode", 2 ),
|
||||
YAML_SIGNED( "pwrOnSpeed", 3 ),
|
||||
YAML_SIGNED( "pwrOffSpeed", 3 ),
|
||||
YAML_CUSTOM("jitterFilter",r_jitterFilter,nullptr),
|
||||
YAML_UNSIGNED( "noJitterFilter", 1 ),
|
||||
YAML_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "disableRssiPoweroffAlarm", 1 ),
|
||||
YAML_UNSIGNED( "USBMode", 2 ),
|
||||
YAML_UNSIGNED( "jackMode", 2 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("ttsLanguage", 2),
|
||||
YAML_SIGNED_CUST( "beepVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "wavVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "backgroundVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioPitch", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 8, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 168 ),
|
||||
YAML_PADDING( 120 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
YAML_CUSTOM("rotEncDirection",r_rotEncDirection,nullptr),
|
||||
YAML_UNSIGNED( "rotEncMode", 2 ),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "radioGFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "radioTrainerDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelHeliDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelFMDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCurvesDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelGVDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelLSDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelSFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelTelemetryDisabled", 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelHeader[] = {
|
||||
YAML_STRING("name", 10),
|
||||
YAML_ARRAY("modelId", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TimerData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "start", 22 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED( "value", 22 ),
|
||||
YAML_ENUM("mode", 3, enum_TimerModes),
|
||||
YAML_UNSIGNED( "countdownBeep", 2 ),
|
||||
YAML_UNSIGNED( "minuteBeep", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 2 ),
|
||||
YAML_SIGNED( "countdownStart", 2 ),
|
||||
YAML_UNSIGNED( "showElapsed", 1 ),
|
||||
YAML_UNSIGNED( "extraHaptic", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "destCh", 5 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "carryTrim", 1 ),
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
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),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
YAML_UNSIGNED( "delayDown", 8 ),
|
||||
YAML_UNSIGNED( "speedUp", 8 ),
|
||||
YAML_UNSIGNED( "speedDown", 8 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
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_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_SIGNED( "curve", 8 ),
|
||||
YAML_STRING("name", 4),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "scale", 14 ),
|
||||
YAML_CUSTOM("carryTrim",r_carryTrim,nullptr),
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveHeader[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
YAML_UNSIGNED( "smooth", 1 ),
|
||||
YAML_SIGNED( "points", 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("func", 8, enum_LogicalSwitchesFunctions),
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_ENUM("type", 8, enum_SwashType),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED_CUST( "collectiveSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "aileronSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "elevatorSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "collectiveWeight", 8 ),
|
||||
YAML_SIGNED( "aileronWeight", 8 ),
|
||||
YAML_SIGNED( "elevatorWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_trim_t[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "value", 11 ),
|
||||
YAML_UNSIGNED( "mode", 5 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_GVarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("name", 3),
|
||||
YAML_UNSIGNED( "min", 12 ),
|
||||
YAML_UNSIGNED( "max", 12 ),
|
||||
YAML_UNSIGNED( "popup", 1 ),
|
||||
YAML_UNSIGNED( "prec", 1 ),
|
||||
YAML_UNSIGNED( "unit", 2 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_VarioData[] = {
|
||||
YAML_UNSIGNED_CUST( "source", 7, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_UNSIGNED( "centerSilent", 1 ),
|
||||
YAML_SIGNED( "centerMax", 8 ),
|
||||
YAML_SIGNED( "centerMin", 8 ),
|
||||
YAML_SIGNED( "min", 8 ),
|
||||
YAML_SIGNED( "max", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RssiAlarmData[] = {
|
||||
YAML_CUSTOM("disabled",r_rssiDisabled,nullptr),
|
||||
YAML_CUSTOM("warning",r_rssiWarning,nullptr),
|
||||
YAML_CUSTOM("critical",r_rssiCritical,nullptr),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RFAlarmData[] = {
|
||||
YAML_SIGNED( "warning", 8 ),
|
||||
YAML_SIGNED( "critical", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PpmModule[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "power", 2 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_SIGNED( "antennaMode", 2 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "noninverted", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "refreshRate", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_64[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_8[] = {
|
||||
YAML_UNSIGNED( "receivers", 7 ),
|
||||
YAML_UNSIGNED( "racingMode", 1 ),
|
||||
YAML_ARRAY("receiverName", 64, 3, struct_string_64, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_9[] = {
|
||||
YAML_ARRAY("rx_id", 8, 4, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 3 ),
|
||||
YAML_UNSIGNED( "rfPower", 1 ),
|
||||
YAML_UNSIGNED( "reserved", 4 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_10[] = {
|
||||
YAML_UNSIGNED( "emi", 2 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "phyMode", 3 ),
|
||||
YAML_UNSIGNED( "reserved", 2 ),
|
||||
YAML_UNSIGNED( "rfPower", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_11[] = {
|
||||
YAML_UNSIGNED( "raw12bits", 1 ),
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_12[] = {
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_13[] = {
|
||||
YAML_UNSIGNED( "flags", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_PpmModule, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("afhds3", 16, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("ghost", 8, struct_anonymous_11, NULL),
|
||||
YAML_STRUCT("crsf", 8, struct_anonymous_12, NULL),
|
||||
YAML_STRUCT("dsmp", 8, struct_anonymous_13, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 8, enum_ModuleType),
|
||||
YAML_CUSTOM("subType",r_modSubtype,w_modSubtype),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED_CUST( "channelsCount", 8, r_channelsCount, w_channelsCount ),
|
||||
YAML_ENUM("failsafeMode", 4, enum_FailsafeModes),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_UNION("mod", 200, union_anonymous_4_elmts, select_mod_type),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerModuleData[] = {
|
||||
YAML_UNSIGNED_CUST( "mode", 8, r_trainerMode, w_trainerMode ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput_elmts[] = {
|
||||
YAML_SIGNED( "value", 16 ),
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 16, union_ScriptDataInput_elmts, select_script_input),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ScriptData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("file", 6),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_ARRAY("inputs", 16, 6, union_ScriptDataInput, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_14_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_16, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_ENUM("formula", 8, enum_TelemetrySensorFormula),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_21[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_22[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_17_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_20, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_21, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_22, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_14_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_15_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_ENUM("type", 1, enum_TelemetrySensorType),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "unit", 6 ),
|
||||
YAML_UNSIGNED( "prec", 2 ),
|
||||
YAML_UNSIGNED( "autoOffset", 1 ),
|
||||
YAML_UNSIGNED( "filter", 1 ),
|
||||
YAML_UNSIGNED( "logs", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 1 ),
|
||||
YAML_UNSIGNED( "onlyPositive", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNION("cfg", 32, union_anonymous_17_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LineDataSource[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "val", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_LineDataSource, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScriptData[] = {
|
||||
YAML_STRING("file", 6),
|
||||
YAML_ARRAY("inputs", 16, 8, struct_signed_16, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_TelemetryScreenData_u_elmts[] = {
|
||||
YAML_ARRAY("bars", 48, 4, struct_FrSkyBarData, NULL),
|
||||
YAML_ARRAY("lines", 32, 4, struct_FrSkyLineData, NULL),
|
||||
YAML_STRUCT("script", 176, struct_TelemetryScriptData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_CUSTOM("type",r_tele_screen_type,w_tele_screen_type),
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_u_elmts, select_tele_screen_data),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_USBJoystickChData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("mode", 3, enum_USBJoystickCh),
|
||||
YAML_UNSIGNED( "inversion", 1 ),
|
||||
YAML_UNSIGNED( "param", 4 ),
|
||||
YAML_UNSIGNED( "btn_num", 5 ),
|
||||
YAML_UNSIGNED( "switch_npos", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_UNSIGNED( "telemetryProtocol", 3 ),
|
||||
YAML_UNSIGNED( "thrTrim", 1 ),
|
||||
YAML_UNSIGNED( "noGlobalFunctions", 1 ),
|
||||
YAML_UNSIGNED( "displayTrims", 2 ),
|
||||
YAML_UNSIGNED( "ignoreSensorIds", 1 ),
|
||||
YAML_SIGNED( "trimInc", 3 ),
|
||||
YAML_UNSIGNED( "disableThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "displayChecklist", 1 ),
|
||||
YAML_UNSIGNED( "extendedLimits", 1 ),
|
||||
YAML_UNSIGNED( "extendedTrims", 1 ),
|
||||
YAML_UNSIGNED( "throttleReversed", 1 ),
|
||||
YAML_UNSIGNED( "enableCustomThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableTelemetryWarning", 1 ),
|
||||
YAML_UNSIGNED( "showInstanceIds", 1 ),
|
||||
YAML_PADDING( 5 ),
|
||||
YAML_SIGNED( "customThrottleWarningPosition", 8 ),
|
||||
YAML_UNSIGNED( "beepANACenter", 16 ),
|
||||
YAML_ARRAY("mixData", 160, 64, struct_MixData, NULL),
|
||||
YAML_ARRAY("limitData", 88, 32, struct_LimitData, NULL),
|
||||
YAML_ARRAY("expoData", 136, 64, struct_ExpoData, NULL),
|
||||
YAML_ARRAY("curves", 32, 32, struct_CurveHeader, NULL),
|
||||
YAML_ARRAY("points", 8, 512, struct_signed_8, NULL),
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_STRUCT("rssiAlarms", 0, struct_RssiAlarmData, NULL),
|
||||
YAML_STRUCT("rfAlarms", 16, struct_RFAlarmData, NULL),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_ENUM("potsWarnMode", 2, enum_PotsWarnMode),
|
||||
YAML_ENUM("jitterFilter", 2, enum_ModelOverridableEnable),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ARRAY("moduleData", 232, 2, struct_ModuleData, NULL),
|
||||
YAML_ARRAY("failsafeChannels", 16, 32, struct_signed_16, NULL),
|
||||
YAML_STRUCT("trainerData", 40, struct_TrainerModuleData, NULL),
|
||||
YAML_ARRAY("scriptsData", 192, 7, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 24, 32, struct_string_24, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 1, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, struct_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_UNSIGNED( "usbJoystickExtMode", 1 ),
|
||||
YAML_ENUM("usbJoystickIfMode", 3, enum_USBJoystickIfMode),
|
||||
YAML_UNSIGNED( "usbJoystickCircularCut", 4 ),
|
||||
YAML_ARRAY("usbJoystickCh", 16, 26, struct_USBJoystickChData, NULL),
|
||||
YAML_ENUM("radioGFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("radioTrainerDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelHeliDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelFMDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCurvesDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelGVDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelLSDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelSFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCustomScriptsDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelTelemetryDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 29
|
||||
|
||||
static const struct YamlNode __RadioData_root_node = YAML_ROOT( struct_RadioData );
|
||||
|
||||
const YamlNode* get_radiodata_nodes()
|
||||
{
|
||||
return &__RadioData_root_node;
|
||||
}
|
||||
static const struct YamlNode __ModelData_root_node = YAML_ROOT( struct_ModelData );
|
||||
|
||||
const YamlNode* get_modeldata_nodes()
|
||||
{
|
||||
return &__ModelData_root_node;
|
||||
}
|
||||
static const struct YamlNode __PartialModel_root_node = YAML_ROOT( struct_PartialModel );
|
||||
|
||||
const YamlNode* get_partialmodel_nodes()
|
||||
{
|
||||
return &__PartialModel_root_node;
|
||||
}
|
||||
|
||||
@@ -72,9 +72,7 @@ const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
@@ -102,52 +100,18 @@ const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_POT2, "POT2" },
|
||||
{ MIXSRC_TILT_X, "TILT_X" },
|
||||
{ MIXSRC_TILT_Y, "TILT_Y" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SE, "SE" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TrimT5, "TrimT5" },
|
||||
{ MIXSRC_TrimT6, "TrimT6" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
@@ -182,34 +146,6 @@ const struct YamlIdStr enum_SwashType[] = {
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SE0, "SE0" },
|
||||
{ SWSRC_SE1, "SE1" },
|
||||
{ SWSRC_SE2, "SE2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
@@ -320,24 +256,19 @@ static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 6, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "manuallyEdited", 1 ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_ARRAY("calib", 48, 12, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_SIGNED( "currModel", 8 ),
|
||||
YAML_UNSIGNED( "contrast", 8 ),
|
||||
@@ -404,14 +335,11 @@ static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("sticksConfig", 0, MAX_STICKS, struct_stickConfig, stick_name_valid),
|
||||
YAML_ARRAY("slidersConfig", 0, MAX_POTS, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 4, 8, struct_potConfig, nullptr),
|
||||
YAML_ARRAY("switchConfig", 2, 32, struct_switchConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 8, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 144 ),
|
||||
YAML_PADDING( 144 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
@@ -473,8 +401,8 @@ static const struct YamlNode struct_MixData[] = {
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED_CUST( "offset", 14, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "offset", 13, in_read_weight, in_write_weight ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
@@ -504,10 +432,9 @@ static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
@@ -532,9 +459,9 @@ static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED_CUST( "andsw", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
@@ -559,10 +486,10 @@ static const struct YamlNode struct_trim_t[] = {
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_ARRAY("trim", 16, 6, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
@@ -727,6 +654,11 @@ static const struct YamlNode struct_ScriptData[] = {
|
||||
YAML_ARRAY("inputs", 16, 6, union_ScriptDataInput, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_14_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
@@ -869,10 +801,10 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_ARRAY("flightModeData", 320, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
@@ -887,8 +819,8 @@ static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("trainerData", 40, struct_TrainerModuleData, NULL),
|
||||
YAML_ARRAY("scriptsData", 192, 7, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 24, 32, struct_string_24, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 8, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, struct_TelemetryScreenData, NULL),
|
||||
|
||||
@@ -1,943 +0,0 @@
|
||||
// generated by generate_yaml.py
|
||||
|
||||
//
|
||||
// Enums first
|
||||
//
|
||||
|
||||
const struct YamlIdStr enum_BacklightMode[] = {
|
||||
{ e_backlight_mode_off, "backlight_mode_off" },
|
||||
{ e_backlight_mode_keys, "backlight_mode_keys" },
|
||||
{ e_backlight_mode_sticks, "backlight_mode_sticks" },
|
||||
{ e_backlight_mode_all, "backlight_mode_all" },
|
||||
{ e_backlight_mode_on, "backlight_mode_on" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_AntennaModes[] = {
|
||||
{ ANTENNA_MODE_INTERNAL, "MODE_INTERNAL" },
|
||||
{ ANTENNA_MODE_ASK, "MODE_ASK" },
|
||||
{ ANTENNA_MODE_PER_MODEL, "MODE_PER_MODEL" },
|
||||
{ ANTENNA_MODE_EXTERNAL, "MODE_EXTERNAL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModuleType[] = {
|
||||
{ MODULE_TYPE_NONE, "TYPE_NONE" },
|
||||
{ MODULE_TYPE_PPM, "TYPE_PPM" },
|
||||
{ MODULE_TYPE_XJT_PXX1, "TYPE_XJT_PXX1" },
|
||||
{ MODULE_TYPE_ISRM_PXX2, "TYPE_ISRM_PXX2" },
|
||||
{ MODULE_TYPE_DSM2, "TYPE_DSM2" },
|
||||
{ MODULE_TYPE_CROSSFIRE, "TYPE_CROSSFIRE" },
|
||||
{ MODULE_TYPE_MULTIMODULE, "TYPE_MULTIMODULE" },
|
||||
{ MODULE_TYPE_R9M_PXX1, "TYPE_R9M_PXX1" },
|
||||
{ MODULE_TYPE_R9M_PXX2, "TYPE_R9M_PXX2" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX1, "TYPE_R9M_LITE_PXX1" },
|
||||
{ MODULE_TYPE_R9M_LITE_PXX2, "TYPE_R9M_LITE_PXX2" },
|
||||
{ MODULE_TYPE_GHOST, "TYPE_GHOST" },
|
||||
{ MODULE_TYPE_R9M_LITE_PRO_PXX2, "TYPE_R9M_LITE_PRO_PXX2" },
|
||||
{ MODULE_TYPE_SBUS, "TYPE_SBUS" },
|
||||
{ MODULE_TYPE_XJT_LITE_PXX2, "TYPE_XJT_LITE_PXX2" },
|
||||
{ MODULE_TYPE_FLYSKY, "TYPE_FLYSKY" },
|
||||
{ MODULE_TYPE_LEMON_DSMP, "TYPE_LEMON_DSMP" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TrainerMultiplex[] = {
|
||||
{ TRAINER_OFF, "OFF" },
|
||||
{ TRAINER_ADD, "ADD" },
|
||||
{ TRAINER_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BeeperMode[] = {
|
||||
{ e_mode_quiet, "mode_quiet" },
|
||||
{ e_mode_alarms, "mode_alarms" },
|
||||
{ e_mode_nokeys, "mode_nokeys" },
|
||||
{ e_mode_all, "mode_all" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_BluetoothModes[] = {
|
||||
{ BLUETOOTH_OFF, "OFF" },
|
||||
{ BLUETOOTH_TELEMETRY, "TELEMETRY" },
|
||||
{ BLUETOOTH_TRAINER, "TRAINER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_Functions[] = {
|
||||
{ FUNC_OVERRIDE_CHANNEL, "OVERRIDE_CHANNEL" },
|
||||
{ FUNC_TRAINER, "TRAINER" },
|
||||
{ FUNC_INSTANT_TRIM, "INSTANT_TRIM" },
|
||||
{ FUNC_RESET, "RESET" },
|
||||
{ FUNC_SET_TIMER, "SET_TIMER" },
|
||||
{ FUNC_ADJUST_GVAR, "ADJUST_GVAR" },
|
||||
{ FUNC_VOLUME, "VOLUME" },
|
||||
{ FUNC_SET_FAILSAFE, "SET_FAILSAFE" },
|
||||
{ FUNC_RANGECHECK, "RANGECHECK" },
|
||||
{ FUNC_BIND, "BIND" },
|
||||
{ FUNC_PLAY_SOUND, "PLAY_SOUND" },
|
||||
{ FUNC_PLAY_TRACK, "PLAY_TRACK" },
|
||||
{ FUNC_PLAY_VALUE, "PLAY_VALUE" },
|
||||
{ FUNC_RESERVE4, "RESERVE4" },
|
||||
{ FUNC_PLAY_SCRIPT, "PLAY_SCRIPT" },
|
||||
{ FUNC_RESERVE5, "RESERVE5" },
|
||||
{ FUNC_BACKGND_MUSIC, "BACKGND_MUSIC" },
|
||||
{ FUNC_BACKGND_MUSIC_PAUSE, "BACKGND_MUSIC_PAUSE" },
|
||||
{ FUNC_VARIO, "VARIO" },
|
||||
{ FUNC_HAPTIC, "HAPTIC" },
|
||||
{ FUNC_LOGS, "LOGS" },
|
||||
{ FUNC_BACKLIGHT, "BACKLIGHT" },
|
||||
{ FUNC_SCREENSHOT, "SCREENSHOT" },
|
||||
{ FUNC_RACING_MODE, "RACING_MODE" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TimerModes[] = {
|
||||
{ TMRMODE_OFF, "OFF" },
|
||||
{ TMRMODE_ON, "ON" },
|
||||
{ TMRMODE_START, "START" },
|
||||
{ TMRMODE_THR, "THR" },
|
||||
{ TMRMODE_THR_REL, "THR_REL" },
|
||||
{ TMRMODE_THR_START, "THR_START" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixerMultiplex[] = {
|
||||
{ MLTPX_ADD, "ADD" },
|
||||
{ MLTPX_MUL, "MUL" },
|
||||
{ MLTPX_REPL, "REPL" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_MixSources[] = {
|
||||
{ MIXSRC_NONE, "NONE" },
|
||||
{ MIXSRC_Rud, "Rud" },
|
||||
{ MIXSRC_Ele, "Ele" },
|
||||
{ MIXSRC_Thr, "Thr" },
|
||||
{ MIXSRC_Ail, "Ail" },
|
||||
{ MIXSRC_POT1, "POT1" },
|
||||
{ MIXSRC_POT2, "POT2" },
|
||||
{ MIXSRC_MAX, "MAX" },
|
||||
{ MIXSRC_CYC1, "CYC1" },
|
||||
{ MIXSRC_CYC2, "CYC2" },
|
||||
{ MIXSRC_CYC3, "CYC3" },
|
||||
{ MIXSRC_TrimRud, "TrimRud" },
|
||||
{ MIXSRC_TrimEle, "TrimEle" },
|
||||
{ MIXSRC_TrimThr, "TrimThr" },
|
||||
{ MIXSRC_TrimAil, "TrimAil" },
|
||||
{ MIXSRC_SA, "SA" },
|
||||
{ MIXSRC_SB, "SB" },
|
||||
{ MIXSRC_SC, "SC" },
|
||||
{ MIXSRC_SD, "SD" },
|
||||
{ MIXSRC_SE, "SE" },
|
||||
{ MIXSRC_SF, "SF" },
|
||||
{ MIXSRC_SG, "SG" },
|
||||
{ MIXSRC_SH, "SH" },
|
||||
{ MIXSRC_SW1, "SW1" },
|
||||
{ MIXSRC_CH1, "CH1" },
|
||||
{ MIXSRC_CH2, "CH2" },
|
||||
{ MIXSRC_CH3, "CH3" },
|
||||
{ MIXSRC_CH4, "CH4" },
|
||||
{ MIXSRC_CH5, "CH5" },
|
||||
{ MIXSRC_CH6, "CH6" },
|
||||
{ MIXSRC_CH7, "CH7" },
|
||||
{ MIXSRC_CH8, "CH8" },
|
||||
{ MIXSRC_CH9, "CH9" },
|
||||
{ MIXSRC_CH10, "CH10" },
|
||||
{ MIXSRC_CH11, "CH11" },
|
||||
{ MIXSRC_CH12, "CH12" },
|
||||
{ MIXSRC_CH13, "CH13" },
|
||||
{ MIXSRC_CH14, "CH14" },
|
||||
{ MIXSRC_CH15, "CH15" },
|
||||
{ MIXSRC_CH16, "CH16" },
|
||||
{ MIXSRC_GVAR1, "GVAR1" },
|
||||
{ MIXSRC_TX_VOLTAGE, "TX_VOLTAGE" },
|
||||
{ MIXSRC_TX_TIME, "TX_TIME" },
|
||||
{ MIXSRC_TX_GPS, "TX_GPS" },
|
||||
{ MIXSRC_TIMER1, "TIMER1" },
|
||||
{ MIXSRC_TIMER2, "TIMER2" },
|
||||
{ MIXSRC_TIMER3, "TIMER3" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_LogicalSwitchesFunctions[] = {
|
||||
{ LS_FUNC_NONE, "FUNC_NONE" },
|
||||
{ LS_FUNC_VEQUAL, "FUNC_VEQUAL" },
|
||||
{ LS_FUNC_VALMOSTEQUAL, "FUNC_VALMOSTEQUAL" },
|
||||
{ LS_FUNC_VPOS, "FUNC_VPOS" },
|
||||
{ LS_FUNC_VNEG, "FUNC_VNEG" },
|
||||
{ LS_FUNC_RANGE, "FUNC_RANGE" },
|
||||
{ LS_FUNC_APOS, "FUNC_APOS" },
|
||||
{ LS_FUNC_ANEG, "FUNC_ANEG" },
|
||||
{ LS_FUNC_AND, "FUNC_AND" },
|
||||
{ LS_FUNC_OR, "FUNC_OR" },
|
||||
{ LS_FUNC_XOR, "FUNC_XOR" },
|
||||
{ LS_FUNC_EDGE, "FUNC_EDGE" },
|
||||
{ LS_FUNC_EQUAL, "FUNC_EQUAL" },
|
||||
{ LS_FUNC_GREATER, "FUNC_GREATER" },
|
||||
{ LS_FUNC_LESS, "FUNC_LESS" },
|
||||
{ LS_FUNC_DIFFEGREATER, "FUNC_DIFFEGREATER" },
|
||||
{ LS_FUNC_ADIFFEGREATER, "FUNC_ADIFFEGREATER" },
|
||||
{ LS_FUNC_TIMER, "FUNC_TIMER" },
|
||||
{ LS_FUNC_STICKY, "FUNC_STICKY" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwashType[] = {
|
||||
{ SWASH_TYPE_NONE, "TYPE_NONE" },
|
||||
{ SWASH_TYPE_120, "TYPE_120" },
|
||||
{ SWASH_TYPE_120X, "TYPE_120X" },
|
||||
{ SWASH_TYPE_140, "TYPE_140" },
|
||||
{ SWASH_TYPE_90, "TYPE_90" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_SwitchSources[] = {
|
||||
{ SWSRC_NONE, "NONE" },
|
||||
{ SWSRC_SA0, "SA0" },
|
||||
{ SWSRC_SA1, "SA1" },
|
||||
{ SWSRC_SA2, "SA2" },
|
||||
{ SWSRC_SB0, "SB0" },
|
||||
{ SWSRC_SB1, "SB1" },
|
||||
{ SWSRC_SB2, "SB2" },
|
||||
{ SWSRC_SC0, "SC0" },
|
||||
{ SWSRC_SC1, "SC1" },
|
||||
{ SWSRC_SC2, "SC2" },
|
||||
{ SWSRC_SD0, "SD0" },
|
||||
{ SWSRC_SD1, "SD1" },
|
||||
{ SWSRC_SD2, "SD2" },
|
||||
{ SWSRC_SE0, "SE0" },
|
||||
{ SWSRC_SE1, "SE1" },
|
||||
{ SWSRC_SE2, "SE2" },
|
||||
{ SWSRC_SF0, "SF0" },
|
||||
{ SWSRC_SF1, "SF1" },
|
||||
{ SWSRC_SF2, "SF2" },
|
||||
{ SWSRC_SG0, "SG0" },
|
||||
{ SWSRC_SG1, "SG1" },
|
||||
{ SWSRC_SG2, "SG2" },
|
||||
{ SWSRC_SH0, "SH0" },
|
||||
{ SWSRC_SH1, "SH1" },
|
||||
{ SWSRC_SH2, "SH2" },
|
||||
{ SWSRC_TrimRudLeft, "TrimRudLeft" },
|
||||
{ SWSRC_TrimRudRight, "TrimRudRight" },
|
||||
{ SWSRC_TrimEleDown, "TrimEleDown" },
|
||||
{ SWSRC_TrimEleUp, "TrimEleUp" },
|
||||
{ SWSRC_TrimThrDown, "TrimThrDown" },
|
||||
{ SWSRC_TrimThrUp, "TrimThrUp" },
|
||||
{ SWSRC_TrimAilLeft, "TrimAilLeft" },
|
||||
{ SWSRC_TrimAilRight, "TrimAilRight" },
|
||||
{ SWSRC_SW1, "SW1" },
|
||||
{ SWSRC_SW2, "SW2" },
|
||||
{ SWSRC_ON, "ON" },
|
||||
{ SWSRC_ONE, "ONE" },
|
||||
{ SWSRC_TELEMETRY_STREAMING, "TELEMETRY_STREAMING" },
|
||||
{ SWSRC_RADIO_ACTIVITY, "RADIO_ACTIVITY" },
|
||||
{ SWSRC_OFF, "OFF" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_PotsWarnMode[] = {
|
||||
{ POTS_WARN_OFF, "WARN_OFF" },
|
||||
{ POTS_WARN_MANUAL, "WARN_MANUAL" },
|
||||
{ POTS_WARN_AUTO, "WARN_AUTO" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ModelOverridableEnable[] = {
|
||||
{ OVERRIDE_GLOBAL, "GLOBAL" },
|
||||
{ OVERRIDE_OFF, "OFF" },
|
||||
{ OVERRIDE_ON, "ON" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_FailsafeModes[] = {
|
||||
{ FAILSAFE_NOT_SET, "NOT_SET" },
|
||||
{ FAILSAFE_HOLD, "HOLD" },
|
||||
{ FAILSAFE_CUSTOM, "CUSTOM" },
|
||||
{ FAILSAFE_NOPULSES, "NOPULSES" },
|
||||
{ FAILSAFE_RECEIVER, "RECEIVER" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorFormula[] = {
|
||||
{ TELEM_FORMULA_ADD, "FORMULA_ADD" },
|
||||
{ TELEM_FORMULA_AVERAGE, "FORMULA_AVERAGE" },
|
||||
{ TELEM_FORMULA_MIN, "FORMULA_MIN" },
|
||||
{ TELEM_FORMULA_MAX, "FORMULA_MAX" },
|
||||
{ TELEM_FORMULA_MULTIPLY, "FORMULA_MULTIPLY" },
|
||||
{ TELEM_FORMULA_TOTALIZE, "FORMULA_TOTALIZE" },
|
||||
{ TELEM_FORMULA_CELL, "FORMULA_CELL" },
|
||||
{ TELEM_FORMULA_CONSUMPTION, "FORMULA_CONSUMPTION" },
|
||||
{ TELEM_FORMULA_DIST, "FORMULA_DIST" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_TelemetrySensorType[] = {
|
||||
{ TELEM_TYPE_CUSTOM, "TYPE_CUSTOM" },
|
||||
{ TELEM_TYPE_CALCULATED, "TYPE_CALCULATED" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickIfMode[] = {
|
||||
{ USBJOYS_JOYSTICK, "JOYSTICK" },
|
||||
{ USBJOYS_GAMEPAD, "GAMEPAD" },
|
||||
{ USBJOYS_MULTIAXIS, "MULTIAXIS" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_USBJoystickCh[] = {
|
||||
{ USBJOYS_CH_NONE, "CH_NONE" },
|
||||
{ USBJOYS_CH_BUTTON, "CH_BUTTON" },
|
||||
{ USBJOYS_CH_AXIS, "CH_AXIS" },
|
||||
{ USBJOYS_CH_SIM, "CH_SIM" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX_CUST("calib",r_calib,w_calib),
|
||||
YAML_SIGNED( "mid", 16 ),
|
||||
YAML_SIGNED( "spanNeg", 16 ),
|
||||
YAML_SIGNED( "spanPos", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerMix[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "srcChn", 6 ),
|
||||
YAML_ENUM("mode", 2, enum_TrainerMultiplex),
|
||||
YAML_SIGNED( "studWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerData[] = {
|
||||
YAML_ARRAY("calib", 16, 4, struct_signed_16, NULL),
|
||||
YAML_ARRAY("mix", 16, 4, struct_TrainerMix, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_1[] = {
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_2[] = {
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_UNSIGNED( "mode", 8 ),
|
||||
YAML_UNSIGNED( "param", 8 ),
|
||||
YAML_SIGNED( "spare", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_SIGNED( "val2", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
YAML_STRUCT("play", 48, struct_anonymous_1, NULL),
|
||||
YAML_STRUCT("all", 64, struct_anonymous_2, NULL),
|
||||
YAML_STRUCT("clear", 64, struct_anonymous_3, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CustomFunctionData[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_ENUM("func", 7, enum_Functions),
|
||||
YAML_CUSTOM("def",r_customFn,w_customFn),
|
||||
YAML_PADDING( 64 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_24[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "manuallyEdited", 1 ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_CUSTOM("board",nullptr,w_board),
|
||||
YAML_ARRAY("calib", 48, 6, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_SIGNED( "currModel", 8 ),
|
||||
YAML_UNSIGNED( "contrast", 8 ),
|
||||
YAML_UNSIGNED( "vBatWarn", 8 ),
|
||||
YAML_SIGNED( "txVoltageCalibration", 8 ),
|
||||
YAML_ENUM("backlightMode", 3, enum_BacklightMode),
|
||||
YAML_ENUM("antennaMode", 2, enum_AntennaModes),
|
||||
YAML_UNSIGNED( "disableRtcWarning", 1 ),
|
||||
YAML_UNSIGNED( "keysBacklight", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ENUM("internalModule", 8, enum_ModuleType),
|
||||
YAML_STRUCT("trainer", 128, struct_TrainerData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "fai", 1 ),
|
||||
YAML_SIGNED_CUST( "beepMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_UNSIGNED( "alarmsFlash", 1 ),
|
||||
YAML_UNSIGNED( "disableMemoryWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableAlarmWarning", 1 ),
|
||||
YAML_UNSIGNED( "stickMode", 2 ),
|
||||
YAML_SIGNED( "timezone", 5 ),
|
||||
YAML_UNSIGNED( "adjustRTC", 1 ),
|
||||
YAML_UNSIGNED( "inactivityTimer", 8 ),
|
||||
YAML_CUSTOM("telemetryBaudrate",r_telemetryBaudrate,nullptr),
|
||||
YAML_UNSIGNED( "internalModuleBaudrate", 3 ),
|
||||
YAML_SIGNED( "splashMode", 3 ),
|
||||
YAML_SIGNED_CUST( "hapticMode", 2, r_beeperMode, w_beeperMode ),
|
||||
YAML_SIGNED( "switchesDelay", 8 ),
|
||||
YAML_UNSIGNED( "lightAutoOff", 8 ),
|
||||
YAML_UNSIGNED( "templateSetup", 8 ),
|
||||
YAML_SIGNED( "PPM_Multiplier", 8 ),
|
||||
YAML_SIGNED_CUST( "hapticLength", 8, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 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 ),
|
||||
YAML_SIGNED_CUST( "vBatMax", 8, r_vbat_max, w_vbat_max ),
|
||||
YAML_UNSIGNED( "backlightBright", 8 ),
|
||||
YAML_UNSIGNED( "globalTimer", 32 ),
|
||||
YAML_UNSIGNED( "bluetoothBaudrate", 4 ),
|
||||
YAML_ENUM("bluetoothMode", 4, enum_BluetoothModes),
|
||||
YAML_UNSIGNED( "countryCode", 2 ),
|
||||
YAML_SIGNED( "pwrOnSpeed", 3 ),
|
||||
YAML_SIGNED( "pwrOffSpeed", 3 ),
|
||||
YAML_CUSTOM("jitterFilter",r_jitterFilter,nullptr),
|
||||
YAML_UNSIGNED( "noJitterFilter", 1 ),
|
||||
YAML_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "disableRssiPoweroffAlarm", 1 ),
|
||||
YAML_UNSIGNED( "USBMode", 2 ),
|
||||
YAML_UNSIGNED( "jackMode", 2 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("ttsLanguage", 2),
|
||||
YAML_SIGNED_CUST( "beepVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "wavVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "backgroundVolume", 4, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "varioPitch", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED_CUST( "varioRange", 8, r_vPitch, w_vPitch ),
|
||||
YAML_SIGNED( "varioRepeat", 8 ),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_CUSTOM("auxSerialMode",r_serialMode,nullptr),
|
||||
YAML_CUSTOM("aux2SerialMode",r_serialMode,nullptr),
|
||||
YAML_ARRAY("serialPort", 8, 4, struct_serialConfig, nullptr),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 8, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 192 ),
|
||||
YAML_PADDING( 144 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
YAML_CUSTOM("rotEncDirection",r_rotEncDirection,nullptr),
|
||||
YAML_UNSIGNED( "rotEncMode", 2 ),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "radioGFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "radioTrainerDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelHeliDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelFMDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCurvesDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelGVDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelLSDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelSFDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelCustomScriptsDisabled", 1 ),
|
||||
YAML_UNSIGNED( "modelTelemetryDisabled", 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelHeader[] = {
|
||||
YAML_STRING("name", 10),
|
||||
YAML_ARRAY("modelId", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TimerData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "start", 22 ),
|
||||
YAML_SIGNED_CUST( "swtch", 10, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_SIGNED( "value", 22 ),
|
||||
YAML_ENUM("mode", 3, enum_TimerModes),
|
||||
YAML_UNSIGNED( "countdownBeep", 2 ),
|
||||
YAML_UNSIGNED( "minuteBeep", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 2 ),
|
||||
YAML_SIGNED( "countdownStart", 2 ),
|
||||
YAML_UNSIGNED( "showElapsed", 1 ),
|
||||
YAML_UNSIGNED( "extraHaptic", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED_CUST( "value", 8, in_read_weight, in_write_weight ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_MixData[] = {
|
||||
YAML_SIGNED_CUST( "weight", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "destCh", 5 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "carryTrim", 1 ),
|
||||
YAML_UNSIGNED( "mixWarn", 2 ),
|
||||
YAML_ENUM("mltpx", 2, enum_MixerMultiplex),
|
||||
YAML_PADDING( 1 ),
|
||||
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),
|
||||
YAML_UNSIGNED( "delayUp", 8 ),
|
||||
YAML_UNSIGNED( "delayDown", 8 ),
|
||||
YAML_UNSIGNED( "speedUp", 8 ),
|
||||
YAML_UNSIGNED( "speedDown", 8 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LimitData[] = {
|
||||
YAML_IDX,
|
||||
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_CUST( "offset", 11, in_read_weight, in_write_weight ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_SIGNED( "curve", 8 ),
|
||||
YAML_STRING("name", 4),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "scale", 14 ),
|
||||
YAML_CUSTOM("carryTrim",r_carryTrim,nullptr),
|
||||
YAML_SIGNED( "trimSource", 6 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED_CUST( "flightModes", 9, r_flightModes, w_flightModes ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "offset", 8, in_read_weight, in_write_weight ),
|
||||
YAML_STRUCT("curve", 16, struct_CurveRef, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveHeader[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
YAML_UNSIGNED( "smooth", 1 ),
|
||||
YAML_SIGNED( "points", 6 ),
|
||||
YAML_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_signed_8[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "val", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LogicalSwitchData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("func", 8, enum_LogicalSwitchesFunctions),
|
||||
YAML_CUSTOM("def",r_logicSw,w_logicSw),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_PADDING( 10 ),
|
||||
YAML_SIGNED_CUST( "andsw", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_ENUM("type", 8, enum_SwashType),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED_CUST( "collectiveSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "aileronSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_UNSIGNED_CUST( "elevatorSource", 8, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "collectiveWeight", 8 ),
|
||||
YAML_SIGNED( "aileronWeight", 8 ),
|
||||
YAML_SIGNED( "elevatorWeight", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_trim_t[] = {
|
||||
YAML_IDX,
|
||||
YAML_SIGNED( "value", 11 ),
|
||||
YAML_UNSIGNED( "mode", 5 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FlightModeData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("trim", 16, 4, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_PADDING( 7 ),
|
||||
YAML_UNSIGNED( "fadeIn", 8 ),
|
||||
YAML_UNSIGNED( "fadeOut", 8 ),
|
||||
YAML_ARRAY("gvars", 16, 9, struct_signed_16, gvar_is_active),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_GVarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("name", 3),
|
||||
YAML_UNSIGNED( "min", 12 ),
|
||||
YAML_UNSIGNED( "max", 12 ),
|
||||
YAML_UNSIGNED( "popup", 1 ),
|
||||
YAML_UNSIGNED( "prec", 1 ),
|
||||
YAML_UNSIGNED( "unit", 2 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_VarioData[] = {
|
||||
YAML_UNSIGNED_CUST( "source", 7, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_UNSIGNED( "centerSilent", 1 ),
|
||||
YAML_SIGNED( "centerMax", 8 ),
|
||||
YAML_SIGNED( "centerMin", 8 ),
|
||||
YAML_SIGNED( "min", 8 ),
|
||||
YAML_SIGNED( "max", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RssiAlarmData[] = {
|
||||
YAML_CUSTOM("disabled",r_rssiDisabled,nullptr),
|
||||
YAML_CUSTOM("warning",r_rssiWarning,nullptr),
|
||||
YAML_CUSTOM("critical",r_rssiCritical,nullptr),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RFAlarmData[] = {
|
||||
YAML_SIGNED( "warning", 8 ),
|
||||
YAML_SIGNED( "critical", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PpmModule[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "power", 2 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_SIGNED( "antennaMode", 2 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_UNSIGNED( "noninverted", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "refreshRate", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_string_64[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_8[] = {
|
||||
YAML_UNSIGNED( "receivers", 7 ),
|
||||
YAML_UNSIGNED( "racingMode", 1 ),
|
||||
YAML_ARRAY("receiverName", 64, 3, struct_string_64, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_9[] = {
|
||||
YAML_ARRAY("rx_id", 8, 4, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 3 ),
|
||||
YAML_UNSIGNED( "rfPower", 1 ),
|
||||
YAML_UNSIGNED( "reserved", 4 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_10[] = {
|
||||
YAML_UNSIGNED( "emi", 2 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "phyMode", 3 ),
|
||||
YAML_UNSIGNED( "reserved", 2 ),
|
||||
YAML_UNSIGNED( "rfPower", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_11[] = {
|
||||
YAML_UNSIGNED( "raw12bits", 1 ),
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_12[] = {
|
||||
YAML_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_13[] = {
|
||||
YAML_UNSIGNED( "flags", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_PpmModule, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("afhds3", 16, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("ghost", 8, struct_anonymous_11, NULL),
|
||||
YAML_STRUCT("crsf", 8, struct_anonymous_12, NULL),
|
||||
YAML_STRUCT("dsmp", 8, struct_anonymous_13, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 8, enum_ModuleType),
|
||||
YAML_CUSTOM("subType",r_modSubtype,w_modSubtype),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED_CUST( "channelsCount", 8, r_channelsCount, w_channelsCount ),
|
||||
YAML_ENUM("failsafeMode", 4, enum_FailsafeModes),
|
||||
YAML_PADDING( 4 ),
|
||||
YAML_UNION("mod", 200, union_anonymous_4_elmts, select_mod_type),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TrainerModuleData[] = {
|
||||
YAML_UNSIGNED_CUST( "mode", 8, r_trainerMode, w_trainerMode ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput_elmts[] = {
|
||||
YAML_SIGNED( "value", 16 ),
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_ScriptDataInput[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 16, union_ScriptDataInput_elmts, select_script_input),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ScriptData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("file", 6),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_ARRAY("inputs", 16, 6, union_ScriptDataInput, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_14_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_16, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_ENUM("formula", 8, enum_TelemetrySensorFormula),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_21[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_22[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_17_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_20, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_21, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_22, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_14_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_15_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_ENUM("type", 1, enum_TelemetrySensorType),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "unit", 6 ),
|
||||
YAML_UNSIGNED( "prec", 2 ),
|
||||
YAML_UNSIGNED( "autoOffset", 1 ),
|
||||
YAML_UNSIGNED( "filter", 1 ),
|
||||
YAML_UNSIGNED( "logs", 1 ),
|
||||
YAML_UNSIGNED( "persistent", 1 ),
|
||||
YAML_UNSIGNED( "onlyPositive", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNION("cfg", 32, union_anonymous_17_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "source", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LineDataSource[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED_CUST( "val", 16, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_LineDataSource, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScriptData[] = {
|
||||
YAML_STRING("file", 6),
|
||||
YAML_ARRAY("inputs", 16, 8, struct_signed_16, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_TelemetryScreenData_u_elmts[] = {
|
||||
YAML_ARRAY("bars", 48, 4, struct_FrSkyBarData, NULL),
|
||||
YAML_ARRAY("lines", 32, 4, struct_FrSkyLineData, NULL),
|
||||
YAML_STRUCT("script", 176, struct_TelemetryScriptData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_CUSTOM("type",r_tele_screen_type,w_tele_screen_type),
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_u_elmts, select_tele_screen_data),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_USBJoystickChData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("mode", 3, enum_USBJoystickCh),
|
||||
YAML_UNSIGNED( "inversion", 1 ),
|
||||
YAML_UNSIGNED( "param", 4 ),
|
||||
YAML_UNSIGNED( "btn_num", 5 ),
|
||||
YAML_UNSIGNED( "switch_npos", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_CUSTOM("semver",nullptr,w_semver),
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_UNSIGNED( "telemetryProtocol", 3 ),
|
||||
YAML_UNSIGNED( "thrTrim", 1 ),
|
||||
YAML_UNSIGNED( "noGlobalFunctions", 1 ),
|
||||
YAML_UNSIGNED( "displayTrims", 2 ),
|
||||
YAML_UNSIGNED( "ignoreSensorIds", 1 ),
|
||||
YAML_SIGNED( "trimInc", 3 ),
|
||||
YAML_UNSIGNED( "disableThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "displayChecklist", 1 ),
|
||||
YAML_UNSIGNED( "extendedLimits", 1 ),
|
||||
YAML_UNSIGNED( "extendedTrims", 1 ),
|
||||
YAML_UNSIGNED( "throttleReversed", 1 ),
|
||||
YAML_UNSIGNED( "enableCustomThrottleWarning", 1 ),
|
||||
YAML_UNSIGNED( "disableTelemetryWarning", 1 ),
|
||||
YAML_UNSIGNED( "showInstanceIds", 1 ),
|
||||
YAML_PADDING( 5 ),
|
||||
YAML_SIGNED( "customThrottleWarningPosition", 8 ),
|
||||
YAML_UNSIGNED( "beepANACenter", 16 ),
|
||||
YAML_ARRAY("mixData", 160, 64, struct_MixData, NULL),
|
||||
YAML_ARRAY("limitData", 88, 32, struct_LimitData, NULL),
|
||||
YAML_ARRAY("expoData", 136, 64, struct_ExpoData, NULL),
|
||||
YAML_ARRAY("curves", 32, 32, struct_CurveHeader, NULL),
|
||||
YAML_ARRAY("points", 8, 512, struct_signed_8, NULL),
|
||||
YAML_ARRAY("logicalSw", 72, 64, struct_LogicalSwitchData, NULL),
|
||||
YAML_ARRAY("customFn", 88, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, swash_is_active),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED_CUST( "thrTraceSrc", 8, r_thrSrc, w_thrSrc ),
|
||||
YAML_CUSTOM("switchWarningState",r_swtchWarn,w_swtchWarn),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED_CUST( "rssiSource", 8, r_tele_sensor, w_tele_sensor ),
|
||||
YAML_STRUCT("rssiAlarms", 0, struct_RssiAlarmData, NULL),
|
||||
YAML_STRUCT("rfAlarms", 16, struct_RFAlarmData, NULL),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_ENUM("potsWarnMode", 2, enum_PotsWarnMode),
|
||||
YAML_ENUM("jitterFilter", 2, enum_ModelOverridableEnable),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_ARRAY("moduleData", 232, 2, struct_ModuleData, NULL),
|
||||
YAML_ARRAY("failsafeChannels", 16, 32, struct_signed_16, NULL),
|
||||
YAML_STRUCT("trainerData", 40, struct_TrainerModuleData, NULL),
|
||||
YAML_ARRAY("scriptsData", 192, 7, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 24, 32, struct_string_24, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 16 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, struct_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_UNSIGNED( "usbJoystickExtMode", 1 ),
|
||||
YAML_ENUM("usbJoystickIfMode", 3, enum_USBJoystickIfMode),
|
||||
YAML_UNSIGNED( "usbJoystickCircularCut", 4 ),
|
||||
YAML_ARRAY("usbJoystickCh", 16, 26, struct_USBJoystickChData, NULL),
|
||||
YAML_ENUM("radioGFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("radioTrainerDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelHeliDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelFMDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCurvesDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelGVDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelLSDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelSFDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelCustomScriptsDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_ENUM("modelTelemetryDisabled", 2, enum_ModelOverridableEnable),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 96, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 29
|
||||
|
||||
static const struct YamlNode __RadioData_root_node = YAML_ROOT( struct_RadioData );
|
||||
|
||||
const YamlNode* get_radiodata_nodes()
|
||||
{
|
||||
return &__RadioData_root_node;
|
||||
}
|
||||
static const struct YamlNode __ModelData_root_node = YAML_ROOT( struct_ModelData );
|
||||
|
||||
const YamlNode* get_modeldata_nodes()
|
||||
{
|
||||
return &__ModelData_root_node;
|
||||
}
|
||||
static const struct YamlNode __PartialModel_root_node = YAML_ROOT( struct_PartialModel );
|
||||
|
||||
const YamlNode* get_partialmodel_nodes()
|
||||
{
|
||||
return &__PartialModel_root_node;
|
||||
}
|
||||
|
||||
@@ -48,9 +48,9 @@
|
||||
int _dummy_##tag[0] _yaml_attribute("raw:YAML_CUSTOM(" _yaml_note( \
|
||||
#tag) "," _yaml_note(read) "," _yaml_note(write) ")")
|
||||
|
||||
#define CUST_ARRAY(tag, elmt_type, fcn) \
|
||||
int _dummy_##tag[0] _yaml_attribute("raw:YAML_ARRAY(" _yaml_note( \
|
||||
#tag) ", 0, 4, " _yaml_note(elmt_type) ", " _yaml_note(fcn) ")")
|
||||
#define CUST_ARRAY(tag, elmt_type, max, fcn) \
|
||||
int _dummy_##tag[0] _yaml_attribute("raw:YAML_ARRAY(" _yaml_note( \
|
||||
#tag) ", 0, " #max ", " _yaml_note(elmt_type) ", " _yaml_note(fcn) ")")
|
||||
|
||||
#define CUST_IDX(tag, read, write) \
|
||||
int _dummy_##tag[0] _yaml_attribute("raw:YAML_IDX_CUST(" _yaml_note( \
|
||||
@@ -67,7 +67,7 @@
|
||||
#define CUST(read, write)
|
||||
#define ARRAY(elmt_size, elmt_type, fcn)
|
||||
#define CUST_ATTR(tag, read, write)
|
||||
#define CUST_ARRAY(tag, elmt_type, fcn)
|
||||
#define CUST_ARRAY(tag, elmt_type, max, fcn)
|
||||
#define CUST_IDX(tag, read, write)
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user