Pack the frozen time capsule
This commit is contained in:
@@ -7,4 +7,6 @@ if(STORAGE_CONVERSIONS)
|
||||
storage/conversions/conversions.cpp
|
||||
storage/conversions/conversions_219_220.cpp
|
||||
)
|
||||
|
||||
include(storage/conversions/yaml/CMakeLists.txt)
|
||||
endif()
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
set(SRC ${SRC}
|
||||
storage/conversions/yaml/yaml_datastructs.cpp)
|
||||
@@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Copyright (C) OpenTX
|
||||
*
|
||||
* Based on code named
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* This file is based on work published at http://www.coranac.com/documents/working-with-bits-and-bitfields
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef BITFIELD_H
|
||||
#define BITFIELD_H
|
||||
|
||||
#include <inttypes.h>
|
||||
|
||||
// A set of bitfield handling macros
|
||||
|
||||
template <typename T>
|
||||
inline T bfBit(uint8_t n)
|
||||
{
|
||||
return T(1) << n;
|
||||
}
|
||||
|
||||
#define BFBIT_SET(y, mask) ( y |= (mask) )
|
||||
#define BFBIT_CLEAR(y, mask) ( y &= ~(mask) )
|
||||
#define BFBIT_FLIP(y, mask) ( y ^= (mask) )
|
||||
#define BF_SINGLE_BIT_SET(y, i) BFBIT_SET(y, bfBit(i))
|
||||
|
||||
//! Create a bitmask of length 'len'.
|
||||
template <typename T>
|
||||
inline T bfBitmask(uint8_t len)
|
||||
{
|
||||
return bfBit<T>(len) - 1;
|
||||
}
|
||||
|
||||
//! Create a bitfield mask of length 'len' starting at bit 'start'.
|
||||
template <typename T>
|
||||
inline T bfMask(uint8_t start, uint8_t len)
|
||||
{
|
||||
return bfBitmask<T>(len) << start;
|
||||
}
|
||||
|
||||
//! Prepare a bitmask for insertion or combining.
|
||||
template <typename T>
|
||||
inline T bfPrep(T x, uint8_t start, uint8_t len)
|
||||
{
|
||||
return (x & bfBitmask<T>(len)) << start;
|
||||
}
|
||||
|
||||
//! Extract a bitfield of length 'len' starting at bit 'start' from 'y'.
|
||||
template <typename T>
|
||||
inline T bfGet(T y, uint8_t start, uint8_t len)
|
||||
{
|
||||
return ((y)>>(start)) & bfBitmask<T>(len);
|
||||
}
|
||||
|
||||
//! Insert 'len' bits of 'x 'into 'y', starting at bit 'start' from 'y'.
|
||||
template <class T>
|
||||
inline T bfSet(T to, T from, uint8_t start, uint8_t len)
|
||||
{
|
||||
return (to & ~bfMask<T>(start, len)) | bfPrep<T>(from, start, len);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline T bfBitGet(T y, T mask)
|
||||
{
|
||||
return (y & mask);
|
||||
}
|
||||
|
||||
template <class T>
|
||||
inline T bfSingleBitGet(T y, uint8_t i)
|
||||
{
|
||||
return bfBitGet(y, bfBit<T>(i));
|
||||
}
|
||||
|
||||
#endif //BITFIELD_H
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Copyright (C) EdgeTX
|
||||
*
|
||||
* Based on code named
|
||||
* opentx - https://github.com/opentx/opentx
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define MAX_LAYOUT_ZONES 10
|
||||
#define MAX_LAYOUT_OPTIONS 10
|
||||
|
||||
#if defined(PCBNV14)
|
||||
#define MAX_TOPBAR_ZONES 2
|
||||
#else
|
||||
#define MAX_TOPBAR_ZONES 4
|
||||
#endif
|
||||
|
||||
#define WIDGET_NAME_LEN 10
|
||||
#define MAX_WIDGET_OPTIONS 5
|
||||
#define MAX_TOPBAR_OPTIONS 1
|
||||
#define LAYOUT_ID_LEN 10
|
||||
|
||||
#include "zone_220.h"
|
||||
|
||||
struct WidgetPersistentData {
|
||||
ZoneOptionValueTyped options[MAX_WIDGET_OPTIONS];
|
||||
};
|
||||
|
||||
struct ZonePersistentData {
|
||||
char widgetName[WIDGET_NAME_LEN];
|
||||
WidgetPersistentData widgetData;
|
||||
};
|
||||
|
||||
struct LayoutPersistentData {
|
||||
ZonePersistentData zones[MAX_LAYOUT_ZONES];
|
||||
ZoneOptionValueTyped options[MAX_LAYOUT_OPTIONS];
|
||||
};
|
||||
|
||||
struct TopBarPersistentData {
|
||||
ZonePersistentData zones[MAX_TOPBAR_ZONES];
|
||||
ZoneOptionValueTyped options[MAX_TOPBAR_OPTIONS];
|
||||
};
|
||||
@@ -0,0 +1,282 @@
|
||||
/*
|
||||
* Copyright (C) EdgeTX
|
||||
*
|
||||
* Based on code named
|
||||
* opentx - https://github.com/opentx/opentx
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#ifndef _MYEEPROM_H_
|
||||
#define _MYEEPROM_H_
|
||||
|
||||
// #include "datastructs.h"
|
||||
// #include "libopenui/src/bitfield.h"
|
||||
|
||||
#if defined(SDCARD_YAML)
|
||||
#define EEPROM_VER 221
|
||||
#else
|
||||
#define EEPROM_VER 220
|
||||
#endif
|
||||
#define FIRST_CONV_EEPROM_VER 219
|
||||
|
||||
#define GET_MODULE_PPM_POLARITY(idx) g_model.moduleData[idx].ppm.pulsePol
|
||||
#define GET_TRAINER_PPM_POLARITY() g_model.trainerData.pulsePol
|
||||
#define GET_SBUS_POLARITY(idx) g_model.moduleData[idx].sbus.noninverted
|
||||
#define GET_MODULE_PPM_DELAY(idx) (g_model.moduleData[idx].ppm.delay * 50 + 300)
|
||||
#define GET_TRAINER_PPM_DELAY() (g_model.trainerData.delay * 50 + 300)
|
||||
|
||||
#if defined(HARDWARE_TRAINER_EXTERNAL_MODULE)
|
||||
#define IS_TRAINER_EXTERNAL_MODULE() (g_model.trainerData.mode == TRAINER_MODE_MASTER_SBUS_EXTERNAL_MODULE || g_model.trainerData.mode == TRAINER_MODE_MASTER_CPPM_EXTERNAL_MODULE)
|
||||
#else
|
||||
#define IS_TRAINER_EXTERNAL_MODULE() false
|
||||
#endif
|
||||
|
||||
#define IS_TRAINER_AUX_SERIAL() (g_eeGeneral.auxSerialMode == UART_MODE_SBUS_TRAINER)
|
||||
|
||||
#define IS_PLAY_FUNC(func) ((func) >= FUNC_PLAY_SOUND && func <= FUNC_PLAY_VALUE)
|
||||
|
||||
#if defined(GVARS)
|
||||
#define IS_ADJUST_GV_FUNC(func) ((func) == FUNC_ADJUST_GVAR)
|
||||
#else
|
||||
#define IS_ADJUST_GV_FUNC(func) (0)
|
||||
#endif
|
||||
|
||||
#if defined(HAPTIC)
|
||||
#define IS_HAPTIC_FUNC(func) ((func) == FUNC_HAPTIC)
|
||||
#else
|
||||
#define IS_HAPTIC_FUNC(func) (0)
|
||||
#endif
|
||||
|
||||
#define HAS_ENABLE_PARAM(func) ((func) < FUNC_FIRST_WITHOUT_ENABLE || (func == FUNC_BACKLIGHT))
|
||||
#define HAS_REPEAT_PARAM(func) (IS_PLAY_FUNC(func) || IS_HAPTIC_FUNC(func))
|
||||
|
||||
#define CFN_EMPTY(p) (!(p)->swtch)
|
||||
#define CFN_SWITCH(p) ((p)->swtch)
|
||||
#define CFN_FUNC(p) ((p)->func)
|
||||
#define CFN_ACTIVE(p) ((p)->active)
|
||||
#define CFN_CH_INDEX(p) ((p)->all.param)
|
||||
#define CFN_GVAR_INDEX(p) ((p)->all.param)
|
||||
#define CFN_TIMER_INDEX(p) ((p)->all.param)
|
||||
#define CFN_PLAY_REPEAT(p) ((p)->active)
|
||||
#define CFN_PLAY_REPEAT_MUL 1
|
||||
#define CFN_PLAY_REPEAT_NOSTART 0xFF
|
||||
#define CFN_GVAR_MODE(p) ((p)->all.mode)
|
||||
#define CFN_PARAM(p) ((p)->all.val)
|
||||
#define CFN_RESET(p) ((p)->active=0, (p)->clear.val1=0, (p)->clear.val2=0)
|
||||
#define CFN_GVAR_CST_MIN -GVAR_MAX
|
||||
#define CFN_GVAR_CST_MAX GVAR_MAX
|
||||
#define MODEL_GVAR_MIN(idx) (CFN_GVAR_CST_MIN + g_model.gvars[idx].min)
|
||||
#define MODEL_GVAR_MAX(idx) (CFN_GVAR_CST_MAX - g_model.gvars[idx].max)
|
||||
|
||||
#if defined(PCBFRSKY) || defined(PCBNV14)
|
||||
#define SWITCH_CONFIG(x) (bfGet<swconfig_t>(g_eeGeneral.switchConfig, 2*(x), 2))
|
||||
#define SWITCH_EXISTS(x) (SWITCH_CONFIG(x) != SWITCH_NONE)
|
||||
#define IS_CONFIG_3POS(x) (SWITCH_CONFIG(x) == SWITCH_3POS)
|
||||
#define IS_CONFIG_TOGGLE(x) (SWITCH_CONFIG(x) == SWITCH_TOGGLE)
|
||||
#define SWITCH_WARNING_ALLOWED(x) (SWITCH_EXISTS(x) && !IS_CONFIG_TOGGLE(x))
|
||||
#else
|
||||
#define IS_CONFIG_3POS(x) IS_3POS(x)
|
||||
#define IS_CONFIG_TOGGLE(x) IS_TOGGLE(x)
|
||||
#define switchInfo(x) ((x) >= 3 ? (x)-2 : 0)
|
||||
#define SWITCH_EXISTS(x) true
|
||||
#endif
|
||||
|
||||
#define ALTERNATE_VIEW 0x10
|
||||
|
||||
// #if defined(COLORLCD)
|
||||
// #include "layout.h"
|
||||
// #include "theme.h"
|
||||
// #include "topbar.h"
|
||||
// #endif
|
||||
|
||||
#define SWITCHES_DELAY() uint8_t(15+g_eeGeneral.switchesDelay)
|
||||
#define SWITCHES_DELAY_NONE (-15)
|
||||
#define HAPTIC_STRENGTH() (3+g_eeGeneral.hapticStrength)
|
||||
|
||||
enum CurveRefType {
|
||||
CURVE_REF_DIFF,
|
||||
CURVE_REF_EXPO,
|
||||
CURVE_REF_FUNC,
|
||||
CURVE_REF_CUSTOM
|
||||
};
|
||||
|
||||
#define EXPO_VALID(ed) ((ed)->mode)
|
||||
#define EXPO_MODE_ENABLE(ed, v) (((v)<0 && ((ed)->mode&1)) || ((v)>=0 && ((ed)->mode&2)))
|
||||
|
||||
#define limit_min_max_t int16_t
|
||||
#define LIMIT_EXT_PERCENT 150
|
||||
#define LIMIT_STD_PERCENT 100
|
||||
#define LIMIT_EXT_MAX (LIMIT_EXT_PERCENT*10)
|
||||
#define LIMIT_STD_MAX (LIMIT_STD_PERCENT*10)
|
||||
#define PPM_CENTER_MAX 500
|
||||
#define LIMIT_MAX(lim) \
|
||||
(GV_IS_GV_VALUE(lim->max, -GV_RANGELARGE, GV_RANGELARGE) \
|
||||
? GET_GVAR_PREC1(lim->max, -LIMIT_EXT_MAX, +LIMIT_EXT_MAX, \
|
||||
mixerCurrentFlightMode) \
|
||||
: lim->max + LIMIT_STD_MAX)
|
||||
#define LIMIT_MIN(lim) \
|
||||
(GV_IS_GV_VALUE(lim->min, -GV_RANGELARGE, GV_RANGELARGE) \
|
||||
? GET_GVAR_PREC1(lim->min, -LIMIT_EXT_MAX, +LIMIT_EXT_MAX, \
|
||||
mixerCurrentFlightMode) \
|
||||
: lim->min - LIMIT_STD_MAX)
|
||||
#define LIMIT_OFS(lim) \
|
||||
(GV_IS_GV_VALUE(lim->offset, -LIMIT_STD_MAX, LIMIT_STD_MAX) \
|
||||
? GET_GVAR_PREC1(lim->offset, -LIMIT_STD_MAX, +LIMIT_STD_MAX, \
|
||||
mixerCurrentFlightMode) \
|
||||
: lim->offset)
|
||||
#define LIMIT_MAX_RESX(lim) calc1000toRESX(LIMIT_MAX(lim))
|
||||
#define LIMIT_MIN_RESX(lim) calc1000toRESX(LIMIT_MIN(lim))
|
||||
#define LIMIT_OFS_RESX(lim) calc1000toRESX(LIMIT_OFS(lim))
|
||||
|
||||
#define LIMITS_MIN_MAX_OFFSET LIMIT_STD_MAX
|
||||
|
||||
#define TRIM_OFF (1)
|
||||
#define TRIM_ON (0)
|
||||
#define TRIM_RUD (-1)
|
||||
#define TRIM_ELE (-2)
|
||||
#define TRIM_THR (-3)
|
||||
#define TRIM_AIL (-4)
|
||||
#if defined(PCBHORUS)
|
||||
#define TRIM_T5 (-5)
|
||||
#define TRIM_T6 (-6)
|
||||
#define TRIM_LAST TRIM_T6
|
||||
#else
|
||||
#define TRIM_LAST TRIM_AIL
|
||||
#endif
|
||||
|
||||
enum MixerMultiplex {
|
||||
MLTPX_ADD = 0,
|
||||
MLTPX_MUL = 1,
|
||||
MLTPX_REPL = 2,
|
||||
};
|
||||
|
||||
enum TrainerMultiplex {
|
||||
TRAINER_OFF = 0,
|
||||
TRAINER_ADD = 1,
|
||||
TRAINER_REPL = 2,
|
||||
};
|
||||
|
||||
#define GV1_SMALL 128
|
||||
#define GV1_LARGE 1024
|
||||
#define GV_RANGE_OFFSET 500
|
||||
#define DELAY_MAX 250 /* 25 seconds */
|
||||
#define SLOW_MAX 250 /* 25 seconds */
|
||||
|
||||
#define MD_WEIGHT(md) (md->weight)
|
||||
#define MD_WEIGHT_TO_UNION(md, var) var.word = md->weight
|
||||
#define MD_UNION_TO_WEIGHT(var, md) md->weight = var.word
|
||||
|
||||
#define MD_OFFSET(md) (md->offset)
|
||||
#define MD_OFFSET_TO_UNION(md, var) var.word = md->offset
|
||||
#define MD_UNION_TO_OFFSET(var, md) md->offset = var.word
|
||||
|
||||
enum LogicalSwitchesFunctions {
|
||||
LS_FUNC_NONE,
|
||||
LS_FUNC_VEQUAL, // v==offset
|
||||
LS_FUNC_VALMOSTEQUAL, // v~=offset
|
||||
LS_FUNC_VPOS, // v>offset
|
||||
LS_FUNC_VNEG, // v<offset
|
||||
LS_FUNC_RANGE,
|
||||
LS_FUNC_APOS, // |v|>offset
|
||||
LS_FUNC_ANEG, // |v|<offset
|
||||
LS_FUNC_AND,
|
||||
LS_FUNC_OR,
|
||||
LS_FUNC_XOR,
|
||||
LS_FUNC_EDGE,
|
||||
LS_FUNC_EQUAL,
|
||||
LS_FUNC_GREATER,
|
||||
LS_FUNC_LESS,
|
||||
LS_FUNC_DIFFEGREATER,
|
||||
LS_FUNC_ADIFFEGREATER,
|
||||
LS_FUNC_TIMER,
|
||||
LS_FUNC_STICKY,
|
||||
LS_FUNC_COUNT,
|
||||
LS_FUNC_MAX = LS_FUNC_COUNT-1
|
||||
};
|
||||
|
||||
#define MAX_LS_DURATION 250 /*25s*/
|
||||
#define MAX_LS_DELAY 250 /*25s*/
|
||||
#define MAX_LS_ANDSW SWSRC_LAST
|
||||
|
||||
enum TelemetrySensorType
|
||||
{
|
||||
TELEM_TYPE_CUSTOM,
|
||||
TELEM_TYPE_CALCULATED
|
||||
};
|
||||
|
||||
enum TelemetrySensorFormula
|
||||
{
|
||||
TELEM_FORMULA_ADD,
|
||||
TELEM_FORMULA_AVERAGE,
|
||||
TELEM_FORMULA_MIN,
|
||||
TELEM_FORMULA_MAX,
|
||||
TELEM_FORMULA_MULTIPLY,
|
||||
TELEM_FORMULA_TOTALIZE,
|
||||
TELEM_FORMULA_CELL,
|
||||
TELEM_FORMULA_CONSUMPTION,
|
||||
TELEM_FORMULA_DIST,
|
||||
TELEM_FORMULA_LAST = TELEM_FORMULA_DIST
|
||||
};
|
||||
|
||||
enum SwashType {
|
||||
SWASH_TYPE_NONE,
|
||||
SWASH_TYPE_120,
|
||||
SWASH_TYPE_120X,
|
||||
SWASH_TYPE_140,
|
||||
SWASH_TYPE_90,
|
||||
SWASH_TYPE_MAX = SWASH_TYPE_90
|
||||
};
|
||||
|
||||
#define TRIM_EXTENDED_MAX 500
|
||||
#define TRIM_EXTENDED_MIN (-TRIM_EXTENDED_MAX)
|
||||
#define TRIM_MAX 125
|
||||
#define TRIM_MIN (-TRIM_MAX)
|
||||
|
||||
#define TRIMS_ARRAY_SIZE 8
|
||||
#define TRIM_MODE_NONE 0x1F // 0b11111
|
||||
|
||||
#define IS_MANUAL_RESET_TIMER(idx) (g_model.timers[idx].persistent == 2)
|
||||
|
||||
#if !defined(PCBSKY9X)
|
||||
#define TIMER_COUNTDOWN_START(x) (g_model.timers[x].countdownStart == 0 ? 20 : (g_model.timers[x].countdownStart == 1 ? 30 : (g_model.timers[x].countdownStart == -1 ? 10 : 5)))
|
||||
#else
|
||||
#define TIMER_COUNTDOWN_START(x) 10
|
||||
#endif
|
||||
|
||||
// #include "pulses/modules_constants.h"
|
||||
|
||||
enum DisplayTrims
|
||||
{
|
||||
DISPLAY_TRIMS_NEVER,
|
||||
DISPLAY_TRIMS_CHANGE,
|
||||
DISPLAY_TRIMS_ALWAYS
|
||||
};
|
||||
|
||||
extern RadioData g_eeGeneral;
|
||||
extern ModelData g_model;
|
||||
|
||||
PACK(union u_int8int16_t {
|
||||
struct {
|
||||
int8_t lo;
|
||||
uint8_t hi;
|
||||
} bytes_t;
|
||||
int16_t word;
|
||||
});
|
||||
|
||||
constexpr uint8_t EE_GENERAL = 0x01;
|
||||
constexpr uint8_t EE_MODEL = 0x02;
|
||||
|
||||
#endif // _MYEEPROM_H_
|
||||
@@ -0,0 +1,69 @@
|
||||
/*
|
||||
* Copyright (C) EdgeTX
|
||||
*
|
||||
* Based on code named
|
||||
* opentx - https://github.com/opentx/opentx
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <storage/yaml/yaml_node.h>
|
||||
#include <storage/yaml/yaml_bits.h>
|
||||
#include <storage/yaml/yaml_tree_walker.h>
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
namespace yaml_conv_220 {
|
||||
|
||||
#include "yaml_datastructs_funcs.cpp"
|
||||
|
||||
#if defined(PCBX12S)
|
||||
#include "yaml_datastructs_x12s.cpp"
|
||||
#elif defined(PCBX10)
|
||||
#include "yaml_datastructs_x10.cpp"
|
||||
#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_T8)
|
||||
#include "yaml_datastructs_t8.cpp"
|
||||
#else
|
||||
#include "yaml_datastructs_x7.cpp"
|
||||
#endif
|
||||
#elif defined(PCBX9LITE)
|
||||
#include "yaml_datastructs_x9lite.cpp"
|
||||
#elif defined(PCBX9LITES)
|
||||
#include "yaml_datastructs_x9lites.cpp"
|
||||
#elif defined(PCBXLITE)
|
||||
#include "yaml_datastructs_xlite.cpp"
|
||||
#elif defined(PCBXLITES)
|
||||
#include "yaml_datastructs_xlites.cpp"
|
||||
#elif defined(PCBX9E)
|
||||
#include "yaml_datastructs_x9e.cpp"
|
||||
#elif defined(PCBX9D) || defined(PCBX9DP)
|
||||
#include "yaml_datastructs_x9d.cpp"
|
||||
#else
|
||||
#error "Board not supported by YAML storage"
|
||||
#endif
|
||||
|
||||
static_assert(MAX_STR > MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN,
|
||||
"MAX_STR > MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN");
|
||||
|
||||
};
|
||||
@@ -0,0 +1,605 @@
|
||||
/*
|
||||
* Copyright (C) EdgeTX
|
||||
*
|
||||
* Based on code named
|
||||
* opentx - https://github.com/opentx/opentx
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#include <debug.h>
|
||||
#include <string.h>
|
||||
|
||||
//#include "bitfield.h"
|
||||
#include "dataconstants_220.h"
|
||||
#include "datastructs_220.h"
|
||||
#include "myeeprom_220.h"
|
||||
|
||||
#define GVAR_SMALL 128
|
||||
#define VOLUME_LEVEL_DEF 12
|
||||
|
||||
#define in_read_weight nullptr
|
||||
|
||||
static bool in_write_weight(const YamlNode* node, uint32_t val, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
int32_t sval = yaml_to_signed(val,node->size);
|
||||
|
||||
if (sval > GVAR_SMALL-11 && sval < GVAR_SMALL-1) {
|
||||
char n = GVAR_SMALL - sval + '0';
|
||||
return wf(opaque, "-GV", 3) && wf(opaque, &n, 1);
|
||||
}
|
||||
else if (sval < -GVAR_SMALL+11 && sval > -GVAR_SMALL+1) {
|
||||
char n = val - GVAR_SMALL + '1';
|
||||
return wf(opaque, "GV", 2) && wf(opaque, &n, 1);
|
||||
}
|
||||
|
||||
char* s = yaml_signed2str(sval);
|
||||
return wf(opaque, s, strlen(s));
|
||||
}
|
||||
|
||||
extern const struct YamlIdStr enum_MixSources[];
|
||||
|
||||
#define r_mixSrcRaw nullptr
|
||||
|
||||
static bool w_mixSrcRaw(const YamlNode* node, uint32_t val, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
const char* str = nullptr;
|
||||
|
||||
if (val >= MIXSRC_FIRST_INPUT
|
||||
&& val <= MIXSRC_LAST_INPUT) {
|
||||
|
||||
if (!wf(opaque, "I", 1))
|
||||
return false;
|
||||
|
||||
str = yaml_unsigned2str(val - MIXSRC_FIRST_INPUT);
|
||||
}
|
||||
else {
|
||||
str = yaml_output_enum(val, enum_MixSources);
|
||||
}
|
||||
|
||||
if (str) {
|
||||
return wf(opaque, str, strlen(str));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#define r_vbat_min nullptr
|
||||
|
||||
static bool w_vbat_min(const YamlNode* node, uint32_t val, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
char* s = yaml_signed2str(yaml_to_signed(val,node->size) + 90);
|
||||
return wf(opaque, s, strlen(s));
|
||||
}
|
||||
|
||||
#define r_vbat_max nullptr
|
||||
|
||||
static bool w_vbat_max(const YamlNode* node, uint32_t val, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
char* s = yaml_signed2str(yaml_to_signed(val,node->size) + 120);
|
||||
return wf(opaque, s, strlen(s));
|
||||
}
|
||||
|
||||
#if defined(COLORLCD)
|
||||
static uint8_t select_zov(uint8_t* data, uint32_t bitoffs)
|
||||
{
|
||||
data += bitoffs >> 3UL;
|
||||
data -= sizeof(ZoneOptionValueEnum);
|
||||
ZoneOptionValueEnum* p_zovt = (ZoneOptionValueEnum*)data;
|
||||
return *p_zovt;
|
||||
}
|
||||
#endif
|
||||
|
||||
static uint8_t select_mod_type(uint8_t* data, uint32_t bitoffs)
|
||||
{
|
||||
data += bitoffs >> 3UL;
|
||||
data -= offsetof(ModuleData, ppm);
|
||||
|
||||
ModuleData* mod_data = reinterpret_cast<ModuleData*>(data);
|
||||
switch(mod_data->type) {
|
||||
case MODULE_TYPE_NONE:
|
||||
case MODULE_TYPE_PPM:
|
||||
case MODULE_TYPE_DSM2:
|
||||
case MODULE_TYPE_CROSSFIRE:
|
||||
case MODULE_TYPE_GHOST:
|
||||
return 1;
|
||||
case MODULE_TYPE_MULTIMODULE:
|
||||
return 2;
|
||||
case MODULE_TYPE_XJT_PXX1:
|
||||
case MODULE_TYPE_R9M_PXX1:
|
||||
case MODULE_TYPE_R9M_LITE_PXX1:
|
||||
return 3;
|
||||
case MODULE_TYPE_SBUS:
|
||||
return 4;
|
||||
case MODULE_TYPE_ISRM_PXX2:
|
||||
case MODULE_TYPE_R9M_PXX2:
|
||||
case MODULE_TYPE_R9M_LITE_PXX2:
|
||||
case MODULE_TYPE_R9M_LITE_PRO_PXX2:
|
||||
case MODULE_TYPE_XJT_LITE_PXX2:
|
||||
return 5;
|
||||
case MODULE_TYPE_FLYSKY:
|
||||
if (mod_data->subType == FLYSKY_SUBTYPE_AFHDS2A)
|
||||
return 6;
|
||||
if (mod_data->subType == FLYSKY_SUBTYPE_AFHDS3)
|
||||
return 7;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint8_t select_custom_fn(uint8_t* data, uint32_t bitoffs)
|
||||
{
|
||||
// always use 'all'
|
||||
//TODO
|
||||
return 1;
|
||||
}
|
||||
|
||||
static uint8_t select_script_input(uint8_t* data, uint32_t bitoffs)
|
||||
{
|
||||
// always use 'value'
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint8_t select_id1(uint8_t* data, uint32_t bitoffs)
|
||||
{
|
||||
// always use 'id'
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint8_t select_id2(uint8_t* data, uint32_t bitoffs)
|
||||
{
|
||||
// always use 'instance'
|
||||
return 0;
|
||||
}
|
||||
|
||||
static uint8_t select_sensor_cfg(uint8_t* data, uint32_t bitoffs)
|
||||
{
|
||||
// always use 'param'
|
||||
return 5;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static uint32_t sw_read(const char* val, uint8_t val_len)
|
||||
{
|
||||
uint32_t sw = yaml_parse_enum(enum_MixSources, val, val_len);
|
||||
if (sw >= MIXSRC_FIRST_SWITCH)
|
||||
return sw - MIXSRC_FIRST_SWITCH;
|
||||
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool sw_write(uint32_t idx, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
const char* str = yaml_output_enum(idx + MIXSRC_FIRST_SWITCH, enum_MixSources);
|
||||
return str ? wf(opaque, str, strlen(str)) : true;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void r_stick_name(const YamlNode* node, uint8_t* data,
|
||||
uint32_t bitoffs, uint16_t idx,
|
||||
const char* val, uint8_t val_len)
|
||||
{
|
||||
data -= offsetof(RadioData, switchConfig);
|
||||
RadioData* rd = reinterpret_cast<RadioData*>(data);
|
||||
strncpy(rd->anaNames[idx], val, std::min<uint8_t>(val_len, LEN_ANA_NAME));
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool w_stick_name(const YamlNode* node, uint8_t* data,
|
||||
uint32_t bitoffs, uint16_t idx,
|
||||
yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
data -= offsetof(RadioData, switchConfig);
|
||||
RadioData* rd = reinterpret_cast<RadioData*>(data);
|
||||
return wf(opaque, rd->anaNames[idx], strnlen(rd->anaNames[idx], LEN_ANA_NAME));
|
||||
}
|
||||
|
||||
static bool stick_name_valid(uint8_t* data, uint32_t bitoffs, uint16_t idx)
|
||||
{
|
||||
RadioData* rd = reinterpret_cast<RadioData*>(data);
|
||||
return rd->anaNames[idx][0] != '\0';
|
||||
}
|
||||
|
||||
static const struct YamlNode struct_sticksConfig[] = {
|
||||
YAML_IDX,
|
||||
YAML_CUSTOM( "name", nullptr, w_stick_name),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#if 0
|
||||
static void sw_name_read(const YamlNode* node, uint8_t* data, uint32_t bitoffs,
|
||||
uint16_t idx, const char* val, uint8_t val_len)
|
||||
{
|
||||
// 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));
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool sw_name_write(const YamlNode* node, uint8_t* data, uint32_t bitoffs,
|
||||
uint16_t idx, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
// 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];
|
||||
return wf(opaque, str, strnlen(str, LEN_SWITCH_NAME));
|
||||
}
|
||||
|
||||
static const struct YamlIdStr enum_SwitchConfig[] = {
|
||||
{ SWITCH_NONE, "none" },
|
||||
{ SWITCH_TOGGLE, "toggle" },
|
||||
{ SWITCH_2POS, "2pos" },
|
||||
{ SWITCH_3POS, "3pos" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static const struct YamlNode struct_switchConfig[] = {
|
||||
YAML_IDX_CUST( "sw", nullptr, sw_write ),
|
||||
YAML_ENUM( "type", 2, enum_SwitchConfig),
|
||||
YAML_CUSTOM( "name", nullptr, sw_name_write),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#if 0
|
||||
static uint32_t pot_read(const char* val, uint8_t val_len)
|
||||
{
|
||||
uint32_t pot = yaml_parse_enum(enum_MixSources, val, val_len);
|
||||
if (pot >= MIXSRC_FIRST_POT)
|
||||
return pot - MIXSRC_FIRST_POT;
|
||||
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool pot_write(uint32_t idx, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
const char* str = yaml_output_enum(idx + MIXSRC_FIRST_POT, enum_MixSources);
|
||||
return str ? wf(opaque, str, strlen(str)) : true;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void pot_name_read(const YamlNode* node, uint8_t* data, uint32_t bitoffs,
|
||||
uint16_t idx, const char* val, uint8_t val_len)
|
||||
{
|
||||
// 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));
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool pot_name_write(const YamlNode* node, uint8_t* data, uint32_t bitoffs,
|
||||
uint16_t idx, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
// 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];
|
||||
return wf(opaque, str, strnlen(str, LEN_ANA_NAME));
|
||||
}
|
||||
|
||||
static const struct YamlIdStr enum_PotConfig[] = {
|
||||
{ POT_NONE, "none" },
|
||||
{ POT_WITH_DETENT, "with_detent" },
|
||||
{ POT_MULTIPOS_SWITCH, "multipos_switch" },
|
||||
{ POT_WITHOUT_DETENT, "without_detent" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
static const struct YamlNode struct_potConfig[] = {
|
||||
YAML_IDX_CUST( "pot", nullptr, pot_write ),
|
||||
YAML_ENUM( "type", 2, enum_PotConfig),
|
||||
YAML_CUSTOM( "name", nullptr, pot_name_write),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#if 0
|
||||
static uint32_t slider_read(const char* val, uint8_t val_len)
|
||||
{
|
||||
uint32_t sl = yaml_parse_enum(enum_MixSources, val, val_len);
|
||||
if (sl >= MIXSRC_FIRST_SLIDER)
|
||||
return sl - MIXSRC_FIRST_SLIDER;
|
||||
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool slider_write(uint32_t idx, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
const char* str = yaml_output_enum(idx + MIXSRC_FIRST_SLIDER, enum_MixSources);
|
||||
return str ? wf(opaque, str, strlen(str)) : true;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void sl_name_read(const YamlNode* node, uint8_t* data, uint32_t bitoffs,
|
||||
uint16_t idx, const char* val, uint8_t val_len)
|
||||
{
|
||||
// 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));
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool sl_name_write(const YamlNode* node, uint8_t* data, uint32_t bitoffs,
|
||||
uint16_t idx, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
// 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];
|
||||
return wf(opaque, str, strnlen(str, LEN_ANA_NAME));
|
||||
}
|
||||
|
||||
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", nullptr, slider_write ),
|
||||
YAML_ENUM( "type", 1, enum_SliderConfig),
|
||||
YAML_CUSTOM( "name", nullptr, sl_name_write),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
extern const struct YamlIdStr enum_SwitchSources[];
|
||||
|
||||
#define r_swtchSrc nullptr
|
||||
|
||||
static bool w_swtchSrc(const YamlNode* node, uint32_t val, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
int32_t sval = yaml_to_signed(val, node->size);
|
||||
if (sval < 0) {
|
||||
wf(opaque, "!", 1);
|
||||
sval = abs(sval);
|
||||
}
|
||||
|
||||
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 + 1);
|
||||
return wf(opaque,str, strlen(str));
|
||||
}
|
||||
else if (sval >= SWSRC_FIRST_SENSOR
|
||||
&& sval <= SWSRC_LAST_SENSOR) {
|
||||
|
||||
wf(opaque, "T", 2);
|
||||
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));
|
||||
}
|
||||
|
||||
static bool cfn_is_active(uint8_t* data, uint32_t bitoffs, uint16_t idx)
|
||||
{
|
||||
data += bitoffs >> 3UL;
|
||||
return ((CustomFunctionData*)data)->swtch;
|
||||
}
|
||||
|
||||
static bool gvar_is_active(uint8_t* data, uint32_t bitoffs, uint16_t idx)
|
||||
{
|
||||
gvar_t* gvar = (gvar_t*)(data + (bitoffs>>3UL));
|
||||
return *gvar != GVAR_MAX+1;
|
||||
}
|
||||
|
||||
static bool fmd_is_active(uint8_t* data, uint32_t bitoffs, uint16_t idx)
|
||||
{
|
||||
uint32_t data_ofs = bitoffs >> 3UL;
|
||||
if (data_ofs == offsetof(ModelData, flightModeData)) {
|
||||
return !yaml_is_zero(data, bitoffs, sizeof(FlightModeData)*8);
|
||||
}
|
||||
|
||||
bool is_active = !yaml_is_zero(data, bitoffs,
|
||||
(sizeof(FlightModeData)
|
||||
- sizeof(FlightModeData::gvars))*8);
|
||||
|
||||
FlightModeData* fmd = (FlightModeData*)(data + data_ofs);
|
||||
for (uint8_t i=0; i<MAX_GVARS; i++) {
|
||||
is_active |= fmd->gvars[i] != GVAR_MAX+1;
|
||||
}
|
||||
|
||||
return is_active;
|
||||
}
|
||||
|
||||
#define r_swtchWarn nullptr
|
||||
|
||||
static bool w_swtchWarn(const YamlNode* node, uint32_t val, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
for (int i = 0; i < STORAGE_NUM_SWITCHES; i++) {
|
||||
//if (SWITCH_EXISTS(i)) {
|
||||
|
||||
// decode check state
|
||||
// -> 3 bits per switch
|
||||
auto state = (val >> (3*i)) & 0x07;
|
||||
|
||||
// state == 0 -> no check
|
||||
// state == 1 -> UP
|
||||
// state == 2 -> MIDDLE
|
||||
// state == 3 -> DOWN
|
||||
char swtchWarn[2] = {(char)('A' + i), 0};
|
||||
|
||||
switch (state) {
|
||||
case 0:
|
||||
break;
|
||||
case 1:
|
||||
swtchWarn[1] = 'u';
|
||||
break;
|
||||
case 2:
|
||||
swtchWarn[1] = '-';
|
||||
break;
|
||||
case 3:
|
||||
swtchWarn[1] = 'd';
|
||||
break;
|
||||
default:
|
||||
// this should never happen
|
||||
swtchWarn[1] = 'x';
|
||||
break;
|
||||
}
|
||||
|
||||
if (swtchWarn[1] != 0) {
|
||||
if (!wf(opaque, swtchWarn, 2)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
extern const struct YamlIdStr enum_BeeperMode[];
|
||||
|
||||
#define r_beeperMode nullptr
|
||||
|
||||
static bool w_beeperMode(const YamlNode* node, uint32_t val, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
int32_t sval = yaml_to_signed(val,node->size);
|
||||
const char* str = yaml_output_enum(sval, enum_BeeperMode);
|
||||
return wf(opaque, str, strlen(str));
|
||||
}
|
||||
|
||||
#define r_5pos nullptr
|
||||
|
||||
static bool w_5pos(const YamlNode* node, uint32_t val, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
int32_t sval = yaml_to_signed(val,node->size);
|
||||
char* s = yaml_signed2str(sval + 2);
|
||||
return wf(opaque, s, strlen(s));
|
||||
}
|
||||
|
||||
#define r_vol nullptr
|
||||
|
||||
static bool w_vol(const YamlNode* node, uint32_t val, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
int32_t sval = yaml_to_signed(val,node->size);
|
||||
char* s = yaml_signed2str(sval + VOLUME_LEVEL_DEF);
|
||||
return wf(opaque, s, strlen(s));
|
||||
}
|
||||
|
||||
#define r_spPitch nullptr
|
||||
|
||||
static bool w_spPitch(const YamlNode* node, uint32_t val, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
char* s = yaml_signed2str(val * 15);
|
||||
return wf(opaque, s, strlen(s));
|
||||
}
|
||||
|
||||
#define r_vPitch nullptr
|
||||
|
||||
static bool w_vPitch(const YamlNode* node, uint32_t val, yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
int32_t sval = yaml_to_signed(val,node->size);
|
||||
char* s = yaml_signed2str(sval * 10);
|
||||
return wf(opaque, s, strlen(s));
|
||||
}
|
||||
|
||||
const struct YamlIdStr enum_TrainerMode[] = {
|
||||
#if defined(PCBNV14)
|
||||
{ TRAINER_MODE_OFF, "OFF" },
|
||||
#endif
|
||||
{ TRAINER_MODE_MASTER_TRAINER_JACK, "MASTER_TRAINER_JACK" },
|
||||
{ TRAINER_MODE_SLAVE, "SLAVE" },
|
||||
#if defined(PCBTARANIS) || defined(PCBNV14)
|
||||
{ TRAINER_MODE_MASTER_SBUS_EXTERNAL_MODULE, "MASTER_SBUS_EXT" },
|
||||
{ TRAINER_MODE_MASTER_CPPM_EXTERNAL_MODULE, "MASTER_CPPM_EXT" },
|
||||
#endif
|
||||
#if defined(PCBTARANIS) || defined(AUX_SERIAL) || defined(AUX2_SERIAL)
|
||||
{ TRAINER_MODE_MASTER_BATTERY_COMPARTMENT, "MASTER_BATT_COMP" },
|
||||
#endif
|
||||
{ TRAINER_MODE_MASTER_BLUETOOTH, "MASTER_BT" },
|
||||
{ TRAINER_MODE_SLAVE_BLUETOOTH, "SLAVE_BT" },
|
||||
{ TRAINER_MODE_MULTI, "MASTER_MULTI" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
#define r_trainerMode nullptr
|
||||
|
||||
static bool w_trainerMode(const YamlNode* node, uint32_t val,
|
||||
yaml_writer_func wf, void* opaque)
|
||||
{
|
||||
const char* str = nullptr;
|
||||
str = yaml_output_enum(val, enum_TrainerMode);
|
||||
|
||||
if (str) {
|
||||
return wf(opaque, str, strlen(str));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -0,0 +1,858 @@
|
||||
// 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" },
|
||||
{ ANTENNA_MODE_FIRST, "MODE_FIRST" },
|
||||
{ ANTENNA_MODE_LAST, "MODE_LAST" },
|
||||
{ 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" },
|
||||
{ BLUETOOTH_MAX, "MAX" },
|
||||
{ 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_FIRST_WITHOUT_ENABLE, "FIRST_WITHOUT_ENABLE" },
|
||||
{ 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" },
|
||||
{ FUNC_MAX, "MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ UART_MODE_COUNT, "MODE_COUNT" },
|
||||
{ UART_MODE_MAX, "MODE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ZoneOptionValueEnum[] = {
|
||||
{ ZOV_Unsigned, "Unsigned" },
|
||||
{ ZOV_Signed, "Signed" },
|
||||
{ ZOV_Bool, "Bool" },
|
||||
{ ZOV_String, "String" },
|
||||
{ 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" },
|
||||
{ TMRMODE_COUNT, "COUNT" },
|
||||
{ TMRMODE_MAX, "MAX" },
|
||||
{ 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" },
|
||||
{ LS_FUNC_COUNT, "FUNC_COUNT" },
|
||||
{ LS_FUNC_MAX, "FUNC_MAX" },
|
||||
{ 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_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_COUNT, "TYPE_COUNT" },
|
||||
{ MODULE_TYPE_MAX, "TYPE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX,
|
||||
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_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
YAML_STRUCT("play", 48, struct_anonymous_1, NULL),
|
||||
YAML_STRUCT("all", 48, struct_anonymous_2, NULL),
|
||||
YAML_STRUCT("clear", 48, 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_UNION("fp", 48, union_anonymous_0_elmts, select_custom_fn),
|
||||
YAML_UNSIGNED( "active", 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 ),
|
||||
YAML_UNSIGNED( "boolValue", 32 ),
|
||||
YAML_STRING("stringValue", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ZoneOptionValueTyped[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 32, enum_ZoneOptionValueEnum),
|
||||
YAML_UNION("value", 64, union_ZoneOptionValue_elmts, select_zov),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_OpenTxTheme__PersistentData[] = {
|
||||
YAML_ARRAY("options", 96, 5, struct_ZoneOptionValueTyped, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 9, 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_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_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_PADDING( 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_PADDING( 8 ),
|
||||
YAML_UNSIGNED( "stickReverse", 8 ),
|
||||
YAML_SIGNED_CUST( "beepLength", 3, r_5pos, w_5pos ),
|
||||
YAML_SIGNED_CUST( "hapticStrength", 3, r_5pos, w_5pos ),
|
||||
YAML_UNSIGNED( "gpsFormat", 1 ),
|
||||
YAML_UNSIGNED( "unexpectedShutdown", 1 ),
|
||||
YAML_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_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "jitterFilter", 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", 72, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ENUM("aux2SerialMode", 4, enum_UartModes),
|
||||
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_STRING("currModelFilename", 17),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "blOffBright", 7 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("themeName", 8),
|
||||
YAML_STRUCT("themeData", 480, struct_OpenTxTheme__PersistentData, NULL),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
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", 15),
|
||||
YAML_ARRAY("modelId", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_STRING("bitmap", 14),
|
||||
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_STRING("name", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
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( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
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( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_SIGNED( "curve", 8 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "scale", 14 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "carryTrim", 6 ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
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_SIGNED( "v1", 10 ),
|
||||
YAML_SIGNED( "v3", 10 ),
|
||||
YAML_SIGNED( "andsw", 9 ),
|
||||
YAML_UNSIGNED( "andswtype", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "v2", 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED( "collectiveSource", 8 ),
|
||||
YAML_UNSIGNED( "aileronSource", 8 ),
|
||||
YAML_UNSIGNED( "elevatorSource", 8 ),
|
||||
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", 10),
|
||||
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( "source", 7 ),
|
||||
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_SIGNED( "disabled", 1 ),
|
||||
YAML_UNSIGNED( "flysky_telemetry", 1 ),
|
||||
YAML_SIGNED( "warning", 6 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "critical", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "rfProtocolExtra", 3 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "customProto", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
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_8[] = {
|
||||
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_9[] = {
|
||||
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_10[] = {
|
||||
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_11[] = {
|
||||
YAML_UNSIGNED( "bindPower", 3 ),
|
||||
YAML_UNSIGNED( "runPower", 3 ),
|
||||
YAML_UNSIGNED( "emi", 1 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "failsafeTimeout", 16 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "reserved", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("afhds3", 64, struct_anonymous_11, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 4, enum_ModuleType),
|
||||
YAML_SIGNED( "rfProtocol", 4 ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_UNSIGNED( "failsafeMode", 4 ),
|
||||
YAML_UNSIGNED( "subType", 3 ),
|
||||
YAML_UNSIGNED( "invertedSerial", 1 ),
|
||||
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( "source", 8 ),
|
||||
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 struct_string_32[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 4),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_12_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_14[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_13_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_14, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_UNSIGNED( "formula", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_17[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_16, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_17, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_20, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_12_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_13_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
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_15_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_WidgetPersistentData[] = {
|
||||
YAML_ARRAY("options", 96, 5, struct_ZoneOptionValueTyped, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ZonePersistentData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("widgetName", 10),
|
||||
YAML_STRUCT("widgetData", 480, struct_WidgetPersistentData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LayoutPersistentData[] = {
|
||||
YAML_ARRAY("zones", 576, 10, struct_ZonePersistentData, NULL),
|
||||
YAML_ARRAY("options", 96, 10, struct_ZoneOptionValueTyped, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CustomScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("LayoutId", 10),
|
||||
YAML_STRUCT("layoutData", 6720, struct_LayoutPersistentData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TopBarPersistentData[] = {
|
||||
YAML_ARRAY("zones", 576, 2, struct_ZonePersistentData, NULL),
|
||||
YAML_ARRAY("options", 96, 1, struct_ZoneOptionValueTyped, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("header", 248, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 128, 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( "beepANACenter", 16 ),
|
||||
YAML_ARRAY("mixData", 160, 64, struct_MixData, NULL),
|
||||
YAML_ARRAY("limitData", 104, 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", 72, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, NULL),
|
||||
YAML_ARRAY("flightModeData", 320, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED( "thrTraceSrc", 8 ),
|
||||
YAML_UNSIGNED_CUST( "switchWarningState", 32, r_swtchWarn, w_swtchWarn ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED( "rssiSource", 8 ),
|
||||
YAML_STRUCT("rssiAlarms", 16, struct_RssiAlarmData, NULL),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_UNSIGNED( "potsWarnMode", 2 ),
|
||||
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, 9, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 32, 32, struct_string_32, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 5, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 60, struct_TelemetrySensor, NULL),
|
||||
YAML_ARRAY("screenData", 6800, 5, struct_CustomScreenData, NULL),
|
||||
YAML_STRUCT("topbarData", 1248, struct_TopBarPersistentData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 248, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 128, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 24
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,831 @@
|
||||
// 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" },
|
||||
{ ANTENNA_MODE_FIRST, "MODE_FIRST" },
|
||||
{ ANTENNA_MODE_LAST, "MODE_LAST" },
|
||||
{ 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" },
|
||||
{ BLUETOOTH_MAX, "MAX" },
|
||||
{ 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_FIRST_WITHOUT_ENABLE, "FIRST_WITHOUT_ENABLE" },
|
||||
{ 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" },
|
||||
{ FUNC_MAX, "MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ UART_MODE_COUNT, "MODE_COUNT" },
|
||||
{ UART_MODE_MAX, "MODE_MAX" },
|
||||
{ 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" },
|
||||
{ TMRMODE_COUNT, "COUNT" },
|
||||
{ TMRMODE_MAX, "MAX" },
|
||||
{ 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" },
|
||||
{ LS_FUNC_COUNT, "FUNC_COUNT" },
|
||||
{ LS_FUNC_MAX, "FUNC_MAX" },
|
||||
{ 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_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_COUNT, "TYPE_COUNT" },
|
||||
{ MODULE_TYPE_MAX, "TYPE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX,
|
||||
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_PADDING( 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_PADDING( 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_UNION("fp", 64, union_anonymous_0_elmts, select_custom_fn),
|
||||
YAML_UNSIGNED( "active", 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( "version", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
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_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_UNSIGNED( "telemetryBaudrate", 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_UNSIGNED( "unexpectedShutdown", 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_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "jitterFilter", 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_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_UNSIGNED( "switchUnlockStates", 16 ),
|
||||
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_SIGNED( "uartSampleMode", 2 ),
|
||||
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_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
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( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
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( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
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_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "carryTrim", 6 ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
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_SIGNED( "v1", 10 ),
|
||||
YAML_SIGNED( "v3", 10 ),
|
||||
YAML_SIGNED( "andsw", 9 ),
|
||||
YAML_UNSIGNED( "andswtype", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "v2", 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED( "collectiveSource", 8 ),
|
||||
YAML_UNSIGNED( "aileronSource", 8 ),
|
||||
YAML_UNSIGNED( "elevatorSource", 8 ),
|
||||
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( "source", 7 ),
|
||||
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_SIGNED( "disabled", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "warning", 6 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "critical", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "rfProtocolExtra", 3 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "customProto", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
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_8[] = {
|
||||
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_9[] = {
|
||||
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_10[] = {
|
||||
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_11[] = {
|
||||
YAML_UNSIGNED( "bindPower", 3 ),
|
||||
YAML_UNSIGNED( "runPower", 3 ),
|
||||
YAML_UNSIGNED( "emi", 1 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "failsafeTimeout", 16 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "reserved", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("afhds3", 64, struct_anonymous_11, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 4, enum_ModuleType),
|
||||
YAML_SIGNED( "rfProtocol", 4 ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_UNSIGNED( "failsafeMode", 4 ),
|
||||
YAML_UNSIGNED( "subType", 3 ),
|
||||
YAML_UNSIGNED( "invertedSerial", 1 ),
|
||||
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( "source", 16 ),
|
||||
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_12_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_14[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_13_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_14, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_UNSIGNED( "formula", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_17[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_16, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_17, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_20, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_12_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_13_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
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_15_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "source", 16 ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_unsigned_16, 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_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 union_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_elmts, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 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( "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, NULL),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED( "thrTraceSrc", 8 ),
|
||||
YAML_UNSIGNED_CUST( "switchWarningState", 16, r_swtchWarn, w_swtchWarn ),
|
||||
YAML_UNSIGNED( "switchWarningEnable", 8 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED( "rssiSource", 8 ),
|
||||
YAML_STRUCT("rssiAlarms", 16, struct_RssiAlarmData, NULL),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_UNSIGNED( "potsWarnMode", 2 ),
|
||||
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", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_UNSIGNED( "screensType", 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, union_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 24
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,831 @@
|
||||
// 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" },
|
||||
{ ANTENNA_MODE_FIRST, "MODE_FIRST" },
|
||||
{ ANTENNA_MODE_LAST, "MODE_LAST" },
|
||||
{ 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" },
|
||||
{ BLUETOOTH_MAX, "MAX" },
|
||||
{ 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_FIRST_WITHOUT_ENABLE, "FIRST_WITHOUT_ENABLE" },
|
||||
{ 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" },
|
||||
{ FUNC_MAX, "MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ UART_MODE_COUNT, "MODE_COUNT" },
|
||||
{ UART_MODE_MAX, "MODE_MAX" },
|
||||
{ 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" },
|
||||
{ TMRMODE_COUNT, "COUNT" },
|
||||
{ TMRMODE_MAX, "MAX" },
|
||||
{ 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" },
|
||||
{ LS_FUNC_COUNT, "FUNC_COUNT" },
|
||||
{ LS_FUNC_MAX, "FUNC_MAX" },
|
||||
{ 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_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_COUNT, "TYPE_COUNT" },
|
||||
{ MODULE_TYPE_MAX, "TYPE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX,
|
||||
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_PADDING( 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_PADDING( 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_UNION("fp", 64, union_anonymous_0_elmts, select_custom_fn),
|
||||
YAML_UNSIGNED( "active", 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( "version", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
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_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_UNSIGNED( "telemetryBaudrate", 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_UNSIGNED( "unexpectedShutdown", 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_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "jitterFilter", 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_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_UNSIGNED( "switchUnlockStates", 16 ),
|
||||
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_SIGNED( "uartSampleMode", 2 ),
|
||||
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_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
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( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
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( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
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_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "carryTrim", 6 ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
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_SIGNED( "v1", 10 ),
|
||||
YAML_SIGNED( "v3", 10 ),
|
||||
YAML_SIGNED( "andsw", 9 ),
|
||||
YAML_UNSIGNED( "andswtype", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "v2", 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED( "collectiveSource", 8 ),
|
||||
YAML_UNSIGNED( "aileronSource", 8 ),
|
||||
YAML_UNSIGNED( "elevatorSource", 8 ),
|
||||
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( "source", 7 ),
|
||||
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_SIGNED( "disabled", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "warning", 6 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "critical", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "rfProtocolExtra", 3 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "customProto", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
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_8[] = {
|
||||
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_9[] = {
|
||||
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_10[] = {
|
||||
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_11[] = {
|
||||
YAML_UNSIGNED( "bindPower", 3 ),
|
||||
YAML_UNSIGNED( "runPower", 3 ),
|
||||
YAML_UNSIGNED( "emi", 1 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "failsafeTimeout", 16 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "reserved", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("afhds3", 64, struct_anonymous_11, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 4, enum_ModuleType),
|
||||
YAML_SIGNED( "rfProtocol", 4 ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_UNSIGNED( "failsafeMode", 4 ),
|
||||
YAML_UNSIGNED( "subType", 3 ),
|
||||
YAML_UNSIGNED( "invertedSerial", 1 ),
|
||||
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( "source", 16 ),
|
||||
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_12_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_14[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_13_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_14, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_UNSIGNED( "formula", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_17[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_16, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_17, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_20, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_12_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_13_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
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_15_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "source", 16 ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_unsigned_16, 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_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 union_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_elmts, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 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( "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, NULL),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED( "thrTraceSrc", 8 ),
|
||||
YAML_UNSIGNED_CUST( "switchWarningState", 16, r_swtchWarn, w_swtchWarn ),
|
||||
YAML_UNSIGNED( "switchWarningEnable", 8 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED( "rssiSource", 8 ),
|
||||
YAML_STRUCT("rssiAlarms", 16, struct_RssiAlarmData, NULL),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_UNSIGNED( "potsWarnMode", 2 ),
|
||||
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", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_UNSIGNED( "screensType", 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, union_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 24
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,831 @@
|
||||
// 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" },
|
||||
{ ANTENNA_MODE_FIRST, "MODE_FIRST" },
|
||||
{ ANTENNA_MODE_LAST, "MODE_LAST" },
|
||||
{ 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" },
|
||||
{ BLUETOOTH_MAX, "MAX" },
|
||||
{ 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_FIRST_WITHOUT_ENABLE, "FIRST_WITHOUT_ENABLE" },
|
||||
{ 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" },
|
||||
{ FUNC_MAX, "MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ UART_MODE_COUNT, "MODE_COUNT" },
|
||||
{ UART_MODE_MAX, "MODE_MAX" },
|
||||
{ 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" },
|
||||
{ TMRMODE_COUNT, "COUNT" },
|
||||
{ TMRMODE_MAX, "MAX" },
|
||||
{ 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" },
|
||||
{ LS_FUNC_COUNT, "FUNC_COUNT" },
|
||||
{ LS_FUNC_MAX, "FUNC_MAX" },
|
||||
{ 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_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_COUNT, "TYPE_COUNT" },
|
||||
{ MODULE_TYPE_MAX, "TYPE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX,
|
||||
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_PADDING( 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_PADDING( 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_UNION("fp", 64, union_anonymous_0_elmts, select_custom_fn),
|
||||
YAML_UNSIGNED( "active", 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( "version", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
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_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_UNSIGNED( "telemetryBaudrate", 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_UNSIGNED( "unexpectedShutdown", 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_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "jitterFilter", 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_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_UNSIGNED( "switchUnlockStates", 16 ),
|
||||
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_SIGNED( "uartSampleMode", 2 ),
|
||||
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_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
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( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
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( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
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_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "carryTrim", 6 ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
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_SIGNED( "v1", 10 ),
|
||||
YAML_SIGNED( "v3", 10 ),
|
||||
YAML_SIGNED( "andsw", 9 ),
|
||||
YAML_UNSIGNED( "andswtype", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "v2", 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED( "collectiveSource", 8 ),
|
||||
YAML_UNSIGNED( "aileronSource", 8 ),
|
||||
YAML_UNSIGNED( "elevatorSource", 8 ),
|
||||
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( "source", 7 ),
|
||||
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_SIGNED( "disabled", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "warning", 6 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "critical", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "rfProtocolExtra", 3 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "customProto", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
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_8[] = {
|
||||
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_9[] = {
|
||||
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_10[] = {
|
||||
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_11[] = {
|
||||
YAML_UNSIGNED( "bindPower", 3 ),
|
||||
YAML_UNSIGNED( "runPower", 3 ),
|
||||
YAML_UNSIGNED( "emi", 1 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "failsafeTimeout", 16 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "reserved", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("afhds3", 64, struct_anonymous_11, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 4, enum_ModuleType),
|
||||
YAML_SIGNED( "rfProtocol", 4 ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_UNSIGNED( "failsafeMode", 4 ),
|
||||
YAML_UNSIGNED( "subType", 3 ),
|
||||
YAML_UNSIGNED( "invertedSerial", 1 ),
|
||||
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( "source", 16 ),
|
||||
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_12_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_14[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_13_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_14, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_UNSIGNED( "formula", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_17[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_16, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_17, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_20, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_12_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_13_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
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_15_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "source", 16 ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_unsigned_16, 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_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 union_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_elmts, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 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( "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, NULL),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED( "thrTraceSrc", 8 ),
|
||||
YAML_UNSIGNED_CUST( "switchWarningState", 16, r_swtchWarn, w_swtchWarn ),
|
||||
YAML_UNSIGNED( "switchWarningEnable", 8 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED( "rssiSource", 8 ),
|
||||
YAML_STRUCT("rssiAlarms", 16, struct_RssiAlarmData, NULL),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_UNSIGNED( "potsWarnMode", 2 ),
|
||||
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", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_UNSIGNED( "screensType", 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, union_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 24
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,831 @@
|
||||
// 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" },
|
||||
{ ANTENNA_MODE_FIRST, "MODE_FIRST" },
|
||||
{ ANTENNA_MODE_LAST, "MODE_LAST" },
|
||||
{ 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" },
|
||||
{ BLUETOOTH_MAX, "MAX" },
|
||||
{ 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_FIRST_WITHOUT_ENABLE, "FIRST_WITHOUT_ENABLE" },
|
||||
{ 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" },
|
||||
{ FUNC_MAX, "MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ UART_MODE_COUNT, "MODE_COUNT" },
|
||||
{ UART_MODE_MAX, "MODE_MAX" },
|
||||
{ 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" },
|
||||
{ TMRMODE_COUNT, "COUNT" },
|
||||
{ TMRMODE_MAX, "MAX" },
|
||||
{ 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" },
|
||||
{ LS_FUNC_COUNT, "FUNC_COUNT" },
|
||||
{ LS_FUNC_MAX, "FUNC_MAX" },
|
||||
{ 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_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_COUNT, "TYPE_COUNT" },
|
||||
{ MODULE_TYPE_MAX, "TYPE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX,
|
||||
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_PADDING( 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_PADDING( 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_UNION("fp", 64, union_anonymous_0_elmts, select_custom_fn),
|
||||
YAML_UNSIGNED( "active", 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( "version", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
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_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_UNSIGNED( "telemetryBaudrate", 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_UNSIGNED( "unexpectedShutdown", 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_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "jitterFilter", 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_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_UNSIGNED( "switchUnlockStates", 16 ),
|
||||
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_SIGNED( "uartSampleMode", 2 ),
|
||||
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_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
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( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
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( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
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_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "carryTrim", 6 ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
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_SIGNED( "v1", 10 ),
|
||||
YAML_SIGNED( "v3", 10 ),
|
||||
YAML_SIGNED( "andsw", 9 ),
|
||||
YAML_UNSIGNED( "andswtype", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "v2", 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED( "collectiveSource", 8 ),
|
||||
YAML_UNSIGNED( "aileronSource", 8 ),
|
||||
YAML_UNSIGNED( "elevatorSource", 8 ),
|
||||
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( "source", 7 ),
|
||||
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_SIGNED( "disabled", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "warning", 6 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "critical", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "rfProtocolExtra", 3 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "customProto", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
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_8[] = {
|
||||
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_9[] = {
|
||||
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_10[] = {
|
||||
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_11[] = {
|
||||
YAML_UNSIGNED( "bindPower", 3 ),
|
||||
YAML_UNSIGNED( "runPower", 3 ),
|
||||
YAML_UNSIGNED( "emi", 1 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "failsafeTimeout", 16 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "reserved", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("afhds3", 64, struct_anonymous_11, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 4, enum_ModuleType),
|
||||
YAML_SIGNED( "rfProtocol", 4 ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_UNSIGNED( "failsafeMode", 4 ),
|
||||
YAML_UNSIGNED( "subType", 3 ),
|
||||
YAML_UNSIGNED( "invertedSerial", 1 ),
|
||||
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( "source", 16 ),
|
||||
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_12_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_14[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_13_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_14, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_UNSIGNED( "formula", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_17[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_16, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_17, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_20, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_12_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_13_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
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_15_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "source", 16 ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_unsigned_16, 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_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 union_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_elmts, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 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( "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, NULL),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED( "thrTraceSrc", 8 ),
|
||||
YAML_UNSIGNED_CUST( "switchWarningState", 16, r_swtchWarn, w_swtchWarn ),
|
||||
YAML_UNSIGNED( "switchWarningEnable", 8 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED( "rssiSource", 8 ),
|
||||
YAML_STRUCT("rssiAlarms", 16, struct_RssiAlarmData, NULL),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_UNSIGNED( "potsWarnMode", 2 ),
|
||||
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", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_UNSIGNED( "screensType", 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, union_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 24
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,875 @@
|
||||
// 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" },
|
||||
{ ANTENNA_MODE_FIRST, "MODE_FIRST" },
|
||||
{ ANTENNA_MODE_LAST, "MODE_LAST" },
|
||||
{ 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" },
|
||||
{ BLUETOOTH_MAX, "MAX" },
|
||||
{ 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_FIRST_WITHOUT_ENABLE, "FIRST_WITHOUT_ENABLE" },
|
||||
{ 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" },
|
||||
{ FUNC_MAX, "MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ UART_MODE_COUNT, "MODE_COUNT" },
|
||||
{ UART_MODE_MAX, "MODE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ZoneOptionValueEnum[] = {
|
||||
{ ZOV_Unsigned, "Unsigned" },
|
||||
{ ZOV_Signed, "Signed" },
|
||||
{ ZOV_Bool, "Bool" },
|
||||
{ ZOV_String, "String" },
|
||||
{ 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" },
|
||||
{ TMRMODE_COUNT, "COUNT" },
|
||||
{ TMRMODE_MAX, "MAX" },
|
||||
{ 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_S1, "S1" },
|
||||
{ MIXSRC_6POS, "6POS" },
|
||||
{ MIXSRC_S2, "S2" },
|
||||
{ MIXSRC_EXT1, "EXT1" },
|
||||
{ MIXSRC_EXT2, "EXT2" },
|
||||
{ MIXSRC_LS, "LS" },
|
||||
{ MIXSRC_RS, "RS" },
|
||||
{ MIXSRC_MOUSE1, "MOUSE1" },
|
||||
{ MIXSRC_MOUSE2, "MOUSE2" },
|
||||
{ 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[] = {
|
||||
{ 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" },
|
||||
{ LS_FUNC_COUNT, "FUNC_COUNT" },
|
||||
{ LS_FUNC_MAX, "FUNC_MAX" },
|
||||
{ 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_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" },
|
||||
{ SWSRC_RADIO_ACTIVITY, "RADIO_ACTIVITY" },
|
||||
{ SWSRC_OFF, "OFF" },
|
||||
{ 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_COUNT, "TYPE_COUNT" },
|
||||
{ MODULE_TYPE_MAX, "TYPE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX,
|
||||
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_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
YAML_STRUCT("play", 48, struct_anonymous_1, NULL),
|
||||
YAML_STRUCT("all", 48, struct_anonymous_2, NULL),
|
||||
YAML_STRUCT("clear", 48, 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_UNION("fp", 48, union_anonymous_0_elmts, select_custom_fn),
|
||||
YAML_UNSIGNED( "active", 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 ),
|
||||
YAML_UNSIGNED( "boolValue", 32 ),
|
||||
YAML_STRING("stringValue", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ZoneOptionValueTyped[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 32, enum_ZoneOptionValueEnum),
|
||||
YAML_UNION("value", 64, union_ZoneOptionValue_elmts, select_zov),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_OpenTxTheme__PersistentData[] = {
|
||||
YAML_ARRAY("options", 96, 5, struct_ZoneOptionValueTyped, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 15, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
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_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_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_PADDING( 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_UNSIGNED( "unexpectedShutdown", 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_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "jitterFilter", 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", 72, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ENUM("aux2SerialMode", 4, enum_UartModes),
|
||||
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_STRING("currModelFilename", 17),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "blOffBright", 7 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("themeName", 8),
|
||||
YAML_STRUCT("themeData", 480, struct_OpenTxTheme__PersistentData, NULL),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
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", 15),
|
||||
YAML_ARRAY("modelId", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_STRING("bitmap", 14),
|
||||
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_STRING("name", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
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( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
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( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_SIGNED( "curve", 8 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "scale", 14 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "carryTrim", 6 ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
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_SIGNED( "v1", 10 ),
|
||||
YAML_SIGNED( "v3", 10 ),
|
||||
YAML_SIGNED( "andsw", 9 ),
|
||||
YAML_UNSIGNED( "andswtype", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "v2", 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED( "collectiveSource", 8 ),
|
||||
YAML_UNSIGNED( "aileronSource", 8 ),
|
||||
YAML_UNSIGNED( "elevatorSource", 8 ),
|
||||
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, 6, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 10),
|
||||
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( "source", 7 ),
|
||||
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_SIGNED( "disabled", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "warning", 6 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "critical", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "rfProtocolExtra", 3 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "customProto", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
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_8[] = {
|
||||
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_9[] = {
|
||||
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_10[] = {
|
||||
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_11[] = {
|
||||
YAML_UNSIGNED( "bindPower", 3 ),
|
||||
YAML_UNSIGNED( "runPower", 3 ),
|
||||
YAML_UNSIGNED( "emi", 1 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "failsafeTimeout", 16 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "reserved", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("afhds3", 64, struct_anonymous_11, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 4, enum_ModuleType),
|
||||
YAML_SIGNED( "rfProtocol", 4 ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_UNSIGNED( "failsafeMode", 4 ),
|
||||
YAML_UNSIGNED( "subType", 3 ),
|
||||
YAML_UNSIGNED( "invertedSerial", 1 ),
|
||||
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( "source", 16 ),
|
||||
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 struct_string_32[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 4),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_12_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_14[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_13_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_14, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_UNSIGNED( "formula", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_17[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_16, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_17, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_20, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_12_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_13_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
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_15_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_WidgetPersistentData[] = {
|
||||
YAML_ARRAY("options", 96, 5, struct_ZoneOptionValueTyped, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ZonePersistentData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("widgetName", 10),
|
||||
YAML_STRUCT("widgetData", 480, struct_WidgetPersistentData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LayoutPersistentData[] = {
|
||||
YAML_ARRAY("zones", 576, 10, struct_ZonePersistentData, NULL),
|
||||
YAML_ARRAY("options", 96, 10, struct_ZoneOptionValueTyped, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CustomScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("LayoutId", 10),
|
||||
YAML_STRUCT("layoutData", 6720, struct_LayoutPersistentData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TopBarPersistentData[] = {
|
||||
YAML_ARRAY("zones", 576, 4, struct_ZonePersistentData, NULL),
|
||||
YAML_ARRAY("options", 96, 1, struct_ZoneOptionValueTyped, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("header", 248, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 128, 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( "beepANACenter", 16 ),
|
||||
YAML_ARRAY("mixData", 160, 64, struct_MixData, NULL),
|
||||
YAML_ARRAY("limitData", 104, 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", 72, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, NULL),
|
||||
YAML_ARRAY("flightModeData", 352, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED( "thrTraceSrc", 8 ),
|
||||
YAML_UNSIGNED_CUST( "switchWarningState", 32, r_swtchWarn, w_swtchWarn ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED( "rssiSource", 8 ),
|
||||
YAML_STRUCT("rssiAlarms", 16, struct_RssiAlarmData, NULL),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_UNSIGNED( "potsWarnMode", 2 ),
|
||||
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, 9, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 32, 32, struct_string_32, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 9, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 60, struct_TelemetrySensor, NULL),
|
||||
YAML_ARRAY("screenData", 6800, 5, struct_CustomScreenData, NULL),
|
||||
YAML_STRUCT("topbarData", 2400, struct_TopBarPersistentData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 248, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 128, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 24
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,875 @@
|
||||
// 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" },
|
||||
{ ANTENNA_MODE_FIRST, "MODE_FIRST" },
|
||||
{ ANTENNA_MODE_LAST, "MODE_LAST" },
|
||||
{ 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" },
|
||||
{ BLUETOOTH_MAX, "MAX" },
|
||||
{ 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_FIRST_WITHOUT_ENABLE, "FIRST_WITHOUT_ENABLE" },
|
||||
{ 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" },
|
||||
{ FUNC_MAX, "MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ UART_MODE_COUNT, "MODE_COUNT" },
|
||||
{ UART_MODE_MAX, "MODE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_ZoneOptionValueEnum[] = {
|
||||
{ ZOV_Unsigned, "Unsigned" },
|
||||
{ ZOV_Signed, "Signed" },
|
||||
{ ZOV_Bool, "Bool" },
|
||||
{ ZOV_String, "String" },
|
||||
{ 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" },
|
||||
{ TMRMODE_COUNT, "COUNT" },
|
||||
{ TMRMODE_MAX, "MAX" },
|
||||
{ 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_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_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[] = {
|
||||
{ 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" },
|
||||
{ LS_FUNC_COUNT, "FUNC_COUNT" },
|
||||
{ LS_FUNC_MAX, "FUNC_MAX" },
|
||||
{ 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_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" },
|
||||
{ SWSRC_RADIO_ACTIVITY, "RADIO_ACTIVITY" },
|
||||
{ SWSRC_OFF, "OFF" },
|
||||
{ 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_COUNT, "TYPE_COUNT" },
|
||||
{ MODULE_TYPE_MAX, "TYPE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX,
|
||||
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_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
YAML_STRUCT("play", 48, struct_anonymous_1, NULL),
|
||||
YAML_STRUCT("all", 48, struct_anonymous_2, NULL),
|
||||
YAML_STRUCT("clear", 48, 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_UNION("fp", 48, union_anonymous_0_elmts, select_custom_fn),
|
||||
YAML_UNSIGNED( "active", 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 ),
|
||||
YAML_UNSIGNED( "boolValue", 32 ),
|
||||
YAML_STRING("stringValue", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ZoneOptionValueTyped[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 32, enum_ZoneOptionValueEnum),
|
||||
YAML_UNION("value", 64, union_ZoneOptionValue_elmts, select_zov),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_OpenTxTheme__PersistentData[] = {
|
||||
YAML_ARRAY("options", 96, 5, struct_ZoneOptionValueTyped, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_RadioData[] = {
|
||||
YAML_UNSIGNED( "version", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 15, struct_CalibData, NULL),
|
||||
YAML_PADDING( 16 ),
|
||||
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_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_UNSIGNED( "telemetryBaudrate", 3 ),
|
||||
YAML_PADDING( 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_UNSIGNED( "unexpectedShutdown", 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_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "jitterFilter", 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", 72, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ENUM("aux2SerialMode", 4, enum_UartModes),
|
||||
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_STRING("currModelFilename", 17),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_UNSIGNED( "blOffBright", 7 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("themeName", 8),
|
||||
YAML_STRUCT("themeData", 480, struct_OpenTxTheme__PersistentData, NULL),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
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", 15),
|
||||
YAML_ARRAY("modelId", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_STRING("bitmap", 14),
|
||||
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_STRING("name", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
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( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
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( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_SIGNED( "curve", 8 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "scale", 14 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "carryTrim", 6 ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
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_SIGNED( "v1", 10 ),
|
||||
YAML_SIGNED( "v3", 10 ),
|
||||
YAML_SIGNED( "andsw", 9 ),
|
||||
YAML_UNSIGNED( "andswtype", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "v2", 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED( "collectiveSource", 8 ),
|
||||
YAML_UNSIGNED( "aileronSource", 8 ),
|
||||
YAML_UNSIGNED( "elevatorSource", 8 ),
|
||||
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, 6, struct_trim_t, NULL),
|
||||
YAML_STRING("name", 10),
|
||||
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( "source", 7 ),
|
||||
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_SIGNED( "disabled", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "warning", 6 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "critical", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "rfProtocolExtra", 3 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "customProto", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
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_8[] = {
|
||||
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_9[] = {
|
||||
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_10[] = {
|
||||
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_11[] = {
|
||||
YAML_UNSIGNED( "bindPower", 3 ),
|
||||
YAML_UNSIGNED( "runPower", 3 ),
|
||||
YAML_UNSIGNED( "emi", 1 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "failsafeTimeout", 16 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "reserved", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("afhds3", 64, struct_anonymous_11, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 4, enum_ModuleType),
|
||||
YAML_SIGNED( "rfProtocol", 4 ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_UNSIGNED( "failsafeMode", 4 ),
|
||||
YAML_UNSIGNED( "subType", 3 ),
|
||||
YAML_UNSIGNED( "invertedSerial", 1 ),
|
||||
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( "source", 16 ),
|
||||
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 struct_string_32[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 4),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_12_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_14[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_13_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_14, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_UNSIGNED( "formula", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_17[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_16, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_17, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_20, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_12_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_13_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
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_15_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_WidgetPersistentData[] = {
|
||||
YAML_ARRAY("options", 96, 5, struct_ZoneOptionValueTyped, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ZonePersistentData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("widgetName", 10),
|
||||
YAML_STRUCT("widgetData", 480, struct_WidgetPersistentData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_LayoutPersistentData[] = {
|
||||
YAML_ARRAY("zones", 576, 10, struct_ZonePersistentData, NULL),
|
||||
YAML_ARRAY("options", 96, 10, struct_ZoneOptionValueTyped, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CustomScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("LayoutId", 10),
|
||||
YAML_STRUCT("layoutData", 6720, struct_LayoutPersistentData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TopBarPersistentData[] = {
|
||||
YAML_ARRAY("zones", 576, 4, struct_ZonePersistentData, NULL),
|
||||
YAML_ARRAY("options", 96, 1, struct_ZoneOptionValueTyped, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("header", 248, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 128, 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( "beepANACenter", 16 ),
|
||||
YAML_ARRAY("mixData", 160, 64, struct_MixData, NULL),
|
||||
YAML_ARRAY("limitData", 104, 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", 72, 64, struct_CustomFunctionData, cfn_is_active),
|
||||
YAML_STRUCT("swashR", 64, struct_SwashRingData, NULL),
|
||||
YAML_ARRAY("flightModeData", 352, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED( "thrTraceSrc", 8 ),
|
||||
YAML_UNSIGNED_CUST( "switchWarningState", 32, r_swtchWarn, w_swtchWarn ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED( "rssiSource", 8 ),
|
||||
YAML_STRUCT("rssiAlarms", 16, struct_RssiAlarmData, NULL),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_UNSIGNED( "potsWarnMode", 2 ),
|
||||
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, 9, struct_ScriptData, NULL),
|
||||
YAML_ARRAY("inputNames", 32, 32, struct_string_32, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 9, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 60, struct_TelemetrySensor, NULL),
|
||||
YAML_ARRAY("screenData", 6800, 5, struct_CustomScreenData, NULL),
|
||||
YAML_STRUCT("topbarData", 2400, struct_TopBarPersistentData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 248, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 128, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 24
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,831 @@
|
||||
// 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" },
|
||||
{ ANTENNA_MODE_FIRST, "MODE_FIRST" },
|
||||
{ ANTENNA_MODE_LAST, "MODE_LAST" },
|
||||
{ 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" },
|
||||
{ BLUETOOTH_MAX, "MAX" },
|
||||
{ 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_FIRST_WITHOUT_ENABLE, "FIRST_WITHOUT_ENABLE" },
|
||||
{ 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" },
|
||||
{ FUNC_MAX, "MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ UART_MODE_COUNT, "MODE_COUNT" },
|
||||
{ UART_MODE_MAX, "MODE_MAX" },
|
||||
{ 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" },
|
||||
{ TMRMODE_COUNT, "COUNT" },
|
||||
{ TMRMODE_MAX, "MAX" },
|
||||
{ 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" },
|
||||
{ LS_FUNC_COUNT, "FUNC_COUNT" },
|
||||
{ LS_FUNC_MAX, "FUNC_MAX" },
|
||||
{ 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_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_COUNT, "TYPE_COUNT" },
|
||||
{ MODULE_TYPE_MAX, "TYPE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX,
|
||||
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_PADDING( 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_PADDING( 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_UNION("fp", 64, union_anonymous_0_elmts, select_custom_fn),
|
||||
YAML_UNSIGNED( "active", 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( "version", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
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_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_UNSIGNED( "telemetryBaudrate", 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_UNSIGNED( "unexpectedShutdown", 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_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "jitterFilter", 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_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_UNSIGNED( "switchUnlockStates", 16 ),
|
||||
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_SIGNED( "uartSampleMode", 2 ),
|
||||
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_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
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( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
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( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
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_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "carryTrim", 6 ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
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_SIGNED( "v1", 10 ),
|
||||
YAML_SIGNED( "v3", 10 ),
|
||||
YAML_SIGNED( "andsw", 9 ),
|
||||
YAML_UNSIGNED( "andswtype", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "v2", 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED( "collectiveSource", 8 ),
|
||||
YAML_UNSIGNED( "aileronSource", 8 ),
|
||||
YAML_UNSIGNED( "elevatorSource", 8 ),
|
||||
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( "source", 7 ),
|
||||
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_SIGNED( "disabled", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "warning", 6 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "critical", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "rfProtocolExtra", 3 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "customProto", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
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_8[] = {
|
||||
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_9[] = {
|
||||
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_10[] = {
|
||||
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_11[] = {
|
||||
YAML_UNSIGNED( "bindPower", 3 ),
|
||||
YAML_UNSIGNED( "runPower", 3 ),
|
||||
YAML_UNSIGNED( "emi", 1 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "failsafeTimeout", 16 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "reserved", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("afhds3", 64, struct_anonymous_11, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 4, enum_ModuleType),
|
||||
YAML_SIGNED( "rfProtocol", 4 ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_UNSIGNED( "failsafeMode", 4 ),
|
||||
YAML_UNSIGNED( "subType", 3 ),
|
||||
YAML_UNSIGNED( "invertedSerial", 1 ),
|
||||
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( "source", 16 ),
|
||||
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_12_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_14[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_13_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_14, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_UNSIGNED( "formula", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_17[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_16, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_17, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_20, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_12_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_13_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
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_15_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "source", 16 ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_unsigned_16, 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_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 union_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_elmts, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 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( "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, NULL),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED( "thrTraceSrc", 8 ),
|
||||
YAML_UNSIGNED_CUST( "switchWarningState", 16, r_swtchWarn, w_swtchWarn ),
|
||||
YAML_UNSIGNED( "switchWarningEnable", 8 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED( "rssiSource", 8 ),
|
||||
YAML_STRUCT("rssiAlarms", 16, struct_RssiAlarmData, NULL),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_UNSIGNED( "potsWarnMode", 2 ),
|
||||
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", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_UNSIGNED( "screensType", 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, union_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 24
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,846 @@
|
||||
// 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" },
|
||||
{ ANTENNA_MODE_FIRST, "MODE_FIRST" },
|
||||
{ ANTENNA_MODE_LAST, "MODE_LAST" },
|
||||
{ 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" },
|
||||
{ BLUETOOTH_MAX, "MAX" },
|
||||
{ 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_FIRST_WITHOUT_ENABLE, "FIRST_WITHOUT_ENABLE" },
|
||||
{ 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" },
|
||||
{ FUNC_MAX, "MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ UART_MODE_COUNT, "MODE_COUNT" },
|
||||
{ UART_MODE_MAX, "MODE_MAX" },
|
||||
{ 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" },
|
||||
{ TMRMODE_COUNT, "COUNT" },
|
||||
{ TMRMODE_MAX, "MAX" },
|
||||
{ 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_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_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" },
|
||||
{ LS_FUNC_COUNT, "FUNC_COUNT" },
|
||||
{ LS_FUNC_MAX, "FUNC_MAX" },
|
||||
{ 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_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" },
|
||||
{ SWSRC_RADIO_ACTIVITY, "RADIO_ACTIVITY" },
|
||||
{ SWSRC_OFF, "OFF" },
|
||||
{ 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_COUNT, "TYPE_COUNT" },
|
||||
{ MODULE_TYPE_MAX, "TYPE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX,
|
||||
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", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_2[] = {
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_UNSIGNED( "mode", 8 ),
|
||||
YAML_UNSIGNED( "param", 8 ),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
YAML_STRUCT("play", 64, 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_UNION("fp", 64, union_anonymous_0_elmts, select_custom_fn),
|
||||
YAML_UNSIGNED( "active", 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( "version", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 9, 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_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_UNSIGNED( "telemetryBaudrate", 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_UNSIGNED( "unexpectedShutdown", 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_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "jitterFilter", 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_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_UNSIGNED( "switchUnlockStates", 32 ),
|
||||
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),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
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", 12),
|
||||
YAML_ARRAY("modelId", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_STRING("bitmap", 10),
|
||||
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_STRING("name", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
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( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
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( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_SIGNED( "curve", 8 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "scale", 14 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "carryTrim", 6 ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
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_SIGNED( "v1", 10 ),
|
||||
YAML_SIGNED( "v3", 10 ),
|
||||
YAML_SIGNED( "andsw", 9 ),
|
||||
YAML_UNSIGNED( "andswtype", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "v2", 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED( "collectiveSource", 8 ),
|
||||
YAML_UNSIGNED( "aileronSource", 8 ),
|
||||
YAML_UNSIGNED( "elevatorSource", 8 ),
|
||||
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", 10),
|
||||
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( "source", 7 ),
|
||||
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_SIGNED( "disabled", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "warning", 6 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "critical", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "rfProtocolExtra", 3 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "customProto", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
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_8[] = {
|
||||
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_9[] = {
|
||||
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_10[] = {
|
||||
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_11[] = {
|
||||
YAML_UNSIGNED( "bindPower", 3 ),
|
||||
YAML_UNSIGNED( "runPower", 3 ),
|
||||
YAML_UNSIGNED( "emi", 1 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "failsafeTimeout", 16 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "reserved", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("afhds3", 64, struct_anonymous_11, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 4, enum_ModuleType),
|
||||
YAML_SIGNED( "rfProtocol", 4 ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_UNSIGNED( "failsafeMode", 4 ),
|
||||
YAML_UNSIGNED( "subType", 3 ),
|
||||
YAML_UNSIGNED( "invertedSerial", 1 ),
|
||||
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( "source", 16 ),
|
||||
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 struct_string_32[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 4),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_12_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_14[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_13_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_14, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_UNSIGNED( "formula", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_17[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_16, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_17, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_20, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_12_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_13_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
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_15_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "source", 16 ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 3, struct_unsigned_16, 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_elmts[] = {
|
||||
YAML_ARRAY("bars", 48, 4, struct_FrSkyBarData, NULL),
|
||||
YAML_ARRAY("lines", 48, 4, struct_FrSkyLineData, NULL),
|
||||
YAML_STRUCT("script", 176, struct_TelemetryScriptData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_elmts, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("header", 192, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 128, 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( "beepANACenter", 16 ),
|
||||
YAML_ARRAY("mixData", 160, 64, struct_MixData, NULL),
|
||||
YAML_ARRAY("limitData", 104, 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, NULL),
|
||||
YAML_ARRAY("flightModeData", 320, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED( "thrTraceSrc", 8 ),
|
||||
YAML_UNSIGNED_CUST( "switchWarningState", 32, r_swtchWarn, w_swtchWarn ),
|
||||
YAML_UNSIGNED( "switchWarningEnable", 16 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED( "rssiSource", 8 ),
|
||||
YAML_UNSIGNED( "voltsSource", 8 ),
|
||||
YAML_UNSIGNED( "altitudeSource", 8 ),
|
||||
YAML_STRUCT("rssiAlarms", 16, struct_RssiAlarmData, NULL),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_UNSIGNED( "potsWarnMode", 2 ),
|
||||
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", 32, 32, struct_string_32, NULL),
|
||||
YAML_UNSIGNED( "potsWarnEnabled", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 5, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 60, struct_TelemetrySensor, NULL),
|
||||
YAML_UNSIGNED( "screensType", 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, union_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 192, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 128, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 24
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,886 @@
|
||||
// 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" },
|
||||
{ ANTENNA_MODE_FIRST, "MODE_FIRST" },
|
||||
{ ANTENNA_MODE_LAST, "MODE_LAST" },
|
||||
{ 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" },
|
||||
{ BLUETOOTH_MAX, "MAX" },
|
||||
{ 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_FIRST_WITHOUT_ENABLE, "FIRST_WITHOUT_ENABLE" },
|
||||
{ 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" },
|
||||
{ FUNC_MAX, "MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ UART_MODE_COUNT, "MODE_COUNT" },
|
||||
{ UART_MODE_MAX, "MODE_MAX" },
|
||||
{ 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" },
|
||||
{ TMRMODE_COUNT, "COUNT" },
|
||||
{ TMRMODE_MAX, "MAX" },
|
||||
{ 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_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_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" },
|
||||
{ LS_FUNC_COUNT, "FUNC_COUNT" },
|
||||
{ LS_FUNC_MAX, "FUNC_MAX" },
|
||||
{ 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_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" },
|
||||
{ SWSRC_RADIO_ACTIVITY, "RADIO_ACTIVITY" },
|
||||
{ SWSRC_OFF, "OFF" },
|
||||
{ 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_COUNT, "TYPE_COUNT" },
|
||||
{ MODULE_TYPE_MAX, "TYPE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX,
|
||||
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", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_2[] = {
|
||||
YAML_SIGNED( "val", 16 ),
|
||||
YAML_UNSIGNED( "mode", 8 ),
|
||||
YAML_UNSIGNED( "param", 8 ),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_PADDING( 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_0_elmts[] = {
|
||||
YAML_STRUCT("play", 64, 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_UNION("fp", 64, union_anonymous_0_elmts, select_custom_fn),
|
||||
YAML_UNSIGNED( "active", 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( "version", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_ARRAY("calib", 48, 12, 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_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_UNSIGNED( "telemetryBaudrate", 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_UNSIGNED( "unexpectedShutdown", 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_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "jitterFilter", 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_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_UNSIGNED( "switchUnlockStates", 64 ),
|
||||
YAML_ARRAY("sticksConfig", 0, 4, struct_sticksConfig, stick_name_valid),
|
||||
YAML_ARRAY("switchConfig", 2, 32, struct_switchConfig, nullptr),
|
||||
YAML_PADDING( 432 ),
|
||||
YAML_PADDING( 288 ),
|
||||
YAML_PADDING( 8 ),
|
||||
YAML_STRING("bluetoothName", 10),
|
||||
YAML_STRING("ownerRegistrationID", 8),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
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", 12),
|
||||
YAML_ARRAY("modelId", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_STRING("bitmap", 10),
|
||||
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_STRING("name", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
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( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
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( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
YAML_UNSIGNED( "symetrical", 1 ),
|
||||
YAML_UNSIGNED( "revert", 1 ),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_SIGNED( "curve", 8 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ExpoData[] = {
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "scale", 14 ),
|
||||
YAML_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "carryTrim", 6 ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
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_SIGNED( "v1", 10 ),
|
||||
YAML_SIGNED( "v3", 10 ),
|
||||
YAML_SIGNED( "andsw", 9 ),
|
||||
YAML_UNSIGNED( "andswtype", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "v2", 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED( "collectiveSource", 8 ),
|
||||
YAML_UNSIGNED( "aileronSource", 8 ),
|
||||
YAML_UNSIGNED( "elevatorSource", 8 ),
|
||||
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", 10),
|
||||
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( "source", 7 ),
|
||||
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_SIGNED( "disabled", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "warning", 6 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "critical", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "rfProtocolExtra", 3 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "customProto", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
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_8[] = {
|
||||
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_9[] = {
|
||||
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_10[] = {
|
||||
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_11[] = {
|
||||
YAML_UNSIGNED( "bindPower", 3 ),
|
||||
YAML_UNSIGNED( "runPower", 3 ),
|
||||
YAML_UNSIGNED( "emi", 1 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "failsafeTimeout", 16 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "reserved", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("afhds3", 64, struct_anonymous_11, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 4, enum_ModuleType),
|
||||
YAML_SIGNED( "rfProtocol", 4 ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_UNSIGNED( "failsafeMode", 4 ),
|
||||
YAML_UNSIGNED( "subType", 3 ),
|
||||
YAML_UNSIGNED( "invertedSerial", 1 ),
|
||||
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( "source", 16 ),
|
||||
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 struct_string_32[] = {
|
||||
YAML_IDX,
|
||||
YAML_STRING("val", 4),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_12_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_14[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_13_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_14, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_UNSIGNED( "formula", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_17[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_16, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_17, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_20, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_12_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_13_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
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_15_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "source", 16 ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 3, struct_unsigned_16, 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_elmts[] = {
|
||||
YAML_ARRAY("bars", 48, 4, struct_FrSkyBarData, NULL),
|
||||
YAML_ARRAY("lines", 48, 4, struct_FrSkyLineData, NULL),
|
||||
YAML_STRUCT("script", 176, struct_TelemetryScriptData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_elmts, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("header", 192, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 128, 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( "beepANACenter", 16 ),
|
||||
YAML_ARRAY("mixData", 160, 64, struct_MixData, NULL),
|
||||
YAML_ARRAY("limitData", 104, 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, NULL),
|
||||
YAML_ARRAY("flightModeData", 320, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED( "thrTraceSrc", 8 ),
|
||||
YAML_UNSIGNED_CUST( "switchWarningState", 64, r_swtchWarn, w_swtchWarn ),
|
||||
YAML_UNSIGNED( "switchWarningEnable", 32 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED( "rssiSource", 8 ),
|
||||
YAML_UNSIGNED( "voltsSource", 8 ),
|
||||
YAML_UNSIGNED( "altitudeSource", 8 ),
|
||||
YAML_STRUCT("rssiAlarms", 16, struct_RssiAlarmData, NULL),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_UNSIGNED( "potsWarnMode", 2 ),
|
||||
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", 32, 32, struct_string_32, NULL),
|
||||
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 ),
|
||||
YAML_UNSIGNED( "screensType", 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, union_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 192, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 128, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 24
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,816 @@
|
||||
// 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" },
|
||||
{ ANTENNA_MODE_FIRST, "MODE_FIRST" },
|
||||
{ ANTENNA_MODE_LAST, "MODE_LAST" },
|
||||
{ 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" },
|
||||
{ BLUETOOTH_MAX, "MAX" },
|
||||
{ 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_FIRST_WITHOUT_ENABLE, "FIRST_WITHOUT_ENABLE" },
|
||||
{ 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" },
|
||||
{ FUNC_MAX, "MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ UART_MODE_COUNT, "MODE_COUNT" },
|
||||
{ UART_MODE_MAX, "MODE_MAX" },
|
||||
{ 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" },
|
||||
{ TMRMODE_COUNT, "COUNT" },
|
||||
{ TMRMODE_MAX, "MAX" },
|
||||
{ 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_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" },
|
||||
{ LS_FUNC_COUNT, "FUNC_COUNT" },
|
||||
{ LS_FUNC_MAX, "FUNC_MAX" },
|
||||
{ 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_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_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_COUNT, "TYPE_COUNT" },
|
||||
{ MODULE_TYPE_MAX, "TYPE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX,
|
||||
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_PADDING( 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_PADDING( 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_UNION("fp", 64, union_anonymous_0_elmts, select_custom_fn),
|
||||
YAML_UNSIGNED( "active", 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( "version", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
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_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_UNSIGNED( "telemetryBaudrate", 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_UNSIGNED( "unexpectedShutdown", 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_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "jitterFilter", 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_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_UNSIGNED( "switchUnlockStates", 16 ),
|
||||
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_SIGNED( "uartSampleMode", 2 ),
|
||||
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_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
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( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
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( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
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_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "carryTrim", 6 ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
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_SIGNED( "v1", 10 ),
|
||||
YAML_SIGNED( "v3", 10 ),
|
||||
YAML_SIGNED( "andsw", 9 ),
|
||||
YAML_UNSIGNED( "andswtype", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "v2", 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED( "collectiveSource", 8 ),
|
||||
YAML_UNSIGNED( "aileronSource", 8 ),
|
||||
YAML_UNSIGNED( "elevatorSource", 8 ),
|
||||
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( "source", 7 ),
|
||||
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_SIGNED( "disabled", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "warning", 6 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "critical", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "rfProtocolExtra", 3 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "customProto", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
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_8[] = {
|
||||
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_9[] = {
|
||||
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_10[] = {
|
||||
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_11[] = {
|
||||
YAML_UNSIGNED( "bindPower", 3 ),
|
||||
YAML_UNSIGNED( "runPower", 3 ),
|
||||
YAML_UNSIGNED( "emi", 1 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "failsafeTimeout", 16 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "reserved", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("afhds3", 64, struct_anonymous_11, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 4, enum_ModuleType),
|
||||
YAML_SIGNED( "rfProtocol", 4 ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_UNSIGNED( "failsafeMode", 4 ),
|
||||
YAML_UNSIGNED( "subType", 3 ),
|
||||
YAML_UNSIGNED( "invertedSerial", 1 ),
|
||||
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( "source", 16 ),
|
||||
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_12_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_14[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_13_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_14, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_UNSIGNED( "formula", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_17[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_16, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_17, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_20, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_12_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_13_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
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_15_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "source", 16 ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_unsigned_16, 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_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 union_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_elmts, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 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( "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, NULL),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED( "thrTraceSrc", 8 ),
|
||||
YAML_UNSIGNED_CUST( "switchWarningState", 16, r_swtchWarn, w_swtchWarn ),
|
||||
YAML_UNSIGNED( "switchWarningEnable", 8 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED( "rssiSource", 8 ),
|
||||
YAML_STRUCT("rssiAlarms", 16, struct_RssiAlarmData, NULL),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_UNSIGNED( "potsWarnMode", 2 ),
|
||||
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", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 1, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_UNSIGNED( "screensType", 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, union_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 24
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,826 @@
|
||||
// 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" },
|
||||
{ ANTENNA_MODE_FIRST, "MODE_FIRST" },
|
||||
{ ANTENNA_MODE_LAST, "MODE_LAST" },
|
||||
{ 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" },
|
||||
{ BLUETOOTH_MAX, "MAX" },
|
||||
{ 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_FIRST_WITHOUT_ENABLE, "FIRST_WITHOUT_ENABLE" },
|
||||
{ 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" },
|
||||
{ FUNC_MAX, "MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ UART_MODE_COUNT, "MODE_COUNT" },
|
||||
{ UART_MODE_MAX, "MODE_MAX" },
|
||||
{ 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" },
|
||||
{ TMRMODE_COUNT, "COUNT" },
|
||||
{ TMRMODE_MAX, "MAX" },
|
||||
{ 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" },
|
||||
{ LS_FUNC_COUNT, "FUNC_COUNT" },
|
||||
{ LS_FUNC_MAX, "FUNC_MAX" },
|
||||
{ 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_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_COUNT, "TYPE_COUNT" },
|
||||
{ MODULE_TYPE_MAX, "TYPE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX,
|
||||
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_PADDING( 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_PADDING( 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_UNION("fp", 64, union_anonymous_0_elmts, select_custom_fn),
|
||||
YAML_UNSIGNED( "active", 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( "version", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
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_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_UNSIGNED( "telemetryBaudrate", 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_UNSIGNED( "unexpectedShutdown", 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_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "jitterFilter", 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_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_UNSIGNED( "switchUnlockStates", 16 ),
|
||||
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_SIGNED( "uartSampleMode", 2 ),
|
||||
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_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
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( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
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( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
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_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "carryTrim", 6 ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
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_SIGNED( "v1", 10 ),
|
||||
YAML_SIGNED( "v3", 10 ),
|
||||
YAML_SIGNED( "andsw", 9 ),
|
||||
YAML_UNSIGNED( "andswtype", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "v2", 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED( "collectiveSource", 8 ),
|
||||
YAML_UNSIGNED( "aileronSource", 8 ),
|
||||
YAML_UNSIGNED( "elevatorSource", 8 ),
|
||||
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( "source", 7 ),
|
||||
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_SIGNED( "disabled", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "warning", 6 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "critical", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "rfProtocolExtra", 3 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "customProto", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
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_8[] = {
|
||||
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_9[] = {
|
||||
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_10[] = {
|
||||
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_11[] = {
|
||||
YAML_UNSIGNED( "bindPower", 3 ),
|
||||
YAML_UNSIGNED( "runPower", 3 ),
|
||||
YAML_UNSIGNED( "emi", 1 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "failsafeTimeout", 16 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "reserved", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("afhds3", 64, struct_anonymous_11, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 4, enum_ModuleType),
|
||||
YAML_SIGNED( "rfProtocol", 4 ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_UNSIGNED( "failsafeMode", 4 ),
|
||||
YAML_UNSIGNED( "subType", 3 ),
|
||||
YAML_UNSIGNED( "invertedSerial", 1 ),
|
||||
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( "source", 16 ),
|
||||
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_12_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_14[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_13_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_14, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_UNSIGNED( "formula", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_17[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_16, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_17, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_20, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_12_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_13_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
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_15_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "source", 16 ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_unsigned_16, 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_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 union_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_elmts, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 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( "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, NULL),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED( "thrTraceSrc", 8 ),
|
||||
YAML_UNSIGNED_CUST( "switchWarningState", 16, r_swtchWarn, w_swtchWarn ),
|
||||
YAML_UNSIGNED( "switchWarningEnable", 8 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED( "rssiSource", 8 ),
|
||||
YAML_STRUCT("rssiAlarms", 16, struct_RssiAlarmData, NULL),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_UNSIGNED( "potsWarnMode", 2 ),
|
||||
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", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 1, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_UNSIGNED( "screensType", 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, union_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 24
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,823 @@
|
||||
// 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" },
|
||||
{ ANTENNA_MODE_FIRST, "MODE_FIRST" },
|
||||
{ ANTENNA_MODE_LAST, "MODE_LAST" },
|
||||
{ 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" },
|
||||
{ BLUETOOTH_MAX, "MAX" },
|
||||
{ 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_FIRST_WITHOUT_ENABLE, "FIRST_WITHOUT_ENABLE" },
|
||||
{ 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" },
|
||||
{ FUNC_MAX, "MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ UART_MODE_COUNT, "MODE_COUNT" },
|
||||
{ UART_MODE_MAX, "MODE_MAX" },
|
||||
{ 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" },
|
||||
{ TMRMODE_COUNT, "COUNT" },
|
||||
{ TMRMODE_MAX, "MAX" },
|
||||
{ 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_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" },
|
||||
{ LS_FUNC_COUNT, "FUNC_COUNT" },
|
||||
{ LS_FUNC_MAX, "FUNC_MAX" },
|
||||
{ 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_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_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_COUNT, "TYPE_COUNT" },
|
||||
{ MODULE_TYPE_MAX, "TYPE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX,
|
||||
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_PADDING( 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_PADDING( 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_UNION("fp", 64, union_anonymous_0_elmts, select_custom_fn),
|
||||
YAML_UNSIGNED( "active", 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( "version", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
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_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_UNSIGNED( "telemetryBaudrate", 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_UNSIGNED( "unexpectedShutdown", 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_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "jitterFilter", 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_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_UNSIGNED( "switchUnlockStates", 16 ),
|
||||
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),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
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_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
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( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
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( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
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_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "carryTrim", 6 ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
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_SIGNED( "v1", 10 ),
|
||||
YAML_SIGNED( "v3", 10 ),
|
||||
YAML_SIGNED( "andsw", 9 ),
|
||||
YAML_UNSIGNED( "andswtype", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "v2", 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED( "collectiveSource", 8 ),
|
||||
YAML_UNSIGNED( "aileronSource", 8 ),
|
||||
YAML_UNSIGNED( "elevatorSource", 8 ),
|
||||
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( "source", 7 ),
|
||||
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_SIGNED( "disabled", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "warning", 6 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "critical", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "rfProtocolExtra", 3 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "customProto", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
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_8[] = {
|
||||
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_9[] = {
|
||||
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_10[] = {
|
||||
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_11[] = {
|
||||
YAML_UNSIGNED( "bindPower", 3 ),
|
||||
YAML_UNSIGNED( "runPower", 3 ),
|
||||
YAML_UNSIGNED( "emi", 1 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "failsafeTimeout", 16 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "reserved", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("afhds3", 64, struct_anonymous_11, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 4, enum_ModuleType),
|
||||
YAML_SIGNED( "rfProtocol", 4 ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_UNSIGNED( "failsafeMode", 4 ),
|
||||
YAML_UNSIGNED( "subType", 3 ),
|
||||
YAML_UNSIGNED( "invertedSerial", 1 ),
|
||||
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( "source", 16 ),
|
||||
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_12_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_14[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_13_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_14, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_UNSIGNED( "formula", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_17[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_16, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_17, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_20, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_12_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_13_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
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_15_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "source", 16 ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_unsigned_16, 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_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 union_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_elmts, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 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( "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, NULL),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED( "thrTraceSrc", 8 ),
|
||||
YAML_UNSIGNED_CUST( "switchWarningState", 16, r_swtchWarn, w_swtchWarn ),
|
||||
YAML_UNSIGNED( "switchWarningEnable", 8 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED( "rssiSource", 8 ),
|
||||
YAML_STRUCT("rssiAlarms", 16, struct_RssiAlarmData, NULL),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_UNSIGNED( "potsWarnMode", 2 ),
|
||||
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", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_UNSIGNED( "screensType", 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, union_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 24
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,827 @@
|
||||
// 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" },
|
||||
{ ANTENNA_MODE_FIRST, "MODE_FIRST" },
|
||||
{ ANTENNA_MODE_LAST, "MODE_LAST" },
|
||||
{ 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" },
|
||||
{ BLUETOOTH_MAX, "MAX" },
|
||||
{ 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_FIRST_WITHOUT_ENABLE, "FIRST_WITHOUT_ENABLE" },
|
||||
{ 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" },
|
||||
{ FUNC_MAX, "MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
const struct YamlIdStr enum_UartModes[] = {
|
||||
{ UART_MODE_NONE, "MODE_NONE" },
|
||||
{ UART_MODE_TELEMETRY_MIRROR, "MODE_TELEMETRY_MIRROR" },
|
||||
{ UART_MODE_TELEMETRY, "MODE_TELEMETRY" },
|
||||
{ UART_MODE_SBUS_TRAINER, "MODE_SBUS_TRAINER" },
|
||||
{ UART_MODE_LUA, "MODE_LUA" },
|
||||
{ UART_MODE_COUNT, "MODE_COUNT" },
|
||||
{ UART_MODE_MAX, "MODE_MAX" },
|
||||
{ 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" },
|
||||
{ TMRMODE_COUNT, "COUNT" },
|
||||
{ TMRMODE_MAX, "MAX" },
|
||||
{ 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_GYRO1, "GYRO1" },
|
||||
{ MIXSRC_GYRO2, "GYRO2" },
|
||||
{ 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_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" },
|
||||
{ LS_FUNC_COUNT, "FUNC_COUNT" },
|
||||
{ LS_FUNC_MAX, "FUNC_MAX" },
|
||||
{ 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_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_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_COUNT, "TYPE_COUNT" },
|
||||
{ MODULE_TYPE_MAX, "TYPE_MAX" },
|
||||
{ 0, NULL }
|
||||
};
|
||||
|
||||
//
|
||||
// Structs last
|
||||
//
|
||||
|
||||
static const struct YamlNode struct_CalibData[] = {
|
||||
YAML_IDX,
|
||||
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_PADDING( 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_3[] = {
|
||||
YAML_SIGNED( "val1", 32 ),
|
||||
YAML_PADDING( 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_UNION("fp", 64, union_anonymous_0_elmts, select_custom_fn),
|
||||
YAML_UNSIGNED( "active", 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( "version", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
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_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_UNSIGNED( "telemetryBaudrate", 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_UNSIGNED( "unexpectedShutdown", 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_UNSIGNED( "imperial", 1 ),
|
||||
YAML_UNSIGNED( "jitterFilter", 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_ENUM("auxSerialMode", 4, enum_UartModes),
|
||||
YAML_ARRAY("slidersConfig", 1, 4, struct_sliderConfig, nullptr),
|
||||
YAML_ARRAY("potsConfig", 2, 4, struct_potConfig, nullptr),
|
||||
YAML_UNSIGNED( "backlightColor", 8 ),
|
||||
YAML_UNSIGNED( "switchUnlockStates", 16 ),
|
||||
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),
|
||||
YAML_SIGNED( "gyroMax", 8 ),
|
||||
YAML_SIGNED( "gyroOffset", 8 ),
|
||||
YAML_SIGNED( "uartSampleMode", 2 ),
|
||||
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_STRING("name", 3),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_CurveRef[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_SIGNED( "value", 8 ),
|
||||
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( "offset", 14 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
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( "min", 11 ),
|
||||
YAML_SIGNED( "max", 11 ),
|
||||
YAML_SIGNED( "ppmCenter", 10 ),
|
||||
YAML_SIGNED( "offset", 11 ),
|
||||
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_UNSIGNED_CUST( "srcRaw", 10, r_mixSrcRaw, w_mixSrcRaw ),
|
||||
YAML_SIGNED( "carryTrim", 6 ),
|
||||
YAML_UNSIGNED( "chn", 5 ),
|
||||
YAML_SIGNED_CUST( "swtch", 9, r_swtchSrc, w_swtchSrc ),
|
||||
YAML_UNSIGNED( "flightModes", 9 ),
|
||||
YAML_SIGNED_CUST( "weight", 8, in_read_weight, in_write_weight ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_STRING("name", 6),
|
||||
YAML_SIGNED( "offset", 8 ),
|
||||
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_SIGNED( "v1", 10 ),
|
||||
YAML_SIGNED( "v3", 10 ),
|
||||
YAML_SIGNED( "andsw", 9 ),
|
||||
YAML_UNSIGNED( "andswtype", 1 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "v2", 16 ),
|
||||
YAML_UNSIGNED( "delay", 8 ),
|
||||
YAML_UNSIGNED( "duration", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_SwashRingData[] = {
|
||||
YAML_UNSIGNED( "type", 8 ),
|
||||
YAML_UNSIGNED( "value", 8 ),
|
||||
YAML_UNSIGNED( "collectiveSource", 8 ),
|
||||
YAML_UNSIGNED( "aileronSource", 8 ),
|
||||
YAML_UNSIGNED( "elevatorSource", 8 ),
|
||||
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( "source", 7 ),
|
||||
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_SIGNED( "disabled", 1 ),
|
||||
YAML_PADDING( 1 ),
|
||||
YAML_SIGNED( "warning", 6 ),
|
||||
YAML_PADDING( 2 ),
|
||||
YAML_SIGNED( "critical", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_5[] = {
|
||||
YAML_SIGNED( "delay", 6 ),
|
||||
YAML_UNSIGNED( "pulsePol", 1 ),
|
||||
YAML_UNSIGNED( "outputType", 1 ),
|
||||
YAML_SIGNED( "frameLength", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_6[] = {
|
||||
YAML_UNSIGNED( "rfProtocolExtra", 3 ),
|
||||
YAML_UNSIGNED( "disableTelemetry", 1 ),
|
||||
YAML_UNSIGNED( "disableMapping", 1 ),
|
||||
YAML_UNSIGNED( "customProto", 1 ),
|
||||
YAML_UNSIGNED( "autoBindMode", 1 ),
|
||||
YAML_UNSIGNED( "lowPowerMode", 1 ),
|
||||
YAML_SIGNED( "optionValue", 8 ),
|
||||
YAML_UNSIGNED( "receiverTelemetryOff", 1 ),
|
||||
YAML_UNSIGNED( "receiverHigherChannels", 1 ),
|
||||
YAML_PADDING( 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_7[] = {
|
||||
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_8[] = {
|
||||
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_9[] = {
|
||||
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_10[] = {
|
||||
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_11[] = {
|
||||
YAML_UNSIGNED( "bindPower", 3 ),
|
||||
YAML_UNSIGNED( "runPower", 3 ),
|
||||
YAML_UNSIGNED( "emi", 1 ),
|
||||
YAML_UNSIGNED( "telemetry", 1 ),
|
||||
YAML_UNSIGNED( "failsafeTimeout", 16 ),
|
||||
YAML_ARRAY("rx_freq", 8, 2, struct_unsigned_8, NULL),
|
||||
YAML_UNSIGNED( "mode", 2 ),
|
||||
YAML_UNSIGNED( "reserved", 6 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_4_elmts[] = {
|
||||
YAML_ARRAY("raw", 8, 25, struct_unsigned_8, NULL),
|
||||
YAML_STRUCT("ppm", 16, struct_anonymous_5, NULL),
|
||||
YAML_STRUCT("multi", 24, struct_anonymous_6, NULL),
|
||||
YAML_STRUCT("pxx", 16, struct_anonymous_7, NULL),
|
||||
YAML_STRUCT("sbus", 16, struct_anonymous_8, NULL),
|
||||
YAML_STRUCT("pxx2", 200, struct_anonymous_9, NULL),
|
||||
YAML_STRUCT("flysky", 56, struct_anonymous_10, NULL),
|
||||
YAML_STRUCT("afhds3", 64, struct_anonymous_11, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModuleData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ENUM("type", 4, enum_ModuleType),
|
||||
YAML_SIGNED( "rfProtocol", 4 ),
|
||||
YAML_UNSIGNED( "channelsStart", 8 ),
|
||||
YAML_SIGNED( "channelsCount", 8 ),
|
||||
YAML_UNSIGNED( "failsafeMode", 4 ),
|
||||
YAML_UNSIGNED( "subType", 3 ),
|
||||
YAML_UNSIGNED( "invertedSerial", 1 ),
|
||||
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( "source", 16 ),
|
||||
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_12_elmts[] = {
|
||||
YAML_UNSIGNED( "id", 16 ),
|
||||
YAML_UNSIGNED( "persistentValue", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_14[] = {
|
||||
YAML_UNSIGNED( "physID", 5 ),
|
||||
YAML_UNSIGNED( "rxIndex", 3 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_13_elmts[] = {
|
||||
YAML_STRUCT("frskyInstance", 8, struct_anonymous_14, NULL),
|
||||
YAML_UNSIGNED( "instance", 8 ),
|
||||
YAML_UNSIGNED( "formula", 8 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_16[] = {
|
||||
YAML_UNSIGNED( "ratio", 16 ),
|
||||
YAML_SIGNED( "offset", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_17[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_UNSIGNED( "index", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_18[] = {
|
||||
YAML_ARRAY("sources", 8, 4, struct_signed_8, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_19[] = {
|
||||
YAML_UNSIGNED( "source", 8 ),
|
||||
YAML_PADDING( 24 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_anonymous_20[] = {
|
||||
YAML_UNSIGNED( "gps", 8 ),
|
||||
YAML_UNSIGNED( "alt", 8 ),
|
||||
YAML_PADDING( 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode union_anonymous_15_elmts[] = {
|
||||
YAML_STRUCT("custom", 32, struct_anonymous_16, NULL),
|
||||
YAML_STRUCT("cell", 32, struct_anonymous_17, NULL),
|
||||
YAML_STRUCT("calc", 32, struct_anonymous_18, NULL),
|
||||
YAML_STRUCT("consumption", 32, struct_anonymous_19, NULL),
|
||||
YAML_STRUCT("dist", 32, struct_anonymous_20, NULL),
|
||||
YAML_UNSIGNED( "param", 32 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_TelemetrySensor[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("id1", 16, union_anonymous_12_elmts, select_id1),
|
||||
YAML_UNION("id2", 8, union_anonymous_13_elmts, select_id2),
|
||||
YAML_STRING("label", 4),
|
||||
YAML_UNSIGNED( "subId", 8 ),
|
||||
YAML_UNSIGNED( "type", 1 ),
|
||||
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_15_elmts, select_sensor_cfg),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyBarData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "source", 16 ),
|
||||
YAML_SIGNED( "barMin", 16 ),
|
||||
YAML_SIGNED( "barMax", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_unsigned_16[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNSIGNED( "val", 16 ),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_FrSkyLineData[] = {
|
||||
YAML_IDX,
|
||||
YAML_ARRAY("sources", 16, 2, struct_unsigned_16, 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_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 union_TelemetryScreenData[] = {
|
||||
YAML_IDX,
|
||||
YAML_UNION("u", 192, union_TelemetryScreenData_elmts, NULL),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_ModelData[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 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( "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, NULL),
|
||||
YAML_ARRAY("flightModeData", 288, 9, struct_FlightModeData, fmd_is_active),
|
||||
YAML_UNSIGNED( "thrTraceSrc", 8 ),
|
||||
YAML_UNSIGNED_CUST( "switchWarningState", 16, r_swtchWarn, w_swtchWarn ),
|
||||
YAML_UNSIGNED( "switchWarningEnable", 8 ),
|
||||
YAML_ARRAY("gvars", 56, 9, struct_GVarData, NULL),
|
||||
YAML_STRUCT("varioData", 40, struct_VarioData, NULL),
|
||||
YAML_UNSIGNED( "rssiSource", 8 ),
|
||||
YAML_STRUCT("rssiAlarms", 16, struct_RssiAlarmData, NULL),
|
||||
YAML_PADDING( 3 ),
|
||||
YAML_UNSIGNED( "thrTrimSw", 3 ),
|
||||
YAML_UNSIGNED( "potsWarnMode", 2 ),
|
||||
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", 8 ),
|
||||
YAML_ARRAY("potsWarnPosition", 8, 2, struct_signed_8, NULL),
|
||||
YAML_ARRAY("telemetrySensors", 112, 40, struct_TelemetrySensor, NULL),
|
||||
YAML_UNSIGNED( "screensType", 8 ),
|
||||
YAML_ARRAY("screens", 192, 4, union_TelemetryScreenData, NULL),
|
||||
YAML_UNSIGNED( "view", 8 ),
|
||||
YAML_STRING("modelRegistrationID", 8),
|
||||
YAML_END
|
||||
};
|
||||
static const struct YamlNode struct_PartialModel[] = {
|
||||
YAML_STRUCT("header", 96, struct_ModelHeader, NULL),
|
||||
YAML_ARRAY("timers", 88, 3, struct_TimerData, NULL),
|
||||
YAML_END
|
||||
};
|
||||
|
||||
#define MAX_RADIODATA_MODELDATA_PARTIALMODEL_STR_LEN 24
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,66 @@
|
||||
/*
|
||||
* Copyright (C) EdgeTX
|
||||
*
|
||||
* Based on code named
|
||||
* opentx - https://github.com/opentx/opentx
|
||||
* th9x - http://code.google.com/p/th9x
|
||||
* er9x - http://code.google.com/p/er9x
|
||||
* gruvin9x - http://code.google.com/p/gruvin9x
|
||||
*
|
||||
* License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#define LEN_ZONE_OPTION_STRING 8
|
||||
|
||||
union ZoneOptionValue
|
||||
{
|
||||
uint32_t unsignedValue;
|
||||
int32_t signedValue;
|
||||
uint32_t boolValue;
|
||||
char stringValue[LEN_ZONE_OPTION_STRING];
|
||||
};
|
||||
|
||||
enum ZoneOptionValueEnum {
|
||||
ZOV_Unsigned=0,
|
||||
ZOV_Signed,
|
||||
ZOV_Bool,
|
||||
ZOV_String
|
||||
};
|
||||
|
||||
struct ZoneOption
|
||||
{
|
||||
enum Type {
|
||||
Integer,
|
||||
Source,
|
||||
Bool,
|
||||
String,
|
||||
File,
|
||||
TextSize,
|
||||
Timer,
|
||||
Switch,
|
||||
Color
|
||||
};
|
||||
|
||||
const char * name;
|
||||
Type type;
|
||||
ZoneOptionValue deflt;
|
||||
ZoneOptionValue min;
|
||||
ZoneOptionValue max;
|
||||
};
|
||||
|
||||
struct ZoneOptionValueTyped
|
||||
{
|
||||
ZoneOptionValueEnum type;
|
||||
ZoneOptionValue value FUNC(select_zov);
|
||||
};
|
||||
Reference in New Issue
Block a user