mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 17:25:13 +03:00
Merge pull request #770 from opentx/bsongis/Issue767_extra_pot
Bsongis/issue767 extra pot
This commit is contained in:
commit
8a0dc22578
35 changed files with 469 additions and 290 deletions
|
@ -195,12 +195,12 @@ QString AnalogString(int index)
|
||||||
{
|
{
|
||||||
static const QString sticks[] = { QObject::tr("Rud"), QObject::tr("Ele"), QObject::tr("Thr"), QObject::tr("Ail") };
|
static const QString sticks[] = { QObject::tr("Rud"), QObject::tr("Ele"), QObject::tr("Thr"), QObject::tr("Ail") };
|
||||||
static const QString pots9X[] = { QObject::tr("P1"), QObject::tr("P2"), QObject::tr("P3") };
|
static const QString pots9X[] = { QObject::tr("P1"), QObject::tr("P2"), QObject::tr("P3") };
|
||||||
static const QString potsX9D[] = { QObject::tr("S1"), QObject::tr("S2"), QObject::tr("LS"), QObject::tr("RS") };
|
static const QString potsTaranis[] = { QObject::tr("S1"), QObject::tr("S2"), QObject::tr("S3"), QObject::tr("LS"), QObject::tr("RS") };
|
||||||
|
|
||||||
if (index < 4)
|
if (index < 4)
|
||||||
return CHECK_IN_ARRAY(sticks, index);
|
return CHECK_IN_ARRAY(sticks, index);
|
||||||
else
|
else
|
||||||
return (IS_TARANIS(GetEepromInterface()->getBoard()) ? CHECK_IN_ARRAY(potsX9D, index-4) : CHECK_IN_ARRAY(pots9X, index-4));
|
return (IS_TARANIS(GetEepromInterface()->getBoard()) ? CHECK_IN_ARRAY(potsTaranis, index-4) : CHECK_IN_ARRAY(pots9X, index-4));
|
||||||
}
|
}
|
||||||
|
|
||||||
QString RotaryEncoderString(int index)
|
QString RotaryEncoderString(int index)
|
||||||
|
@ -242,10 +242,13 @@ QString RawSource::toString()
|
||||||
}
|
}
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case SOURCE_TYPE_VIRTUAL_INPUT:
|
case SOURCE_TYPE_VIRTUAL_INPUT:
|
||||||
if (model && strlen(model->inputNames[index]) > 0)
|
{
|
||||||
return QString(model->inputNames[index]);
|
QString result = QObject::tr("[I%1]").arg(index+1);
|
||||||
else
|
if (model && strlen(model->inputNames[index]) > 0) {
|
||||||
return QObject::tr("Input %1").arg(index+1);
|
result += QString(model->inputNames[index]);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
case SOURCE_TYPE_STICK:
|
case SOURCE_TYPE_STICK:
|
||||||
return AnalogString(index);
|
return AnalogString(index);
|
||||||
case SOURCE_TYPE_TRIM:
|
case SOURCE_TYPE_TRIM:
|
||||||
|
@ -316,7 +319,8 @@ QString RawSwitch::toString()
|
||||||
|
|
||||||
static const QString multiposPots[] = {
|
static const QString multiposPots[] = {
|
||||||
QObject::tr("S11"), QObject::tr("S12"), QObject::tr("S13"), QObject::tr("S14"), QObject::tr("S15"), QObject::tr("S16"),
|
QObject::tr("S11"), QObject::tr("S12"), QObject::tr("S13"), QObject::tr("S14"), QObject::tr("S15"), QObject::tr("S16"),
|
||||||
QObject::tr("S21"), QObject::tr("S22"), QObject::tr("S23"), QObject::tr("S24"), QObject::tr("S25"), QObject::tr("S26")
|
QObject::tr("S21"), QObject::tr("S22"), QObject::tr("S23"), QObject::tr("S24"), QObject::tr("S25"), QObject::tr("S26"),
|
||||||
|
QObject::tr("S31"), QObject::tr("S32"), QObject::tr("S33"), QObject::tr("S34"), QObject::tr("S35"), QObject::tr("S36")
|
||||||
};
|
};
|
||||||
|
|
||||||
static const QString trimsSwitches[] = {
|
static const QString trimsSwitches[] = {
|
||||||
|
@ -791,7 +795,8 @@ GeneralSettings::GeneralSettings()
|
||||||
int potsnum=GetEepromInterface()->getCapability(Pots);
|
int potsnum=GetEepromInterface()->getCapability(Pots);
|
||||||
if (t_calib.isEmpty()) {
|
if (t_calib.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
QString t_trainercalib=g.profile[g.id()].trainerCalib();
|
QString t_trainercalib=g.profile[g.id()].trainerCalib();
|
||||||
int8_t t_vBatCalib=(int8_t)g.profile[g.id()].vBatCalib();
|
int8_t t_vBatCalib=(int8_t)g.profile[g.id()].vBatCalib();
|
||||||
int8_t t_currentCalib=(int8_t)g.profile[g.id()].currentCalib();
|
int8_t t_currentCalib=(int8_t)g.profile[g.id()].currentCalib();
|
||||||
|
@ -887,11 +892,30 @@ GeneralSettings::GeneralSettings()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RawSource GeneralSettings::getDefaultSource(unsigned int channel)
|
||||||
|
{
|
||||||
|
unsigned int stick_index = chout_ar[4*templateSetup + channel] - 1;
|
||||||
|
return RawSource(SOURCE_TYPE_STICK, stick_index);
|
||||||
|
}
|
||||||
|
|
||||||
ModelData::ModelData()
|
ModelData::ModelData()
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ExpoData * ModelData::insertInput(const int idx)
|
||||||
|
{
|
||||||
|
memmove(&expoData[idx+1], &expoData[idx], (C9X_MAX_EXPOS-(idx+1))*sizeof(ExpoData));
|
||||||
|
expoData[idx].clear();
|
||||||
|
return &expoData[idx];
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModelData::removeInput(const int idx)
|
||||||
|
{
|
||||||
|
memmove(&expoData[idx], &expoData[idx+1], (C9X_MAX_EXPOS-(idx+1))*sizeof(ExpoData));
|
||||||
|
expoData[C9X_MAX_EXPOS-1].clear();
|
||||||
|
}
|
||||||
|
|
||||||
void ModelData::clearInputs()
|
void ModelData::clearInputs()
|
||||||
{
|
{
|
||||||
for (int i=0; i<C9X_MAX_EXPOS; i++)
|
for (int i=0; i<C9X_MAX_EXPOS; i++)
|
||||||
|
@ -947,12 +971,38 @@ bool ModelData::isempty()
|
||||||
return !used;
|
return !used;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelData::setDefault(uint8_t id)
|
void ModelData::setDefaultMixes(GeneralSettings & settings)
|
||||||
|
{
|
||||||
|
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||||
|
for (int i=0; i<NUM_STICKS; i++) {
|
||||||
|
ExpoData * expo = &expoData[i];
|
||||||
|
expo->chn = i;
|
||||||
|
expo->mode = INPUT_MODE_BOTH;
|
||||||
|
expo->srcRaw = settings.getDefaultSource(i);
|
||||||
|
expo->weight = 100;
|
||||||
|
strncpy(inputNames[i], expo->srcRaw.toString().toLatin1().constData(), sizeof(inputNames[i])-1);
|
||||||
|
MixData * mix = &mixData[i];
|
||||||
|
mix->destCh = i+1;
|
||||||
|
mix->weight = 100;
|
||||||
|
mix->srcRaw = RawSource(SOURCE_TYPE_VIRTUAL_INPUT, i, this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for (int i=0; i<NUM_STICKS; i++) {
|
||||||
|
mixData[i].destCh = i+1;
|
||||||
|
mixData[i].srcRaw = RawSource(SOURCE_TYPE_STICK, i);
|
||||||
|
mixData[i].weight = 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModelData::setDefaultValues(unsigned int id, GeneralSettings & settings)
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
used = true;
|
used = true;
|
||||||
sprintf(name, "MODEL%02d", id+1);
|
sprintf(name, "MODEL%02d", id+1);
|
||||||
modelId = id+1;
|
modelId = id+1;
|
||||||
|
setDefaultMixes(settings);
|
||||||
}
|
}
|
||||||
|
|
||||||
int ModelData::getTrimValue(int phaseIdx, int trimIdx)
|
int ModelData::getTrimValue(int phaseIdx, int trimIdx)
|
||||||
|
|
|
@ -110,7 +110,8 @@ const uint8_t chout_ar[] = { //First number is 0..23 -> template setup, Second
|
||||||
1,2,3,4 , 1,2,4,3 , 1,3,2,4 , 1,3,4,2 , 1,4,2,3 , 1,4,3,2,
|
1,2,3,4 , 1,2,4,3 , 1,3,2,4 , 1,3,4,2 , 1,4,2,3 , 1,4,3,2,
|
||||||
2,1,3,4 , 2,1,4,3 , 2,3,1,4 , 2,3,4,1 , 2,4,1,3 , 2,4,3,1,
|
2,1,3,4 , 2,1,4,3 , 2,3,1,4 , 2,3,4,1 , 2,4,1,3 , 2,4,3,1,
|
||||||
3,1,2,4 , 3,1,4,2 , 3,2,1,4 , 3,2,4,1 , 3,4,1,2 , 3,4,2,1,
|
3,1,2,4 , 3,1,4,2 , 3,2,1,4 , 3,2,4,1 , 3,4,1,2 , 3,4,2,1,
|
||||||
4,1,2,3 , 4,1,3,2 , 4,2,1,3 , 4,2,3,1 , 4,3,1,2 , 4,3,2,1 }; // TODO delete it?
|
4,1,2,3 , 4,1,3,2 , 4,2,1,3 , 4,2,3,1 , 4,3,1,2 , 4,3,2,1
|
||||||
|
}; // TODO delete it?
|
||||||
|
|
||||||
// Beep center bits
|
// Beep center bits
|
||||||
#define BC_BIT_RUD (0x01)
|
#define BC_BIT_RUD (0x01)
|
||||||
|
@ -159,10 +160,8 @@ enum HeliSwashTypes {
|
||||||
|
|
||||||
#define NUM_STICKS 4
|
#define NUM_STICKS 4
|
||||||
#define BOARD_9X_NUM_POTS 3
|
#define BOARD_9X_NUM_POTS 3
|
||||||
#define BOARD_X9D_NUM_POTS 4
|
#define C9X_NUM_POTS 5
|
||||||
#define C9X_NUM_POTS 4
|
|
||||||
#define NUM_CAL_PPM 4
|
#define NUM_CAL_PPM 4
|
||||||
#define NUM_PPM(board) (IS_ARM(board) ? 16 : 8)
|
|
||||||
#define NUM_CYC 3
|
#define NUM_CYC 3
|
||||||
#define C9X_NUM_SWITCHES 10
|
#define C9X_NUM_SWITCHES 10
|
||||||
#define C9X_NUM_KEYS 6
|
#define C9X_NUM_KEYS 6
|
||||||
|
@ -402,6 +401,9 @@ enum BeeperMode {
|
||||||
class GeneralSettings {
|
class GeneralSettings {
|
||||||
public:
|
public:
|
||||||
GeneralSettings();
|
GeneralSettings();
|
||||||
|
|
||||||
|
RawSource getDefaultSource(unsigned int channel);
|
||||||
|
|
||||||
unsigned int version;
|
unsigned int version;
|
||||||
unsigned int variant;
|
unsigned int variant;
|
||||||
int calibMid[NUM_STICKS+C9X_NUM_POTS];
|
int calibMid[NUM_STICKS+C9X_NUM_POTS];
|
||||||
|
@ -439,7 +441,7 @@ class GeneralSettings {
|
||||||
unsigned int backlightDelay;
|
unsigned int backlightDelay;
|
||||||
bool blightinv;
|
bool blightinv;
|
||||||
bool stickScroll;
|
bool stickScroll;
|
||||||
unsigned int templateSetup; //RETA order according to chout_ar array // TODO enum
|
unsigned int templateSetup; //RETA order according to chout_ar array
|
||||||
int PPM_Multiplier;
|
int PPM_Multiplier;
|
||||||
int hapticLength;
|
int hapticLength;
|
||||||
unsigned int reNavigation;
|
unsigned int reNavigation;
|
||||||
|
@ -504,12 +506,19 @@ class CurveReference {
|
||||||
QString toString();
|
QString toString();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum InputMode {
|
||||||
|
INPUT_MODE_NONE,
|
||||||
|
INPUT_MODE_POS,
|
||||||
|
INPUT_MODE_NEG,
|
||||||
|
INPUT_MODE_BOTH
|
||||||
|
};
|
||||||
|
|
||||||
class ExpoData {
|
class ExpoData {
|
||||||
public:
|
public:
|
||||||
ExpoData() { clear(); }
|
ExpoData() { clear(); }
|
||||||
RawSource srcRaw;
|
RawSource srcRaw;
|
||||||
unsigned int scale;
|
unsigned int scale;
|
||||||
unsigned int mode; // 0=end, 1=pos, 2=neg, 3=both
|
unsigned int mode;
|
||||||
unsigned int chn;
|
unsigned int chn;
|
||||||
RawSwitch swtch;
|
RawSwitch swtch;
|
||||||
unsigned int phases; // -5=!FP4, 0=normal, 5=FP4
|
unsigned int phases; // -5=!FP4, 0=normal, 5=FP4
|
||||||
|
@ -882,6 +891,10 @@ class ScriptData {
|
||||||
class ModelData {
|
class ModelData {
|
||||||
public:
|
public:
|
||||||
ModelData();
|
ModelData();
|
||||||
|
|
||||||
|
ExpoData * insertInput(const int idx);
|
||||||
|
void removeInput(const int idx);
|
||||||
|
|
||||||
bool used;
|
bool used;
|
||||||
char name[12+1];
|
char name[12+1];
|
||||||
uint8_t modelVoice;
|
uint8_t modelVoice;
|
||||||
|
@ -937,7 +950,8 @@ class ModelData {
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
bool isempty();
|
bool isempty();
|
||||||
void setDefault(uint8_t id);
|
void setDefaultMixes(GeneralSettings & settings);
|
||||||
|
void setDefaultValues(unsigned int id, GeneralSettings & settings);
|
||||||
|
|
||||||
int getTrimValue(int phaseIdx, int trimIdx);
|
int getTrimValue(int phaseIdx, int trimIdx);
|
||||||
void setTrimValue(int phaseIdx, int trimIdx, int value);
|
void setTrimValue(int phaseIdx, int trimIdx, int value);
|
||||||
|
@ -1063,6 +1077,7 @@ enum Capability {
|
||||||
GetThrSwitch,
|
GetThrSwitch,
|
||||||
HasDisplayText,
|
HasDisplayText,
|
||||||
VirtualInputs,
|
VirtualInputs,
|
||||||
|
TrainerInputs,
|
||||||
LuaInputs,
|
LuaInputs,
|
||||||
LimitsPer1000,
|
LimitsPer1000,
|
||||||
EnhancedCurves,
|
EnhancedCurves,
|
||||||
|
|
|
@ -148,7 +148,7 @@ inline int geteepromsize() {
|
||||||
#include "radio/src/lua/src/lcorolib.c"
|
#include "radio/src/lua/src/lcorolib.c"
|
||||||
|
|
||||||
|
|
||||||
int16_t g_anas[NUM_STICKS+BOARD_X9D_NUM_POTS];
|
int16_t g_anas[NUM_STICKS+5];
|
||||||
|
|
||||||
uint16_t anaIn(uint8_t chan)
|
uint16_t anaIn(uint8_t chan)
|
||||||
{
|
{
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#define HAS_PERSISTENT_TIMERS(board) (IS_ARM(board) || board == BOARD_GRUVIN9X)
|
#define HAS_PERSISTENT_TIMERS(board) (IS_ARM(board) || board == BOARD_GRUVIN9X)
|
||||||
#define HAS_LARGE_LCD(board) IS_TARANIS(board)
|
#define HAS_LARGE_LCD(board) IS_TARANIS(board)
|
||||||
#define MAX_VIEWS(board) (HAS_LARGE_LCD(board) ? 2 : 256)
|
#define MAX_VIEWS(board) (HAS_LARGE_LCD(board) ? 2 : 256)
|
||||||
#define MAX_POTS(board) (IS_TARANIS(board) ? 4 : 3)
|
#define MAX_POTS(board, version) (IS_TARANIS(board) ? (version>=216 ? 5 : 4) : 3)
|
||||||
#define MAX_SWITCHES(board) (IS_TARANIS(board) ? 8 : 7)
|
#define MAX_SWITCHES(board) (IS_TARANIS(board) ? 8 : 7)
|
||||||
#define MAX_SWITCHES_POSITION(board) (IS_TARANIS(board) ? 22 : 9)
|
#define MAX_SWITCHES_POSITION(board) (IS_TARANIS(board) ? 22 : 9)
|
||||||
#define MAX_ROTARY_ENCODERS(board) (board==BOARD_GRUVIN9X ? 2 : (board==BOARD_SKY9X ? 1 : 0))
|
#define MAX_ROTARY_ENCODERS(board) (board==BOARD_GRUVIN9X ? 2 : (board==BOARD_SKY9X ? 1 : 0))
|
||||||
|
@ -60,8 +60,8 @@ class SwitchesConversionTable: public ConversionTable {
|
||||||
addConversion(RawSwitch(SWITCH_TYPE_SWITCH, s), val++);
|
addConversion(RawSwitch(SWITCH_TYPE_SWITCH, s), val++);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version >= 216) {
|
if (IS_TARANIS(board) && version >= 216) {
|
||||||
for (int i=1; i<=GetEepromInterface()->getCapability(MultiposPots) * GetEepromInterface()->getCapability(MultiposPotsPositions); i++) {
|
for (int i=1; i<=3*6; i++) {
|
||||||
addConversion(RawSwitch(SWITCH_TYPE_MULTIPOS_POT, -i), -val+offset);
|
addConversion(RawSwitch(SWITCH_TYPE_MULTIPOS_POT, -i), -val+offset);
|
||||||
addConversion(RawSwitch(SWITCH_TYPE_MULTIPOS_POT, i), val++);
|
addConversion(RawSwitch(SWITCH_TYPE_MULTIPOS_POT, i), val++);
|
||||||
}
|
}
|
||||||
|
@ -172,7 +172,7 @@ class SourcesConversionTable: public ConversionTable {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i<4+MAX_POTS(board); i++)
|
for (int i=0; i<4+MAX_POTS(board, version); i++)
|
||||||
addConversion(RawSource(SOURCE_TYPE_STICK, i), val++);
|
addConversion(RawSource(SOURCE_TYPE_STICK, i), val++);
|
||||||
|
|
||||||
for (int i=0; i<MAX_ROTARY_ENCODERS(board); i++)
|
for (int i=0; i<MAX_ROTARY_ENCODERS(board); i++)
|
||||||
|
@ -733,12 +733,13 @@ void importGvarParam(int & gvar, const int _gvar)
|
||||||
|
|
||||||
class MixField: public TransformedField {
|
class MixField: public TransformedField {
|
||||||
public:
|
public:
|
||||||
MixField(MixData & mix, BoardEnum board, unsigned int version):
|
MixField(MixData & mix, BoardEnum board, unsigned int version, ModelData * model):
|
||||||
TransformedField(internalField),
|
TransformedField(internalField),
|
||||||
internalField("Mix"),
|
internalField("Mix"),
|
||||||
mix(mix),
|
mix(mix),
|
||||||
board(board),
|
board(board),
|
||||||
version(version)
|
version(version),
|
||||||
|
model(model)
|
||||||
{
|
{
|
||||||
if (IS_TARANIS(board) && version >= 216) {
|
if (IS_TARANIS(board) && version >= 216) {
|
||||||
internalField.Append(new UnsignedField<8>(_destCh));
|
internalField.Append(new UnsignedField<8>(_destCh));
|
||||||
|
@ -878,6 +879,14 @@ class MixField: public TransformedField {
|
||||||
|
|
||||||
virtual void afterImport()
|
virtual void afterImport()
|
||||||
{
|
{
|
||||||
|
if (IS_TARANIS(board) || version < 216) {
|
||||||
|
if (mix.srcRaw.type == SOURCE_TYPE_STICK && mix.srcRaw.index < NUM_STICKS) {
|
||||||
|
if (!mix.noExpo) {
|
||||||
|
mix.srcRaw = RawSource(SOURCE_TYPE_VIRTUAL_INPUT, mix.srcRaw.index, model);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mix.srcRaw.type != SOURCE_TYPE_NONE) {
|
if (mix.srcRaw.type != SOURCE_TYPE_NONE) {
|
||||||
mix.destCh = _destCh + 1;
|
mix.destCh = _destCh + 1;
|
||||||
if (!IS_ARM(board) || version < 216) {
|
if (!IS_ARM(board) || version < 216) {
|
||||||
|
@ -908,6 +917,7 @@ class MixField: public TransformedField {
|
||||||
MixData & mix;
|
MixData & mix;
|
||||||
BoardEnum board;
|
BoardEnum board;
|
||||||
unsigned int version;
|
unsigned int version;
|
||||||
|
ModelData * model;
|
||||||
unsigned int _destCh;
|
unsigned int _destCh;
|
||||||
bool _curveMode;
|
bool _curveMode;
|
||||||
int _curveParam;
|
int _curveParam;
|
||||||
|
@ -917,11 +927,11 @@ class MixField: public TransformedField {
|
||||||
unsigned int _offsetMode;
|
unsigned int _offsetMode;
|
||||||
};
|
};
|
||||||
|
|
||||||
class ExpoField: public TransformedField {
|
class InputField: public TransformedField {
|
||||||
public:
|
public:
|
||||||
ExpoField(ExpoData & expo, BoardEnum board, unsigned int version):
|
InputField(ExpoData & expo, BoardEnum board, unsigned int version):
|
||||||
TransformedField(internalField),
|
TransformedField(internalField),
|
||||||
internalField("Expo"),
|
internalField("Input"),
|
||||||
expo(expo),
|
expo(expo),
|
||||||
board(board),
|
board(board),
|
||||||
version(version)
|
version(version)
|
||||||
|
@ -940,11 +950,11 @@ class ExpoField: public TransformedField {
|
||||||
internalField.Append(new SpareBitsField<8>());
|
internalField.Append(new SpareBitsField<8>());
|
||||||
}
|
}
|
||||||
else if (IS_ARM(board)) {
|
else if (IS_ARM(board)) {
|
||||||
internalField.Append(new UnsignedField<8>(expo.mode));
|
internalField.Append(new UnsignedField<8>(expo.mode, "Mode"));
|
||||||
internalField.Append(new UnsignedField<8>(expo.chn));
|
internalField.Append(new UnsignedField<8>(expo.chn, "Channel"));
|
||||||
internalField.Append(new SwitchField<8>(expo.swtch, board, version));
|
internalField.Append(new SwitchField<8>(expo.swtch, board, version));
|
||||||
internalField.Append(new UnsignedField<16>(expo.phases));
|
internalField.Append(new UnsignedField<16>(expo.phases, "Phases"));
|
||||||
internalField.Append(new SignedField<8>(_weight));
|
internalField.Append(new SignedField<8>(_weight, "Weight"));
|
||||||
internalField.Append(new BoolField<8>(_curveMode));
|
internalField.Append(new BoolField<8>(_curveMode));
|
||||||
if (HAS_LARGE_LCD(board)) {
|
if (HAS_LARGE_LCD(board)) {
|
||||||
internalField.Append(new ZCharField<8>(expo.name));
|
internalField.Append(new ZCharField<8>(expo.name));
|
||||||
|
@ -979,6 +989,7 @@ class ExpoField: public TransformedField {
|
||||||
virtual void beforeExport()
|
virtual void beforeExport()
|
||||||
{
|
{
|
||||||
_weight = smallGvarToEEPROM(expo.weight);
|
_weight = smallGvarToEEPROM(expo.weight);
|
||||||
|
|
||||||
if (!IS_TARANIS(board) || version < 216) {
|
if (!IS_TARANIS(board) || version < 216) {
|
||||||
if (expo.curve.type==CurveReference::CURVE_REF_FUNC && expo.curve.value) {
|
if (expo.curve.type==CurveReference::CURVE_REF_FUNC && expo.curve.value) {
|
||||||
_curveMode = true;
|
_curveMode = true;
|
||||||
|
@ -998,8 +1009,10 @@ class ExpoField: public TransformedField {
|
||||||
virtual void afterImport()
|
virtual void afterImport()
|
||||||
{
|
{
|
||||||
if (IS_TARANIS(board) && version < 216) {
|
if (IS_TARANIS(board) && version < 216) {
|
||||||
|
if (expo.mode) {
|
||||||
expo.srcRaw = RawSource(SOURCE_TYPE_STICK, expo.chn);
|
expo.srcRaw = RawSource(SOURCE_TYPE_STICK, expo.chn);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
expo.weight = smallGvarToC9x(_weight);
|
expo.weight = smallGvarToC9x(_weight);
|
||||||
|
|
||||||
|
@ -1091,7 +1104,7 @@ class CurvesField: public TransformedField {
|
||||||
CurveData *curve = &curves[i];
|
CurveData *curve = &curves[i];
|
||||||
int size = (curve->type == CurveData::CURVE_TYPE_CUSTOM ? curve->count * 2 - 2 : curve->count);
|
int size = (curve->type == CurveData::CURVE_TYPE_CUSTOM ? curve->count * 2 - 2 : curve->count);
|
||||||
if (offset+size > maxPoints) {
|
if (offset+size > maxPoints) {
|
||||||
EEPROMWarnings += ::QObject::tr("openTx only accepts %1 points in all curves").arg(maxPoints) + "\n";
|
EEPROMWarnings += ::QObject::tr("OpenTX only accepts %1 points in all curves").arg(maxPoints) + "\n";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (!IS_TARANIS(board) || version < 216) {
|
if (!IS_TARANIS(board) || version < 216) {
|
||||||
|
@ -1128,6 +1141,16 @@ class CurvesField: public TransformedField {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (curve->count > 17) {
|
||||||
|
qDebug() << "Wrong points count" << curve->count;
|
||||||
|
curve->count = 0;
|
||||||
|
for (int j=0; j<maxCurves; j++) {
|
||||||
|
CurveData *curve = &curves[j];
|
||||||
|
curve->clear(5);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for (int j=0; j<curve->count; j++) {
|
for (int j=0; j<curve->count; j++) {
|
||||||
curve->points[j].y = *cur++;
|
curve->points[j].y = *cur++;
|
||||||
}
|
}
|
||||||
|
@ -1268,13 +1291,14 @@ class AndSwitchesConversionTable: public ConversionTable {
|
||||||
|
|
||||||
class LogicalSwitchField: public TransformedField {
|
class LogicalSwitchField: public TransformedField {
|
||||||
public:
|
public:
|
||||||
LogicalSwitchField(LogicalSwitchData & csw, BoardEnum board, unsigned int version, unsigned int variant):
|
LogicalSwitchField(LogicalSwitchData & csw, BoardEnum board, unsigned int version, unsigned int variant, ModelData * model=NULL):
|
||||||
TransformedField(internalField),
|
TransformedField(internalField),
|
||||||
internalField("LogicalSwitch"),
|
internalField("LogicalSwitch"),
|
||||||
csw(csw),
|
csw(csw),
|
||||||
board(board),
|
board(board),
|
||||||
version(version),
|
version(version),
|
||||||
variant(variant),
|
variant(variant),
|
||||||
|
model(model),
|
||||||
functionsConversionTable(board, version),
|
functionsConversionTable(board, version),
|
||||||
sourcesConversionTable(SourcesConversionTable::getInstance(board, version, variant, (version >= 214 || (!IS_ARM(board) && version >= 213)) ? 0 : FLAG_NOSWITCHES)),
|
sourcesConversionTable(SourcesConversionTable::getInstance(board, version, variant, (version >= 214 || (!IS_ARM(board) && version >= 213)) ? 0 : FLAG_NOSWITCHES)),
|
||||||
switchesConversionTable(SwitchesConversionTable::getInstance(board, version)),
|
switchesConversionTable(SwitchesConversionTable::getInstance(board, version)),
|
||||||
|
@ -1364,7 +1388,7 @@ class LogicalSwitchField: public TransformedField {
|
||||||
else if (csw.func != LS_FN_OFF) {
|
else if (csw.func != LS_FN_OFF) {
|
||||||
sourcesConversionTable->importValue((uint8_t)v1, csw.val1);
|
sourcesConversionTable->importValue((uint8_t)v1, csw.val1);
|
||||||
csw.val2 = v2;
|
csw.val2 = v2;
|
||||||
RawSource val1(csw.val1);
|
RawSource val1(csw.val1, model);
|
||||||
if (IS_ARM(board) && version < 216 && val1.type == SOURCE_TYPE_TELEMETRY) {
|
if (IS_ARM(board) && version < 216 && val1.type == SOURCE_TYPE_TELEMETRY) {
|
||||||
switch (val1.index) {
|
switch (val1.index) {
|
||||||
case TELEMETRY_SOURCE_TIMER1:
|
case TELEMETRY_SOURCE_TIMER1:
|
||||||
|
@ -1416,6 +1440,7 @@ class LogicalSwitchField: public TransformedField {
|
||||||
BoardEnum board;
|
BoardEnum board;
|
||||||
unsigned int version;
|
unsigned int version;
|
||||||
unsigned int variant;
|
unsigned int variant;
|
||||||
|
ModelData * model;
|
||||||
LogicalSwitchesFunctionsTable functionsConversionTable;
|
LogicalSwitchesFunctionsTable functionsConversionTable;
|
||||||
SourcesConversionTable * sourcesConversionTable;
|
SourcesConversionTable * sourcesConversionTable;
|
||||||
SwitchesConversionTable * switchesConversionTable;
|
SwitchesConversionTable * switchesConversionTable;
|
||||||
|
@ -2133,11 +2158,12 @@ class MavlinkField: public StructField {
|
||||||
int exportPpmDelay(int delay) { return (delay - 300) / 50; }
|
int exportPpmDelay(int delay) { return (delay - 300) / 50; }
|
||||||
int importPpmDelay(int delay) { return 300 + 50 * delay; }
|
int importPpmDelay(int delay) { return 300 + 50 * delay; }
|
||||||
|
|
||||||
Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, unsigned int version, unsigned int variant):
|
OpenTxModelData::OpenTxModelData(ModelData & modelData, BoardEnum board, unsigned int version, unsigned int variant):
|
||||||
TransformedField(internalField),
|
TransformedField(internalField),
|
||||||
internalField("ModelData"),
|
internalField("ModelData"),
|
||||||
modelData(modelData),
|
modelData(modelData),
|
||||||
board(board),
|
board(board),
|
||||||
|
version(version),
|
||||||
variant(variant),
|
variant(variant),
|
||||||
protocolsConversionTable(board)
|
protocolsConversionTable(board)
|
||||||
{
|
{
|
||||||
|
@ -2227,14 +2253,14 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u
|
||||||
internalField.Append(new UnsignedField<8>(modelData.beepANACenter));
|
internalField.Append(new UnsignedField<8>(modelData.beepANACenter));
|
||||||
|
|
||||||
for (int i=0; i<MAX_MIXERS(board, version); i++)
|
for (int i=0; i<MAX_MIXERS(board, version); i++)
|
||||||
internalField.Append(new MixField(modelData.mixData[i], board, version));
|
internalField.Append(new MixField(modelData.mixData[i], board, version, &modelData));
|
||||||
for (int i=0; i<MAX_CHANNELS(board, version); i++)
|
for (int i=0; i<MAX_CHANNELS(board, version); i++)
|
||||||
internalField.Append(new LimitField(modelData.limitData[i], board, version));
|
internalField.Append(new LimitField(modelData.limitData[i], board, version));
|
||||||
for (int i=0; i<MAX_EXPOS(board, version); i++)
|
for (int i=0; i<MAX_EXPOS(board, version); i++)
|
||||||
internalField.Append(new ExpoField(modelData.expoData[i], board, version));
|
internalField.Append(new InputField(modelData.expoData[i], board, version));
|
||||||
internalField.Append(new CurvesField(modelData.curves, board, version));
|
internalField.Append(new CurvesField(modelData.curves, board, version));
|
||||||
for (int i=0; i<MAX_CUSTOM_SWITCHES(board, version); i++)
|
for (int i=0; i<MAX_CUSTOM_SWITCHES(board, version); i++)
|
||||||
internalField.Append(new LogicalSwitchField(modelData.customSw[i], board, version, variant));
|
internalField.Append(new LogicalSwitchField(modelData.customSw[i], board, version, variant, &modelData));
|
||||||
for (int i=0; i<MAX_CUSTOM_FUNCTIONS(board, version); i++) {
|
for (int i=0; i<MAX_CUSTOM_FUNCTIONS(board, version); i++) {
|
||||||
if (IS_ARM(board))
|
if (IS_ARM(board))
|
||||||
internalField.Append(new ArmCustomFunctionField(modelData.funcSw[i], board, version, variant));
|
internalField.Append(new ArmCustomFunctionField(modelData.funcSw[i], board, version, variant));
|
||||||
|
@ -2346,7 +2372,7 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Open9xModelDataNew::beforeExport()
|
void OpenTxModelData::beforeExport()
|
||||||
{
|
{
|
||||||
// qDebug() << QString("before export model") << modelData.name;
|
// qDebug() << QString("before export model") << modelData.name;
|
||||||
|
|
||||||
|
@ -2360,10 +2386,29 @@ void Open9xModelDataNew::beforeExport()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Open9xModelDataNew::afterImport()
|
void OpenTxModelData::afterImport()
|
||||||
{
|
{
|
||||||
// qDebug() << QString("after import model") << modelData.name ;
|
// qDebug() << QString("after import model") << modelData.name ;
|
||||||
|
|
||||||
|
if (IS_TARANIS(board) && version < 216) {
|
||||||
|
for (unsigned int i=0; i<NUM_STICKS; i++) {
|
||||||
|
for (int j=0; j<64; j++) {
|
||||||
|
ExpoData * expo = &modelData.expoData[j];
|
||||||
|
if (expo->mode == INPUT_MODE_BOTH && expo->chn == i && expo->phases == 0 && expo->swtch.type == SWITCH_TYPE_NONE)
|
||||||
|
break;
|
||||||
|
if (expo->mode == 0 || expo->chn > i) {
|
||||||
|
ExpoData * newExpo = modelData.insertInput(j);
|
||||||
|
newExpo->mode = INPUT_MODE_BOTH;
|
||||||
|
newExpo->srcRaw = RawSource(SOURCE_TYPE_STICK, i);
|
||||||
|
newExpo->chn = i;
|
||||||
|
newExpo->weight = 100;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
strncpy(modelData.inputNames[i], AnalogString(i).toLatin1().constData(), sizeof(modelData.inputNames[i])-1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for (int module=0; module<3; module++) {
|
for (int module=0; module<3; module++) {
|
||||||
if (modelData.moduleData[module].protocol == PXX_XJT_X16 || modelData.moduleData[module].protocol == LP45) {
|
if (modelData.moduleData[module].protocol == PXX_XJT_X16 || modelData.moduleData[module].protocol == LP45) {
|
||||||
if (subprotocols[module] >= 0)
|
if (subprotocols[module] >= 0)
|
||||||
|
@ -2374,13 +2419,13 @@ void Open9xModelDataNew::afterImport()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Open9xGeneralDataNew::Open9xGeneralDataNew(GeneralSettings & generalData, BoardEnum board, unsigned int version, unsigned int variant):
|
OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, BoardEnum board, unsigned int version, unsigned int variant):
|
||||||
TransformedField(internalField),
|
TransformedField(internalField),
|
||||||
internalField("General Settings"),
|
internalField("General Settings"),
|
||||||
generalData(generalData),
|
generalData(generalData),
|
||||||
board(board),
|
board(board),
|
||||||
version(version),
|
version(version),
|
||||||
inputsCount(IS_TARANIS(board) ? 8 : 7)
|
inputsCount(4 + MAX_POTS(board, version))
|
||||||
{
|
{
|
||||||
generalData.version = version;
|
generalData.version = version;
|
||||||
generalData.variant = variant;
|
generalData.variant = variant;
|
||||||
|
@ -2511,18 +2556,18 @@ Open9xGeneralDataNew::Open9xGeneralDataNew(GeneralSettings & generalData, BoardE
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Open9xGeneralDataNew::beforeExport()
|
void OpenTxGeneralData::beforeExport()
|
||||||
{
|
{
|
||||||
uint16_t sum = 0;
|
uint16_t sum = 0;
|
||||||
if (version >= 216) {
|
if (version >= 216) {
|
||||||
int count = 0;
|
int count = 0;
|
||||||
for (int i=0; i<inputsCount; i++) {
|
for (int i=0; i<inputsCount; i++) {
|
||||||
sum += generalData.calibMid[i];
|
sum += generalData.calibMid[i];
|
||||||
if (++count == inputsCount+5) break;
|
if (++count == 12) break;
|
||||||
sum += generalData.calibSpanNeg[i];
|
sum += generalData.calibSpanNeg[i];
|
||||||
if (++count == inputsCount+5) break;
|
if (++count == 12) break;
|
||||||
sum += generalData.calibSpanPos[i];
|
sum += generalData.calibSpanPos[i];
|
||||||
if (++count == inputsCount+5) break;
|
if (++count == 12) break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -2534,6 +2579,6 @@ void Open9xGeneralDataNew::beforeExport()
|
||||||
chkSum = sum;
|
chkSum = sum;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Open9xGeneralDataNew::afterImport()
|
void OpenTxGeneralData::afterImport()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
|
@ -51,9 +51,9 @@
|
||||||
#define O9X_ARM_MAX_CSFUNCOLD 13
|
#define O9X_ARM_MAX_CSFUNCOLD 13
|
||||||
#define O9X_ARM_MAX_CSFUNC 15
|
#define O9X_ARM_MAX_CSFUNC 15
|
||||||
|
|
||||||
class Open9xGeneralDataNew: public TransformedField {
|
class OpenTxGeneralData: public TransformedField {
|
||||||
public:
|
public:
|
||||||
Open9xGeneralDataNew(GeneralSettings & generalData, BoardEnum board, unsigned int version, unsigned int variant=0);
|
OpenTxGeneralData(GeneralSettings & generalData, BoardEnum board, unsigned int version, unsigned int variant=0);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void beforeExport();
|
virtual void beforeExport();
|
||||||
|
@ -113,9 +113,9 @@ class ChannelsConversionTable: public ConversionTable
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class Open9xModelDataNew: public TransformedField {
|
class OpenTxModelData: public TransformedField {
|
||||||
public:
|
public:
|
||||||
Open9xModelDataNew(ModelData & modelData, BoardEnum board, unsigned int version, unsigned int variant);
|
OpenTxModelData(ModelData & modelData, BoardEnum board, unsigned int version, unsigned int variant);
|
||||||
|
|
||||||
const char * getName() { return name; }
|
const char * getName() { return name; }
|
||||||
|
|
||||||
|
@ -126,6 +126,7 @@ class Open9xModelDataNew: public TransformedField {
|
||||||
StructField internalField;
|
StructField internalField;
|
||||||
ModelData & modelData;
|
ModelData & modelData;
|
||||||
BoardEnum board;
|
BoardEnum board;
|
||||||
|
unsigned int version;
|
||||||
unsigned int variant;
|
unsigned int variant;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -236,11 +236,11 @@ bool OpenTxInterface::loadModel(uint8_t version, ModelData &model, uint8_t *data
|
||||||
return loadModel<Open9xArmModelData_v212>(model, data, index);
|
return loadModel<Open9xArmModelData_v212>(model, data, index);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return loadModelVariant<Open9xModelDataNew>(index, model, data, version, variant);
|
return loadModelVariant<OpenTxModelData>(index, model, data, version, variant);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (version >= 213) {
|
else if (version >= 213) {
|
||||||
return loadModelVariant<Open9xModelDataNew>(index, model, data, version, variant);
|
return loadModelVariant<OpenTxModelData>(index, model, data, version, variant);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::cout << " ko\n";
|
std::cout << " ko\n";
|
||||||
|
@ -336,7 +336,7 @@ bool OpenTxInterface::load(RadioData &radioData, const uint8_t *eeprom, int size
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!loadGeneral<Open9xGeneralDataNew>(radioData.generalSettings, version)) {
|
if (!loadGeneral<OpenTxGeneralData>(radioData.generalSettings, version)) {
|
||||||
std::cout << " ko\n";
|
std::cout << " ko\n";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -383,14 +383,14 @@ int OpenTxInterface::save(uint8_t *eeprom, RadioData &radioData, uint32_t varian
|
||||||
variant |= M128_VARIANT;
|
variant |= M128_VARIANT;
|
||||||
}
|
}
|
||||||
|
|
||||||
int result = saveGeneral<Open9xGeneralDataNew>(radioData.generalSettings, board, version, variant);
|
int result = saveGeneral<OpenTxGeneralData>(radioData.generalSettings, board, version, variant);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i<getMaxModels(); i++) {
|
for (int i=0; i<getMaxModels(); i++) {
|
||||||
if (!radioData.models[i].isempty()) {
|
if (!radioData.models[i].isempty()) {
|
||||||
result = saveModel<Open9xModelDataNew>(i, radioData.models[i], version, variant);
|
result = saveModel<OpenTxModelData>(i, radioData.models[i], version, variant);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -417,7 +417,7 @@ int OpenTxInterface::getSize(ModelData &model)
|
||||||
uint8_t tmp[EESIZE_RLC_MAX];
|
uint8_t tmp[EESIZE_RLC_MAX];
|
||||||
efile->EeFsCreate(tmp, EESIZE_RLC_MAX, board);
|
efile->EeFsCreate(tmp, EESIZE_RLC_MAX, board);
|
||||||
|
|
||||||
Open9xModelDataNew open9xModel(model, board, 255, GetCurrentFirmwareVariant());
|
OpenTxModelData open9xModel(model, board, 255, GetCurrentFirmwareVariant());
|
||||||
|
|
||||||
QByteArray eeprom;
|
QByteArray eeprom;
|
||||||
open9xModel.Export(eeprom);
|
open9xModel.Export(eeprom);
|
||||||
|
@ -436,7 +436,7 @@ int OpenTxInterface::getSize(GeneralSettings &settings)
|
||||||
uint8_t tmp[EESIZE_RLC_MAX];
|
uint8_t tmp[EESIZE_RLC_MAX];
|
||||||
efile->EeFsCreate(tmp, EESIZE_RLC_MAX, board);
|
efile->EeFsCreate(tmp, EESIZE_RLC_MAX, board);
|
||||||
|
|
||||||
Open9xGeneralDataNew open9xGeneral(settings, board, 255, GetCurrentFirmwareVariant());
|
OpenTxGeneralData open9xGeneral(settings, board, 255, GetCurrentFirmwareVariant());
|
||||||
// open9xGeneral.Dump();
|
// open9xGeneral.Dump();
|
||||||
|
|
||||||
QByteArray eeprom;
|
QByteArray eeprom;
|
||||||
|
@ -511,7 +511,7 @@ int OpenTxInterface::getCapability(const Capability capability)
|
||||||
else
|
else
|
||||||
return 0;
|
return 0;
|
||||||
case Pots:
|
case Pots:
|
||||||
return (IS_TARANIS(board) ? 4 : 3);
|
return (IS_TARANIS(board) ? 5 : 3);
|
||||||
case Switches:
|
case Switches:
|
||||||
return (IS_TARANIS(board) ? 8 : 7);
|
return (IS_TARANIS(board) ? 8 : 7);
|
||||||
case SwitchesPositions:
|
case SwitchesPositions:
|
||||||
|
@ -671,6 +671,8 @@ int OpenTxInterface::getCapability(const Capability capability)
|
||||||
case HasDisplayText:
|
case HasDisplayText:
|
||||||
case VirtualInputs:
|
case VirtualInputs:
|
||||||
return IS_TARANIS(board) ? 32 : 0;
|
return IS_TARANIS(board) ? 32 : 0;
|
||||||
|
case TrainerInputs:
|
||||||
|
return IS_ARM(board) ? 16 : 8;
|
||||||
case LuaInputs:
|
case LuaInputs:
|
||||||
case LimitsPer1000:
|
case LimitsPer1000:
|
||||||
case EnhancedCurves:
|
case EnhancedCurves:
|
||||||
|
@ -681,7 +683,7 @@ int OpenTxInterface::getCapability(const Capability capability)
|
||||||
case HasMahPersistent:
|
case HasMahPersistent:
|
||||||
return (IS_ARM(board) ? true : false);
|
return (IS_ARM(board) ? true : false);
|
||||||
case MultiposPots:
|
case MultiposPots:
|
||||||
return IS_TARANIS(board) ? 2 : 0;
|
return IS_TARANIS(board) ? 3 : 0;
|
||||||
case MultiposPotsPositions:
|
case MultiposPotsPositions:
|
||||||
return IS_TARANIS(board) ? 6 : 0;
|
return IS_TARANIS(board) ? 6 : 0;
|
||||||
case SimulatorVariant:
|
case SimulatorVariant:
|
||||||
|
|
|
@ -599,7 +599,7 @@ void populateSourceCB(QComboBox *b, const RawSource & source, const ModelData &
|
||||||
if (item == source) b->setCurrentIndex(b->count()-1);
|
if (item == source) b->setCurrentIndex(b->count()-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i=0; i<NUM_PPM(GetEepromInterface()->getBoard()); i++) {
|
for (int i=0; i<GetEepromInterface()->getCapability(TrainerInputs); i++) {
|
||||||
item = RawSource(SOURCE_TYPE_PPM, i);
|
item = RawSource(SOURCE_TYPE_PPM, i);
|
||||||
b->addItem(item.toString(), item.toValue());
|
b->addItem(item.toString(), item.toValue());
|
||||||
if (item == source) b->setCurrentIndex(b->count()-1);
|
if (item == source) b->setCurrentIndex(b->count()-1);
|
||||||
|
|
|
@ -155,7 +155,7 @@ void MdiChild::OpenEditWindow(bool wizard=false)
|
||||||
ModelData &model = radioData.models[row - 1];
|
ModelData &model = radioData.models[row - 1];
|
||||||
|
|
||||||
if (model.isempty()) {
|
if (model.isempty()) {
|
||||||
model.setDefault(row - 1);
|
model.setDefaultValues(row - 1, radioData.generalSettings);
|
||||||
isNew = true; //modeledit - clear mixes, apply first template
|
isNew = true; //modeledit - clear mixes, apply first template
|
||||||
setModified();
|
setModified();
|
||||||
}
|
}
|
||||||
|
|
|
@ -145,25 +145,23 @@ void InputsPanel::update()
|
||||||
bool InputsPanel::gm_insertExpo(int idx)
|
bool InputsPanel::gm_insertExpo(int idx)
|
||||||
{
|
{
|
||||||
if (idx<0 || idx>=C9X_MAX_EXPOS || model.expoData[C9X_MAX_EXPOS-1].mode > 0) {
|
if (idx<0 || idx>=C9X_MAX_EXPOS || model.expoData[C9X_MAX_EXPOS-1].mode > 0) {
|
||||||
QMessageBox::information(this, "companion", tr("Not enough available inputs!"));
|
QMessageBox::information(this, "Companion", tr("Not enough available inputs!"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int chn = model.expoData[idx].chn;
|
int chn = model.expoData[idx].chn;
|
||||||
memmove(&model.expoData[idx+1],&model.expoData[idx],
|
|
||||||
(C9X_MAX_EXPOS-(idx+1))*sizeof(ExpoData) );
|
ExpoData * newExpo = model.insertInput(idx);
|
||||||
memset(&model.expoData[idx],0,sizeof(ExpoData));
|
newExpo->chn = chn;
|
||||||
model.expoData[idx].chn = chn;
|
newExpo->weight = 100;
|
||||||
model.expoData[idx].weight = 100;
|
newExpo->mode = INPUT_MODE_BOTH;
|
||||||
model.expoData[idx].mode = 3 /* TODO enum */;
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputsPanel::gm_deleteExpo(int index)
|
void InputsPanel::gm_deleteExpo(int index)
|
||||||
{
|
{
|
||||||
memmove(&model.expoData[index],&model.expoData[index+1],
|
model.removeInput(index);
|
||||||
(C9X_MAX_EXPOS-(index+1))*sizeof(ExpoData));
|
|
||||||
memset(&model.expoData[C9X_MAX_EXPOS-1],0,sizeof(ExpoData));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InputsPanel::gm_openExpo(int index)
|
void InputsPanel::gm_openExpo(int index)
|
||||||
|
|
|
@ -6,20 +6,15 @@
|
||||||
class MixersList : public QListWidget
|
class MixersList : public QListWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit MixersList(QWidget *parent, bool expo);
|
explicit MixersList(QWidget *parent, bool expo);
|
||||||
// QMimeData * mimeData ( const QList<QListWidgetItem *> items );
|
|
||||||
|
|
||||||
void keyPressEvent(QKeyEvent *event);
|
void keyPressEvent(QKeyEvent *event);
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void mimeDropped(int index, const QMimeData *data, Qt::DropAction action);
|
void mimeDropped(int index, const QMimeData *data, Qt::DropAction action);
|
||||||
void keyWasPressed(QKeyEvent *event);
|
void keyWasPressed(QKeyEvent *event);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
bool dropMimeData(int index, const QMimeData *data, Qt::DropAction action);
|
bool dropMimeData(int index, const QMimeData *data, Qt::DropAction action);
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,8 @@ void MixesPanel::update()
|
||||||
curDest++;
|
curDest++;
|
||||||
if (curDest > outputs) {
|
if (curDest > outputs) {
|
||||||
str = tr("X%1 ").arg(curDest-outputs);
|
str = tr("X%1 ").arg(curDest-outputs);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
str = tr("CH%1%2").arg(curDest/10).arg(curDest%10);
|
str = tr("CH%1%2").arg(curDest/10).arg(curDest%10);
|
||||||
if (GetEepromInterface()->getCapability(HasChNames) && showNames) {
|
if (GetEepromInterface()->getCapability(HasChNames) && showNames) {
|
||||||
QString name=model.limitData[curDest-1].name;
|
QString name=model.limitData[curDest-1].name;
|
||||||
|
@ -80,7 +81,8 @@ void MixesPanel::update()
|
||||||
|
|
||||||
if (md->destCh > outputs) {
|
if (md->destCh > outputs) {
|
||||||
str = tr("X%1 ").arg(md->destCh-outputs);
|
str = tr("X%1 ").arg(md->destCh-outputs);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
str = tr("CH%1%2").arg(md->destCh/10).arg(md->destCh%10);
|
str = tr("CH%1%2").arg(md->destCh/10).arg(md->destCh%10);
|
||||||
str.append(" ");
|
str.append(" ");
|
||||||
if (GetEepromInterface()->getCapability(HasChNames) && showNames) {
|
if (GetEepromInterface()->getCapability(HasChNames) && showNames) {
|
||||||
|
@ -110,7 +112,9 @@ void MixesPanel::update()
|
||||||
QString phasesStr = getPhasesStr(md->phases, model);
|
QString phasesStr = getPhasesStr(md->phases, model);
|
||||||
if (!phasesStr.isEmpty()) str += " " + phasesStr;
|
if (!phasesStr.isEmpty()) str += " " + phasesStr;
|
||||||
|
|
||||||
if (md->swtch.type != SWITCH_TYPE_NONE) str += " " + tr("Switch(%1)").arg(md->swtch.toString());
|
if (md->swtch.type != SWITCH_TYPE_NONE) {
|
||||||
|
str += " " + tr("Switch(%1)").arg(md->swtch.toString());
|
||||||
|
}
|
||||||
|
|
||||||
if (!GetEepromInterface()->getCapability(VirtualInputs)) {
|
if (!GetEepromInterface()->getCapability(VirtualInputs)) {
|
||||||
if (md->carryTrim>0) {
|
if (md->carryTrim>0) {
|
||||||
|
|
|
@ -58,11 +58,11 @@ public:
|
||||||
ModelsListWidget::ModelsListWidget(QWidget *parent):
|
ModelsListWidget::ModelsListWidget(QWidget *parent):
|
||||||
QListWidget(parent)
|
QListWidget(parent)
|
||||||
{
|
{
|
||||||
this->setFont(QFont("Courier New",12));
|
setFont(QFont("Courier New",12));
|
||||||
radioData = &((MdiChild *)parent)->radioData;
|
radioData = &((MdiChild *)parent)->radioData;
|
||||||
refreshList();
|
refreshList();
|
||||||
|
|
||||||
connect(this, SIGNAL(itemActivated(QListWidgetItem*)), this, SLOT(OpenEditWindow()));
|
connect(this, SIGNAL(doubleClicked(QModelIndex)), this, SLOT(OpenEditWindow()));
|
||||||
connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowContextMenu(const QPoint&)));
|
connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(ShowContextMenu(const QPoint&)));
|
||||||
connect(this, SIGNAL(currentRowChanged(int)), this, SLOT(viableModelSelected(int)));
|
connect(this, SIGNAL(currentRowChanged(int)), this, SLOT(viableModelSelected(int)));
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ ModelsListWidget::ModelsListWidget(QWidget *parent):
|
||||||
setDragDropOverwriteMode(true);
|
setDragDropOverwriteMode(true);
|
||||||
setDropIndicatorShown(true);
|
setDropIndicatorShown(true);
|
||||||
|
|
||||||
active_highlight_color = this->palette().color(QPalette::Active, QPalette::Highlight);
|
active_highlight_color = palette().color(QPalette::Active, QPalette::Highlight);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelsListWidget::ShowContextMenu(const QPoint& pos)
|
void ModelsListWidget::ShowContextMenu(const QPoint& pos)
|
||||||
|
|
|
@ -381,7 +381,7 @@ void referenceModelAudioFiles()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Switches Audio Files <switchname>-[up|mid|down].wav
|
// Switches Audio Files <switchname>-[up|mid|down].wav
|
||||||
for (int i=0; i<SWSRC_LAST_SWITCH+NUM_XPOTS*POTS_POS_COUNT && !found; i++) {
|
for (int i=0; i<SWSRC_LAST_SWITCH+NUM_XPOTS*XPOTS_MULTIPOS_COUNT && !found; i++) {
|
||||||
getSwitchAudioFile(path, i);
|
getSwitchAudioFile(path, i);
|
||||||
if (!strcmp(filename, fn)) {
|
if (!strcmp(filename, fn)) {
|
||||||
sdAvailableSwitchAudioFiles |= MASK_SWITCH_AUDIO_FILE(i);
|
sdAvailableSwitchAudioFiles |= MASK_SWITCH_AUDIO_FILE(i);
|
||||||
|
|
|
@ -212,13 +212,72 @@ PACK(typedef struct {
|
||||||
|
|
||||||
}) ModelData_v215;
|
}) ModelData_v215;
|
||||||
|
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
#define NUM_POTS_215 4
|
||||||
|
#else
|
||||||
|
#define NUM_POTS_215 3
|
||||||
|
#endif
|
||||||
|
|
||||||
PACK(typedef struct {
|
PACK(typedef struct {
|
||||||
uint8_t version;
|
uint8_t version;
|
||||||
uint16_t variant;
|
uint16_t variant;
|
||||||
int16_t calibMid[NUM_STICKS+NUM_POTS];
|
int16_t calibMid[NUM_STICKS+NUM_POTS_215];
|
||||||
int16_t calibSpanNeg[NUM_STICKS+NUM_POTS];
|
int16_t calibSpanNeg[NUM_STICKS+NUM_POTS_215];
|
||||||
int16_t calibSpanPos[NUM_STICKS+NUM_POTS];
|
int16_t calibSpanPos[NUM_STICKS+NUM_POTS_215];
|
||||||
uint16_t chkSum;
|
uint16_t chkSum;
|
||||||
|
int8_t currModel;
|
||||||
|
uint8_t contrast;
|
||||||
|
uint8_t vBatWarn;
|
||||||
|
int8_t vBatCalib;
|
||||||
|
int8_t backlightMode;
|
||||||
|
TrainerData trainer;
|
||||||
|
uint8_t view; // index of view in main screen
|
||||||
|
int8_t buzzerMode:2; // -2=quiet, -1=only alarms, 0=no keys, 1=all
|
||||||
|
uint8_t fai:1;
|
||||||
|
int8_t beepMode:2; // -2=quiet, -1=only alarms, 0=no keys, 1=all
|
||||||
|
uint8_t alarmsFlash:1;
|
||||||
|
uint8_t disableMemoryWarning:1;
|
||||||
|
uint8_t disableAlarmWarning:1;
|
||||||
|
uint8_t stickMode:2;
|
||||||
|
int8_t timezone:5;
|
||||||
|
uint8_t spare1:1;
|
||||||
|
uint8_t inactivityTimer;
|
||||||
|
uint8_t mavbaud:3;
|
||||||
|
SPLASH_MODE; /* 3bits */
|
||||||
|
int8_t hapticMode:2; // -2=quiet, -1=only alarms, 0=no keys, 1=all
|
||||||
|
uint8_t blOffBright:4;
|
||||||
|
uint8_t blOnBright:4;
|
||||||
|
uint8_t lightAutoOff;
|
||||||
|
uint8_t templateSetup; // RETA order for receiver channels
|
||||||
|
int8_t PPM_Multiplier;
|
||||||
|
int8_t hapticLength;
|
||||||
|
uint8_t reNavigation; // not used on STOCK board
|
||||||
|
int8_t beepLength:3;
|
||||||
|
uint8_t hapticStrength:3;
|
||||||
|
uint8_t gpsFormat:1;
|
||||||
|
uint8_t unexpectedShutdown:1;
|
||||||
|
uint8_t speakerPitch;
|
||||||
|
int8_t speakerVolume;
|
||||||
|
int8_t vBatMin;
|
||||||
|
int8_t vBatMax;
|
||||||
|
uint8_t backlightBright;
|
||||||
|
int8_t currentCalib;
|
||||||
|
int8_t temperatureWarn;
|
||||||
|
uint8_t mAhWarn;
|
||||||
|
uint16_t mAhUsed;
|
||||||
|
uint32_t globalTimer;
|
||||||
|
int8_t temperatureCalib;
|
||||||
|
uint8_t btBaudrate;
|
||||||
|
uint8_t optrexDisplay;
|
||||||
|
uint8_t sticksGain;
|
||||||
|
uint8_t rotarySteps;
|
||||||
|
uint8_t countryCode;
|
||||||
|
uint8_t imperial;
|
||||||
|
char ttsLanguage[2];
|
||||||
|
int8_t beepVolume;
|
||||||
|
int8_t wavVolume;
|
||||||
|
int8_t varioVolume;
|
||||||
|
int8_t backgroundVolume;
|
||||||
}) GeneralSettings_v215;
|
}) GeneralSettings_v215;
|
||||||
|
|
||||||
void ConvertGeneralSettings_215_to_216(EEGeneral &settings)
|
void ConvertGeneralSettings_215_to_216(EEGeneral &settings)
|
||||||
|
@ -227,12 +286,18 @@ void ConvertGeneralSettings_215_to_216(EEGeneral &settings)
|
||||||
memcpy(&oldSettings, &settings, sizeof(oldSettings));
|
memcpy(&oldSettings, &settings, sizeof(oldSettings));
|
||||||
|
|
||||||
settings.version = 216;
|
settings.version = 216;
|
||||||
for (int i=0; i<NUM_STICKS+NUM_POTS; i++) {
|
for (int i=0, j=0; i<NUM_STICKS+NUM_POTS; i++) {
|
||||||
settings.calib[i].mid = oldSettings.calibMid[i];
|
settings.calib[i].mid = oldSettings.calibMid[j];
|
||||||
settings.calib[i].spanNeg = oldSettings.calibSpanNeg[i];
|
settings.calib[i].spanNeg = oldSettings.calibSpanNeg[j];
|
||||||
settings.calib[i].spanPos = oldSettings.calibSpanPos[i];
|
settings.calib[i].spanPos = oldSettings.calibSpanPos[j];
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
if (i==POT3) continue;
|
||||||
|
#endif
|
||||||
|
j++;
|
||||||
}
|
}
|
||||||
settings.chkSum = evalChkSum();
|
settings.chkSum = evalChkSum();
|
||||||
|
|
||||||
|
memcpy(&settings.currModel, &oldSettings.currModel, sizeof(GeneralSettings_v215)-offsetof(GeneralSettings_v215, currModel));
|
||||||
}
|
}
|
||||||
|
|
||||||
int ConvertTelemetrySource_215_to_216(int source)
|
int ConvertTelemetrySource_215_to_216(int source)
|
||||||
|
@ -270,6 +335,9 @@ int ConvertSource_215_to_216(int source, bool insertZero=false)
|
||||||
// Virtual Inputs and Lua Outputs added
|
// Virtual Inputs and Lua Outputs added
|
||||||
if (source > 0)
|
if (source > 0)
|
||||||
source += MAX_INPUTS + MAX_SCRIPTS*MAX_SCRIPT_OUTPUTS;
|
source += MAX_INPUTS + MAX_SCRIPTS*MAX_SCRIPT_OUTPUTS;
|
||||||
|
// S3 added
|
||||||
|
if (source > MIXSRC_POT2)
|
||||||
|
source += 1;
|
||||||
// PPM9-PPM16 added
|
// PPM9-PPM16 added
|
||||||
if (source > MIXSRC_FIRST_PPM+7)
|
if (source > MIXSRC_FIRST_PPM+7)
|
||||||
source += 8;
|
source += 8;
|
||||||
|
@ -290,7 +358,7 @@ int ConvertSwitch_215_to_216(int swtch)
|
||||||
else if (swtch <= SWSRC_LAST_SWITCH)
|
else if (swtch <= SWSRC_LAST_SWITCH)
|
||||||
return swtch;
|
return swtch;
|
||||||
else
|
else
|
||||||
return swtch + (2*4) + (2*6); // 4 trims and 2 * 6-pos added as switches
|
return swtch + (2*4) + (3*6); // 4 trims and 2 * 6-pos added as switches
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
int ConvertSource_215_to_216(int source, bool insertZero=false)
|
int ConvertSource_215_to_216(int source, bool insertZero=false)
|
||||||
|
|
|
@ -1154,7 +1154,7 @@ void menuGeneralDiagAna(uint8_t event)
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
lcd_putsLeft(6*FH+1, STR_BATT_CALIB);
|
lcd_putsLeft(6*FH+1, STR_BATT_CALIB);
|
||||||
static int32_t adcBatt;
|
static int32_t adcBatt;
|
||||||
adcBatt = ((adcBatt * 7) + anaIn(8)) / 8;
|
adcBatt = ((adcBatt * 7) + anaIn(TX_VOLTAGE)) / 8;
|
||||||
uint32_t batCalV = (adcBatt + (adcBatt*g_eeGeneral.vBatCalib)/128) * BATT_SCALE;
|
uint32_t batCalV = (adcBatt + (adcBatt*g_eeGeneral.vBatCalib)/128) * BATT_SCALE;
|
||||||
batCalV >>= 11;
|
batCalV >>= 11;
|
||||||
batCalV += 2; // because of the diode
|
batCalV += 2; // because of the diode
|
||||||
|
@ -1162,7 +1162,7 @@ void menuGeneralDiagAna(uint8_t event)
|
||||||
#elif defined(PCBSKY9X)
|
#elif defined(PCBSKY9X)
|
||||||
lcd_putsLeft(5*FH+1, STR_BATT_CALIB);
|
lcd_putsLeft(5*FH+1, STR_BATT_CALIB);
|
||||||
static int32_t adcBatt;
|
static int32_t adcBatt;
|
||||||
adcBatt = ((adcBatt * 7) + anaIn(7)) / 8;
|
adcBatt = ((adcBatt * 7) + anaIn(TX_VOLTAGE)) / 8;
|
||||||
uint32_t batCalV = (adcBatt + adcBatt*(g_eeGeneral.vBatCalib)/128) * 4191;
|
uint32_t batCalV = (adcBatt + adcBatt*(g_eeGeneral.vBatCalib)/128) * 4191;
|
||||||
batCalV /= 55296;
|
batCalV /= 55296;
|
||||||
putsVolts(LEN_CALIB_FIELDS*FW+4*FW, 5*FH+1, batCalV, (m_posVert==1 ? INVERS : 0));
|
putsVolts(LEN_CALIB_FIELDS*FW+4*FW, 5*FH+1, batCalV, (m_posVert==1 ? INVERS : 0));
|
||||||
|
@ -1170,7 +1170,7 @@ void menuGeneralDiagAna(uint8_t event)
|
||||||
lcd_putsLeft(6*FH-2, STR_BATT_CALIB);
|
lcd_putsLeft(6*FH-2, STR_BATT_CALIB);
|
||||||
// Gruvin wants 2 decimal places and instant update of volts calib field when button pressed
|
// Gruvin wants 2 decimal places and instant update of volts calib field when button pressed
|
||||||
static uint16_t adcBatt;
|
static uint16_t adcBatt;
|
||||||
adcBatt = ((adcBatt * 7) + anaIn(7)) / 8; // running average, sourced directly (to avoid unending debate :P)
|
adcBatt = ((adcBatt * 7) + anaIn(TX_VOLTAGE)) / 8; // running average, sourced directly (to avoid unending debate :P)
|
||||||
uint32_t batCalV = ((uint32_t)adcBatt*1390 + (10*(int32_t)adcBatt*g_eeGeneral.vBatCalib)/8) / BandGap;
|
uint32_t batCalV = ((uint32_t)adcBatt*1390 + (10*(int32_t)adcBatt*g_eeGeneral.vBatCalib)/8) / BandGap;
|
||||||
lcd_outdezNAtt(LEN_CALIB_FIELDS*FW+4*FW, 6*FH-2, batCalV, PREC2|(m_posVert==1 ? INVERS : 0));
|
lcd_outdezNAtt(LEN_CALIB_FIELDS*FW+4*FW, 6*FH-2, batCalV, PREC2|(m_posVert==1 ? INVERS : 0));
|
||||||
#else
|
#else
|
||||||
|
@ -1196,6 +1196,7 @@ void menuGeneralDiagAna(uint8_t event)
|
||||||
enum menuGeneralHwItems {
|
enum menuGeneralHwItems {
|
||||||
ITEM_SETUP_HW_POT1,
|
ITEM_SETUP_HW_POT1,
|
||||||
ITEM_SETUP_HW_POT2,
|
ITEM_SETUP_HW_POT2,
|
||||||
|
ITEM_SETUP_HW_POT3,
|
||||||
ITEM_SETUP_HW_UART3_MODE,
|
ITEM_SETUP_HW_UART3_MODE,
|
||||||
ITEM_SETUP_HW_MAX
|
ITEM_SETUP_HW_MAX
|
||||||
};
|
};
|
||||||
|
@ -1214,14 +1215,20 @@ void menuGeneralHardware(uint8_t event)
|
||||||
switch(i) {
|
switch(i) {
|
||||||
case ITEM_SETUP_HW_POT1:
|
case ITEM_SETUP_HW_POT1:
|
||||||
case ITEM_SETUP_HW_POT2:
|
case ITEM_SETUP_HW_POT2:
|
||||||
|
case ITEM_SETUP_HW_POT3:
|
||||||
{
|
{
|
||||||
int idx = i - ITEM_SETUP_HW_POT1;
|
int idx = i - ITEM_SETUP_HW_POT1;
|
||||||
uint8_t mask = (1<<idx);
|
uint8_t shift = (2*idx);
|
||||||
uint8_t potType = selectMenuItem(HW_SETTINGS_COLUMN, y, i==ITEM_SETUP_HW_POT1 ? STR_POT1TYPE : STR_POT2TYPE, STR_POTTYPES, (g_eeGeneral.potsType & mask) >> idx, 0, 1, attr, event);
|
uint8_t mask = (0x03 << shift);
|
||||||
if (potType)
|
putsMixerSource(sizeof(TR_TYPE)*FW, y, MIXSRC_FIRST_POT+idx);
|
||||||
g_eeGeneral.potsType |= mask;
|
uint8_t potType = (g_eeGeneral.potsType & mask) >> shift;
|
||||||
else
|
if (potType == POT_TYPE_NONE && i < 2)
|
||||||
|
potType = 1;
|
||||||
|
potType = selectMenuItem(HW_SETTINGS_COLUMN, y, STR_TYPE, STR_POTTYPES, potType, 0, POT_TYPE_MAX, attr, event);
|
||||||
|
if (potType == POT_TYPE_POT && i < 2)
|
||||||
|
potType = 0;
|
||||||
g_eeGeneral.potsType &= ~mask;
|
g_eeGeneral.potsType &= ~mask;
|
||||||
|
g_eeGeneral.potsType |= (potType << shift);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1234,7 +1241,6 @@ void menuGeneralHardware(uint8_t event)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#elif defined(PCBSKY9X)
|
#elif defined(PCBSKY9X)
|
||||||
|
@ -1323,7 +1329,7 @@ void menuCommonCalib(uint8_t event)
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
uint8_t idx = i - POT1;
|
uint8_t idx = i - POT1;
|
||||||
int count = reusableBuffer.calib.xpotsCalib[idx].stepsCount;
|
int count = reusableBuffer.calib.xpotsCalib[idx].stepsCount;
|
||||||
if (IS_MULTIPOS_POT(i) && count <= POTS_POS_COUNT) {
|
if (IS_POT_MULTIPOS(i) && count <= XPOTS_MULTIPOS_COUNT) {
|
||||||
if (reusableBuffer.calib.xpotsCalib[idx].lastCount == 0 || vt < reusableBuffer.calib.xpotsCalib[idx].lastPosition - XPOT_DELTA || vt > reusableBuffer.calib.xpotsCalib[idx].lastPosition + XPOT_DELTA) {
|
if (reusableBuffer.calib.xpotsCalib[idx].lastCount == 0 || vt < reusableBuffer.calib.xpotsCalib[idx].lastPosition - XPOT_DELTA || vt > reusableBuffer.calib.xpotsCalib[idx].lastPosition + XPOT_DELTA) {
|
||||||
reusableBuffer.calib.xpotsCalib[idx].lastPosition = vt;
|
reusableBuffer.calib.xpotsCalib[idx].lastPosition = vt;
|
||||||
reusableBuffer.calib.xpotsCalib[idx].lastCount = 1;
|
reusableBuffer.calib.xpotsCalib[idx].lastCount = 1;
|
||||||
|
@ -1341,7 +1347,7 @@ void menuCommonCalib(uint8_t event)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!found) {
|
if (!found) {
|
||||||
if (count < POTS_POS_COUNT) {
|
if (count < XPOTS_MULTIPOS_COUNT) {
|
||||||
reusableBuffer.calib.xpotsCalib[idx].steps[count] = position;
|
reusableBuffer.calib.xpotsCalib[idx].steps[count] = position;
|
||||||
}
|
}
|
||||||
reusableBuffer.calib.xpotsCalib[idx].stepsCount += 1;
|
reusableBuffer.calib.xpotsCalib[idx].stepsCount += 1;
|
||||||
|
@ -1413,7 +1419,7 @@ void menuCommonCalib(uint8_t event)
|
||||||
for (uint8_t i=POT1; i<=POT_LAST; i++) {
|
for (uint8_t i=POT1; i<=POT_LAST; i++) {
|
||||||
int idx = i - POT1;
|
int idx = i - POT1;
|
||||||
int count = reusableBuffer.calib.xpotsCalib[idx].stepsCount;
|
int count = reusableBuffer.calib.xpotsCalib[idx].stepsCount;
|
||||||
if (IS_MULTIPOS_POT(i) && count > 1 && count <= POTS_POS_COUNT) {
|
if (IS_POT_MULTIPOS(i) && count > 1 && count <= XPOTS_MULTIPOS_COUNT) {
|
||||||
for (int j=0; j<count; j++) {
|
for (int j=0; j<count; j++) {
|
||||||
for (int k=j+1; k<count; k++) {
|
for (int k=j+1; k<count; k++) {
|
||||||
if (reusableBuffer.calib.xpotsCalib[idx].steps[k] < reusableBuffer.calib.xpotsCalib[idx].steps[j]) {
|
if (reusableBuffer.calib.xpotsCalib[idx].steps[k] < reusableBuffer.calib.xpotsCalib[idx].steps[j]) {
|
||||||
|
@ -1451,11 +1457,11 @@ void menuCommonCalib(uint8_t event)
|
||||||
if (reusableBuffer.calib.state == 2) {
|
if (reusableBuffer.calib.state == 2) {
|
||||||
steps = reusableBuffer.calib.xpotsCalib[i-POT1].stepsCount;
|
steps = reusableBuffer.calib.xpotsCalib[i-POT1].stepsCount;
|
||||||
}
|
}
|
||||||
else if (IS_MULTIPOS_POT(i)) {
|
else if (IS_POT_MULTIPOS(i)) {
|
||||||
StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[i];
|
StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[i];
|
||||||
steps = calib->count + 1;
|
steps = calib->count + 1;
|
||||||
}
|
}
|
||||||
if (steps > 0 && steps <= POTS_POS_COUNT) {
|
if (steps > 0 && steps <= XPOTS_MULTIPOS_COUNT) {
|
||||||
lcd_outdezAtt(LCD_W/2-2+(i-POT1)*5, LCD_H-6, steps, TINSIZE);
|
lcd_outdezAtt(LCD_W/2-2+(i-POT1)*5, LCD_H-6, steps, TINSIZE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1351,6 +1351,12 @@ bool isSourceAvailable(int source)
|
||||||
return false;
|
return false;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(PCBTARANIS)
|
||||||
|
if (source>=MIXSRC_FIRST_POT && source<=MIXSRC_LAST_POT) {
|
||||||
|
return IS_POT_AVAILABLE(POT1+source-MIXSRC_FIRST_POT);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(HELI)
|
#if !defined(HELI)
|
||||||
if (source>=MIXSRC_CYC1 && source<=MIXSRC_CYC3)
|
if (source>=MIXSRC_CYC1 && source<=MIXSRC_CYC3)
|
||||||
return false;
|
return false;
|
||||||
|
@ -1438,11 +1444,11 @@ bool isSwitchAvailableInLogicalSwitches(int swtch)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
if (swtch >= SWSRC_P11 && swtch <= SWSRC_P26) {
|
if (swtch >= SWSRC_FIRST_MULTIPOS_SWITCH && swtch <= SWSRC_LAST_MULTIPOS_SWITCH) {
|
||||||
int index = (swtch - SWSRC_P11) / POTS_POS_COUNT;
|
int index = (swtch - SWSRC_FIRST_MULTIPOS_SWITCH) / XPOTS_MULTIPOS_COUNT;
|
||||||
if (g_eeGeneral.potsType & (1<<index)) {
|
if (IS_POT_MULTIPOS(POT1+index)) {
|
||||||
StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[POT1+index];
|
StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[POT1+index];
|
||||||
return (calib->count >= ((swtch - SWSRC_P11) % POTS_POS_COUNT));
|
return (calib->count >= ((swtch - SWSRC_FIRST_MULTIPOS_SWITCH) % XPOTS_MULTIPOS_COUNT));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -122,10 +122,12 @@ void drawPotsBars()
|
||||||
// Optimization by Mike Blandford
|
// Optimization by Mike Blandford
|
||||||
uint8_t x, i, len ; // declare temporary variables
|
uint8_t x, i, len ; // declare temporary variables
|
||||||
for (x=LCD_W/2-5, i=NUM_STICKS; i<NUM_STICKS+NUM_POTS; x+=5, i++) {
|
for (x=LCD_W/2-5, i=NUM_STICKS; i<NUM_STICKS+NUM_POTS; x+=5, i++) {
|
||||||
|
if (IS_POT_AVAILABLE(i)) {
|
||||||
len = ((calibratedStick[i]+RESX)*BAR_HEIGHT/(RESX*2))+1l; // calculate once per loop
|
len = ((calibratedStick[i]+RESX)*BAR_HEIGHT/(RESX*2))+1l; // calculate once per loop
|
||||||
V_BAR(x, LCD_H-8, len)
|
V_BAR(x, LCD_H-8, len)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void drawStick(uint8_t centrex, int16_t xval, int16_t yval)
|
void drawStick(uint8_t centrex, int16_t xval, int16_t yval)
|
||||||
{
|
{
|
||||||
|
@ -196,8 +198,11 @@ void displayTrims(uint8_t phase)
|
||||||
void displaySliders()
|
void displaySliders()
|
||||||
{
|
{
|
||||||
for (uint8_t i=NUM_STICKS; i<NUM_STICKS+NUM_POTS; i++) {
|
for (uint8_t i=NUM_STICKS; i<NUM_STICKS+NUM_POTS; i++) {
|
||||||
xcoord_t x = (i%2 ? LCD_W-5 : 3);
|
if (i == POT3) {
|
||||||
int8_t y = (i>NUM_STICKS+1 ? LCD_H/2+1 : 1);
|
continue;
|
||||||
|
}
|
||||||
|
xcoord_t x = ((i==POT1 || i==SLIDER1) ? 3 : LCD_W-5);
|
||||||
|
int8_t y = (i>=SLIDER1 ? LCD_H/2+1 : 1);
|
||||||
lcd_vline(x, y, LCD_H/2-2);
|
lcd_vline(x, y, LCD_H/2-2);
|
||||||
lcd_vline(x+1, y, LCD_H/2-2);
|
lcd_vline(x+1, y, LCD_H/2-2);
|
||||||
y += LCD_H/2-4;
|
y += LCD_H/2-4;
|
||||||
|
|
|
@ -153,7 +153,7 @@ const pm_char * openLogs()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
f_puts("Rud,Ele,Thr,Ail,S1,S2,LS,RS,SA,SB,SC,SD,SE,SF,SG,SH\n", &g_oLogFile);
|
f_puts("Rud,Ele,Thr,Ail,S1,S2,S3,LS,RS,SA,SB,SC,SD,SE,SF,SG,SH\n", &g_oLogFile);
|
||||||
#else
|
#else
|
||||||
f_puts("Rud,Ele,Thr,Ail,P1,P2,P3,THR,RUD,ELE,3POS,AIL,GEA,TRN\n", &g_oLogFile);
|
f_puts("Rud,Ele,Thr,Ail,P1,P2,P3,THR,RUD,ELE,3POS,AIL,GEA,TRN\n", &g_oLogFile);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -78,6 +78,8 @@
|
||||||
#define MAX_SCRIPTS 7
|
#define MAX_SCRIPTS 7
|
||||||
#define MAX_INPUTS 32
|
#define MAX_INPUTS 32
|
||||||
#define NUM_PPM 16
|
#define NUM_PPM 16
|
||||||
|
#define NUM_POTS 5
|
||||||
|
#define NUM_XPOTS 3
|
||||||
#elif defined(CPUARM)
|
#elif defined(CPUARM)
|
||||||
#define MAX_MODELS 60
|
#define MAX_MODELS 60
|
||||||
#define NUM_CHNOUT 32 // number of real output channels CH1-CH32
|
#define NUM_CHNOUT 32 // number of real output channels CH1-CH32
|
||||||
|
@ -87,6 +89,8 @@
|
||||||
#define NUM_CSW 32 // number of custom switches
|
#define NUM_CSW 32 // number of custom switches
|
||||||
#define NUM_CFN 64 // number of functions assigned to switches
|
#define NUM_CFN 64 // number of functions assigned to switches
|
||||||
#define NUM_PPM 16
|
#define NUM_PPM 16
|
||||||
|
#define NUM_POTS 3
|
||||||
|
#define NUM_XPOTS 0
|
||||||
#elif defined(CPUM2560) || defined(CPUM2561)
|
#elif defined(CPUM2560) || defined(CPUM2561)
|
||||||
#define MAX_MODELS 30
|
#define MAX_MODELS 30
|
||||||
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
||||||
|
@ -96,6 +100,8 @@
|
||||||
#define NUM_CSW 15 // number of custom switches
|
#define NUM_CSW 15 // number of custom switches
|
||||||
#define NUM_CFN 24 // number of functions assigned to switches
|
#define NUM_CFN 24 // number of functions assigned to switches
|
||||||
#define NUM_PPM 8
|
#define NUM_PPM 8
|
||||||
|
#define NUM_POTS 3
|
||||||
|
#define NUM_XPOTS 0
|
||||||
#elif defined(CPUM128)
|
#elif defined(CPUM128)
|
||||||
#define MAX_MODELS 30
|
#define MAX_MODELS 30
|
||||||
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
||||||
|
@ -105,6 +111,8 @@
|
||||||
#define NUM_CSW 15 // number of custom switches
|
#define NUM_CSW 15 // number of custom switches
|
||||||
#define NUM_CFN 24 // number of functions assigned to switches
|
#define NUM_CFN 24 // number of functions assigned to switches
|
||||||
#define NUM_PPM 8
|
#define NUM_PPM 8
|
||||||
|
#define NUM_POTS 3
|
||||||
|
#define NUM_XPOTS 0
|
||||||
#else
|
#else
|
||||||
#define MAX_MODELS 16
|
#define MAX_MODELS 16
|
||||||
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
#define NUM_CHNOUT 16 // number of real output channels CH1-CH16
|
||||||
|
@ -114,6 +122,8 @@
|
||||||
#define NUM_CSW 12 // number of custom switches
|
#define NUM_CSW 12 // number of custom switches
|
||||||
#define NUM_CFN 16 // number of functions assigned to switches
|
#define NUM_CFN 16 // number of functions assigned to switches
|
||||||
#define NUM_PPM 8
|
#define NUM_PPM 8
|
||||||
|
#define NUM_POTS 3
|
||||||
|
#define NUM_XPOTS 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MAX_TIMERS 2
|
#define MAX_TIMERS 2
|
||||||
|
@ -333,12 +343,12 @@ enum BacklightMode {
|
||||||
#define SPLASH_MODE uint8_t splashMode:1; uint8_t spare4:2
|
#define SPLASH_MODE uint8_t splashMode:1; uint8_t spare4:2
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define POTS_POS_COUNT 6
|
#define XPOTS_MULTIPOS_COUNT 6
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
PACK(typedef struct {
|
PACK(typedef struct {
|
||||||
uint8_t count;
|
uint8_t count;
|
||||||
uint8_t steps[POTS_POS_COUNT-1];
|
uint8_t steps[XPOTS_MULTIPOS_COUNT-1];
|
||||||
}) StepsCalibData;
|
}) StepsCalibData;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -1305,10 +1315,8 @@ enum SwitchSources {
|
||||||
SWSRC_LAST_SWITCH = SWSRC_TRAINER,
|
SWSRC_LAST_SWITCH = SWSRC_TRAINER,
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
SWSRC_P11,
|
SWSRC_FIRST_MULTIPOS_SWITCH,
|
||||||
SWSRC_P16 = SWSRC_P11+5,
|
SWSRC_LAST_MULTIPOS_SWITCH = SWSRC_FIRST_MULTIPOS_SWITCH + (NUM_XPOTS*XPOTS_MULTIPOS_COUNT) - 1,
|
||||||
SWSRC_P21,
|
|
||||||
SWSRC_P26 = SWSRC_P21+5,
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
SWSRC_FIRST_TRIM,
|
SWSRC_FIRST_TRIM,
|
||||||
|
@ -1369,11 +1377,12 @@ enum MixSources {
|
||||||
|
|
||||||
MIXSRC_FIRST_POT,
|
MIXSRC_FIRST_POT,
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
MIXSRC_S1 = MIXSRC_FIRST_POT,
|
MIXSRC_POT1 = MIXSRC_FIRST_POT,
|
||||||
MIXSRC_S2,
|
MIXSRC_POT2,
|
||||||
MIXSRC_S3,
|
MIXSRC_POT3,
|
||||||
MIXSRC_S4,
|
MIXSRC_SLIDER1,
|
||||||
MIXSRC_LAST_POT = MIXSRC_S4,
|
MIXSRC_SLIDER2,
|
||||||
|
MIXSRC_LAST_POT = MIXSRC_SLIDER2,
|
||||||
#else
|
#else
|
||||||
MIXSRC_P1 = MIXSRC_FIRST_POT,
|
MIXSRC_P1 = MIXSRC_FIRST_POT,
|
||||||
MIXSRC_P2,
|
MIXSRC_P2,
|
||||||
|
|
|
@ -520,7 +520,7 @@ uint16_t evalChkSum()
|
||||||
{
|
{
|
||||||
uint16_t sum = 0;
|
uint16_t sum = 0;
|
||||||
const int16_t *calibValues = (const int16_t *) &g_eeGeneral.calib[0];
|
const int16_t *calibValues = (const int16_t *) &g_eeGeneral.calib[0];
|
||||||
for (int i=0; i<NUM_STICKS+NUM_POTS+5; i++)
|
for (int i=0; i<12; i++)
|
||||||
sum += calibValues[i];
|
sum += calibValues[i];
|
||||||
return sum;
|
return sum;
|
||||||
}
|
}
|
||||||
|
@ -1404,7 +1404,7 @@ void getSwitchesPosition(bool startup)
|
||||||
for (int i=0; i<NUM_XPOTS; i++) {
|
for (int i=0; i<NUM_XPOTS; i++) {
|
||||||
if (g_eeGeneral.potsType & (1 << i)) {
|
if (g_eeGeneral.potsType & (1 << i)) {
|
||||||
StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[POT1+i];
|
StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[POT1+i];
|
||||||
if (calib->count>0 && calib->count<POTS_POS_COUNT) {
|
if (calib->count>0 && calib->count<XPOTS_MULTIPOS_COUNT) {
|
||||||
uint8_t pos = anaIn(POT1+i) / (2*RESX/calib->count);
|
uint8_t pos = anaIn(POT1+i) / (2*RESX/calib->count);
|
||||||
uint8_t previousPos = potsPos[i] >> 4;
|
uint8_t previousPos = potsPos[i] >> 4;
|
||||||
uint8_t previousStoredPos = potsPos[i] & 0x0F;
|
uint8_t previousStoredPos = potsPos[i] & 0x0F;
|
||||||
|
@ -1416,7 +1416,7 @@ void getSwitchesPosition(bool startup)
|
||||||
potsLastposStart[i] = 0;
|
potsLastposStart[i] = 0;
|
||||||
potsPos[i] = (pos << 4) | pos;
|
potsPos[i] = (pos << 4) | pos;
|
||||||
if (previousStoredPos != pos) {
|
if (previousStoredPos != pos) {
|
||||||
PLAY_SWITCH_MOVED(SWSRC_LAST_SWITCH+i*POTS_POS_COUNT+pos);
|
PLAY_SWITCH_MOVED(SWSRC_LAST_SWITCH+i*XPOTS_MULTIPOS_COUNT+pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1424,7 +1424,7 @@ void getSwitchesPosition(bool startup)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#define SWITCH_POSITION(sw) (switchesPos & (1<<(sw)))
|
#define SWITCH_POSITION(sw) (switchesPos & (1<<(sw)))
|
||||||
#define POT_POSITION(sw) ((potsPos[(sw)/POTS_POS_COUNT] & 0x0f) == ((sw) % POTS_POS_COUNT))
|
#define POT_POSITION(sw) ((potsPos[(sw)/XPOTS_MULTIPOS_COUNT] & 0x0f) == ((sw) % XPOTS_MULTIPOS_COUNT))
|
||||||
#else
|
#else
|
||||||
#define getSwitchesPosition(...)
|
#define getSwitchesPosition(...)
|
||||||
#define SWITCH_POSITION(idx) switchState((EnumKeys)(SW_BASE+(idx)))
|
#define SWITCH_POSITION(idx) switchState((EnumKeys)(SW_BASE+(idx)))
|
||||||
|
@ -1464,8 +1464,8 @@ bool getSwitch(int8_t swtch)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
else if (cs_idx <= SWSRC_P26) {
|
else if (cs_idx <= SWSRC_LAST_MULTIPOS_SWITCH) {
|
||||||
result = POT_POSITION(cs_idx-SWSRC_P11);
|
result = POT_POSITION(cs_idx-SWSRC_FIRST_MULTIPOS_SWITCH);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
else if (cs_idx <= SWSRC_LAST_TRIM) {
|
else if (cs_idx <= SWSRC_LAST_TRIM) {
|
||||||
|
@ -2821,7 +2821,7 @@ void getADC()
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
if (s_noScroll) v = temp[x] >> 1;
|
if (s_noScroll) v = temp[x] >> 1;
|
||||||
StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[x];
|
StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[x];
|
||||||
if (!s_noScroll && IS_MULTIPOS_POT(x) && calib->count>0 && calib->count<POTS_POS_COUNT) {
|
if (!s_noScroll && IS_POT_MULTIPOS(x) && calib->count>0 && calib->count<XPOTS_MULTIPOS_COUNT) {
|
||||||
uint8_t vShifted = (v >> 4);
|
uint8_t vShifted = (v >> 4);
|
||||||
s_anaFilt[x] = 2*RESX;
|
s_anaFilt[x] = 2*RESX;
|
||||||
for (int i=0; i<calib->count; i++) {
|
for (int i=0; i<calib->count; i++) {
|
||||||
|
@ -3084,7 +3084,7 @@ void evalInputs(uint8_t mode)
|
||||||
|
|
||||||
#ifndef SIMU
|
#ifndef SIMU
|
||||||
if (i < NUM_STICKS+NUM_POTS) {
|
if (i < NUM_STICKS+NUM_POTS) {
|
||||||
if (IS_MULTIPOS_POT(i)) {
|
if (IS_POT_MULTIPOS(i)) {
|
||||||
v -= RESX;
|
v -= RESX;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
@ -378,8 +378,6 @@ enum EnumKeys {
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define NUM_SWITCHES 8
|
#define NUM_SWITCHES 8
|
||||||
#define IS_3POS(sw) ((sw) != 5 && (sw) != 7)
|
#define IS_3POS(sw) ((sw) != 5 && (sw) != 7)
|
||||||
#define NUM_POTS 4
|
|
||||||
#define NUM_XPOTS 2
|
|
||||||
#define NUM_SW_SRCRAW 8
|
#define NUM_SW_SRCRAW 8
|
||||||
#define SWSRC_THR SWSRC_SF2
|
#define SWSRC_THR SWSRC_SF2
|
||||||
#define SWSRC_GEA SWSRC_SG2
|
#define SWSRC_GEA SWSRC_SG2
|
||||||
|
@ -391,8 +389,6 @@ enum EnumKeys {
|
||||||
#define NUM_SWITCHES 7
|
#define NUM_SWITCHES 7
|
||||||
#define IS_3POS(sw) ((sw) == 0)
|
#define IS_3POS(sw) ((sw) == 0)
|
||||||
#define IS_MOMENTARY(sw) (sw == SWSRC_TRN)
|
#define IS_MOMENTARY(sw) (sw == SWSRC_TRN)
|
||||||
#define NUM_POTS 3
|
|
||||||
#define NUM_XPOTS 0
|
|
||||||
#define NUM_SW_SRCRAW 1
|
#define NUM_SW_SRCRAW 1
|
||||||
#define SW_DSM2_BIND SW_TRN
|
#define SW_DSM2_BIND SW_TRN
|
||||||
#endif
|
#endif
|
||||||
|
@ -413,10 +409,19 @@ enum EnumKeys {
|
||||||
|
|
||||||
#include "myeeprom.h"
|
#include "myeeprom.h"
|
||||||
|
|
||||||
|
enum PotType {
|
||||||
|
POT_TYPE_NONE,
|
||||||
|
POT_TYPE_POT,
|
||||||
|
POT_TYPE_MULTIPOS,
|
||||||
|
POT_TYPE_MAX=POT_TYPE_MULTIPOS
|
||||||
|
};
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define IS_MULTIPOS_POT(x) ((x)>=POT1 && (x)<=POT_LAST && (g_eeGeneral.potsType & (1 << ((x)-POT1))))
|
#define IS_POT_AVAILABLE(x) ((x)!=POT3 || (g_eeGeneral.potsType & (0x03 << (2*((x)-POT1))))!=POT_TYPE_NONE)
|
||||||
|
#define IS_POT_MULTIPOS(x) ((x)>=POT1 && (x)<=POT_LAST && ((g_eeGeneral.potsType>>(2*((x)-POT1)))&0x03)==POT_TYPE_MULTIPOS)
|
||||||
#else
|
#else
|
||||||
#define IS_MULTIPOS_POT(x) (false)
|
#define IS_POT_AVAILABLE(x) (true)
|
||||||
|
#define IS_POT_MULTIPOS(x) (false)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if ROTARY_ENCODERS > 0
|
#if ROTARY_ENCODERS > 0
|
||||||
|
@ -1044,7 +1049,8 @@ enum Analogs {
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
POT1,
|
POT1,
|
||||||
POT2,
|
POT2,
|
||||||
POT_LAST = POT2,
|
POT3,
|
||||||
|
POT_LAST = POT3,
|
||||||
SLIDER1,
|
SLIDER1,
|
||||||
SLIDER2,
|
SLIDER2,
|
||||||
#else
|
#else
|
||||||
|
@ -1603,7 +1609,7 @@ union ReusableBuffer
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
struct {
|
struct {
|
||||||
uint8_t stepsCount;
|
uint8_t stepsCount;
|
||||||
int16_t steps[POTS_POS_COUNT];
|
int16_t steps[XPOTS_MULTIPOS_COUNT];
|
||||||
uint8_t lastCount;
|
uint8_t lastCount;
|
||||||
int16_t lastPosition;
|
int16_t lastPosition;
|
||||||
} xpotsCalib[NUM_XPOTS];
|
} xpotsCalib[NUM_XPOTS];
|
||||||
|
|
|
@ -407,18 +407,18 @@ uint16_t anaIn(uint8_t chan)
|
||||||
else if (chan<NUM_STICKS+NUM_POTS)
|
else if (chan<NUM_STICKS+NUM_POTS)
|
||||||
return th9xSim->knobs[chan-NUM_STICKS]->getValue();
|
return th9xSim->knobs[chan-NUM_STICKS]->getValue();
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
else if (chan == 8)
|
else if (chan == TX_VOLTAGE)
|
||||||
return 1000;
|
return 1000;
|
||||||
#elif defined(PCBSKY9X)
|
#elif defined(PCBSKY9X)
|
||||||
else if (chan == 7)
|
else if (chan == TX_VOLTAGE)
|
||||||
return 1500;
|
return 1500;
|
||||||
else if (chan == 8)
|
else if (chan == TX_CURRENT)
|
||||||
return 100;
|
return 100;
|
||||||
#elif defined(PCBGRUVIN9X)
|
#elif defined(PCBGRUVIN9X)
|
||||||
else if (chan == 7)
|
else if (chan == TX_VOLTAGE)
|
||||||
return 150;
|
return 150;
|
||||||
#else
|
#else
|
||||||
else if (chan == 7)
|
else if (chan == TX_VOLTAGE)
|
||||||
return 1500;
|
return 1500;
|
||||||
#endif
|
#endif
|
||||||
else
|
else
|
||||||
|
|
|
@ -60,9 +60,9 @@
|
||||||
|
|
||||||
volatile uint16_t Analog_values[NUMBER_ANALOG];
|
volatile uint16_t Analog_values[NUMBER_ANALOG];
|
||||||
#if defined(REV4a)
|
#if defined(REV4a)
|
||||||
const char ana_direction[NUMBER_ANALOG] = {0,1,0,1, 1,1,1,0, 0};
|
const char ana_direction[NUMBER_ANALOG] = {0,1,0,1, 1,1,0,1,0, 0};
|
||||||
#elif !defined(REV3)
|
#elif !defined(REV3)
|
||||||
const char ana_direction[NUMBER_ANALOG] = {0,1,0,1, 1,0,1,0, 0};
|
const char ana_direction[NUMBER_ANALOG] = {0,1,0,1, 1,0,0,1,0, 0};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void adcInit()
|
void adcInit()
|
||||||
|
@ -88,7 +88,7 @@ void adcInit()
|
||||||
ADC1->CR1 = ADC_CR1_SCAN ;
|
ADC1->CR1 = ADC_CR1_SCAN ;
|
||||||
ADC1->CR2 = ADC_CR2_ADON | ADC_CR2_DMA | ADC_CR2_DDS ;
|
ADC1->CR2 = ADC_CR2_ADON | ADC_CR2_DMA | ADC_CR2_DDS ;
|
||||||
ADC1->SQR1 = (NUMBER_ANALOG-1) << 20 ; // NUMBER_ANALOG Channels
|
ADC1->SQR1 = (NUMBER_ANALOG-1) << 20 ; // NUMBER_ANALOG Channels
|
||||||
ADC1->SQR2 = SLIDE_L + (SLIDE_R<<5) + (BATTERY<<10) ;
|
ADC1->SQR2 = (SLIDE_L<<5) + (SLIDE_R<<10) + (BATTERY<<15) ;
|
||||||
ADC1->SQR3 = STICK_LH + (STICK_LV<<5) + (STICK_RV<<10) + (STICK_RH<<15) + (POT_L<<20) + (POT_R<<25) ;
|
ADC1->SQR3 = STICK_LH + (STICK_LV<<5) + (STICK_RV<<10) + (STICK_RH<<15) + (POT_L<<20) + (POT_R<<25) ;
|
||||||
ADC1->SMPR1 = SAMPTIME + (SAMPTIME<<3) + (SAMPTIME<<6) + (SAMPTIME<<9) + (SAMPTIME<<12)
|
ADC1->SMPR1 = SAMPTIME + (SAMPTIME<<3) + (SAMPTIME<<6) + (SAMPTIME<<9) + (SAMPTIME<<12)
|
||||||
+ (SAMPTIME<<15) + (SAMPTIME<<18) + (SAMPTIME<<21) + (SAMPTIME<<24) ;
|
+ (SAMPTIME<<15) + (SAMPTIME<<18) + (SAMPTIME<<21) + (SAMPTIME<<24) ;
|
||||||
|
@ -120,7 +120,6 @@ void adcRead()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
DMA2_Stream0->CR &= ~DMA_SxCR_EN ; // Disable DMA
|
DMA2_Stream0->CR &= ~DMA_SxCR_EN ; // Disable DMA
|
||||||
// return ( i < 10000 ) ? 1 : 0 ;
|
|
||||||
|
|
||||||
#if !defined(REV3)
|
#if !defined(REV3)
|
||||||
// adc direction correct
|
// adc direction correct
|
||||||
|
@ -136,9 +135,3 @@ void adcRead()
|
||||||
void adcStop()
|
void adcStop()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -498,8 +498,6 @@ const pm_char STR_VIEW_TEXT[] PROGMEM = "View text";
|
||||||
const pm_char STR_POTWARNING[] PROGMEM = TR_POTWARNING;
|
const pm_char STR_POTWARNING[] PROGMEM = TR_POTWARNING;
|
||||||
const pm_char STR_CHECKLIST[] PROGMEM = TR_CHECKLIST;
|
const pm_char STR_CHECKLIST[] PROGMEM = TR_CHECKLIST;
|
||||||
const pm_char STR_UART3MODE[] PROGMEM = TR_UART3MODE;
|
const pm_char STR_UART3MODE[] PROGMEM = TR_UART3MODE;
|
||||||
const pm_char STR_POT1TYPE[] PROGMEM = TR_POT1TYPE;
|
|
||||||
const pm_char STR_POT2TYPE[] PROGMEM = TR_POT2TYPE;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if MENUS_LOCK == 1
|
#if MENUS_LOCK == 1
|
||||||
|
|
|
@ -689,8 +689,6 @@ extern const pm_char STR_VIEW_TEXT[];
|
||||||
extern const pm_char STR_POTWARNING[];
|
extern const pm_char STR_POTWARNING[];
|
||||||
extern const pm_char STR_CHECKLIST[];
|
extern const pm_char STR_CHECKLIST[];
|
||||||
extern const pm_char STR_UART3MODE[];
|
extern const pm_char STR_UART3MODE[];
|
||||||
extern const pm_char STR_POT1TYPE[];
|
|
||||||
extern const pm_char STR_POT2TYPE[];
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if MENUS_LOCK == 1
|
#if MENUS_LOCK == 1
|
||||||
|
|
|
@ -342,7 +342,7 @@
|
||||||
#define LEN_VSRCRAW "\004"
|
#define LEN_VSRCRAW "\004"
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""LS\0 ""RS\0 "
|
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""LS\0 ""RS\0 "
|
||||||
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
||||||
#elif defined(EXTRA_3POS)
|
#elif defined(EXTRA_3POS)
|
||||||
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
||||||
|
@ -376,7 +376,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
|
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
#elif defined(CPUARM)
|
#elif defined(CPUARM)
|
||||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
|
@ -718,8 +718,6 @@
|
||||||
#define TR_CHECKLIST "Display Checklist"
|
#define TR_CHECKLIST "Display Checklist"
|
||||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||||
#define TR_UART3MODE "Serial port"
|
#define TR_UART3MODE "Serial port"
|
||||||
#define TR_POT1TYPE "S1 Type"
|
|
||||||
#define TR_POT2TYPE "S2 Type"
|
|
||||||
|
|
||||||
#if defined(MAVLINK)
|
#if defined(MAVLINK)
|
||||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||||
|
|
|
@ -344,7 +344,7 @@
|
||||||
#define LEN_VSRCRAW "\004"
|
#define LEN_VSRCRAW "\004"
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""LS\0 ""RS\0 " //4 Potis S1,S2,Links,Rechts
|
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""LS\0 ""RS\0 " //4 Potis S1,S2,Links,Rechts
|
||||||
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
||||||
#elif defined(EXTRA_3POS)
|
#elif defined(EXTRA_3POS)
|
||||||
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
||||||
|
@ -378,7 +378,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
|
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
#elif defined(CPUARM)
|
#elif defined(CPUARM)
|
||||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_CUSTOMSW
|
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_CUSTOMSW
|
||||||
|
@ -720,8 +720,6 @@
|
||||||
#define TR_CHECKLIST "Display Checklist"
|
#define TR_CHECKLIST "Display Checklist"
|
||||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||||
#define TR_UART3MODE "Serial Port"
|
#define TR_UART3MODE "Serial Port"
|
||||||
#define TR_POT1TYPE "S1 Type"
|
|
||||||
#define TR_POT2TYPE "S2 Type"
|
|
||||||
|
|
||||||
#if defined(MAVLINK)
|
#if defined(MAVLINK)
|
||||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
#define TR_UART3MODES "OFF\0 ""S-Port Mirror\0 ""Debug\0 "
|
#define TR_UART3MODES "OFF\0 ""S-Port Mirror\0 ""Debug\0 "
|
||||||
|
|
||||||
#define LEN_POTTYPES "\017"
|
#define LEN_POTTYPES "\017"
|
||||||
#define TR_POTTYPES "Pot\0 ""Multipos Switch"
|
#define TR_POTTYPES "None\0 ""Pot\0 ""Multipos Switch"
|
||||||
|
|
||||||
#define LEN_DATETIME "\005"
|
#define LEN_DATETIME "\005"
|
||||||
#define TR_DATETIME "DATE:""TIME:"
|
#define TR_DATETIME "DATE:""TIME:"
|
||||||
|
@ -352,7 +352,7 @@
|
||||||
#define LEN_VSRCRAW "\004"
|
#define LEN_VSRCRAW "\004"
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""LS\0 ""RS\0 "
|
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""LS\0 ""RS\0 "
|
||||||
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
||||||
#elif defined(EXTRA_3POS)
|
#elif defined(EXTRA_3POS)
|
||||||
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
||||||
|
@ -386,7 +386,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
|
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
#elif defined(CPUARM)
|
#elif defined(CPUARM)
|
||||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
|
@ -728,8 +728,6 @@
|
||||||
#define TR_CHECKLIST "Display Checklist"
|
#define TR_CHECKLIST "Display Checklist"
|
||||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||||
#define TR_UART3MODE "Serial port"
|
#define TR_UART3MODE "Serial port"
|
||||||
#define TR_POT1TYPE "S1 Type"
|
|
||||||
#define TR_POT2TYPE "S2 Type"
|
|
||||||
|
|
||||||
#if defined(MAVLINK)
|
#if defined(MAVLINK)
|
||||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||||
|
|
|
@ -342,7 +342,7 @@
|
||||||
#define LEN_VSRCRAW "\004"
|
#define LEN_VSRCRAW "\004"
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""LS\0 ""RS\0 "
|
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""LS\0 ""RS\0 "
|
||||||
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
||||||
#elif defined(EXTRA_3POS)
|
#elif defined(EXTRA_3POS)
|
||||||
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
||||||
|
@ -376,7 +376,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
|
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
#elif defined(CPUARM)
|
#elif defined(CPUARM)
|
||||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
|
@ -718,8 +718,6 @@
|
||||||
#define TR_CHECKLIST "Display Checklist"
|
#define TR_CHECKLIST "Display Checklist"
|
||||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||||
#define TR_UART3MODE "Serial port"
|
#define TR_UART3MODE "Serial port"
|
||||||
#define TR_POT1TYPE "S1 Type"
|
|
||||||
#define TR_POT2TYPE "S2 Type"
|
|
||||||
|
|
||||||
#if defined(MAVLINK)
|
#if defined(MAVLINK)
|
||||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||||
|
|
|
@ -342,7 +342,7 @@
|
||||||
#define LEN_VSRCRAW "\004"
|
#define LEN_VSRCRAW "\004"
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""LS\0 ""RS\0 "
|
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""LS\0 ""RS\0 "
|
||||||
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
||||||
#elif defined(EXTRA_3POS)
|
#elif defined(EXTRA_3POS)
|
||||||
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
||||||
|
@ -376,7 +376,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
|
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
#elif defined(CPUARM)
|
#elif defined(CPUARM)
|
||||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
|
@ -718,8 +718,6 @@
|
||||||
#define TR_CHECKLIST "Display Checklist"
|
#define TR_CHECKLIST "Display Checklist"
|
||||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||||
#define TR_UART3MODE "Serial port"
|
#define TR_UART3MODE "Serial port"
|
||||||
#define TR_POT1TYPE "S1 Type"
|
|
||||||
#define TR_POT2TYPE "S2 Type"
|
|
||||||
|
|
||||||
#if defined(MAVLINK)
|
#if defined(MAVLINK)
|
||||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||||
|
|
|
@ -342,7 +342,7 @@
|
||||||
#define LEN_VSRCRAW "\004"
|
#define LEN_VSRCRAW "\004"
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""LS\0 ""RS\0 "
|
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""LS\0 ""RS\0 "
|
||||||
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
||||||
#elif defined(EXTRA_3POS)
|
#elif defined(EXTRA_3POS)
|
||||||
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
||||||
|
@ -376,7 +376,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
|
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
#elif defined(CPUARM)
|
#elif defined(CPUARM)
|
||||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
|
@ -718,8 +718,6 @@
|
||||||
#define TR_CHECKLIST "Afficher notes"
|
#define TR_CHECKLIST "Afficher notes"
|
||||||
#define TR_FAS_OFFSET TR(INDENT "Corr FAS", INDENT "Correction FAS")
|
#define TR_FAS_OFFSET TR(INDENT "Corr FAS", INDENT "Correction FAS")
|
||||||
#define TR_UART3MODE "Port série"
|
#define TR_UART3MODE "Port série"
|
||||||
#define TR_POT1TYPE "Type S1"
|
|
||||||
#define TR_POT2TYPE "Type S2"
|
|
||||||
|
|
||||||
#if defined(MAVLINK)
|
#if defined(MAVLINK)
|
||||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "RSSI Max"
|
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "RSSI Max"
|
||||||
|
|
|
@ -342,7 +342,7 @@
|
||||||
#define LEN_VSRCRAW "\004"
|
#define LEN_VSRCRAW "\004"
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""LS\0 ""RS\0 "
|
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""LS\0 ""RS\0 "
|
||||||
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
||||||
#elif defined(EXTRA_3POS)
|
#elif defined(EXTRA_3POS)
|
||||||
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
||||||
|
@ -376,7 +376,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
|
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
#elif defined(CPUARM)
|
#elif defined(CPUARM)
|
||||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
|
@ -718,8 +718,6 @@
|
||||||
#define TR_CHECKLIST "Display Checklist"
|
#define TR_CHECKLIST "Display Checklist"
|
||||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||||
#define TR_UART3MODE "Serial port"
|
#define TR_UART3MODE "Serial port"
|
||||||
#define TR_POT1TYPE "S1 Type"
|
|
||||||
#define TR_POT2TYPE "S2 Type"
|
|
||||||
|
|
||||||
#if defined(MAVLINK)
|
#if defined(MAVLINK)
|
||||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||||
|
|
|
@ -342,7 +342,7 @@
|
||||||
#define LEN_VSRCRAW "\004"
|
#define LEN_VSRCRAW "\004"
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""LS\0 ""RS\0 "
|
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""LS\0 ""RS\0 "
|
||||||
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
||||||
#elif defined(EXTRA_3POS)
|
#elif defined(EXTRA_3POS)
|
||||||
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
||||||
|
@ -376,7 +376,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
|
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
#elif defined(CPUARM)
|
#elif defined(CPUARM)
|
||||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "GAZ""SK""SW""LOL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "GAZ""SK""SW""LOL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
|
@ -718,8 +718,6 @@
|
||||||
#define TR_CHECKLIST "Display Checklist"
|
#define TR_CHECKLIST "Display Checklist"
|
||||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||||
#define TR_UART3MODE "Port szreg."
|
#define TR_UART3MODE "Port szreg."
|
||||||
#define TR_POT1TYPE "Typ S1"
|
|
||||||
#define TR_POT2TYPE "Typ S2"
|
|
||||||
|
|
||||||
#if defined(MAVLINK)
|
#if defined(MAVLINK)
|
||||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Maks RSSI"
|
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Maks RSSI"
|
||||||
|
|
|
@ -342,7 +342,7 @@
|
||||||
#define LEN_VSRCRAW "\004"
|
#define LEN_VSRCRAW "\004"
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""LS\0 ""RS\0 "
|
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""LS\0 ""RS\0 "
|
||||||
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
||||||
#elif defined(EXTRA_3POS)
|
#elif defined(EXTRA_3POS)
|
||||||
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
||||||
|
@ -376,7 +376,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
|
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
#elif defined(CPUARM)
|
#elif defined(CPUARM)
|
||||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
|
@ -718,8 +718,6 @@
|
||||||
#define TR_CHECKLIST "Display Checklist"
|
#define TR_CHECKLIST "Display Checklist"
|
||||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||||
#define TR_UART3MODE "Serial port"
|
#define TR_UART3MODE "Serial port"
|
||||||
#define TR_POT1TYPE "S1 Type"
|
|
||||||
#define TR_POT2TYPE "S2 Type"
|
|
||||||
|
|
||||||
#if defined(MAVLINK)
|
#if defined(MAVLINK)
|
||||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||||
|
|
|
@ -342,7 +342,7 @@
|
||||||
#define LEN_VSRCRAW "\004"
|
#define LEN_VSRCRAW "\004"
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""LS\0 ""RS\0 "
|
#define TR_POTS_VSRCRAW "S1\0 ""S2\0 ""S3\0 ""LS\0 ""RS\0 "
|
||||||
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
#define TR_SW_VSRCRAW "SA\0 ""SB\0 ""SC\0 ""SD\0 ""SE\0 ""SF\0 ""SG\0 ""SH\0 "
|
||||||
#elif defined(EXTRA_3POS)
|
#elif defined(EXTRA_3POS)
|
||||||
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
#define TR_POTS_VSRCRAW "P1\0 ""P2\0 "
|
||||||
|
@ -376,7 +376,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
|
#define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26""P31""P32""P33""P34""P35""P36"
|
||||||
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES "SA\300""SA-""SA\301""SB\300""SB-""SB\301""SC\300""SC-""SC\301""SD\300""SD-""SD\301""SE\300""SE-""SE\301""SF\300""SF\301""SG\300""SG-""SG\301""SH\300""SH\301" TR_6POS_POTS TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
#elif defined(CPUARM)
|
#elif defined(CPUARM)
|
||||||
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_TRIMS_SWITCHES TR_ROTENC_SWITCHES TR_LOGICALSW
|
||||||
|
@ -718,8 +718,6 @@
|
||||||
#define TR_CHECKLIST "Display Checklist"
|
#define TR_CHECKLIST "Display Checklist"
|
||||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||||
#define TR_UART3MODE "Serieporten"
|
#define TR_UART3MODE "Serieporten"
|
||||||
#define TR_POT1TYPE "S1-ratten"
|
|
||||||
#define TR_POT2TYPE "S2-ratten"
|
|
||||||
|
|
||||||
#if defined(MAVLINK)
|
#if defined(MAVLINK)
|
||||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue