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.
24 #include "constants.h"
25 #include "curvereference.h"
26 #include "rawsource.h"
27 #include "rawswitch.h"
31 class RadioDataConversionState
;
41 Q_DECLARE_TR_FUNCTIONS(ExpoData
)
44 ExpoData() { clear(); }
47 unsigned int mode
; // InputMode
50 unsigned int flightModes
; // -5=!FP4, 0=normal, 5=FP4
56 void clear() { memset(this, 0, sizeof(ExpoData
)); }
57 void convert(RadioDataConversionState
& cstate
);
66 #define MIXDATA_NAME_LEN 10
69 Q_DECLARE_TR_FUNCTIONS(MixData
)
72 MixData() { clear(); }
73 void convert(RadioDataConversionState
& cstate
);
75 unsigned int destCh
; // 1..CPN_MAX_CHNOUT
79 CurveReference curve
; //0=symmetrisch
81 unsigned int delayDown
;
82 unsigned int speedUp
; // Servogeschwindigkeit aus Tabelle (10ms Cycle)
83 unsigned int speedDown
; // 0 nichts
86 MltpxValue mltpx
; // multiplex method 0=+ 1=* 2=replace
87 unsigned int mixWarn
; // mixer warning
88 unsigned int flightModes
; // -5=!FP4, 0=normal, 5=FP4
90 char name
[MIXDATA_NAME_LEN
+1];
92 void clear() { memset(this, 0, sizeof(MixData
)); }
96 Q_DECLARE_TR_FUNCTIONS(LimitData
)
99 LimitData() { clear(); }
107 CurveReference curve
;
108 QString
minToString() const;
109 QString
maxToString() const;
110 QString
offsetToString() const;
111 QString
revertToString() const;
112 QString
nameToString(int index
) const;
123 Q_DECLARE_TR_FUNCTIONS(CurveData
)
129 CURVE_TYPE_LAST
= CURVE_TYPE_CUSTOM
133 void clear(int count
);
134 bool isEmpty() const;
135 QString
nameToString(const int idx
) const;
140 CurvePoint points
[CPN_MAX_POINTS
];
144 class FlightModeData
{
145 Q_DECLARE_TR_FUNCTIONS(FlightModeData
)
148 FlightModeData() { clear(0); }
149 int trimMode
[CPN_MAX_TRIMS
];
150 int trimRef
[CPN_MAX_TRIMS
];
151 int trim
[CPN_MAX_TRIMS
];
155 unsigned int fadeOut
;
156 int rotaryEncoders
[CPN_MAX_ENCODERS
];
157 int gvars
[CPN_MAX_GVARS
];
158 void clear(const int phase
);
159 QString
nameToString(int index
) const;
160 void convert(RadioDataConversionState
& cstate
);
163 class SwashRingData
{
164 Q_DECLARE_TR_FUNCTIONS(SwashRingData
)
167 SwashRingData() { clear(); }
170 int collectiveWeight
;
172 RawSource collectiveSource
;
173 RawSource aileronSource
;
174 RawSource elevatorSource
;
176 void clear() { memset(this, 0, sizeof(SwashRingData
)); }