Various fixes around Companion trainer mode (#7116)
[opentx.git] / radio / src / storage / conversions / datastructs_218.h
blob578e7c1bf432bfc76d8feada3bf9317c143fe0f8
1 /*
2 * Copyright (C) OpenTX
4 * Based on code named
5 * th9x - http://code.google.com/p/th9x
6 * er9x - http://code.google.com/p/er9x
7 * gruvin9x - http://code.google.com/p/gruvin9x
9 * License GPLv2: http://www.gnu.org/licenses/gpl-2.0.html
11 * This program is free software; you can redistribute it and/or modify
12 * it under the terms of the GNU General Public License version 2 as
13 * published by the Free Software Foundation.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
21 #ifndef OPENTX_DATASTRUCTS_218_H
22 #define OPENTX_DATASTRUCTS_218_H
24 #define MAX_TIMERS_218 3
25 #define MAX_GVARS_218 9
27 #if defined(PCBHORUS)
28 #define NUM_SWITCHES_218 8
29 #elif defined(PCBXLITE)
30 #define NUM_SWITCHES_218 4
31 #elif defined(PCBX7)
32 #define NUM_SWITCHES_218 6
33 #elif defined(PCBX9E)
34 #define NUM_SWITCHES_218 18 // yes, it's a lot!
35 #else
36 #define NUM_SWITCHES_218 8
37 #endif
39 #if defined(PCBHORUS)
40 #define LEN_SWITCH_NAME_218 3
41 #define LEN_ANA_NAME_218 3
42 #define LEN_MODEL_FILENAME_218 16
43 #define LEN_BLUETOOTH_NAME_218 10
44 #else
45 #define LEN_SWITCH_NAME_218 3
46 #define LEN_ANA_NAME_218 3
47 #define LEN_BLUETOOTH_NAME_218 10
48 #endif
50 #define LEN_GVAR_NAME_218 3
52 #if defined(PCBHORUS)
53 #define LEN_MODEL_NAME_218 15
54 #define LEN_TIMER_NAME_218 8
55 #define LEN_FLIGHT_MODE_NAME_218 10
56 #define LEN_BITMAP_NAME_218 10
57 #define LEN_EXPOMIX_NAME_218 6
58 #define LEN_CHANNEL_NAME_218 6
59 #define LEN_INPUT_NAME_218 4
60 #define LEN_CURVE_NAME_218 3
61 #define LEN_FUNCTION_NAME_218 6
62 #define MAX_CURVES_218 32
63 #define MAX_CURVE_POINTS_218 512
64 #elif LCD_W == 212
65 #define LEN_MODEL_NAME_218 12
66 #define LEN_TIMER_NAME_218 8
67 #define LEN_FLIGHT_MODE_NAME_218 10
68 #define LEN_BITMAP_NAME_218 10
69 #define LEN_EXPOMIX_NAME_218 8
70 #define LEN_CHANNEL_NAME_218 6
71 #define LEN_INPUT_NAME_218 4
72 #define LEN_CURVE_NAME_218 3
73 #define LEN_FUNCTION_NAME_218 8
74 #define MAX_CURVES_218 32
75 #define MAX_CURVE_POINTS_218 512
76 #else
77 #define LEN_MODEL_NAME_218 10
78 #define LEN_TIMER_NAME_218 3
79 #define LEN_FLIGHT_MODE_NAME_218 6
80 #define LEN_EXPOMIX_NAME_218 6
81 #define LEN_CHANNEL_NAME_218 4
82 #define LEN_INPUT_NAME_218 3
83 #define LEN_CURVE_NAME_218 3
84 #define LEN_FUNCTION_NAME_218 6
85 #define MAX_CURVES_218 16
86 #define MAX_CURVE_POINTS_218 512
87 #endif
89 #if defined(PCBHORUS)
90 #define MAX_MODELS_218 60
91 #define MAX_OUTPUT_CHANNELS_218 32 // number of real output channels CH1-CH32
92 #define MAX_FLIGHT_MODES_218 9
93 #define MAX_MIXERS_218 64
94 #define MAX_EXPOS_218 64
95 #define MAX_LOGICAL_SWITCHES_218 64
96 #define MAX_SPECIAL_FUNCTIONS_218 64 // number of functions assigned to switches
97 #define MAX_SCRIPTS_218 9
98 #define MAX_INPUTS_218 32
99 #define MAX_TRAINER_CHANNELS_218 16
100 #define MAX_TELEMETRY_SENSORS_218 32
101 #define MAX_CUSTOM_SCREENS_218 5
102 #elif defined(PCBTARANIS)
103 #define MAX_MODELS_218 60
104 #define MAX_OUTPUT_CHANNELS_218 32 // number of real output channels CH1-CH32
105 #define MAX_FLIGHT_MODES_218 9
106 #define MAX_MIXERS_218 64
107 #define MAX_EXPOS_218 64
108 #define MAX_LOGICAL_SWITCHES_218 64
109 #define MAX_SPECIAL_FUNCTIONS_218 64 // number of functions assigned to switches
110 #define MAX_SCRIPTS_218 7
111 #define MAX_INPUTS_218 32
112 #define MAX_TRAINER_CHANNELS_218 16
113 #define MAX_TELEMETRY_SENSORS_218 32
114 #elif defined(PCBSKY9X)
115 #define MAX_MODELS_218 60
116 #define MAX_OUTPUT_CHANNELS_218 32 // number of real output channels CH1-CH32
117 #define MAX_FLIGHT_MODES_218 9
118 #define MAX_MIXERS_218 64
119 #define MAX_EXPOS_218 32
120 #define MAX_LOGICAL_SWITCHES_218 64
121 #define MAX_SPECIAL_FUNCTIONS_218 64 // number of functions assigned to switches
122 #define MAX_INPUTS_218 32
123 #define MAX_TRAINER_CHANNELS_218 16
124 #define MAX_TELEMETRY_SENSORS_218 32
125 #endif
127 #if defined(COLORLCD)
128 typedef uint32_t swarnstate218_t;
129 #elif defined(PCBX9E)
130 typedef uint64_t swconfig218_t;
131 typedef uint64_t swarnstate218_t;
132 typedef uint32_t swarnenable218_t;
133 #elif defined(PCBTARANIS)
134 typedef uint16_t swconfig218_t;
135 typedef uint16_t swarnstate218_t;
136 typedef uint8_t swarnenable218_t;
137 #else
138 typedef uint8_t swarnstate218_t;
139 typedef uint8_t swarnenable218_t;
140 #endif
142 PACK(typedef struct {
143 uint8_t type:4;
144 int8_t rfProtocol:4;
145 uint8_t channelsStart;
146 int8_t channelsCount; // 0=8 channels
147 uint8_t failsafeMode:4; // only 3 bits used
148 uint8_t subType:3;
149 uint8_t invertedSerial:1; // telemetry serial inverted from standard
150 int16_t failsafeChannels[MAX_OUTPUT_CHANNELS_218];
151 union {
152 struct {
153 int8_t delay:6;
154 uint8_t pulsePol:1;
155 uint8_t outputType:1; // false = open drain, true = push pull
156 int8_t frameLength;
157 } ppm;
158 struct {
159 uint8_t rfProtocolExtra:2;
160 uint8_t spare1:3;
161 uint8_t customProto:1;
162 uint8_t autoBindMode:1;
163 uint8_t lowPowerMode:1;
164 int8_t optionValue;
165 } multi;
166 struct {
167 uint8_t power:2; // 0=10 mW, 1=100 mW, 2=500 mW, 3=1W
168 uint8_t spare1:2;
169 uint8_t receiverTelemetryOff:1; // false = receiver telem enabled
170 uint8_t receiverHigherChannels:1; // false = pwm out 1-8, true 9-16
171 uint8_t external_antenna:1; // false = internal antenna, true = external antenna
172 uint8_t fast:1;
173 uint8_t spare2;
174 } pxx;
175 struct {
176 uint8_t spare1:6;
177 uint8_t noninverted:1;
178 uint8_t spare2:1;
179 int8_t refreshRate; // definition as framelength for ppm (* 5 + 225 = time in 1/10 ms)
180 } sbus;
182 }) ModuleData_v218;
184 PACK(typedef struct {
185 int32_t mode:9; // timer trigger source -> off, abs, stk, stk%, sw/!sw, !m_sw/!m_sw
186 uint32_t start:23;
187 int32_t value:24;
188 uint32_t countdownBeep:2;
189 uint32_t minuteBeep:1;
190 uint32_t persistent:2;
191 int32_t countdownStart:2;
192 uint32_t direction:1;
193 char name[LEN_TIMER_NAME_218];
194 }) TimerData_v218;
196 #if defined(PCBSKY9X)
197 #define ROTENC_DATA int16_t rotaryEncoders[1];
198 #else
199 #define ROTENC_DATA
200 #endif
202 PACK(typedef struct {
203 trim_t trim[NUM_TRIMS];
204 char name[LEN_FLIGHT_MODE_NAME_218];
205 int16_t swtch:9; // swtch of phase[0] is not used
206 int16_t spare:7;
207 uint8_t fadeIn;
208 uint8_t fadeOut;
209 ROTENC_DATA
210 gvar_t gvars[MAX_GVARS_218];
211 }) FlightModeData_v218;
213 PACK(typedef struct {
214 int16_t weight:11; // GV1=-1024, -GV1=1023
215 uint16_t destCh:5;
216 uint16_t srcRaw:10; // srcRaw=0 means not used
217 uint16_t carryTrim:1;
218 uint16_t mixWarn:2; // mixer warning
219 uint16_t mltpx:2; // multiplex method: 0 means +=, 1 means *=, 2 means :=
220 uint16_t spare:1;
221 int32_t offset:14;
222 int32_t swtch:9;
223 uint32_t flightModes:9;
224 CurveRef curve;
225 uint8_t delayUp;
226 uint8_t delayDown;
227 uint8_t speedUp;
228 uint8_t speedDown;
229 char name[LEN_EXPOMIX_NAME_218];
230 }) MixData_v218;
232 PACK(typedef struct {
233 uint16_t mode:2;
234 uint16_t scale:14;
235 uint16_t srcRaw:10;
236 int16_t carryTrim:6;
237 uint32_t chn:5;
238 int32_t swtch:9;
239 uint32_t flightModes:9;
240 int32_t weight:8;
241 int32_t spare:1;
242 char name[LEN_EXPOMIX_NAME_218];
243 int8_t offset;
244 CurveRef curve;
245 }) ExpoData_v218;
247 PACK(typedef struct {
248 uint8_t type:1;
249 uint8_t smooth:1;
250 int8_t points:6; // describes number of points - 5
251 char name[LEN_CURVE_NAME_218];
252 }) CurveData_v218;
254 PACK(typedef struct {
255 int16_t calib[4];
256 TrainerMix mix[4];
257 }) TrainerData_v218;
259 PACK(typedef struct { // Logical Switches data
260 uint8_t func;
261 int32_t v1:10;
262 int32_t v3:10;
263 int32_t andsw:9;
264 uint32_t andswtype:1;
265 uint32_t spare:2;
266 int16_t v2;
267 uint8_t delay;
268 uint8_t duration;
269 }) LogicalSwitchData_v218;
271 #if defined(PCBTARANIS)
272 #define CFN_SPARE_TYPE int32_t
273 #else
274 #define CFN_SPARE_TYPE int16_t
275 #endif
277 PACK(typedef struct {
278 int16_t swtch:9;
279 uint16_t func:7;
280 PACK(union {
281 PACK(struct {
282 char name[LEN_FUNCTION_NAME_218];
283 }) play;
285 PACK(struct {
286 int16_t val;
287 uint8_t mode;
288 uint8_t param;
289 CFN_SPARE_TYPE spare2;
290 }) all;
292 PACK(struct {
293 int32_t val1;
294 CFN_SPARE_TYPE val2;
295 }) clear;
297 uint8_t active;
298 }) CustomFunctionData_v218;
300 PACK(struct GVarData_v218 {
301 char name[LEN_GVAR_NAME_218];
302 uint32_t min:12;
303 uint32_t max:12;
304 uint32_t popup:1;
305 uint32_t prec:1;
306 uint32_t unit:2;
307 uint32_t spare:4;
310 #if defined(COLORLCD)
311 PACK(struct FrSkyTelemetryData_v217 {
312 uint8_t varioSource:7;
313 uint8_t varioCenterSilent:1;
314 int8_t varioCenterMax;
315 int8_t varioCenterMin;
316 int8_t varioMin;
317 int8_t varioMax;
319 #else
320 union FrSkyScreenData {
321 FrSkyBarData bars[4];
322 FrSkyLineData lines[4];
323 #if defined(PCBTARANIS)
324 TelemetryScriptData script;
325 #endif
327 PACK(struct FrSkyTelemetryData_v217 {
328 uint8_t voltsSource;
329 uint8_t altitudeSource;
330 uint8_t screensType; // 2bits per screen (None/Gauges/Numbers/Script)
331 FrSkyScreenData screens[MAX_TELEMETRY_SCREENS];
332 uint8_t varioSource:7;
333 uint8_t varioCenterSilent:1;
334 int8_t varioCenterMax;
335 int8_t varioCenterMin;
336 int8_t varioMin;
337 int8_t varioMax;
339 #endif
341 #if defined(PCBHORUS)
342 #define MODELDATA_EXTRA_218 uint8_t spare:3; uint8_t trainerMode:3; uint8_t potsWarnMode:2; ModuleData_v218 moduleData[NUM_MODULES+1]; ScriptData scriptsData[MAX_SCRIPTS_218]; char inputNames[MAX_INPUTS_218][LEN_INPUT_NAME_218]; uint8_t potsWarnEnabled; int8_t potsWarnPosition[3 + 4];
343 #elif defined(PCBTARANIS)
344 #define MODELDATA_EXTRA_218 uint8_t spare:3; uint8_t trainerMode:3; uint8_t potsWarnMode:2; ModuleData_v218 moduleData[NUM_MODULES+1]; ScriptData scriptsData[MAX_SCRIPTS_218]; char inputNames[MAX_INPUTS_218][LEN_INPUT_NAME_218]; uint8_t potsWarnEnabled; int8_t potsWarnPosition[STORAGE_NUM_POTS + STORAGE_NUM_SLIDERS];
345 #elif defined(PCBSKY9X)
346 #define MODELDATA_EXTRA_218 uint8_t spare:6; uint8_t potsWarnMode:2; ModuleData_v218 moduleData[NUM_MODULES+1]; char inputNames[MAX_INPUTS_218][LEN_INPUT_NAME_218]; uint8_t potsWarnEnabled; int8_t potsWarnPosition[STORAGE_NUM_POTS + STORAGE_NUM_SLIDERS]; uint8_t rxBattAlarms[2];
347 #endif
349 PACK(struct TelemetrySensor_218 {
350 union {
351 uint16_t id; // data identifier, for FrSky we can reuse existing ones. Source unit is derived from type.
352 uint16_t persistentValue;
354 union {
355 PACK(struct {
356 uint8_t physID:5;
357 uint8_t rxIndex:3; // 1 bit for module index, 2 bits for receiver index
358 }) frskyInstance;
359 uint8_t instance;
360 uint8_t formula;
362 char label[TELEM_LABEL_LEN]; // user defined label
363 uint8_t type:1; // 0=custom / 1=calculated
364 uint8_t unit:5; // user can choose what unit to display each value in
365 uint8_t prec:2;
366 uint8_t autoOffset:1;
367 uint8_t filter:1;
368 uint8_t logs:1;
369 uint8_t persistent:1;
370 uint8_t onlyPositive:1;
371 uint8_t subId:3;
372 union {
373 PACK(struct {
374 uint16_t ratio;
375 int16_t offset;
376 }) custom;
377 PACK(struct {
378 uint8_t source;
379 uint8_t index;
380 uint16_t spare;
381 }) cell;
382 PACK(struct {
383 int8_t sources[4];
384 }) calc;
385 PACK(struct {
386 uint8_t source;
387 uint8_t spare[3];
388 }) consumption;
389 PACK(struct {
390 uint8_t gps;
391 uint8_t alt;
392 uint16_t spare;
393 }) dist;
394 uint32_t param;
398 #if defined(PCBHORUS)
399 PACK(struct CustomScreenData_v218 {
400 char layoutName[10];
401 Layout::PersistentData layoutData;
403 #define VIEW_DATA \
404 CustomScreenData screenData[MAX_CUSTOM_SCREENS]; \
405 Topbar::PersistentData topbarData; \
406 uint8_t view;
407 #elif defined(PCBTARANIS)
408 #define VIEW_DATA uint8_t view;
409 #else
410 #define VIEW_DATA
411 #endif
413 #if LEN_BITMAP_NAME > 0
414 #define MODEL_HEADER_BITMAP_FIELD_218 char bitmap[10];
415 #else
416 #define MODEL_HEADER_BITMAP_FIELD_218
417 #endif
419 PACK(struct ModelHeader_v218 {
420 char name[LEN_MODEL_NAME]; // must be first for eeLoadModelName
421 uint8_t modelId[NUM_MODULES];
422 MODEL_HEADER_BITMAP_FIELD_218
425 #if defined(COLORLCD)
426 #define SWITCH_WARNING_DATA_218
427 #else
428 #define SWITCH_WARNING_DATA_218 swarnenable218_t switchWarningEnable;
429 #endif
431 PACK(struct ModelData_v218 {
432 ModelHeader_v218 header;
433 TimerData_v218 timers[MAX_TIMERS_218];
434 uint8_t telemetryProtocol:3;
435 uint8_t thrTrim:1; // Enable Throttle Trim
436 uint8_t noGlobalFunctions:1;
437 uint8_t displayTrims:2;
438 uint8_t ignoreSensorIds:1;
439 int8_t trimInc:3; // Trim Increments
440 uint8_t disableThrottleWarning:1;
441 uint8_t displayChecklist:1;
442 uint8_t extendedLimits:1;
443 uint8_t extendedTrims:1;
444 uint8_t throttleReversed:1;
445 BeepANACenter beepANACenter;
446 MixData_v218 mixData[MAX_MIXERS_218];
447 LimitData limitData[MAX_OUTPUT_CHANNELS_218];
448 ExpoData_v218 expoData[MAX_EXPOS_218];
450 CurveData_v218 curves[MAX_CURVES_218];
451 int8_t points[MAX_CURVE_POINTS_218];
453 LogicalSwitchData_v218 logicalSw[MAX_LOGICAL_SWITCHES_218];
454 CustomFunctionData_v218 customFn[MAX_SPECIAL_FUNCTIONS_218];
455 SwashRingData swashR;
456 FlightModeData_v218 flightModeData[MAX_FLIGHT_MODES_218];
458 uint8_t thrTraceSrc;
460 swarnstate218_t switchWarningState;
462 SWITCH_WARNING_DATA_218
464 GVarData_v218 gvars[MAX_GVARS_218];
466 FrSkyTelemetryData_v217 frsky;
467 RssiAlarmData rssiAlarms;
469 MODELDATA_EXTRA_218
471 TelemetrySensor_218 telemetrySensors[MAX_TELEMETRY_SENSORS_218];
473 TARANIS_PCBX9E_FIELD(uint8_t toplcdTimer)
475 // TODO conversion for custom screens?
476 VIEW_DATA
479 #if defined(PCBHORUS)
480 #define EXTRA_GENERAL_FIELDS_218 \
481 uint8_t auxSerialMode:4; \
482 uint8_t slidersConfig:4; \
483 uint32_t switchConfig; \
484 uint8_t potsConfig; /* two bits per pot */ \
485 char switchNames[NUM_SWITCHES_218][LEN_SWITCH_NAME_218]; \
486 char anaNames[NUM_STICKS+3+4][LEN_ANA_NAME_218]; \
487 char currModelFilename[LEN_MODEL_FILENAME_218+1]; \
488 uint8_t spare:1; \
489 uint8_t blOffBright:7; \
490 char bluetoothName[LEN_BLUETOOTH_NAME_218];
491 #elif defined(PCBTARANIS)
492 #if defined(STORAGE_BLUETOOTH) && !defined(PCBX9D) && !defined(PCBX9DP)
493 #define BLUETOOTH_FIELDS_218 \
494 uint8_t spare; \
495 char bluetoothName[LEN_BLUETOOTH_NAME_218];
496 #else
497 #define BLUETOOTH_FIELDS_218
498 #endif
499 #define EXTRA_GENERAL_FIELDS_218 \
500 uint8_t auxSerialMode:4; \
501 uint8_t slidersConfig:4; \
502 uint8_t potsConfig; /* two bits per pot */\
503 uint8_t backlightColor; \
504 swarnstate218_t switchUnlockStates; \
505 swconfig218_t switchConfig; \
506 char switchNames[NUM_SWITCHES_218][LEN_SWITCH_NAME_218]; \
507 char anaNames[NUM_STICKS+STORAGE_NUM_POTS+STORAGE_NUM_SLIDERS][LEN_ANA_NAME_218]; \
508 BLUETOOTH_FIELDS_218
509 #elif defined(PCBSKY9X)
510 #define EXTRA_GENERAL_FIELDS_218 \
511 int8_t txCurrentCalibration; \
512 int8_t temperatureWarn; \
513 uint8_t mAhWarn; \
514 uint16_t mAhUsed; \
515 int8_t temperatureCalib; \
516 uint8_t optrexDisplay; \
517 uint8_t sticksGain; \
518 uint8_t rotarySteps; \
519 char switchNames[NUM_SWITCHES_218][LEN_SWITCH_NAME_218]; \
520 char anaNames[NUM_STICKS+STORAGE_NUM_POTS+STORAGE_NUM_SLIDERS][LEN_ANA_NAME_218];
521 #else
522 #define EXTRA_GENERAL_FIELDS_218 EXTRA_GENERAL_FIELDS_GENERAL_218
523 #endif
525 #if defined(COLORLCD)
526 #include "gui/480x272/theme.h"
527 #define THEME_NAME_LEN 8
528 #define THEME_DATA \
529 char themeName[THEME_NAME_LEN]; \
530 Theme::PersistentData themeData;
531 #else
532 #define THEME_DATA
533 #endif
535 #if defined(PCBHORUS)
536 #define NUM_CALIBRATION_INPUTS 13
537 #else
538 #define NUM_CALIBRATION_INPUTS (NUM_STICKS+STORAGE_NUM_POTS+STORAGE_NUM_SLIDERS)
539 #endif
541 PACK(struct RadioData_v218 {
542 uint8_t version;
543 uint16_t variant;
544 CalibData calib[NUM_CALIBRATION_INPUTS];
545 uint16_t chkSum;
546 N_HORUS_FIELD(int8_t currModel);
547 N_HORUS_FIELD(uint8_t contrast);
548 uint8_t vBatWarn;
549 int8_t txVoltageCalibration;
550 int8_t backlightMode;
551 TrainerData_v218 trainer;
552 uint8_t view; // index of view in main screen
553 int8_t buzzerMode:2;
554 uint8_t fai:1;
555 int8_t beepMode:2; // -2=quiet, -1=only alarms, 0=no keys, 1=all
556 uint8_t alarmsFlash:1;
557 uint8_t disableMemoryWarning:1;
558 uint8_t disableAlarmWarning:1;
559 uint8_t stickMode:2;
560 int8_t timezone:5;
561 uint8_t adjustRTC:1;
562 uint8_t inactivityTimer;
563 uint8_t telemetryBaudrate:3;
564 int8_t splashMode:3;
565 int8_t hapticMode:2;
566 int8_t switchesDelay;
567 uint8_t lightAutoOff;
568 uint8_t templateSetup; // RETA order for receiver channels
569 int8_t PPM_Multiplier;
570 int8_t hapticLength;
571 N_HORUS_FIELD(N_TARANIS_FIELD(uint8_t reNavigation));
572 N_HORUS_FIELD(N_TARANIS_FIELD(uint8_t stickReverse));
573 int8_t beepLength:3;
574 int8_t hapticStrength:3;
575 uint8_t gpsFormat:1;
576 uint8_t unexpectedShutdown:1;
577 uint8_t speakerPitch;
578 int8_t speakerVolume;
579 int8_t vBatMin;
580 int8_t vBatMax;
582 uint8_t backlightBright;
583 uint32_t globalTimer;
584 uint8_t bluetoothBaudrate:4;
585 uint8_t bluetoothMode:4;
586 uint8_t countryCode;
587 uint8_t imperial:1;
588 uint8_t jitterFilter:1; /* 0 - active */
589 uint8_t disableRssiPoweroffAlarm:1;
590 uint8_t USBMode:2;
591 uint8_t spareExtraArm:3;
592 char ttsLanguage[2];
593 int8_t beepVolume:4;
594 int8_t wavVolume:4;
595 int8_t varioVolume:4;
596 int8_t backgroundVolume:4;
597 int8_t varioPitch;
598 int8_t varioRange;
599 int8_t varioRepeat;
600 CustomFunctionData_v218 customFn[MAX_SPECIAL_FUNCTIONS_218];
602 EXTRA_GENERAL_FIELDS_218
604 THEME_DATA
607 #include "chksize.h"
609 #define CHKSIZE(x, y) check_size<struct x, y>()
611 static inline void check_struct_218()
613 #if defined(PCBHORUS)
614 CHKSIZE(ModelData_v218, 9380);
615 #elif defined(PCBX9E)
616 CHKSIZE(ModelData_v218, 6520);
617 #elif defined(PCBX9D)
618 CHKSIZE(RadioData_v218, 872);
619 #endif
623 #undef CHKSIZE
625 #endif //OPENTX_DATASTRUCTS_218_H