Merge remote-tracking branch 'origin/next' into
bsongis/Lua_interpreter_171 Conflicts: companion/src/firmwares/opentx/opentxeeprom.cpp
This commit is contained in:
@@ -894,8 +894,12 @@ class ModelData {
|
||||
SwashRingData swashRingData;
|
||||
unsigned int thrTraceSrc;
|
||||
int8_t traineron; // 0 disable trainer, 1 allow trainer
|
||||
unsigned int modelId;
|
||||
unsigned int modelId;
|
||||
unsigned int switchWarningStates;
|
||||
unsigned int nSwToWarn;
|
||||
unsigned int nPotsToWarn;
|
||||
int potPosition[C9X_NUM_POTS];
|
||||
bool displayText;
|
||||
// TODO structure
|
||||
char gvars_names[C9X_MAX_GVARS][6+1];
|
||||
bool gvars_popups[C9X_MAX_GVARS];
|
||||
@@ -1043,6 +1047,7 @@ enum Capability {
|
||||
CSFunc,
|
||||
LCDWidth,
|
||||
GetThrSwitch,
|
||||
HasDisplayText,
|
||||
VirtualInputs,
|
||||
LuaInputs,
|
||||
LimitsPer1000,
|
||||
|
||||
@@ -24,13 +24,13 @@
|
||||
#define MAX_CURVES(board, version) (IS_ARM(board) ? ((IS_TARANIS(board) && version >= 216) ? 32 : 16) : O9X_MAX_CURVES)
|
||||
#define MAX_GVARS(board, version) ((IS_ARM(board) && version >= 216) ? 9 : 5)
|
||||
|
||||
#define IS_RELEASE_21_MARCH_2013(board, version) (version >= 214 || (!IS_ARM(board) && version >= 213))
|
||||
#define IS_RELEASE_23_MARCH_2013(board, version) (version >= 214 || (board==BOARD_STOCK && version >= 213))
|
||||
#define IS_AFTER_RELEASE_21_MARCH_2013(board, version) (version >= 214 || (!IS_ARM(board) && version >= 213))
|
||||
#define IS_AFTER_RELEASE_23_MARCH_2013(board, version) (version >= 214 || (board==BOARD_STOCK && version >= 213))
|
||||
|
||||
inline int switchIndex(int i, BoardEnum board, unsigned int version)
|
||||
{
|
||||
bool release21March2013 = IS_RELEASE_21_MARCH_2013(board, version);
|
||||
if (!IS_TARANIS(board) && release21March2013)
|
||||
bool afterrelease21March2013 = IS_AFTER_RELEASE_21_MARCH_2013(board, version);
|
||||
if (!IS_TARANIS(board) && afterrelease21March2013)
|
||||
return (i<=3 ? i+3 : (i<=6 ? i-3 : i));
|
||||
else
|
||||
return i;
|
||||
@@ -153,7 +153,7 @@ class SourcesConversionTable: public ConversionTable {
|
||||
public:
|
||||
SourcesConversionTable(BoardEnum board, unsigned int version, unsigned int variant, unsigned long flags=0)
|
||||
{
|
||||
bool release21March2013 = IS_RELEASE_21_MARCH_2013(board, version);
|
||||
bool afterrelease21March2013 = IS_AFTER_RELEASE_21_MARCH_2013(board, version);
|
||||
|
||||
int val=0;
|
||||
|
||||
@@ -177,19 +177,19 @@ class SourcesConversionTable: public ConversionTable {
|
||||
for (int i=0; i<MAX_ROTARY_ENCODERS(board); i++)
|
||||
addConversion(RawSource(SOURCE_TYPE_ROTARY_ENCODER, 0), val++);
|
||||
|
||||
if (!release21March2013) {
|
||||
if (!afterrelease21March2013) {
|
||||
for (int i=0; i<NUM_STICKS; i++)
|
||||
addConversion(RawSource(SOURCE_TYPE_TRIM, i), val++);
|
||||
}
|
||||
|
||||
addConversion(RawSource(SOURCE_TYPE_MAX), val++);
|
||||
|
||||
if (release21March2013) {
|
||||
if (afterrelease21March2013) {
|
||||
for (int i=0; i<3; i++)
|
||||
addConversion(RawSource(SOURCE_TYPE_CYC, i), val++);
|
||||
}
|
||||
|
||||
if (release21March2013) {
|
||||
if (afterrelease21March2013) {
|
||||
for (int i=0; i<NUM_STICKS; i++)
|
||||
addConversion(RawSource(SOURCE_TYPE_TRIM, i), val++);
|
||||
}
|
||||
@@ -197,7 +197,7 @@ class SourcesConversionTable: public ConversionTable {
|
||||
addConversion(RawSource(SOURCE_TYPE_SWITCH, 0), val++);
|
||||
|
||||
if (!(flags & FLAG_NOSWITCHES)) {
|
||||
if (release21March2013) {
|
||||
if (afterrelease21March2013) {
|
||||
for (int i=1; i<MAX_SWITCHES(board); i++)
|
||||
addConversion(RawSource(SOURCE_TYPE_SWITCH, i), val++);
|
||||
}
|
||||
@@ -213,7 +213,7 @@ class SourcesConversionTable: public ConversionTable {
|
||||
addConversion(RawSource(SOURCE_TYPE_CUSTOM_SWITCH, i), val++);
|
||||
}
|
||||
|
||||
if (!release21March2013) {
|
||||
if (!afterrelease21March2013) {
|
||||
for (int i=0; i<3; i++)
|
||||
addConversion(RawSource(SOURCE_TYPE_CYC, i), val++);
|
||||
}
|
||||
@@ -225,14 +225,14 @@ class SourcesConversionTable: public ConversionTable {
|
||||
addConversion(RawSource(SOURCE_TYPE_CH, i), val++);
|
||||
|
||||
if (!(flags & FLAG_NOTELEMETRY)) {
|
||||
if (release21March2013) {
|
||||
if (afterrelease21March2013) {
|
||||
if ((board != BOARD_STOCK && (board!=BOARD_M128 || version<215)) || (variant & GVARS_VARIANT)) {
|
||||
for (int i=0; i<MAX_GVARS(board, version); i++)
|
||||
addConversion(RawSource(SOURCE_TYPE_GVAR, i), val++);
|
||||
}
|
||||
}
|
||||
|
||||
if (release21March2013)
|
||||
if (afterrelease21March2013)
|
||||
addConversion(RawSource(SOURCE_TYPE_TELEMETRY, 0), val++);
|
||||
|
||||
for (int i=1; i<TELEMETRY_SOURCE_ACC; i++)
|
||||
@@ -690,7 +690,7 @@ class MixField: public TransformedField {
|
||||
internalField.Append(new ZCharField<6>(mix.name));
|
||||
}
|
||||
}
|
||||
else if (IS_DBLRAM(board, version) && IS_RELEASE_23_MARCH_2013(board, version)) {
|
||||
else if (IS_DBLRAM(board, version) && IS_AFTER_RELEASE_23_MARCH_2013(board, version)) {
|
||||
internalField.Append(new UnsignedField<4>(_destCh));
|
||||
internalField.Append(new BoolField<1>(_curveMode));
|
||||
internalField.Append(new BoolField<1>(mix.noExpo));
|
||||
@@ -849,7 +849,7 @@ class ExpoField: public TransformedField {
|
||||
}
|
||||
internalField.Append(new SignedField<8>(_curveParam));
|
||||
}
|
||||
else if (IS_DBLRAM(board, version) && IS_RELEASE_23_MARCH_2013(board, version)) {
|
||||
else if (IS_DBLRAM(board, version) && IS_AFTER_RELEASE_23_MARCH_2013(board, version)) {
|
||||
internalField.Append(new UnsignedField<2>(expo.mode));
|
||||
internalField.Append(new UnsignedField<2>(expo.chn));
|
||||
internalField.Append(new BoolField<1>(_curveMode));
|
||||
@@ -1051,9 +1051,9 @@ class LogicalSwitchesFunctionsTable: public ConversionTable {
|
||||
LogicalSwitchesFunctionsTable(BoardEnum board, unsigned int version)
|
||||
{
|
||||
int val=0;
|
||||
bool release21March2013 = IS_RELEASE_21_MARCH_2013(board, version);
|
||||
bool afterrelease21March2013 = IS_AFTER_RELEASE_21_MARCH_2013(board, version);
|
||||
addConversion(LS_FN_OFF, val++);
|
||||
if (release21March2013)
|
||||
if (afterrelease21March2013)
|
||||
addConversion(LS_FN_VEQUAL, val++);
|
||||
addConversion(LS_FN_VPOS, val++);
|
||||
addConversion(LS_FN_VNEG, val++);
|
||||
@@ -1065,11 +1065,11 @@ class LogicalSwitchesFunctionsTable: public ConversionTable {
|
||||
addConversion(LS_FN_XOR, val++);
|
||||
if (IS_ARM(board) && version >= 216) addConversion(LS_FN_STAY, val++);
|
||||
addConversion(LS_FN_EQUAL, val++);
|
||||
if (!release21March2013)
|
||||
if (!afterrelease21March2013)
|
||||
addConversion(LS_FN_NEQUAL, val++);
|
||||
addConversion(LS_FN_GREATER, val++);
|
||||
addConversion(LS_FN_LESS, val++);
|
||||
if (!release21March2013) {
|
||||
if (!afterrelease21March2013) {
|
||||
addConversion(LS_FN_EGREATER, val++);
|
||||
addConversion(LS_FN_ELESS, val++);
|
||||
}
|
||||
@@ -1371,20 +1371,17 @@ class SwitchesWarningField: public TransformedField {
|
||||
|
||||
virtual void beforeExport()
|
||||
{
|
||||
bool release21March2013 = IS_RELEASE_21_MARCH_2013(board, version);
|
||||
if (release21March2013) {
|
||||
_sw = (sw & 0xC1) + ((sw & 0x30) >> 3) + ((sw & 0x0E) << 2);
|
||||
}
|
||||
else {
|
||||
_sw = sw;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void afterImport()
|
||||
{
|
||||
bool release21March2013 = IS_RELEASE_21_MARCH_2013(board, version);
|
||||
if (release21March2013) {
|
||||
sw = (_sw & 0xC1) + ((_sw & 0x38) >> 2) + ((_sw & 0x06) << 3);
|
||||
bool afterrelease21March2013 = IS_AFTER_RELEASE_21_MARCH_2013(board, version);
|
||||
if (afterrelease21March2013 && version < 216) {
|
||||
sw = _sw >> 1;
|
||||
}
|
||||
else if (!afterrelease21March2013) {
|
||||
sw = ((_sw & 0x30) >> 4) + ((_sw & 0x0E) << 1) + ((_sw & 0xC0) >> 1);
|
||||
}
|
||||
else {
|
||||
sw = _sw;
|
||||
@@ -1784,8 +1781,8 @@ class FrskyScreenField: public DataField {
|
||||
{
|
||||
_screen = screen;
|
||||
|
||||
bool release21March2013 = IS_RELEASE_21_MARCH_2013(board, version);
|
||||
if (!release21March2013) {
|
||||
bool afterrelease21March2013 = IS_AFTER_RELEASE_21_MARCH_2013(board, version);
|
||||
if (!afterrelease21March2013) {
|
||||
for (int i=0; i<4; i++) {
|
||||
if (_screen.body.bars[i].source > 0)
|
||||
_screen.body.bars[i].source--;
|
||||
@@ -1809,12 +1806,12 @@ class FrskyScreenField: public DataField {
|
||||
{
|
||||
_screen = screen;
|
||||
|
||||
bool release21March2013 = IS_RELEASE_21_MARCH_2013(board, version);
|
||||
bool afterrelease21March2013 = IS_AFTER_RELEASE_21_MARCH_2013(board, version);
|
||||
|
||||
// NOTA: screen.type should have been imported first!
|
||||
if (screen.type == 0) {
|
||||
numbers.ImportBits(input);
|
||||
if (!release21March2013) {
|
||||
if (!afterrelease21March2013) {
|
||||
int columns=(IS_TARANIS(board) ? 3:2);
|
||||
for (int i=0; i<4; i++) {
|
||||
for (int j=0; j<columns;j++) {
|
||||
@@ -1826,7 +1823,7 @@ class FrskyScreenField: public DataField {
|
||||
}
|
||||
else {
|
||||
bars.ImportBits(input);
|
||||
if (!release21March2013) {
|
||||
if (!afterrelease21March2013) {
|
||||
for (int i=0; i<4; i++) {
|
||||
if (_screen.body.bars[i].source > 0)
|
||||
_screen.body.bars[i].source++;
|
||||
@@ -2016,9 +2013,9 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u
|
||||
else
|
||||
internalField.Append(new ZCharField<10>(modelData.name));
|
||||
|
||||
bool release21March2013 = IS_RELEASE_21_MARCH_2013(board, version);
|
||||
bool afterrelease21March2013 = IS_AFTER_RELEASE_21_MARCH_2013(board, version);
|
||||
|
||||
if (release21March2013)
|
||||
if (afterrelease21March2013)
|
||||
internalField.Append(new UnsignedField<8>(modelData.modelId));
|
||||
|
||||
if (IS_TARANIS(board) && version >= 215) {
|
||||
@@ -2035,7 +2032,7 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u
|
||||
internalField.Append(new SpareBitsField<4>());
|
||||
internalField.Append(new SignedField<16>(modelData.timers[i].pvalue));
|
||||
}
|
||||
else if (release21March2013) {
|
||||
else if (afterrelease21March2013) {
|
||||
internalField.Append(new UnsignedField<12>(modelData.timers[i].val));
|
||||
internalField.Append(new BoolField<1>((bool &)modelData.timers[i].countdownBeep));
|
||||
internalField.Append(new BoolField<1>(modelData.timers[i].minuteBeep));
|
||||
@@ -2077,7 +2074,7 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u
|
||||
internalField.Append(new BoolField<1>(modelData.disableThrottleWarning));
|
||||
|
||||
if (IS_TARANIS(board) || (IS_ARM(board) && version >= 216))
|
||||
internalField.Append(new SpareBitsField<1>());
|
||||
internalField.Append(new BoolField<1>(modelData.displayText));
|
||||
else
|
||||
internalField.Append(new BoolField<1>(modelData.moduleData[0].ppmPulsePol));
|
||||
|
||||
@@ -2119,15 +2116,19 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u
|
||||
|
||||
internalField.Append(new UnsignedField<8>(modelData.thrTraceSrc));
|
||||
|
||||
if (!release21March2013) {
|
||||
if (!afterrelease21March2013) {
|
||||
internalField.Append(new UnsignedField<8>(modelData.modelId));
|
||||
}
|
||||
|
||||
if (IS_TARANIS(board))
|
||||
internalField.Append(new UnsignedField<16>(modelData.switchWarningStates));
|
||||
internalField.Append(new SwitchesWarningField<16>(modelData.switchWarningStates, board, version));
|
||||
else
|
||||
internalField.Append(new SwitchesWarningField<8>(modelData.switchWarningStates, board, version));
|
||||
|
||||
if (version >= 216) {
|
||||
internalField.Append(new UnsignedField<8>(modelData.nSwToWarn));
|
||||
}
|
||||
|
||||
if ((board == BOARD_STOCK || (board == BOARD_M128 && version >= 215)) && (variant & GVARS_VARIANT)) {
|
||||
for (int i=0; i<MAX_GVARS(board, version); i++) {
|
||||
// on M64 GVARS are common to all phases, and there is no name
|
||||
@@ -2178,6 +2179,13 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u
|
||||
}
|
||||
}
|
||||
|
||||
if (board==BOARD_SKY9X && version >= 216) {
|
||||
internalField.Append(new UnsignedField<8>(modelData.nPotsToWarn));
|
||||
for (int i=0; i < GetEepromInterface()->getCapability(Pots); i++) {
|
||||
internalField.Append(new SignedField<8>(modelData.potPosition[i]));
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_TARANIS(board)) {
|
||||
for (int i=0; i<MAX_CURVES(board, version); i++) {
|
||||
internalField.Append(new ZCharField<6>(modelData.curves[i].name));
|
||||
@@ -2196,6 +2204,10 @@ Open9xModelDataNew::Open9xModelDataNew(ModelData & modelData, BoardEnum board, u
|
||||
for (int i=0; i<32; i++) {
|
||||
internalField.Append(new ZCharField<4>(modelData.inputNames[i]));
|
||||
}
|
||||
internalField.Append(new UnsignedField<8>(modelData.nPotsToWarn));
|
||||
for (int i=0; i < GetEepromInterface()->getCapability(Pots); i++) {
|
||||
internalField.Append(new SignedField<8>(modelData.potPosition[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -671,6 +671,7 @@ int Open9xInterface::getCapability(const Capability capability)
|
||||
return (IS_TARANIS(board) ? 212 : 128) ;
|
||||
case GetThrSwitch:
|
||||
return (IS_TARANIS(board) ? DSW_SF1 : DSW_THR) ;
|
||||
case HasDisplayText:
|
||||
case VirtualInputs:
|
||||
return IS_TARANIS(board) ? 32 : 0;
|
||||
case LuaInputs:
|
||||
|
||||
@@ -392,6 +392,10 @@ Setup::Setup(QWidget *parent, ModelData & model):
|
||||
ui->modelImage_label->hide();
|
||||
ui->imagePreview->hide();
|
||||
}
|
||||
|
||||
if (!GetEepromInterface()->getCapability(HasDisplayText)) {
|
||||
ui->displayText->hide();
|
||||
}
|
||||
|
||||
// Beep Center checkboxes
|
||||
int analogs = 4 + GetEepromInterface()->getCapability(Pots);
|
||||
@@ -403,14 +407,12 @@ Setup::Setup(QWidget *parent, ModelData & model):
|
||||
connect(checkbox, SIGNAL(toggled(bool)), this, SLOT(onBeepCenterToggled(bool)));
|
||||
centerBeepCheckboxes << checkbox;
|
||||
}
|
||||
ui->switchesStartupLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, analogs+GetEepromInterface()->getCapability(RotaryEncoders));
|
||||
|
||||
// Startup switches warnings
|
||||
ui->switchesStartupWarning->setProperty("index", 0);
|
||||
connect(ui->switchesStartupWarning, SIGNAL(currentIndexChanged(int)), this, SLOT(startupSwitchEdited(int)));
|
||||
for (int i=0; i<GetEepromInterface()->getCapability(Switches)-1; i++) {
|
||||
QLabel * label = new QLabel();
|
||||
QSlider * slider = new QSlider();
|
||||
QLabel * label = new QLabel(this);
|
||||
QSlider * slider = new QSlider(this);
|
||||
QCheckBox * cb = new QCheckBox(this);
|
||||
slider->setProperty("index", i+1);
|
||||
slider->setOrientation(Qt::Vertical);
|
||||
slider->setMinimum(0);
|
||||
@@ -429,13 +431,35 @@ Setup::Setup(QWidget *parent, ModelData & model):
|
||||
label->setText(switches9X[i]);
|
||||
slider->setMaximum(i==0 ? 2 : 1);
|
||||
}
|
||||
cb->setProperty("index", i+1);
|
||||
ui->switchesStartupLayout->addWidget(label, 0, i+1);
|
||||
ui->switchesStartupLayout->setAlignment(label, Qt::AlignCenter);
|
||||
ui->switchesStartupLayout->addWidget(slider, 1, i+1);
|
||||
ui->switchesStartupLayout->setAlignment(slider, Qt::AlignCenter);
|
||||
ui->switchesStartupLayout->addWidget(cb, 2, i+1);
|
||||
ui->switchesStartupLayout->setAlignment(cb, Qt::AlignCenter);
|
||||
connect(slider, SIGNAL(valueChanged(int)), this, SLOT(startupSwitchEdited(int)));
|
||||
connect(cb, SIGNAL(toggled(bool)), this, SLOT(startupSwitchToggled(bool)));
|
||||
startupSwitchesSliders << slider;
|
||||
startupSwitchesCheckboxes << cb;
|
||||
}
|
||||
ui->switchesStartupLayout->addItem(new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum), 0, GetEepromInterface()->getCapability(Switches));
|
||||
|
||||
// Pot warnings
|
||||
if(IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
for (int i=0; i<GetEepromInterface()->getCapability(Pots); i++) {
|
||||
QCheckBox * cb = new QCheckBox(this);
|
||||
cb->setProperty("index", i+1);
|
||||
cb->setText(AnalogString(i+4));
|
||||
ui->potWarningLayout->addWidget(cb, 0, i+1);
|
||||
connect(cb, SIGNAL(toggled(bool)), this, SLOT(potWarningToggled(bool)));
|
||||
potWarningCheckboxes << cb;
|
||||
}
|
||||
}
|
||||
else {
|
||||
ui->label_potWarning->hide();
|
||||
ui->potWarningMode->hide();
|
||||
}
|
||||
lock = false;
|
||||
}
|
||||
|
||||
@@ -533,9 +557,14 @@ void Setup::update()
|
||||
ui->throttleTrim->setChecked(model.thrTrim);
|
||||
ui->extendedLimits->setChecked(model.extendedLimits);
|
||||
ui->extendedTrims->setChecked(model.extendedTrims);
|
||||
ui->displayText->setChecked(model.displayText);
|
||||
|
||||
updateBeepCenter();
|
||||
updateStartupSwitches();
|
||||
|
||||
if(IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
updatePotWarnings();
|
||||
}
|
||||
|
||||
for (int i=0; i<C9X_MAX_TIMERS; i++)
|
||||
timers[i]->update();
|
||||
@@ -557,13 +586,13 @@ void Setup::updateStartupSwitches()
|
||||
lock = true;
|
||||
|
||||
unsigned int switchStates = model.switchWarningStates;
|
||||
bool enabled = !(switchStates & 0x01);
|
||||
ui->switchesStartupWarning->setCurrentIndex(switchStates & 0x01);
|
||||
switchStates >>= 1;
|
||||
|
||||
for (int i=0; i<GetEepromInterface()->getCapability(Switches)-1; i++) {
|
||||
QSlider * slider = startupSwitchesSliders[i];
|
||||
QCheckBox * cb = startupSwitchesCheckboxes[i];
|
||||
bool enabled = !(model.nSwToWarn & (1 << i));
|
||||
slider->setEnabled(enabled);
|
||||
cb->setChecked(enabled);
|
||||
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
slider->setValue(i==5 ? (switchStates & 0x3)/2 : switchStates & 0x3);
|
||||
switchStates >>= 2;
|
||||
@@ -584,36 +613,31 @@ void Setup::startupSwitchEdited(int value)
|
||||
unsigned int mask;
|
||||
int index = sender()->property("index").toInt();
|
||||
|
||||
if (index == 0) {
|
||||
mask = 0x01;
|
||||
}
|
||||
else if (IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
if (index == 6)
|
||||
mask = 0x02 << (index*2 - 1);
|
||||
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
|
||||
if (index == 6) {
|
||||
shift = (index - 1) * 2;
|
||||
mask = 0x02 << shift;
|
||||
shift++;
|
||||
}
|
||||
else {
|
||||
shift = index*2 - 1;
|
||||
shift = (index - 1) * 2;
|
||||
mask = 0x03 << shift;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (index == 1) {
|
||||
shift = 1;
|
||||
mask = 0x03 << shift;
|
||||
mask = 0x03;
|
||||
}
|
||||
else {
|
||||
mask = 0x01 << (index+1);
|
||||
shift = index;
|
||||
mask = 0x01 << shift;
|
||||
}
|
||||
}
|
||||
|
||||
model.switchWarningStates &= ~mask;
|
||||
|
||||
if (value) {
|
||||
if (shift == 0) {
|
||||
model.switchWarningStates |= mask;
|
||||
}
|
||||
else {
|
||||
model.switchWarningStates |= (value << shift);
|
||||
}
|
||||
model.switchWarningStates |= (value << shift);
|
||||
}
|
||||
|
||||
updateStartupSwitches();
|
||||
@@ -621,6 +645,72 @@ void Setup::startupSwitchEdited(int value)
|
||||
}
|
||||
}
|
||||
|
||||
void Setup::startupSwitchToggled(bool checked)
|
||||
{
|
||||
if (!lock) {
|
||||
int index = sender()->property("index").toInt()-1;
|
||||
|
||||
if (checked)
|
||||
model.nSwToWarn &= ~(1 << index);
|
||||
else
|
||||
model.nSwToWarn |= (1 << index);
|
||||
|
||||
updateStartupSwitches();
|
||||
emit modified();
|
||||
}
|
||||
}
|
||||
|
||||
void Setup::updatePotWarnings()
|
||||
{
|
||||
lock = true;
|
||||
int mode = model.nPotsToWarn >> 6;
|
||||
ui->potWarningMode->setCurrentIndex(mode);
|
||||
|
||||
if (mode == 0)
|
||||
model.nPotsToWarn = 0x3F;
|
||||
|
||||
for (int i=0; i<potWarningCheckboxes.size(); i++) {
|
||||
bool enabled = !(model.nPotsToWarn & (1 << i));
|
||||
|
||||
potWarningCheckboxes[i]->setChecked(enabled);
|
||||
potWarningCheckboxes[i]->setDisabled(mode == 0);
|
||||
}
|
||||
lock = false;
|
||||
}
|
||||
|
||||
void Setup::potWarningToggled(bool checked)
|
||||
{
|
||||
if (!lock) {
|
||||
int index = sender()->property("index").toInt()-1;
|
||||
|
||||
if(checked)
|
||||
model.nPotsToWarn &= ~(1 << index);
|
||||
else
|
||||
model.nPotsToWarn |= (1 << index);
|
||||
|
||||
updatePotWarnings();
|
||||
emit modified();
|
||||
}
|
||||
}
|
||||
|
||||
void Setup::on_potWarningMode_currentIndexChanged(int index)
|
||||
{
|
||||
if (!lock) {
|
||||
int mask = 0xC0;
|
||||
model.nPotsToWarn = model.nPotsToWarn & ~mask;
|
||||
model.nPotsToWarn = model.nPotsToWarn | ((index << 6) & mask);
|
||||
|
||||
updatePotWarnings();
|
||||
emit modified();
|
||||
}
|
||||
}
|
||||
|
||||
void Setup::on_displayText_toggled(bool checked)
|
||||
{
|
||||
model.displayText = checked;
|
||||
emit modified();
|
||||
}
|
||||
|
||||
void Setup::on_throttleTrim_toggled(bool checked)
|
||||
{
|
||||
model.thrTrim = checked;
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
#include <QCheckBox>
|
||||
#include <QSlider>
|
||||
#include <QSpinBox>
|
||||
#include <QLabel>
|
||||
|
||||
namespace Ui {
|
||||
class Setup;
|
||||
@@ -82,19 +83,26 @@ class Setup : public ModelPanel
|
||||
void on_extendedTrims_toggled(bool checked);
|
||||
void on_throttleWarning_toggled(bool checked);
|
||||
void on_throttleReverse_toggled(bool checked);
|
||||
void on_displayText_toggled(bool checked);
|
||||
void on_image_currentIndexChanged(int index);
|
||||
void on_trimIncrement_currentIndexChanged(int index);
|
||||
void onBeepCenterToggled(bool checked);
|
||||
void startupSwitchEdited(int value);
|
||||
void startupSwitchToggled(bool checked);
|
||||
void potWarningToggled(bool checked);
|
||||
void on_potWarningMode_currentIndexChanged(int index);
|
||||
void onChildModified();
|
||||
|
||||
private:
|
||||
Ui::Setup *ui;
|
||||
QVector<QSlider *> startupSwitchesSliders;
|
||||
QVector<QCheckBox *> startupSwitchesCheckboxes;
|
||||
QVector<QCheckBox *> potWarningCheckboxes;
|
||||
QVector<QCheckBox *> centerBeepCheckboxes;
|
||||
ModulePanel * modules[C9X_NUM_MODULES+1];
|
||||
TimerPanel * timers[C9X_MAX_TIMERS];
|
||||
void updateStartupSwitches();
|
||||
void updatePotWarnings();
|
||||
void updateBeepCenter();
|
||||
};
|
||||
|
||||
|
||||
+156
-130
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>782</width>
|
||||
<height>334</height>
|
||||
<width>787</width>
|
||||
<height>727</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
@@ -16,134 +16,6 @@
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Model Name</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_timer2">
|
||||
<property name="text">
|
||||
<string>Timer2</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Timer1</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_ttrace">
|
||||
<property name="text">
|
||||
<string>Throttle Source</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="swwarn_label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Switch startup Warning</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Center beep</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<layout class="QGridLayout" name="centerBeepLayout"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Trim Increment</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<layout class="QGridLayout" name="switchesStartupLayout" rowstretch="0,0" columnstretch="0">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="1" column="0">
|
||||
<widget class="QComboBox" name="switchesStartupWarning">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>ON</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>OFF</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="switchesStartupWarning_Label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Check</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QGridLayout" name="gridLayout_37" columnstretch="0,0,0,0,0,0">
|
||||
<item row="0" column="3">
|
||||
@@ -231,6 +103,85 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>Model Name</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="label_timer2">
|
||||
<property name="text">
|
||||
<string>Timer2</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Timer1</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="3" column="0">
|
||||
<widget class="QLabel" name="label_ttrace">
|
||||
<property name="text">
|
||||
<string>Throttle Source</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QLabel" name="swwarn_label">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Minimum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Switch Warnings</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="0">
|
||||
<widget class="QLabel" name="label_12">
|
||||
<property name="text">
|
||||
<string>Center beep</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="7" column="1">
|
||||
<layout class="QGridLayout" name="centerBeepLayout"/>
|
||||
</item>
|
||||
<item row="4" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="text">
|
||||
<string>Trim Increment</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="4" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
@@ -288,6 +239,29 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="displayText">
|
||||
<property name="layoutDirection">
|
||||
<enum>Qt::RightToLeft</enum>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Display Checklist</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="3" column="1">
|
||||
@@ -353,6 +327,58 @@ If this is checked the throttle will be reversed. Idle will be forward, trim wi
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<layout class="QGridLayout" name="switchesStartupLayout" rowstretch="0" columnstretch="0">
|
||||
<property name="sizeConstraint">
|
||||
<enum>QLayout::SetMinimumSize</enum>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="verticalSpacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="6" column="0">
|
||||
<widget class="QLabel" name="label_potWarning">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Pot Warnings</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="6" column="1">
|
||||
<layout class="QGridLayout" name="potWarningLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QComboBox" name="potWarningMode">
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>OFF</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Manual</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Auto</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
|
||||
@@ -111,6 +111,8 @@ PACK(typedef struct {
|
||||
}) MixData_v215;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
PACK(typedef struct {
|
||||
int8_t mode; // timer trigger source -> off, abs, stk, stk%, sw/!sw, !m_sw/!m_sw
|
||||
uint16_t start:12;
|
||||
@@ -131,6 +133,30 @@ PACK(typedef struct {
|
||||
gvar_t gvars[5];
|
||||
}) PhaseData_v215;
|
||||
|
||||
PACK(typedef struct {
|
||||
int16_t v1;
|
||||
int16_t v2;
|
||||
uint8_t func;
|
||||
uint8_t delay;
|
||||
uint8_t duration;
|
||||
int8_t andsw;
|
||||
}) LogicalSwitchData_v215;
|
||||
|
||||
PACK(typedef struct {
|
||||
int8_t swtch;
|
||||
uint8_t func;
|
||||
PACK(union {
|
||||
char name[LEN_CFN_NAME];
|
||||
struct {
|
||||
int16_t val;
|
||||
int16_t ext1;
|
||||
int16_t ext2;
|
||||
} composite;
|
||||
}) param;
|
||||
uint8_t mode:2;
|
||||
uint8_t active:6;
|
||||
}) CustomFnData_v215;
|
||||
|
||||
PACK(typedef struct {
|
||||
FrSkyChannelData channels[2];
|
||||
uint8_t usrProto; // Protocol in FrSky user data, 0=None, 1=FrSky hub, 2=WS HowHigh, 3=Halcyon
|
||||
@@ -168,8 +194,8 @@ PACK(typedef struct {
|
||||
int16_t curves[16];
|
||||
int8_t points[NUM_POINTS];
|
||||
|
||||
LogicalSwitchData customSw[NUM_CSW];
|
||||
CustomFnData funcSw[NUM_CFN];
|
||||
LogicalSwitchData_v215 customSw[NUM_CSW];
|
||||
CustomFnData_v215 funcSw[NUM_CFN];
|
||||
SwashRingData swashR;
|
||||
PhaseData_v215 phaseData[MAX_PHASES];
|
||||
|
||||
@@ -377,75 +403,144 @@ void ConvertModel_215_to_216(ModelData &model)
|
||||
g_model.points[i] = oldModel.points[i];
|
||||
}
|
||||
for (uint8_t i=0; i<32; i++) {
|
||||
g_model.customSw[i] = oldModel.customSw[i];
|
||||
LogicalSwitchData & sw = g_model.customSw[i];
|
||||
sw.func = oldModel.customSw[i].func;
|
||||
if (sw.func >= LS_FUNC_RANGE) sw.func += 1;
|
||||
if (sw.func >= LS_FUNC_STAY) sw.func += 1;
|
||||
sw.v1 = oldModel.customSw[i].v1;
|
||||
sw.v2 = oldModel.customSw[i].v2;
|
||||
sw.delay = oldModel.customSw[i].delay;
|
||||
sw.duration = oldModel.customSw[i].duration;
|
||||
sw.andsw = oldModel.customSw[i].andsw;
|
||||
#if defined(PCBTARANIS)
|
||||
LogicalSwitchData * cs = &g_model.customSw[i];
|
||||
uint8_t cstate = cswFamily(cs->func);
|
||||
uint8_t cstate = cswFamily(sw.func);
|
||||
if (cstate == LS_FAMILY_OFS || cstate == LS_FAMILY_COMP || cstate == LS_FAMILY_DIFF) {
|
||||
if (cs->v1 > 0) cs->v1 += MAX_INPUTS + MAX_SCRIPTS*MAX_SCRIPT_OUTPUTS;
|
||||
if (cs->v1 > MIXSRC_GVAR1+4) cs->v1 += 4;
|
||||
if (sw.v1 > 0) sw.v1 += MAX_INPUTS + MAX_SCRIPTS*MAX_SCRIPT_OUTPUTS;
|
||||
if (sw.v1 > MIXSRC_GVAR1+4) sw.v1 += 4;
|
||||
}
|
||||
if (cstate == LS_FAMILY_OFS || cstate == LS_FAMILY_DIFF) {
|
||||
if (cs->v1 >= MIXSRC_FIRST_TELEM) {
|
||||
switch ((uint8_t)cs->v1) {
|
||||
if (sw.v1 >= MIXSRC_FIRST_TELEM) {
|
||||
switch ((uint8_t)sw.v1) {
|
||||
case MIXSRC_FIRST_TELEM + TELEM_TM1-1:
|
||||
case MIXSRC_FIRST_TELEM + TELEM_TM2-1:
|
||||
cs->v2 = (cs->v2+128) * 3;
|
||||
sw.v2 = (sw.v2+128) * 3;
|
||||
break;
|
||||
case MIXSRC_FIRST_TELEM + TELEM_ALT-1:
|
||||
case MIXSRC_FIRST_TELEM + TELEM_GPSALT-1:
|
||||
case MIXSRC_FIRST_TELEM + TELEM_MIN_ALT-1:
|
||||
case MIXSRC_FIRST_TELEM + TELEM_MAX_ALT-1:
|
||||
cs->v2 = (cs->v2+128) * 8 - 500;
|
||||
sw.v2 = (sw.v2+128) * 8 - 500;
|
||||
break;
|
||||
case MIXSRC_FIRST_TELEM + TELEM_RPM-1:
|
||||
case MIXSRC_FIRST_TELEM + TELEM_MAX_RPM-1:
|
||||
cs->v2 = (cs->v2+128) * 50;
|
||||
sw.v2 = (sw.v2+128) * 50;
|
||||
break;
|
||||
case MIXSRC_FIRST_TELEM + TELEM_T1-1:
|
||||
case MIXSRC_FIRST_TELEM + TELEM_T2-1:
|
||||
case MIXSRC_FIRST_TELEM + TELEM_MAX_T1-1:
|
||||
case MIXSRC_FIRST_TELEM + TELEM_MAX_T2-1:
|
||||
cs->v2 = (cs->v2+128) + 30;
|
||||
sw.v2 = (sw.v2+128) + 30;
|
||||
break;
|
||||
case MIXSRC_FIRST_TELEM + TELEM_CELL-1:
|
||||
case MIXSRC_FIRST_TELEM + TELEM_HDG-1:
|
||||
cs->v2 = (cs->v2+128) * 2;
|
||||
sw.v2 = (sw.v2+128) * 2;
|
||||
break;
|
||||
case MIXSRC_FIRST_TELEM + TELEM_DIST-1:
|
||||
case MIXSRC_FIRST_TELEM + TELEM_MAX_DIST-1:
|
||||
cs->v2 = (cs->v2+128) * 8;
|
||||
sw.v2 = (sw.v2+128) * 8;
|
||||
break;
|
||||
case MIXSRC_FIRST_TELEM + TELEM_CURRENT-1:
|
||||
case MIXSRC_FIRST_TELEM + TELEM_POWER-1:
|
||||
cs->v2 = (cs->v2+128) * 5;
|
||||
sw.v2 = (sw.v2+128) * 5;
|
||||
break;
|
||||
case MIXSRC_FIRST_TELEM + TELEM_CONSUMPTION-1:
|
||||
cs->v2 = (cs->v2+128) * 20;
|
||||
sw.v2 = (sw.v2+128) * 20;
|
||||
break;
|
||||
default:
|
||||
cs->v2 += 128;
|
||||
sw.v2 += 128;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (cstate == LS_FAMILY_COMP) {
|
||||
if (cs->v2 > 0) cs->v2 += MAX_INPUTS + MAX_SCRIPTS*MAX_SCRIPT_OUTPUTS;
|
||||
if (cs->v2 > MIXSRC_GVAR1+4) cs->v2 += 4;
|
||||
if (sw.v2 > 0) sw.v2 += MAX_INPUTS + MAX_SCRIPTS*MAX_SCRIPT_OUTPUTS;
|
||||
if (sw.v2 > MIXSRC_GVAR1+4) sw.v2 += 4;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
for (uint8_t i=0; i<32; i++) {
|
||||
g_model.funcSw[i] = oldModel.funcSw[i];
|
||||
CustomFnData *sd = &g_model.funcSw[i];
|
||||
if (CFN_FUNC(sd) == FUNC_PLAY_VALUE || CFN_FUNC(sd) == FUNC_VOLUME || (IS_ADJUST_GV_FUNC(CFN_FUNC(sd)) && CFN_GVAR_MODE(sd) == FUNC_ADJUST_GVAR_SOURCE)) {
|
||||
CustomFnData & fn = g_model.funcSw[i];
|
||||
fn.swtch = oldModel.funcSw[i].swtch;
|
||||
fn.func = oldModel.funcSw[i].func;
|
||||
if (fn.func <= 15) {
|
||||
fn.all.param = fn.func;
|
||||
fn.func = FUNC_SAFETY_CHANNEL;
|
||||
}
|
||||
else if (fn.func <= 20) {
|
||||
fn.all.param = fn.func - 16;
|
||||
fn.func = FUNC_TRAINER;
|
||||
}
|
||||
else if (fn.func == 21) {
|
||||
fn.func = FUNC_INSTANT_TRIM;
|
||||
}
|
||||
else if (fn.func == 22) {
|
||||
fn.func = FUNC_PLAY_SOUND;
|
||||
}
|
||||
#if defined(PCBSKY9X)
|
||||
else if (fn.func == 23) {
|
||||
fn.func = FUNC_HAPTIC;
|
||||
}
|
||||
#endif
|
||||
else if (fn.func == 23+IS_PCBSKY9X) {
|
||||
fn.func = FUNC_RESET;
|
||||
}
|
||||
else if (fn.func == 24+IS_PCBSKY9X) {
|
||||
fn.func = FUNC_VARIO;
|
||||
}
|
||||
else if (fn.func == 25+IS_PCBSKY9X) {
|
||||
fn.func = FUNC_PLAY_TRACK;
|
||||
}
|
||||
else if (fn.func == 26+IS_PCBSKY9X) {
|
||||
fn.func = FUNC_PLAY_VALUE;
|
||||
}
|
||||
else if (fn.func == 27+IS_PCBSKY9X) {
|
||||
fn.func = FUNC_LOGS;
|
||||
}
|
||||
else if (fn.func == 28+IS_PCBSKY9X) {
|
||||
fn.func = FUNC_VOLUME;
|
||||
}
|
||||
else if (fn.func == 29+IS_PCBSKY9X) {
|
||||
fn.func = FUNC_BACKLIGHT;
|
||||
}
|
||||
else if (fn.func == 30+IS_PCBSKY9X) {
|
||||
fn.func = FUNC_BACKGND_MUSIC;
|
||||
}
|
||||
else if (fn.func == 31+IS_PCBSKY9X) {
|
||||
fn.func = FUNC_BACKGND_MUSIC_PAUSE;
|
||||
}
|
||||
else {
|
||||
fn.all.param = fn.func - 32 - IS_PCBSKY9X;
|
||||
fn.all.mode = oldModel.funcSw[i].mode;
|
||||
fn.func = FUNC_ADJUST_GVAR;
|
||||
}
|
||||
|
||||
fn.active = oldModel.funcSw[i].active;
|
||||
if (HAS_REPEAT_PARAM(fn.func)) {
|
||||
fn.active *= 5;
|
||||
}
|
||||
|
||||
if (fn.func == FUNC_PLAY_TRACK || fn.func == FUNC_BACKGND_MUSIC) {
|
||||
memcpy(fn.play.name, oldModel.funcSw[i].param.name, LEN_CFN_NAME);
|
||||
}
|
||||
else {
|
||||
fn.all.val = oldModel.funcSw[i].param.composite.val;
|
||||
}
|
||||
if (fn.func == FUNC_PLAY_VALUE || fn.func == FUNC_VOLUME || (IS_ADJUST_GV_FUNC(fn.func) && fn.all.mode == FUNC_ADJUST_GVAR_SOURCE)) {
|
||||
#if defined(PCBTARANIS)
|
||||
CFN_PARAM(sd) += 1 + MAX_INPUTS + MAX_SCRIPTS*MAX_SCRIPT_OUTPUTS;
|
||||
fn.all.param += 1 + MAX_INPUTS + MAX_SCRIPTS*MAX_SCRIPT_OUTPUTS;
|
||||
#endif
|
||||
if (CFN_PARAM(sd) > MIXSRC_GVAR1+4) CFN_PARAM(sd) += 4;
|
||||
if (fn.all.param > MIXSRC_GVAR1+4) fn.all.param += 4;
|
||||
}
|
||||
if (HAS_REPEAT_PARAM(sd))
|
||||
CFN_PLAY_REPEAT(sd) *= 5;
|
||||
}
|
||||
|
||||
g_model.swashR = oldModel.swashR;
|
||||
@@ -474,7 +569,8 @@ void ConvertModel_215_to_216(ModelData &model)
|
||||
#endif
|
||||
}
|
||||
g_model.thrTraceSrc = oldModel.thrTraceSrc;
|
||||
g_model.switchWarningStates = oldModel.switchWarningStates;
|
||||
g_model.switchWarningStates = oldModel.switchWarningStates >> 1;
|
||||
g_model.nSwToWarn = (oldModel.switchWarningStates & 0x01) ? 0xFF : 0;
|
||||
for (uint8_t i=0; i<5; i++) {
|
||||
memcpy(g_model.gvars[i].name, oldModel.gvar_names[i], LEN_GVAR_NAME);
|
||||
}
|
||||
|
||||
@@ -160,8 +160,8 @@ enum menuGeneralSetupItems {
|
||||
ITEM_SETUP_CONTRAST,
|
||||
ITEM_SETUP_ALARMS_LABEL,
|
||||
ITEM_SETUP_BATTERY_WARNING,
|
||||
IF_PCBSKY9X(ITEM_SETUP_CAPACITY_WARNING)
|
||||
IF_PCBSKY9X(ITEM_SETUP_TEMPERATURE_WARNING)
|
||||
CASE_PCBSKY9X(ITEM_SETUP_CAPACITY_WARNING)
|
||||
CASE_PCBSKY9X(ITEM_SETUP_TEMPERATURE_WARNING)
|
||||
ITEM_SETUP_INACTIVITY_ALARM,
|
||||
ITEM_SETUP_MEMORY_WARNING,
|
||||
ITEM_SETUP_ALARM_WARNING,
|
||||
@@ -211,7 +211,7 @@ void menuGeneralSetup(uint8_t event)
|
||||
}
|
||||
#endif
|
||||
|
||||
MENU(STR_MENURADIOSETUP, menuTabDiag, e_Setup, ITEM_SETUP_MAX+1, {0, IF_RTCLOCK(2) IF_RTCLOCK(2) IF_BATTGRAPH(1) LABEL(SOUND), IF_AUDIO(0) IF_BUZZER(0) IF_VOICE(0) IF_CPUARM(0) IF_CPUARM(0) IF_CPUARM(0) IF_CPUARM(0) 0, IF_AUDIO(0) IF_HAPTIC(LABEL(HAPTIC)) IF_HAPTIC(0) IF_HAPTIC(0) IF_HAPTIC(0) 0, LABEL(ALARMS), 0, IF_PCBSKY9X(0) IF_PCBSKY9X(0) 0, 0, 0, IF_ROTARY_ENCODERS(0) LABEL(BACKLIGHT), 0, 0, IF_CPUARM(0) CASE_PWM_BACKLIGHT(0) CASE_PWM_BACKLIGHT(0) 0, IF_SPLASH(0) IF_GPS(0) IF_GPS(0) IF_PXX(0) IF_CPUARM(0) IF_CPUARM(0) IF_FAI_CHOICE(0) 0, LABEL(TX_MODE), CASE_PCBTARANIS(0) 1/*to force edit mode*/});
|
||||
MENU(STR_MENURADIOSETUP, menuTabDiag, e_Setup, ITEM_SETUP_MAX+1, {0, IF_RTCLOCK(2) IF_RTCLOCK(2) IF_BATTGRAPH(1) LABEL(SOUND), IF_AUDIO(0) IF_BUZZER(0) IF_VOICE(0) IF_CPUARM(0) IF_CPUARM(0) IF_CPUARM(0) IF_CPUARM(0) 0, IF_AUDIO(0) IF_HAPTIC(LABEL(HAPTIC)) IF_HAPTIC(0) IF_HAPTIC(0) IF_HAPTIC(0) 0, LABEL(ALARMS), 0, CASE_PCBSKY9X(0) CASE_PCBSKY9X(0) 0, 0, 0, IF_ROTARY_ENCODERS(0) LABEL(BACKLIGHT), 0, 0, IF_CPUARM(0) CASE_PWM_BACKLIGHT(0) CASE_PWM_BACKLIGHT(0) 0, IF_SPLASH(0) IF_GPS(0) IF_GPS(0) IF_PXX(0) IF_CPUARM(0) IF_CPUARM(0) IF_FAI_CHOICE(0) 0, LABEL(TX_MODE), CASE_PCBTARANIS(0) 1/*to force edit mode*/});
|
||||
|
||||
uint8_t sub = m_posVert - 1;
|
||||
|
||||
|
||||
+125
-47
@@ -669,7 +669,8 @@ void menuModelFailsafe(uint8_t event)
|
||||
bool newLongNames = false;
|
||||
uint8_t ch;
|
||||
|
||||
if (event == EVT_KEY_BREAK(KEY_ENTER) && s_editMode) {
|
||||
if (event == EVT_KEY_LONG(KEY_ENTER) && s_editMode) {
|
||||
s_noHi = NO_HI_LEN;
|
||||
g_model.moduleData[g_moduleIdx].failsafeChannels[m_posVert] = channelOutputs[m_posVert];
|
||||
eeDirty(EE_MODEL);
|
||||
AUDIO_WARNING1();
|
||||
@@ -721,7 +722,7 @@ void menuModelFailsafe(uint8_t event)
|
||||
|
||||
// Value
|
||||
LcdFlags flags = TINSIZE;
|
||||
if (m_posVert == ch) {
|
||||
if (m_posVert == ch && !s_noHi) {
|
||||
flags |= INVERS;
|
||||
if (s_editMode)
|
||||
flags |= BLINK;
|
||||
@@ -873,7 +874,11 @@ enum menuModelSetupItems {
|
||||
ITEM_MODEL_THROTTLE_TRACE,
|
||||
ITEM_MODEL_THROTTLE_TRIM,
|
||||
ITEM_MODEL_THROTTLE_WARNING,
|
||||
#if defined(PCBTARANIS)
|
||||
ITEM_MODEL_CHECKLIST_DISPLAY,
|
||||
#endif
|
||||
ITEM_MODEL_SWITCHES_WARNING,
|
||||
CASE_PCBTARANIS(ITEM_MODEL_POT_WARNING)
|
||||
ITEM_MODEL_BEEP_CENTER,
|
||||
#if defined(PCBTARANIS)
|
||||
ITEM_MODEL_INTERNAL_MODULE_LABEL,
|
||||
@@ -956,21 +961,22 @@ void menuModelSetup(uint8_t event)
|
||||
#define PORT_CHANNELS_ROWS(x) (x==0 ? PORT1_CHANNELS_ROWS() : (x==1 ? PORT2_CHANNELS_ROWS() : TRAINER_CHANNELS_ROWS()))
|
||||
#define FAILSAFE_ROWS(x) ((g_model.moduleData[x].rfProtocol==RF_PROTO_X16 || g_model.moduleData[x].rfProtocol==RF_PROTO_LR12) ? (g_model.moduleData[x].failsafeMode==FAILSAFE_CUSTOM ? (uint8_t)1 : (uint8_t)0) : HIDDEN_ROW)
|
||||
#define MODEL_SETUP_MAX_LINES (1+ITEM_MODEL_SETUP_MAX)
|
||||
#define POT_WARN_ITEMS() ((g_model.nPotsToWarn >> 6) ? (uint8_t)NUM_POTS : (uint8_t)0)
|
||||
|
||||
bool CURSOR_ON_CELL = (m_posHorz >= 0);
|
||||
MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, NAVIGATION_LINE_BY_LINE|(NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1), LABEL(InternalModule), 0, IF_PORT1_ON(1), IF_PORT1_ON(IS_D8_RX(0) ? (uint8_t)1 : (uint8_t)2), IF_PORT1_ON(FAILSAFE_ROWS(0)), LABEL(ExternalModule), (g_model.externalModule==MODULE_TYPE_XJT || IS_MODULE_DSM2(EXTERNAL_MODULE)) ? (uint8_t)1 : (uint8_t)0, PORT2_CHANNELS_ROWS(), (IS_MODULE_XJT(1) && IS_D8_RX(1)) ? (uint8_t)1 : (IS_MODULE_PPM(1) || IS_MODULE_XJT(1) || IS_MODULE_DSM2(1)) ? (uint8_t)2 : HIDDEN_ROW, IF_PORT2_XJT(FAILSAFE_ROWS(1)), LABEL(Trainer), 0, TRAINER_CHANNELS_ROWS(), IF_TRAINER_ON(2)});
|
||||
MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 1, 0, 0, 0, 0, 0, CASE_PCBTARANIS(0) 7, POT_WARN_ITEMS(), NAVIGATION_LINE_BY_LINE|(NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1), LABEL(InternalModule), 0, IF_PORT1_ON(1), IF_PORT1_ON(IS_D8_RX(0) ? (uint8_t)1 : (uint8_t)2), IF_PORT1_ON(FAILSAFE_ROWS(0)), LABEL(ExternalModule), (g_model.externalModule==MODULE_TYPE_XJT || IS_MODULE_DSM2(EXTERNAL_MODULE)) ? (uint8_t)1 : (uint8_t)0, PORT2_CHANNELS_ROWS(), (IS_MODULE_XJT(1) && IS_D8_RX(1)) ? (uint8_t)1 : (IS_MODULE_PPM(1) || IS_MODULE_XJT(1) || IS_MODULE_DSM2(1)) ? (uint8_t)2 : HIDDEN_ROW, IF_PORT2_XJT(FAILSAFE_ROWS(1)), LABEL(Trainer), 0, TRAINER_CHANNELS_ROWS(), IF_TRAINER_ON(2)});
|
||||
#elif defined(CPUM64)
|
||||
#define CURSOR_ON_CELL (true)
|
||||
#define MODEL_SETUP_MAX_LINES ((IS_PPM_PROTOCOL(protocol)||IS_DSM2_PROTOCOL(protocol)||IS_PXX_PROTOCOL(protocol)) ? 1+ITEM_MODEL_SETUP_MAX : ITEM_MODEL_SETUP_MAX)
|
||||
|
||||
uint8_t protocol = g_model.protocol;
|
||||
MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1, FIELD_PROTOCOL_MAX, 2 });
|
||||
MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1, FIELD_PROTOCOL_MAX, 2 });
|
||||
#else
|
||||
#define CURSOR_ON_CELL (true)
|
||||
#define MODEL_SETUP_MAX_LINES ((IS_PPM_PROTOCOL(protocol)||IS_DSM2_PROTOCOL(protocol)||IS_PXX_PROTOCOL(protocol)) ? 1+ITEM_MODEL_SETUP_MAX : ITEM_MODEL_SETUP_MAX)
|
||||
|
||||
uint8_t protocol = g_model.protocol;
|
||||
MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1, FIELD_PROTOCOL_MAX, 2, IF_PCBSKY9X(1) IF_PCBSKY9X(2) });
|
||||
MENU_TAB({ 0, 0, CASE_PCBTARANIS(0) 2, IF_PERSISTENT_TIMERS(0) 0, 0, 2, IF_PERSISTENT_TIMERS(0) 0, 0, 0, 1, 0, 0, 0, 0, 0, 6, NUM_STICKS+NUM_POTS+NUM_ROTARY_ENCODERS-1, FIELD_PROTOCOL_MAX, 2, CASE_PCBSKY9X(1) CASE_PCBSKY9X(2) });
|
||||
#endif
|
||||
|
||||
if (!MENU_CHECK(menuTabModel, e_ModelSetup, MODEL_SETUP_MAX_LINES)) {
|
||||
@@ -1096,10 +1102,11 @@ void menuModelSetup(uint8_t event)
|
||||
g_model.extendedTrims = onoffMenuItem(g_model.extendedTrims, MODEL_SETUP_2ND_COLUMN, y, STR_ETRIMS, attr, event);
|
||||
#else
|
||||
g_model.extendedTrims = onoffMenuItem(g_model.extendedTrims, MODEL_SETUP_2ND_COLUMN, y, STR_ETRIMS, m_posHorz<=0 ? attr : 0, event==EVT_KEY_BREAK(KEY_ENTER) ? event : 0);
|
||||
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+3*FW, y, STR_RESET_BTN, m_posHorz>0 ? attr : 0);
|
||||
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+3*FW, y, STR_RESET_BTN, m_posHorz>0 && !s_noHi ? attr : 0);
|
||||
if (attr && m_posHorz>0) {
|
||||
s_editMode = 0;
|
||||
if (event==EVT_KEY_LONG(KEY_ENTER)) {
|
||||
s_noHi = NO_HI_LEN;
|
||||
for (uint8_t i=0; i<MAX_PHASES; i++) {
|
||||
memclear(&g_model.phaseData[i], TRIMS_ARRAY_SIZE);
|
||||
}
|
||||
@@ -1138,62 +1145,133 @@ void menuModelSetup(uint8_t event)
|
||||
case ITEM_MODEL_THROTTLE_WARNING:
|
||||
g_model.disableThrottleWarning = !onoffMenuItem(!g_model.disableThrottleWarning, MODEL_SETUP_2ND_COLUMN, y, STR_THROTTLEWARNING, attr, event);
|
||||
break;
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
case ITEM_MODEL_CHECKLIST_DISPLAY:
|
||||
g_model.displayText = onoffMenuItem(g_model.displayText, MODEL_SETUP_2ND_COLUMN, y, STR_CHECKLIST, attr, event);
|
||||
break;
|
||||
#endif
|
||||
|
||||
case ITEM_MODEL_SWITCHES_WARNING:
|
||||
{
|
||||
lcd_putsLeft(y, STR_SWITCHWARNING);
|
||||
swstate_t states = g_model.switchWarningStates;
|
||||
char c = !(states & 1);
|
||||
menu_lcd_onoff(MODEL_SETUP_2ND_COLUMN, y, c, attr);
|
||||
char c;
|
||||
if (attr) {
|
||||
s_editMode = 0;
|
||||
switch(event) {
|
||||
case EVT_KEY_LONG(KEY_ENTER):
|
||||
if (!READ_ONLY()) {
|
||||
killEvents(event);
|
||||
getMovedSwitch();
|
||||
g_model.switchWarningStates = 0x01 + (switches_states << 1);
|
||||
}
|
||||
// no break
|
||||
CASE_EVT_ROTARY_BREAK
|
||||
case EVT_KEY_BREAK(KEY_ENTER):
|
||||
#if !defined(PCBTARANIS)
|
||||
case EVT_KEY_BREAK(KEY_LEFT):
|
||||
case EVT_KEY_BREAK(KEY_RIGHT):
|
||||
#endif
|
||||
if (!READ_ONLY()) {
|
||||
g_model.switchWarningStates ^= 0x01;
|
||||
if (!READ_ONLY()) {
|
||||
switch(event) {
|
||||
CASE_EVT_ROTARY_BREAK
|
||||
case EVT_KEY_BREAK(KEY_ENTER):
|
||||
#if defined(CPUM64)
|
||||
g_model.nSwToWarn ^= (1 << m_posHorz);
|
||||
eeDirty(EE_MODEL);
|
||||
}
|
||||
break;
|
||||
#else
|
||||
if (m_posHorz < NUM_SWITCHES-1) {
|
||||
g_model.nSwToWarn ^= (1 << m_posHorz);
|
||||
eeDirty(EE_MODEL);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
|
||||
case EVT_KEY_LONG(KEY_ENTER):
|
||||
#if defined(CPUM64)
|
||||
getMovedSwitch();
|
||||
g_model.switchWarningStates = switches_states;
|
||||
AUDIO_WARNING1();
|
||||
eeDirty(EE_MODEL);
|
||||
#else
|
||||
if (m_posHorz == NUM_SWITCHES-1) {
|
||||
s_noHi = NO_HI_LEN;
|
||||
getMovedSwitch();
|
||||
g_model.switchWarningStates = switches_states;
|
||||
AUDIO_WARNING1();
|
||||
eeDirty(EE_MODEL);
|
||||
}
|
||||
#endif
|
||||
killEvents(event);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (c) {
|
||||
states >>= 1;
|
||||
for (uint8_t i=1; i<NUM_SWITCHES; i++) {
|
||||
|
||||
LcdFlags line = attr;
|
||||
|
||||
for (uint8_t i=0; i<NUM_SWITCHES-1; i++) {
|
||||
uint8_t swactive = !(g_model.nSwToWarn & 1 << i);
|
||||
#if defined(PCBTARANIS)
|
||||
c = "\300-\301"[states & 0x03];
|
||||
lcd_putc(MODEL_SETUP_2ND_COLUMN+3+i*(2*FW), y, 'A'+i-1);
|
||||
lcd_putc(MODEL_SETUP_2ND_COLUMN+3+i*(2*FW)+FWNUM, y, c);
|
||||
states >>= 2;
|
||||
c = "\300-\301"[states & 0x03];
|
||||
lcd_putcAtt(MODEL_SETUP_2ND_COLUMN+i*(2*FW), y, 'A'+i, line && (m_posHorz == i) ? INVERS : 0);
|
||||
if (swactive) lcd_putc(MODEL_SETUP_2ND_COLUMN+i*(2*FW)+FWNUM, y, c);
|
||||
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+((NUM_SWITCHES-1)*2*FW+2), y, PSTR("<]"), (m_posHorz == NUM_SWITCHES-1 && !s_noHi) ? line : 0);
|
||||
states >>= 2;
|
||||
#else
|
||||
attr = 0;
|
||||
if (IS_3POS(i-1)) {
|
||||
c = '0'+(states & 0x03);
|
||||
states >>= 2;
|
||||
}
|
||||
else {
|
||||
if (states & 0x01)
|
||||
attr = INVERS;
|
||||
c = pgm_read_byte(STR_VSWITCHES - 2 + 6 + (3*i));
|
||||
states >>= 1;
|
||||
}
|
||||
lcd_putcAtt(MODEL_SETUP_2ND_COLUMN+2*FW+i*FW, y, c, attr);
|
||||
#endif
|
||||
attr = 0;
|
||||
|
||||
if (IS_3POS(i)) {
|
||||
c = '0'+(states & 0x03);
|
||||
states >>= 2;
|
||||
}
|
||||
else {
|
||||
if ((states & 0x01) && swactive)
|
||||
attr = INVERS;
|
||||
c = pgm_read_byte(STR_VSWITCHES - 2 + 9 + (3*i));
|
||||
states >>= 1;
|
||||
}
|
||||
if (line && (m_posHorz == i)) {
|
||||
attr = BLINK;
|
||||
if (swactive)
|
||||
attr |= INVERS;
|
||||
}
|
||||
lcd_putcAtt(MODEL_SETUP_2ND_COLUMN+i*FW, y, (swactive || (attr & BLINK)) ? c : '-', attr);
|
||||
#if !defined(CPUM64)
|
||||
lcd_putsAtt(MODEL_SETUP_2ND_COLUMN+(NUM_SWITCHES*FW), y, PSTR("<]"), (m_posHorz == NUM_SWITCHES-1 && !s_noHi) ? line : 0);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
}
|
||||
#if defined(PCBTARANIS)
|
||||
case ITEM_MODEL_POT_WARNING:
|
||||
{
|
||||
lcd_putsLeft(y, STR_POTWARNING);
|
||||
uint8_t potMode = g_model.nPotsToWarn >> 6;
|
||||
if(attr) {
|
||||
if (m_posHorz) s_editMode = 0;
|
||||
if (!READ_ONLY() && m_posHorz) {
|
||||
switch(event) {
|
||||
case EVT_KEY_LONG(KEY_ENTER):
|
||||
killEvents(event);
|
||||
if(potMode == 1) {
|
||||
g_model.potPosition[m_posHorz-1] = getValue(MIXSRC_FIRST_POT+m_posHorz-1) >> 3;
|
||||
AUDIO_WARNING1();
|
||||
eeDirty(EE_MODEL);
|
||||
}
|
||||
break;
|
||||
case EVT_KEY_BREAK(KEY_ENTER):
|
||||
g_model.nPotsToWarn ^= (1 << (m_posHorz-1));
|
||||
eeDirty(EE_MODEL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN, y, PSTR("\004""Off\0""Man\0""Auto"), potMode, attr & ((m_posHorz == 0) ? attr : !INVERS));
|
||||
if (potMode)
|
||||
for (uint8_t i=0; i<NUM_POTS ; i++) {
|
||||
LcdFlags flags = ((m_posHorz==i+1) && attr) ? BLINK : 0;
|
||||
flags |= (!(g_model.nPotsToWarn & (1 << i))) ? INVERS : 0;
|
||||
lcd_putsiAtt(MODEL_SETUP_2ND_COLUMN+5*FW+i*3*FW, y, STR_VSRCRAW, NUM_STICKS+1+i, flags);
|
||||
}
|
||||
|
||||
if (attr && (m_posHorz == 0)) {
|
||||
CHECK_INCDEC_MODELVAR(event, potMode, 0, 2);
|
||||
g_model.nPotsToWarn = (g_model.nPotsToWarn & 0x3F) | ((potMode << 6) & 0xC0);
|
||||
eeDirty(EE_MODEL);
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
case ITEM_MODEL_BEEP_CENTER:
|
||||
lcd_putsLeft(y, STR_BEEPCTR);
|
||||
@@ -5015,7 +5093,7 @@ void menuModelCustomFunctions(uint8_t event)
|
||||
menu_lcd_onoff(MODEL_CUSTOM_FUNC_4TH_COLUMN_ONOFF, y, CFN_ACTIVE(sd), attr);
|
||||
if (active) CHECK_INCDEC_MODELVAR_ZERO(event, CFN_ACTIVE(sd), 1);
|
||||
}
|
||||
else if (HAS_REPEAT_PARAM(sd)) {
|
||||
else if (HAS_REPEAT_PARAM(func)) {
|
||||
if (CFN_PLAY_REPEAT(sd) == 0) {
|
||||
#if LCD_W >= 212
|
||||
lcd_putsAtt(MODEL_CUSTOM_FUNC_4TH_COLUMN+2, y, "1x", attr);
|
||||
|
||||
@@ -372,6 +372,7 @@ void displayWarning(uint8_t event);
|
||||
#if defined(PCBTARANIS)
|
||||
void menuChannelsView(uint8_t event);
|
||||
void pushMenuTextView(const char *filename);
|
||||
bool modelHasNotes();
|
||||
#endif
|
||||
|
||||
#define LABEL(...) (uint8_t)-1
|
||||
|
||||
@@ -294,17 +294,17 @@ PACK(typedef struct t_ScriptData {
|
||||
TRAINER_MODULE
|
||||
};
|
||||
#define MODELDATA_BITMAP char bitmap[LEN_BITMAP_NAME];
|
||||
#define MODELDATA_EXTRA uint8_t externalModule; uint8_t trainerMode; ModuleData moduleData[NUM_MODULES+1]; char curveNames[MAX_CURVES][6]; ScriptData scriptsData[MAX_SCRIPTS]; char inputNames[MAX_INPUTS][4];
|
||||
#define MODELDATA_EXTRA uint8_t externalModule; uint8_t trainerMode; ModuleData moduleData[NUM_MODULES+1]; char curveNames[MAX_CURVES][6]; ScriptData scriptsData[MAX_SCRIPTS]; char inputNames[MAX_INPUTS][4]; uint8_t nPotsToWarn; int8_t potPosition[NUM_POTS];
|
||||
#define LIMITDATA_EXTRA char name[LEN_CHANNEL_NAME]; int8_t curve;
|
||||
#define swstate_t uint16_t
|
||||
#elif defined(PCBSKY9X)
|
||||
#define MODELDATA_BITMAP
|
||||
#define MODELDATA_EXTRA ModuleData moduleData[NUM_MODULES];
|
||||
#define MODELDATA_EXTRA ModuleData moduleData[NUM_MODULES]; uint8_t nPotsToWarn; int8_t potPosition[NUM_POTS];
|
||||
#define LIMITDATA_EXTRA
|
||||
#define swstate_t uint8_t
|
||||
#else
|
||||
#define MODELDATA_BITMAP
|
||||
#define MODELDATA_EXTRA
|
||||
#define MODELDATA_EXTRA
|
||||
#define LIMITDATA_EXTRA
|
||||
#define swstate_t uint8_t
|
||||
#endif
|
||||
@@ -775,9 +775,9 @@ enum Functions {
|
||||
#endif
|
||||
|
||||
#if defined(VOICE)
|
||||
#define HAS_REPEAT_PARAM(sd) (CFN_FUNC(sd) == FUNC_PLAY_SOUND || (CFN_FUNC(sd) >= FUNC_PLAY_TRACK && CFN_FUNC(sd) <= FUNC_PLAY_VALUE))
|
||||
#define HAS_REPEAT_PARAM(func) (func == FUNC_PLAY_SOUND || (func >= FUNC_PLAY_TRACK && func <= FUNC_PLAY_VALUE))
|
||||
#else
|
||||
#define HAS_REPEAT_PARAM(sd) (CFN_FUNC(sd) == FUNC_PLAY_SOUND)
|
||||
#define HAS_REPEAT_PARAM(func) (func == FUNC_PLAY_SOUND)
|
||||
#endif
|
||||
|
||||
enum ResetFunctionParam {
|
||||
@@ -1550,6 +1550,7 @@ PACK(typedef struct t_ModelData {
|
||||
uint8_t thrTraceSrc;
|
||||
|
||||
swstate_t switchWarningStates;
|
||||
uint8_t nSwToWarn;
|
||||
|
||||
MODEL_GVARS_DATA
|
||||
|
||||
|
||||
+111
-28
@@ -585,7 +585,7 @@ void modelDefault(uint8_t id)
|
||||
|
||||
#if defined(MAVLINK)
|
||||
g_model.mavlink.rc_rssi_scale = 15;
|
||||
g_model.mavlink.pc_rssi_en = 1;
|
||||
g_model.mavlink.pc_rssi_en = 1;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -2236,6 +2236,16 @@ void checkAll()
|
||||
|
||||
checkTHR();
|
||||
checkSwitches();
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
if (modelHasNotes() && g_model.displayText) {
|
||||
char filename[sizeof(MODELS_PATH)+1+sizeof(g_model.header.name)+sizeof(TEXT_EXT)] = MODELS_PATH "/";
|
||||
char *buf = strcat_modelname(&filename[sizeof(MODELS_PATH)], g_eeGeneral.currModel);
|
||||
strcpy(buf, TEXT_EXT);
|
||||
pushMenuTextView(filename);
|
||||
}
|
||||
#endif
|
||||
|
||||
clearKeyEvents();
|
||||
}
|
||||
|
||||
@@ -2298,39 +2308,100 @@ void checkSwitches()
|
||||
{
|
||||
swstate_t last_bad_switches = 0xff;
|
||||
swstate_t states = g_model.switchWarningStates;
|
||||
#if defined(PCBTARANIS)
|
||||
uint8_t bad_pots = 0, last_bad_pots = 0xff;
|
||||
#endif
|
||||
|
||||
while (1) {
|
||||
|
||||
#if defined(TELEMETRY_MOD_14051)
|
||||
#if defined(TELEMETRY_MOD_14051) || defined(PCBTARANIS)
|
||||
getADC();
|
||||
#endif
|
||||
|
||||
getMovedSwitch();
|
||||
|
||||
switches_states <<= 1;
|
||||
|
||||
if ((states & 0x01) || (states == switches_states)) {
|
||||
return;
|
||||
|
||||
uint8_t warn = false;
|
||||
#if defined(PCBTARANIS)
|
||||
for (uint8_t i=0; i<NUM_SWITCHES-1; i++) {
|
||||
if (!(g_model.nSwToWarn & (1<<i))) {
|
||||
swstate_t mask = (0x03 << (i*2));
|
||||
if(!((states & mask) == (switches_states & mask)))
|
||||
warn = true;
|
||||
}
|
||||
}
|
||||
uint8_t potMode = g_model.nPotsToWarn >> 6;
|
||||
if(potMode) {
|
||||
perOut(e_perout_mode_normal, 0);
|
||||
bad_pots = 0;
|
||||
for (uint8_t i=0; i<NUM_POTS; i++)
|
||||
if(!(g_model.nPotsToWarn & (1 << i)) && (abs(g_model.potPosition[i] - (getValue(MIXSRC_FIRST_POT+i) >> 3)) > 2)) {
|
||||
warn = true;
|
||||
bad_pots |= (1<<i);
|
||||
}
|
||||
}
|
||||
#else
|
||||
for (uint8_t i=0; i<NUM_SWITCHES-1; i++) {
|
||||
if (!(g_model.nSwToWarn & (1<<i))) {
|
||||
if (i == 0) {
|
||||
if((states & 0x03) != (switches_states & 0x03))
|
||||
warn = true;
|
||||
}
|
||||
else if((states & (1<<(i+1))) != (switches_states & (1<<(i+1))))
|
||||
warn = true;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if(!warn) return;
|
||||
|
||||
// first - display warning
|
||||
#if defined(PCBTARANIS)
|
||||
if ((last_bad_switches != switches_states) || (last_bad_pots != bad_pots)) {
|
||||
MESSAGE(STR_SWITCHWARN, NULL, STR_PRESSANYKEYTOSKIP, ((last_bad_switches == 0xff) || (last_bad_pots == 0xff)) ? AU_SWITCH_ALERT : AU_NONE);
|
||||
for (uint8_t i=0; i<NUM_SWITCHES-1; i++) {
|
||||
if(!(g_model.nSwToWarn & (1<<i))) {
|
||||
swstate_t mask = (0x03 << (i*2));
|
||||
uint8_t attr = ((states & mask) == (switches_states & mask)) ? 0 : INVERS;
|
||||
char c = "\300-\301"[(states & mask) >> (i*2)];
|
||||
lcd_putcAtt(60+i*(2*FW+FW/2), 4*FH+3, 'A'+i, attr);
|
||||
lcd_putcAtt(60+i*(2*FW+FW/2)+FW, 4*FH+3, c, attr);
|
||||
}
|
||||
}
|
||||
if(potMode) {
|
||||
for (uint8_t i=0; i<NUM_POTS; i++) {
|
||||
if (!(g_model.nPotsToWarn & (1 << i))) {
|
||||
uint8_t flags = 0;
|
||||
if (abs(g_model.potPosition[i] - (calibratedStick[NUM_STICKS+i] >> 3)) > 2) {
|
||||
switch (i) {
|
||||
case 0:
|
||||
case 1:
|
||||
lcd_putc(60+i*(5*FW)+2*FW+2, 6*FH-2, g_model.potPosition[i] > (getValue(MIXSRC_FIRST_POT+i) >> 3) ? 126 : 127);
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
lcd_putc(60+i*(5*FW)+2*FW+2, 6*FH-2, g_model.potPosition[i] > (getValue(MIXSRC_FIRST_POT+i) >> 3) ? '\300' : '\301');
|
||||
break;
|
||||
}
|
||||
flags = INVERS;
|
||||
}
|
||||
lcd_putsiAtt(60+i*(5*FW), 6*FH-2, STR_VSRCRAW, NUM_STICKS+1+i, flags);
|
||||
}
|
||||
}
|
||||
}
|
||||
last_bad_pots = bad_pots;
|
||||
#else
|
||||
if (last_bad_switches != switches_states) {
|
||||
MESSAGE(STR_SWITCHWARN, NULL, STR_PRESSANYKEYTOSKIP, last_bad_switches == 0xff ? AU_SWITCH_ALERT : AU_NONE);
|
||||
#if defined(PCBTARANIS)
|
||||
for (uint8_t i=0; i<NUM_SWITCHES-1; i++) {
|
||||
swstate_t mask = (0x03 << (1+i*2));
|
||||
uint8_t attr = ((states & mask) == (switches_states & mask)) ? 0 : INVERS;
|
||||
char c = "\300-\301"[(states & mask) >> (1+i*2)];
|
||||
lcd_putcAtt(60+i*(2*FW+FW/2), 5*FH, 'A'+i, attr);
|
||||
lcd_putcAtt(60+i*(2*FW+FW/2)+FW, 5*FH, c, attr);
|
||||
}
|
||||
#else
|
||||
uint8_t x = 2;
|
||||
for (uint8_t i=1; i<NUM_PSWITCH-1; i++) {
|
||||
uint8_t attr = (states & (1 << i)) == (switches_states & (1 << i)) ? 0 : INVERS;
|
||||
putsSwitches(x, 5*FH, (i>2?(i+1):1+((states>>1)&0x3)), attr);
|
||||
if (i == 1 && attr) i++;
|
||||
if (i != 1) x += 3*FW+FW/2;
|
||||
for (uint8_t i=0; i<NUM_SWITCHES-1; i++) {
|
||||
uint8_t attr;
|
||||
if (i == 0)
|
||||
attr = ((states & 0x03) != (switches_states & 0x03)) ? INVERS : 0;
|
||||
else
|
||||
attr = (states & (1 << (i+1))) == (switches_states & (1 << (i+1))) ? 0 : INVERS;
|
||||
if(!(g_model.nSwToWarn & (1<<i)))
|
||||
putsSwitches(x, 5*FH, (i>0?(i+3):(states&0x3)+1), attr);
|
||||
x += 3*FW+FW/2;
|
||||
}
|
||||
#endif
|
||||
lcdRefresh();
|
||||
@@ -4294,8 +4365,10 @@ void opentxClose()
|
||||
hapticOff();
|
||||
#endif
|
||||
|
||||
saveTimers();
|
||||
|
||||
#if defined(CPUARM) && defined(FRSKY)
|
||||
if((g_model.frsky.mAhPersistent) && (g_model.frsky.storedMah != frskyData.hub.currentConsumption)) {
|
||||
if ((g_model.frsky.mAhPersistent) && (g_model.frsky.storedMah != frskyData.hub.currentConsumption)) {
|
||||
g_model.frsky.storedMah = frskyData.hub.currentConsumption;
|
||||
eeDirty(EE_MODEL);
|
||||
}
|
||||
@@ -4305,20 +4378,24 @@ void opentxClose()
|
||||
}
|
||||
#endif
|
||||
|
||||
saveTimers();
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
uint32_t mAhUsed = g_eeGeneral.mAhUsed + Current_used * (488 + g_eeGeneral.currentCalib) / 8192 / 36;
|
||||
if (g_eeGeneral.mAhUsed != mAhUsed)
|
||||
if (g_eeGeneral.mAhUsed != mAhUsed) {
|
||||
g_eeGeneral.mAhUsed = mAhUsed;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(CPUARM) && !defined(REVA)
|
||||
if (sessionTimer > 0)
|
||||
g_eeGeneral.globalTimer += sessionTimer;
|
||||
#if defined(PCBTARANIS)
|
||||
if ((g_model.nPotsToWarn >> 6) == 2) {
|
||||
for (uint8_t i=0; i<NUM_POTS ; i++)
|
||||
if (!(g_model.nPotsToWarn & (1 << i)))
|
||||
g_model.potPosition[i] = getValue(MIXSRC_FIRST_POT+i) >> 3;
|
||||
eeDirty(EE_MODEL);
|
||||
}
|
||||
#endif
|
||||
|
||||
g_eeGeneral.unexpectedShutdown = 0;
|
||||
|
||||
eeDirty(EE_GENERAL);
|
||||
eeCheck(true);
|
||||
}
|
||||
@@ -4909,6 +4986,12 @@ void saveTimers()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if defined(CPUARM) && !defined(REVA)
|
||||
if (sessionTimer > 0) {
|
||||
g_eeGeneral.globalTimer += sessionTimer;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
+4
-2
@@ -45,9 +45,11 @@
|
||||
// TODO change all IF_xxx by CASE_xxx when used with a comma!
|
||||
|
||||
#if defined(PCBSKY9X)
|
||||
#define IF_PCBSKY9X(x) x,
|
||||
#define IS_PCBSKY9X true
|
||||
#define CASE_PCBSKY9X(x) x,
|
||||
#else
|
||||
#define IF_PCBSKY9X(x)
|
||||
#define IS_PCBSKY9X false
|
||||
#define CASE_PCBSKY9X(x)
|
||||
#endif
|
||||
|
||||
#if defined(PCBTARANIS)
|
||||
|
||||
@@ -494,6 +494,8 @@ const pm_char STR_VIEW_TEXT[] PROGMEM = "View text";
|
||||
const pm_char STR_SCALE[] PROGMEM = "Scale";
|
||||
const pm_char STR_VIEW_CHANNELS[] PROGMEM = "View Channels";
|
||||
const pm_char STR_VIEW_NOTES[] PROGMEM = "View Notes";
|
||||
const pm_char STR_POTWARNING[] PROGMEM = TR_POTWARNING;
|
||||
const pm_char STR_CHECKLIST[] PROGMEM = TR_CHECKLIST;
|
||||
const pm_char STR_UART3MODE[] PROGMEM = TR_UART3MODE;
|
||||
const pm_char STR_POT1TYPE[] PROGMEM = TR_POT1TYPE;
|
||||
const pm_char STR_POT2TYPE[] PROGMEM = TR_POT2TYPE;
|
||||
|
||||
@@ -682,6 +682,8 @@ extern const pm_char STR_VIEW_TEXT[];
|
||||
extern const pm_char STR_SCALE[];
|
||||
extern const pm_char STR_VIEW_CHANNELS[];
|
||||
extern const pm_char STR_VIEW_NOTES[];
|
||||
extern const pm_char STR_POTWARNING[];
|
||||
extern const pm_char STR_CHECKLIST[];
|
||||
extern const pm_char STR_UART3MODE[];
|
||||
extern const pm_char STR_POT1TYPE[];
|
||||
extern const pm_char STR_POT2TYPE[];
|
||||
|
||||
@@ -505,6 +505,7 @@
|
||||
#define TR_SPLASHSCREEN "úvodníLogo"
|
||||
#define TR_THROTTLEWARNING "(\043)Plyn"
|
||||
#define TR_SWITCHWARNING "(\043)Spínače"
|
||||
#define TR_POTWARNING TR("Pot Warn.","Pot Warning")
|
||||
#define TR_TIMEZONE "časové pásmo"
|
||||
#define TR_RXCHANNELORD TR("Pořadí kanálů", "Výchozí pořadí kanálů")
|
||||
#define TR_SLAVE "Podřízený"
|
||||
@@ -698,6 +699,7 @@
|
||||
#define TR_LOWALARM INDENT "Nízký Alarm"
|
||||
#define TR_CRITICALALARM INDENT "Kritický Alarm"
|
||||
#define TR_PERSISTENT_MAH INDENT "Store mAh"
|
||||
#define TR_CHECKLIST "Display Checklist"
|
||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||
#define TR_UART3MODE "Serial port"
|
||||
#define TR_POT1TYPE "S1 Type"
|
||||
|
||||
@@ -505,6 +505,7 @@
|
||||
#define TR_SPLASHSCREEN "Startbild"
|
||||
#define TR_THROTTLEWARNING "Gas Alarm"
|
||||
#define TR_SWITCHWARNING TR("Sch. Alarm","Schalter Alarm")
|
||||
#define TR_POTWARNING TR("Pot Warn.","Pot Warning")
|
||||
#define TR_TIMEZONE TR("Zeitzone","GPS Zeit Zone")
|
||||
#define TR_RXCHANNELORD TR("Kanalanordnung","Kanalvoreinstellung")
|
||||
#define TR_SLAVE "Sch\205ler PPM1-8 als Ausgang"
|
||||
@@ -698,6 +699,7 @@
|
||||
#define TR_LOWALARM INDENT "Low Alarm"
|
||||
#define TR_CRITICALALARM INDENT "Kritisch Alarm"
|
||||
#define TR_PERSISTENT_MAH INDENT "Store mAh"
|
||||
#define TR_CHECKLIST "Display Checklist"
|
||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||
#define TR_UART3MODE "Serial port"
|
||||
#define TR_POT1TYPE "S1 Type"
|
||||
|
||||
@@ -505,6 +505,7 @@
|
||||
#define TR_SPLASHSCREEN "Splash screen"
|
||||
#define TR_THROTTLEWARNING TR("T-Warning","Throttle Warning")
|
||||
#define TR_SWITCHWARNING TR("S-Warning","Switch Warning")
|
||||
#define TR_POTWARNING TR("Pot Warn.","Pot Warning")
|
||||
#define TR_TIMEZONE TR("Time Zone","GPS Time zone")
|
||||
#define TR_RXCHANNELORD TR("Rx Channel Ord","Default channel order")
|
||||
#define TR_SLAVE "Slave"
|
||||
@@ -611,7 +612,7 @@
|
||||
#define TR_EEPROMWARN "EEPROM"
|
||||
#define TR_THROTTLEWARN "THROTTLE"
|
||||
#define TR_ALARMSWARN "ALARMS"
|
||||
#define TR_SWITCHWARN "SWITCH"
|
||||
#define TR_SWITCHWARN TR("SWITCH","CONTROL")
|
||||
#define TR_INVERT_THR TR("Invert Thr?","Invert Throttle?")
|
||||
#define TR_SPEAKER_VOLUME INDENT "Volume"
|
||||
#define TR_LCD "LCD"
|
||||
@@ -698,6 +699,7 @@
|
||||
#define TR_LOWALARM INDENT "Low Alarm"
|
||||
#define TR_CRITICALALARM INDENT "Critical Alarm"
|
||||
#define TR_PERSISTENT_MAH INDENT "Store mAh"
|
||||
#define TR_CHECKLIST "Display Checklist"
|
||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||
#define TR_UART3MODE "Serial port"
|
||||
#define TR_POT1TYPE "S1 Type"
|
||||
|
||||
@@ -505,6 +505,7 @@
|
||||
#define TR_SPLASHSCREEN "Ptalla.inicio"
|
||||
#define TR_THROTTLEWARNING TR("Aviso-A", "Aviso Acelerador")
|
||||
#define TR_SWITCHWARNING TR("Aviso-I", "Aviso Intrptor")
|
||||
#define TR_POTWARNING TR("Pot Warn.","Pot Warning")
|
||||
#define TR_TIMEZONE TR("Zona Hora", "GPS Zona Hora")
|
||||
#define TR_RXCHANNELORD TR("Rx Orden canal", "Orden habitual canales")
|
||||
#define TR_SLAVE "Esclavo"
|
||||
@@ -698,6 +699,7 @@
|
||||
#define TR_LOWALARM INDENT "Alarma baja"
|
||||
#define TR_CRITICALALARM INDENT "Alarma Critica"
|
||||
#define TR_PERSISTENT_MAH INDENT "Valor mAh"
|
||||
#define TR_CHECKLIST "Display Checklist"
|
||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||
#define TR_UART3MODE "Serial port"
|
||||
#define TR_POT1TYPE "S1 Type"
|
||||
|
||||
@@ -505,6 +505,7 @@
|
||||
#define TR_SPLASHSCREEN "Logo d'accueil"
|
||||
#define TR_THROTTLEWARNING "Alerte gaz"
|
||||
#define TR_SWITCHWARNING TR("Alerte int","Alerte interrupt.")
|
||||
#define TR_POTWARNING TR("Alerte pot","Alerte potentiom.")
|
||||
#define TR_TIMEZONE "Fuseau horaire"
|
||||
#define TR_RXCHANNELORD TR("Ordre voies RX","Ordre des voies préféré")
|
||||
#define TR_SLAVE "Elève"
|
||||
@@ -611,7 +612,7 @@
|
||||
#define TR_EEPROMWARN "EEPROM"
|
||||
#define TR_THROTTLEWARN "GAZ"
|
||||
#define TR_ALARMSWARN "SON"
|
||||
#define TR_SWITCHWARN "INTERS"
|
||||
#define TR_SWITCHWARN TR("INTERS","CONTROLES")
|
||||
#define TR_INVERT_THR "Inverser Gaz?"
|
||||
#define TR_SPEAKER_VOLUME INDENT "Volume"
|
||||
#define TR_LCD "Afficheur"
|
||||
@@ -698,6 +699,7 @@
|
||||
#define TR_LOWALARM INDENT "Alarme basse"
|
||||
#define TR_CRITICALALARM INDENT "Alarme critique"
|
||||
#define TR_PERSISTENT_MAH TR(INDENT "Enr. mAh",INDENT "Enregistrer mAh")
|
||||
#define TR_CHECKLIST "Afficher notes"
|
||||
#define TR_FAS_OFFSET TR(INDENT "Corr FAS", INDENT "Correction FAS")
|
||||
#define TR_UART3MODE "Port série"
|
||||
#define TR_POT1TYPE "Type S1"
|
||||
|
||||
@@ -505,6 +505,7 @@
|
||||
#define TR_SPLASHSCREEN TR("Schermo avvio", "Schermata di avvio")
|
||||
#define TR_THROTTLEWARNING TR("All. Thr", "Allarme Throttle")
|
||||
#define TR_SWITCHWARNING TR("Avv. Int.", "Avviso Interr.")
|
||||
#define TR_POTWARNING TR("Pot Warn.","Pot Warning")
|
||||
#define TR_TIMEZONE "Ora locale"
|
||||
#define TR_RXCHANNELORD "Ordine ch RX"
|
||||
#define TR_SLAVE "Allievo"
|
||||
@@ -698,10 +699,11 @@
|
||||
#define TR_LOWALARM INDENT "Allarme Basso"
|
||||
#define TR_CRITICALALARM INDENT "Allarme Critico"
|
||||
#define TR_PERSISTENT_MAH INDENT "Store mAh"
|
||||
#define TR_CHECKLIST "Display Checklist"
|
||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||
#define TR_UART3MODE "Serial port"
|
||||
#define TR_POT1TYPE "S1 Type"
|
||||
#define TR_POT2TYPE "S2 Type"
|
||||
#define TR_POT2TYPE "S2 Type"
|
||||
|
||||
#if defined(MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
|
||||
@@ -505,6 +505,7 @@
|
||||
#define TR_SPLASHSCREEN "Logo ekranu"
|
||||
#define TR_THROTTLEWARNING "(\043)Gaz"
|
||||
#define TR_SWITCHWARNING "(\043)Przełącznik"
|
||||
#define TR_POTWARNING TR("Pot Warn.","Pot Warning")
|
||||
#define TR_TIMEZONE "Strefa czasowa"
|
||||
#define TR_RXCHANNELORD TR("Kolejność kanałów", "Bazowa kolejność kanałów")
|
||||
#define TR_SLAVE "Uczeń"
|
||||
@@ -698,6 +699,7 @@
|
||||
#define TR_LOWALARM INDENT "Alarm niski"
|
||||
#define TR_CRITICALALARM INDENT "Alarm krytyczny"
|
||||
#define TR_PERSISTENT_MAH INDENT "Zapisz mAh"
|
||||
#define TR_CHECKLIST "Display Checklist"
|
||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||
#define TR_UART3MODE "Port szreg."
|
||||
#define TR_POT1TYPE "Typ S1"
|
||||
|
||||
@@ -505,6 +505,7 @@
|
||||
#define TR_SPLASHSCREEN "Splash screen"
|
||||
#define TR_THROTTLEWARNING "Avisa Acel"
|
||||
#define TR_SWITCHWARNING "Avisa Chav"
|
||||
#define TR_POTWARNING TR("Pot Warn.","Pot Warning")
|
||||
#define TR_TIMEZONE "Time Zone"
|
||||
#define TR_RXCHANNELORD "Ordem Canal RX"
|
||||
#define TR_SLAVE "Escravo"
|
||||
@@ -697,11 +698,12 @@
|
||||
#define TR_CHANNELRANGE INDENT "Channel Range"
|
||||
#define TR_LOWALARM INDENT "Low Alarm"
|
||||
#define TR_CRITICALALARM INDENT "Critical Alarm"
|
||||
#define TR_PERSISTENT_MAH INDENT "Store mAh"
|
||||
#define TR_PERSISTENT_MAH INDENT "Store mAh"
|
||||
#define TR_CHECKLIST "Display Checklist"
|
||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||
#define TR_UART3MODE "Serial port"
|
||||
#define TR_POT1TYPE "S1 Type"
|
||||
#define TR_POT2TYPE "S2 Type"
|
||||
#define TR_POT2TYPE "S2 Type"
|
||||
|
||||
#if defined(MAVLINK)
|
||||
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
|
||||
|
||||
@@ -505,6 +505,7 @@
|
||||
#define TR_SPLASHSCREEN "Startbild"
|
||||
#define TR_THROTTLEWARNING "Gasvarning"
|
||||
#define TR_SWITCHWARNING TR("Bryt.varn.","Brytarvarning")
|
||||
#define TR_POTWARNING TR("Pot Warn.","Pot Warning")
|
||||
#define TR_TIMEZONE TR("Tidszon","GPS Tidszon")
|
||||
#define TR_RXCHANNELORD "Kanaler i RX"
|
||||
#define TR_SLAVE "Elev"
|
||||
@@ -698,6 +699,7 @@
|
||||
#define TR_LOWALARM INDENT "Låg-alarm"
|
||||
#define TR_CRITICALALARM INDENT "Kritiskt alarm"
|
||||
#define TR_PERSISTENT_MAH INDENT "Store mAh"
|
||||
#define TR_CHECKLIST "Display Checklist"
|
||||
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
|
||||
#define TR_UART3MODE "Serieporten"
|
||||
#define TR_POT1TYPE "S1-ratten"
|
||||
|
||||
Reference in New Issue
Block a user