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 _DATACONSTANTS_H_
22 #define _DATACONSTANTS_H_
27 #define LUA_EXPORT(...) LEXP(__VA_ARGS__)
28 #define LUA_EXPORT_MULTIPLE(...) LEXP_MULTIPLE(__VA_ARGS__)
29 #define LUA_EXPORT_EXTRA(...) LEXP_EXTRA(__VA_ARGS__)
31 #define LUA_EXPORT(...)
32 #define LUA_EXPORT_MULTIPLE(...)
33 #define LUA_EXPORT_EXTRA(...)
38 #define MAX_OUTPUT_CHANNELS 32 // number of real output channels CH1-CH32
39 #define MAX_FLIGHT_MODES 9
42 #define MAX_LOGICAL_SWITCHES 64
43 #define MAX_SPECIAL_FUNCTIONS 64 // number of functions assigned to switches
46 #define MAX_TRAINER_CHANNELS 16
47 #define MAX_TELEMETRY_SENSORS 32
48 #define MAX_CUSTOM_SCREENS 5
49 #elif defined(PCBFLAMENCO)
51 #define MAX_OUTPUT_CHANNELS 32 // number of real output channels CH1-CH32
52 #define MAX_FLIGHT_MODES 9
55 #define MAX_LOGICAL_SWITCHES 32
56 #define MAX_SPECIAL_FUNCTIONS 64 // number of functions assigned to switches
59 #define MAX_TRAINER_CHANNELS 16
60 #define MAX_TELEMETRY_SENSORS 32
61 #elif defined(PCBTARANIS)
63 #define MAX_OUTPUT_CHANNELS 32 // number of real output channels CH1-CH32
64 #define MAX_FLIGHT_MODES 9
67 #define MAX_LOGICAL_SWITCHES 64
68 #define MAX_SPECIAL_FUNCTIONS 64 // number of functions assigned to switches
71 #define MAX_TRAINER_CHANNELS 16
72 #define MAX_TELEMETRY_SENSORS 32
73 #elif defined(PCBSKY9X)
75 #define MAX_OUTPUT_CHANNELS 32 // number of real output channels CH1-CH32
76 #define MAX_FLIGHT_MODES 9
79 #define MAX_LOGICAL_SWITCHES 64
80 #define MAX_SPECIAL_FUNCTIONS 64 // number of functions assigned to switches
82 #define MAX_TRAINER_CHANNELS 16
83 #define MAX_TELEMETRY_SENSORS 32
84 #elif defined(CPUM2560) || defined(CPUM2561)
86 #define MAX_OUTPUT_CHANNELS 16 // number of real output channels CH1-CH16
87 #define MAX_FLIGHT_MODES 6
90 #define MAX_LOGICAL_SWITCHES 12
91 #define MAX_SPECIAL_FUNCTIONS 24 // number of functions assigned to switches
92 #define MAX_TRAINER_CHANNELS 8
93 #define MAX_TELEMETRY_SENSORS 0
94 #elif defined(CPUM128)
96 #define MAX_OUTPUT_CHANNELS 16 // number of real output channels CH1-CH16
97 #define MAX_FLIGHT_MODES 5
100 #define MAX_LOGICAL_SWITCHES 12
101 #define MAX_SPECIAL_FUNCTIONS 24 // number of functions assigned to switches
102 #define MAX_TRAINER_CHANNELS 8
103 #define MAX_TELEMETRY_SENSORS 0
105 #define MAX_MODELS 16
106 #define MAX_OUTPUT_CHANNELS 16 // number of real output channels CH1-CH16
107 #define MAX_FLIGHT_MODES 5
108 #define MAX_MIXERS 32
110 #define MAX_LOGICAL_SWITCHES 12
111 #define MAX_SPECIAL_FUNCTIONS 16 // number of functions assigned to switches
112 #define MAX_TRAINER_CHANNELS 8
113 #define MAX_TELEMETRY_SENSORS 0
123 #define NUM_CAL_PPM 4
128 CURVE_TYPE_LAST
= CURVE_TYPE_CUSTOM
132 #define MIN_POINTS_PER_CURVE 3
134 #define MIN_POINTS_PER_CURVE 3
137 #define MAX_POINTS_PER_CURVE 17
139 #if defined(PCBHORUS)
140 #define LEN_MODEL_NAME 15
141 #define LEN_TIMER_NAME 8
142 #define LEN_FLIGHT_MODE_NAME 10
143 #define LEN_BITMAP_NAME 10
144 #define LEN_EXPOMIX_NAME 6
145 #define LEN_CHANNEL_NAME 6
146 #define LEN_INPUT_NAME 4
147 #define LEN_CURVE_NAME 3
148 #define LEN_FUNCTION_NAME 6
149 #define MAX_CURVES 32
150 #define MAX_CURVE_POINTS 512
151 #elif defined(PCBFLAMENCO)
152 #define LEN_MODEL_NAME 12
153 #define LEN_TIMER_NAME 8
154 #define LEN_FLIGHT_MODE_NAME 10
155 #define LEN_EXPOMIX_NAME 6
156 #define LEN_CHANNEL_NAME 6
157 #define LEN_INPUT_NAME 4
158 #define LEN_CURVE_NAME 3
159 #define LEN_FUNCTION_NAME 8
160 #define MAX_CURVES 32
161 #define MAX_CURVE_POINTS 512
162 #elif defined(PCBSKY9X) || defined(PCBX7D)
163 #define LEN_MODEL_NAME 10
164 #define LEN_TIMER_NAME 3
165 #define LEN_FLIGHT_MODE_NAME 6
166 #define LEN_EXPOMIX_NAME 6
167 #define LEN_CHANNEL_NAME 4
168 #define LEN_INPUT_NAME 3
169 #define LEN_CURVE_NAME 3
170 #define LEN_FUNCTION_NAME 6
171 #define MAX_CURVES 16
172 #define MAX_CURVE_POINTS 512
173 #elif defined(PCBTARANIS)
174 #define LEN_MODEL_NAME 12
175 #define LEN_TIMER_NAME 8
176 #define LEN_FLIGHT_MODE_NAME 10
177 #define LEN_BITMAP_NAME 10
178 #define LEN_EXPOMIX_NAME 8
179 #define LEN_CHANNEL_NAME 6
180 #define LEN_INPUT_NAME 4
181 #define LEN_CURVE_NAME 3
182 #define LEN_FUNCTION_NAME 8
183 #define MAX_CURVES 32
184 #define MAX_CURVE_POINTS 512
186 #define LEN_MODEL_NAME 10
187 #define LEN_FLIGHT_MODE_NAME 6
189 #define MAX_CURVE_POINTS (112-MAX_CURVES)
192 #if defined(PCBTARANIS) || defined(PCBSKY9X) || defined(PCBHORUS)
193 #define NUM_MODULES 2
195 #define NUM_MODULES 1
198 #if defined(PCBFLAMENCO)
199 #define NUM_SWITCHES 5 // TODO in board.h
202 #define XPOTS_MULTIPOS_COUNT 6
204 #if defined(PCBSKY9X) && defined(REVX)
205 #define MAX_ROTARY_ENCODERS 1
206 #define NUM_ROTARY_ENCODERS 0
207 #elif defined(PCBSKY9X)
208 #define MAX_ROTARY_ENCODERS 1
209 #define NUM_ROTARY_ENCODERS 1
210 #elif defined(CPUM2560)
211 #define MAX_ROTARY_ENCODERS 2
212 #define NUM_ROTARY_ENCODERS 2
214 #define MAX_ROTARY_ENCODERS 0
215 #define NUM_ROTARY_ENCODERS 0
218 #if defined(PCBHORUS)
219 #define NUM_AUX_TRIMS 2
220 #define NUM_MOUSE_ANALOGS 2
222 #define NUM_AUX_TRIMS 0
223 #define NUM_MOUSE_ANALOGS 0
226 #if defined(COLORLCD)
229 VIEW_TIMERS_ALTITUDE
,
261 #if defined(PCBFLAMENCO)
270 #elif defined(PCBTARANIS) || defined(PCBHORUS)
277 TRAINER_MODE_MASTER_TRAINER_JACK
,
279 #if defined(PCBTARANIS)
280 TRAINER_MODE_MASTER_SBUS_EXTERNAL_MODULE
,
281 TRAINER_MODE_MASTER_CPPM_EXTERNAL_MODULE
,
283 TRAINER_MODE_MASTER_BATTERY_COMPARTMENT
,
285 #elif defined(PCBSKY9X)
294 #if defined(CLI) || defined(DEBUG)
299 UART_MODE_TELEMETRY_MIRROR
,
301 UART_MODE_SBUS_TRAINER
,
302 // UART_MODE_CPPM_TRAINER,
304 UART_MODE_MAX
= UART_MODE_COUNT
-1
307 #if defined(PCBHORUS)
308 #define LEN_SWITCH_NAME 3
309 #define LEN_ANA_NAME 3
310 #define LEN_MODEL_FILENAME 16
311 #define LEN_BLUETOOTH_NAME 10
312 #elif defined(CPUARM)
313 #define LEN_SWITCH_NAME 3
314 #define LEN_ANA_NAME 3
315 #define LEN_BLUETOOTH_NAME 10
319 #define TELEM_LABEL_LEN 4
326 UNIT_METERS_PER_SECOND
,
327 UNIT_FEET_PER_SECOND
,
348 // FrSky format used for these fields, could be another format in the future
350 UNIT_CELLS
= UNIT_FIRST_VIRTUAL
,
355 // Internal units (not stored in sensor unit)
359 UNIT_DATETIME_DAY_MONTH
,
360 UNIT_DATETIME_HOUR_MIN
,
363 #define UNIT_MAX UNIT_FLOZ
364 #define UNIT_DIST UNIT_METERS
365 #define UNIT_TEMPERATURE UNIT_CELSIUS
366 #define UNIT_SPEED UNIT_KMH
369 enum TelemetrySource
{
374 TELEM_TIMER_MAX
=TELEM_TIMER2
,
378 TELEM_A1
=TELEM_A_FIRST
,
380 TELEM_A_LAST
=TELEM_A2
,
403 TELEM_MIN_A1
=TELEM_MIN_A_FIRST
,
405 TELEM_MIN_A_LAST
=TELEM_MIN_A2
,
421 TELEM_CSW_MAX
= TELEM_MAX_POWER
,
422 TELEM_NOUSR_MAX
= TELEM_A2
,
423 #if defined(TELEMETRY_FRSKY)
424 TELEM_DISPLAY_MAX
= TELEM_MAX_POWER
,
426 TELEM_DISPLAY_MAX
= TELEM_TIMER2
, // because used also in PlayValue
428 TELEM_STATUS_MAX
= TELEM_GPS_TIME
,
429 TELEM_FIRST_STREAMED_VALUE
= TELEM_RSSI_TX
,
432 #if defined(FRSKY_HUB)
433 #define NUM_TELEMETRY TELEM_CSW_MAX
434 #elif defined(WS_HOW_HIGH)
435 #define NUM_TELEMETRY TELEM_ALT
436 #elif defined(TELEMETRY_FRSKY)
437 #define NUM_TELEMETRY TELEM_A2
438 #elif defined(TELEMETRY_MAVLINK)
439 #define NUM_TELEMETRY 4
441 #define NUM_TELEMETRY TELEM_TIMER2
449 UNIT_METERS_PER_SECOND
,
456 UNIT_A1A2_MAX
= UNIT_MILLIAMPS
,
472 #define NUM_LINE_ITEMS 3
474 #define NUM_LINE_ITEMS 2
477 #if defined(PCBTARANIS)
478 #define MAX_TELEM_SCRIPT_INPUTS 8
482 enum TelemetryScreenType
{
483 TELEMETRY_SCREEN_TYPE_NONE
,
484 TELEMETRY_SCREEN_TYPE_VALUES
,
485 TELEMETRY_SCREEN_TYPE_GAUGES
,
487 TELEMETRY_SCREEN_TYPE_SCRIPT
,
488 TELEMETRY_SCREEN_TYPE_MAX
= TELEMETRY_SCREEN_TYPE_SCRIPT
490 TELEMETRY_SCREEN_TYPE_MAX
= TELEMETRY_SCREEN_TYPE_GAUGES
493 #define MAX_TELEMETRY_SCREENS 4
494 #define TELEMETRY_SCREEN_TYPE(screenIndex) TelemetryScreenType((g_model.frsky.screensType >> (2*(screenIndex))) & 0x03)
495 #define IS_BARS_SCREEN(screenIndex) (TELEMETRY_SCREEN_TYPE(screenIndex) == TELEMETRY_SCREEN_TYPE_GAUGES)
496 #define MIN_BLADES -1 // 1 blade
497 #define MAX_BLADES 126 // 128 blades
499 #define MAX_FRSKY_A_CHANNELS 2
500 #define MAX_TELEMETRY_SCREENS 2
501 #define IS_BARS_SCREEN(screenIndex) (g_model.frsky.screensType & (1<<(screenIndex)))
502 #define MIN_BLADES 0 // 2 blades
503 #define MAX_BLADES 3 // 5 blades
506 #define FAILSAFE_CHANNEL_HOLD 2000
507 #define FAILSAFE_CHANNEL_NOPULSE 2001
509 #define LEN_SCRIPT_FILENAME 6
510 #define LEN_SCRIPT_NAME 6
511 #define MAX_SCRIPT_INPUTS 6
512 #define MAX_SCRIPT_OUTPUTS 6
521 #define LEN_GVAR_NAME 3
522 #define GVAR_MAX 1024
523 #define GVAR_MIN -GVAR_MAX
526 #define RESERVE_RANGE_FOR_GVARS 10
527 // even we do not spend space in EEPROM for 10 GVARS, we reserve the space inside the range of values, like offset, weight, etc.
529 #if defined(PCBSTD) && defined(GVARS)
531 #elif defined(PCBSTD)
533 #elif defined(CPUARM)
544 #if defined(PCBFLAMENCO)
545 SWSRC_SA0
= SWSRC_FIRST_SWITCH
,
561 SWSRC_LAST_SWITCH
= SWSRC_SF2
,
562 #elif defined(PCBTARANIS) || defined(PCBHORUS)
563 SWSRC_SA0
= SWSRC_FIRST_SWITCH
,
587 SWSRC_TRAINER
= SWSRC_SH2
,
619 SWSRC_LAST_SWITCH
= SWSRC_SR2
,
621 SWSRC_LAST_SWITCH
= SWSRC_SH2
,
624 SWSRC_ID0
= SWSRC_FIRST_SWITCH
,
633 SWSRC_TRAINER
= SWSRC_TRN
,
634 SWSRC_LAST_SWITCH
= SWSRC_TRN
,
638 SWSRC_FIRST_MULTIPOS_SWITCH
,
639 SWSRC_LAST_MULTIPOS_SWITCH
= SWSRC_FIRST_MULTIPOS_SWITCH
+ (NUM_XPOTS
*XPOTS_MULTIPOS_COUNT
) - 1,
643 SWSRC_TrimRudLeft
= SWSRC_FIRST_TRIM
,
651 #if defined(PCBHORUS)
656 SWSRC_LAST_TRIM
= SWSRC_TrimT6Up
,
658 SWSRC_LAST_TRIM
= SWSRC_TrimAilRight
,
661 #if defined(PCBSKY9X)
663 #elif defined(CPUM2560)
668 SWSRC_FIRST_LOGICAL_SWITCH
,
669 SWSRC_SW1
= SWSRC_FIRST_LOGICAL_SWITCH
,
681 SWSRC_LAST_LOGICAL_SWITCH
= SWSRC_FIRST_LOGICAL_SWITCH
+MAX_LOGICAL_SWITCHES
-1,
687 SWSRC_FIRST_FLIGHT_MODE
,
688 SWSRC_LAST_FLIGHT_MODE
= SWSRC_FIRST_FLIGHT_MODE
+MAX_FLIGHT_MODES
-1,
690 SWSRC_TELEMETRY_STREAMING
,
692 SWSRC_LAST_SENSOR
= SWSRC_FIRST_SENSOR
+MAX_TELEMETRY_SENSORS
-1,
697 SWSRC_OFF
= -SWSRC_ON
,
699 SWSRC_LAST
= SWSRC_COUNT
-1,
700 SWSRC_FIRST
= -SWSRC_LAST
,
703 SWSRC_LAST_IN_LOGICAL_SWITCHES
= SWSRC_COUNT
-1,
704 SWSRC_LAST_IN_MIXES
= SWSRC_COUNT
-1,
706 SWSRC_LAST_IN_LOGICAL_SWITCHES
= SWSRC_LAST_LOGICAL_SWITCH
,
707 SWSRC_LAST_IN_MIXES
= SWSRC_LAST_LOGICAL_SWITCH
,
710 SWSRC_FIRST_IN_LOGICAL_SWITCHES
= -SWSRC_LAST_IN_LOGICAL_SWITCHES
,
711 SWSRC_FIRST_IN_MIXES
= -SWSRC_LAST_IN_MIXES
,
714 SWSRC_INVERT
= SWSRC_COUNT
+1,
721 #if defined(VIRTUAL_INPUTS)
722 MIXSRC_FIRST_INPUT
, LUA_EXPORT_MULTIPLE("input", "Input [I%d]", MAX_INPUTS
)
723 MIXSRC_LAST_INPUT
= MIXSRC_FIRST_INPUT
+MAX_INPUTS
-1,
726 #if defined(LUA_INPUTS)
728 MIXSRC_LAST_LUA
= MIXSRC_FIRST_LUA
+(MAX_SCRIPTS
*MAX_SCRIPT_OUTPUTS
)-1,
732 MIXSRC_Rud
= MIXSRC_FIRST_STICK
, LUA_EXPORT("rud", "Rudder")
733 MIXSRC_Ele
, LUA_EXPORT("ele", "Elevator")
734 MIXSRC_Thr
, LUA_EXPORT("thr", "Throttle")
735 MIXSRC_Ail
, LUA_EXPORT("ail", "Aileron")
738 #if defined(PCBHORUS)
739 MIXSRC_S1
= MIXSRC_FIRST_POT
, LUA_EXPORT("s1", "Potentiometer S1")
740 MIXSRC_6POS
, LUA_EXPORT("6pos", "Multipos Switch")
741 MIXSRC_S2
, LUA_EXPORT("s2", "Potentiometer S2")
743 MIXSRC_S3
= MIXSRC_FIRST_SLIDER
, LUA_EXPORT("s3", "Slider S3")
744 MIXSRC_S4
, LUA_EXPORT("s4", "Slider S4")
745 MIXSRC_LS
, LUA_EXPORT("ls", "Left rear slider")
746 MIXSRC_RS
, LUA_EXPORT("rs", "Right rear slider")
747 MIXSRC_LAST_POT
= MIXSRC_RS
,
748 #elif defined(PCBFLAMENCO)
749 MIXSRC_POT1
= MIXSRC_FIRST_POT
, LUA_EXPORT("sd", "Potentiometer D")
750 MIXSRC_SLIDER1
, LUA_EXPORT("ls", "Left slider")
751 MIXSRC_SLIDER2
, LUA_EXPORT("rs", "Right slider")
752 MIXSRC_LAST_POT
= MIXSRC_SLIDER2
,
753 #elif defined(PCBX9E)
754 MIXSRC_POT1
= MIXSRC_FIRST_POT
, LUA_EXPORT("s1", "Potentiometer 1")
755 MIXSRC_POT2
, LUA_EXPORT("s2", "Potentiometer 2")
756 MIXSRC_POT3
, LUA_EXPORT("s3", "Potentiometer 3")
757 MIXSRC_POT4
, LUA_EXPORT("s4", "Potentiometer 4 (X9E only)")
759 MIXSRC_SLIDER1
= MIXSRC_FIRST_SLIDER
, LUA_EXPORT("ls", "Left slider")
760 MIXSRC_SLIDER2
, LUA_EXPORT("rs", "Right slider")
761 MIXSRC_SLIDER3
, LUA_EXPORT("lcs", "Left center slider (X9E only)")
762 MIXSRC_SLIDER4
, LUA_EXPORT("rcs", "Right center slider (X9E only)")
763 MIXSRC_LAST_POT
= MIXSRC_SLIDER4
,
764 #elif defined(PCBX7D)
765 MIXSRC_POT1
= MIXSRC_FIRST_POT
, LUA_EXPORT("s1", "Potentiometer 1")
766 MIXSRC_POT2
, LUA_EXPORT("s2", "Potentiometer 2")
767 MIXSRC_LAST_POT
= MIXSRC_POT2
,
768 #elif defined(PCBTARANIS)
769 MIXSRC_POT1
= MIXSRC_FIRST_POT
, LUA_EXPORT("s1", "Potentiometer 1")
770 MIXSRC_POT2
, LUA_EXPORT("s2", "Potentiometer 2")
771 MIXSRC_POT3
, LUA_EXPORT("s3", "Potentiometer 3")
773 MIXSRC_SLIDER1
= MIXSRC_FIRST_SLIDER
, LUA_EXPORT("ls", "Left slider")
774 MIXSRC_SLIDER2
, LUA_EXPORT("rs", "Right slider")
775 MIXSRC_LAST_POT
= MIXSRC_SLIDER2
,
777 MIXSRC_P1
= MIXSRC_FIRST_POT
,
780 MIXSRC_LAST_POT
= MIXSRC_P3
,
783 #if defined(PCBHORUS)
788 #if defined(PCBSKY9X)
790 MIXSRC_LAST_ROTARY_ENCODER
= MIXSRC_REa
,
791 #elif defined(CPUM2560)
794 #if ROTARY_ENCODERS > 2
797 MIXSRC_LAST_ROTARY_ENCODER
= MIXSRC_REd
,
799 MIXSRC_LAST_ROTARY_ENCODER
= MIXSRC_REb
,
806 MIXSRC_CYC1
= MIXSRC_FIRST_HELI
, LUA_EXPORT("cyc1", "Cyclic 1")
807 MIXSRC_CYC2
, LUA_EXPORT("cyc2", "Cyclic 2")
808 MIXSRC_CYC3
, LUA_EXPORT("cyc3", "Cyclic 3")
811 MIXSRC_TrimRud
= MIXSRC_FIRST_TRIM
, LUA_EXPORT("trim-rud", "Rudder trim")
812 MIXSRC_TrimEle
, LUA_EXPORT("trim-ele", "Elevator trim")
813 MIXSRC_TrimThr
, LUA_EXPORT("trim-thr", "Throttle trim")
814 MIXSRC_TrimAil
, LUA_EXPORT("trim-ail", "Aileron trim")
815 #if defined(PCBHORUS)
816 MIXSRC_TrimT5
, LUA_EXPORT("trim-t5", "Aux trim T5")
817 MIXSRC_TrimT6
, LUA_EXPORT("trim-t6", "Aux trim T6")
818 MIXSRC_LAST_TRIM
= MIXSRC_TrimT6
,
820 MIXSRC_LAST_TRIM
= MIXSRC_TrimAil
,
825 #if defined(PCBFLAMENCO)
826 MIXSRC_SA
= MIXSRC_FIRST_SWITCH
, LUA_EXPORT("sa", "Switch A")
827 MIXSRC_SB
, LUA_EXPORT("sb", "Switch B")
828 MIXSRC_SC
, LUA_EXPORT("sc", "Switch C")
829 MIXSRC_SE
, LUA_EXPORT("se", "Switch E")
830 MIXSRC_SF
, LUA_EXPORT("sf", "Switch F")
831 MIXSRC_LAST_SWITCH
= MIXSRC_SF
,
832 #elif defined(PCBTARANIS) || defined(PCBHORUS)
833 MIXSRC_SA
= MIXSRC_FIRST_SWITCH
, LUA_EXPORT("sa", "Switch A")
834 MIXSRC_SB
, LUA_EXPORT("sb", "Switch B")
835 MIXSRC_SC
, LUA_EXPORT("sc", "Switch C")
836 MIXSRC_SD
, LUA_EXPORT("sd", "Switch D")
838 MIXSRC_SE
, LUA_EXPORT("se", "Switch E")
840 MIXSRC_SF
, LUA_EXPORT("sf", "Switch F")
842 MIXSRC_SG
, LUA_EXPORT("sg", "Switch G")
844 MIXSRC_SH
, LUA_EXPORT("sh", "Switch H")
846 MIXSRC_SI
, LUA_EXPORT("si", "Switch I")
847 MIXSRC_SJ
, LUA_EXPORT("sj", "Switch J")
848 MIXSRC_SK
, LUA_EXPORT("sk", "Switch K")
849 MIXSRC_SL
, LUA_EXPORT("sl", "Switch L")
850 MIXSRC_SM
, LUA_EXPORT("sm", "Switch M")
851 MIXSRC_SN
, LUA_EXPORT("sn", "Switch N")
852 MIXSRC_SO
, LUA_EXPORT("so", "Switch O")
853 MIXSRC_SP
, LUA_EXPORT("sp", "Switch P")
854 MIXSRC_SQ
, LUA_EXPORT("sq", "Switch Q")
855 MIXSRC_SR
, LUA_EXPORT("sr", "Switch R")
856 MIXSRC_LAST_SWITCH
= MIXSRC_SR
,
858 MIXSRC_LAST_SWITCH
= MIXSRC_SH
,
861 MIXSRC_3POS
= MIXSRC_FIRST_SWITCH
,
868 MIXSRC_LAST_SWITCH
= MIXSRC_TRN
,
870 MIXSRC_FIRST_LOGICAL_SWITCH
,
871 MIXSRC_SW1
= MIXSRC_FIRST_LOGICAL_SWITCH
, LUA_EXPORT_MULTIPLE("ls", "Logical switch L%d", MAX_LOGICAL_SWITCHES
)
872 MIXSRC_LAST_LOGICAL_SWITCH
= MIXSRC_FIRST_LOGICAL_SWITCH
+MAX_LOGICAL_SWITCHES
-1,
874 MIXSRC_FIRST_TRAINER
, LUA_EXPORT_MULTIPLE("trn", "Trainer input %d", MAX_TRAINER_CHANNELS
)
875 MIXSRC_LAST_TRAINER
= MIXSRC_FIRST_TRAINER
+MAX_TRAINER_CHANNELS
-1,
878 MIXSRC_CH1
= MIXSRC_FIRST_CH
, LUA_EXPORT_MULTIPLE("ch", "Channel CH%d", MAX_OUTPUT_CHANNELS
)
894 MIXSRC_LAST_CH
= MIXSRC_CH1
+MAX_OUTPUT_CHANNELS
-1,
897 MIXSRC_GVAR1
= MIXSRC_FIRST_GVAR
, LUA_EXPORT_MULTIPLE("gvar", "Global variable %d", MAX_GVARS
)
898 MIXSRC_LAST_GVAR
= MIXSRC_FIRST_GVAR
+MAX_GVARS
-1,
901 MIXSRC_TX_VOLTAGE
, LUA_EXPORT("tx-voltage", "Transmitter battery voltage [volts]")
902 MIXSRC_TX_TIME
, LUA_EXPORT("clock", "RTC clock [minutes from midnight]")
903 #if defined(INTERNAL_GPS)
905 MIXSRC_FIRST_RESERVE
,
907 MIXSRC_FIRST_RESERVE
,
914 MIXSRC_TIMER1
= MIXSRC_FIRST_TIMER
, LUA_EXPORT("timer1", "Timer 1 value [seconds]")
915 MIXSRC_TIMER2
, LUA_EXPORT("timer2", "Timer 2 value [seconds]")
916 MIXSRC_TIMER3
, LUA_EXPORT("timer3", "Timer 3 value [seconds]")
917 MIXSRC_LAST_TIMER
= MIXSRC_TIMER3
,
922 MIXSRC_LAST_TELEM
= MIXSRC_FIRST_TELEM
+3*MAX_TELEMETRY_SENSORS
-1
924 MIXSRC_LAST_TELEM
= MIXSRC_FIRST_TELEM
+NUM_TELEMETRY
-1
928 #define MIXSRC_FIRST (MIXSRC_NONE+1)
929 #define MIXSRC_LAST MIXSRC_LAST_CH
930 #define INPUTSRC_FIRST MIXSRC_Rud
931 #define INPUTSRC_LAST MIXSRC_LAST_TELEM
934 e_backlight_mode_off
= 0,
935 e_backlight_mode_keys
= 1,
936 e_backlight_mode_sticks
= 2,
937 e_backlight_mode_all
= e_backlight_mode_keys
+e_backlight_mode_sticks
,
942 // first the functions which need a checkbox
943 FUNC_OVERRIDE_CHANNEL
,
957 // then the other functions
958 FUNC_FIRST_WITHOUT_ENABLE
,
959 FUNC_PLAY_SOUND
= FUNC_FIRST_WITHOUT_ENABLE
,
970 FUNC_BACKGND_MUSIC_PAUSE
,
978 #if defined(PCBTARANIS)
982 FUNC_TEST
, // should remain the last before MAX as not added in companion9x
996 enum CountDownModes
{
1000 #if defined(CPUARM) && defined(HAPTIC)
1006 enum ResetFunctionParam
{
1013 #if defined(TELEMETRY_FRSKY)
1014 FUNC_RESET_TELEMETRY
,
1016 #if ROTARY_ENCODERS > 0
1019 #if ROTARY_ENCODERS > 1
1023 FUNC_RESET_PARAM_FIRST_TELEM
,
1024 FUNC_RESET_PARAM_LAST_TELEM
= FUNC_RESET_PARAM_FIRST_TELEM
+ MAX_TELEMETRY_SENSORS
,
1026 FUNC_RESET_PARAMS_COUNT
,
1027 FUNC_RESET_PARAM_LAST
= FUNC_RESET_PARAMS_COUNT
-1,
1030 enum AdjustGvarFunctionParam
{
1031 FUNC_ADJUST_GVAR_CONSTANT
,
1032 FUNC_ADJUST_GVAR_SOURCE
,
1033 FUNC_ADJUST_GVAR_GVAR
,
1034 FUNC_ADJUST_GVAR_INCDEC
,
1037 #endif // _DATACONSTANTS_H_