diff --git a/DONATIONS.txt b/DONATIONS.txt
index a868d4b66..aa31b72d6 100644
--- a/DONATIONS.txt
+++ b/DONATIONS.txt
@@ -302,3 +302,11 @@ Dan Neelands
Yashiro Masayuki
Isaac Sloan
Harold Baird
+Roy Bender
+Bradley Murchie
+Maximilian Süß
+Dean Jansa
+Ronald Donker
+Paul Oldenkamp
+Dietmar Drees
+Bradley Murchie
diff --git a/companion/src/comparedialog.cpp b/companion/src/comparedialog.cpp
index 4265d50ab..6b1609c0e 100644
--- a/companion/src/comparedialog.cpp
+++ b/companion/src/comparedialog.cpp
@@ -1260,6 +1260,7 @@ void compareDialog::printFrSky()
color=getColor1(fd1->rssiAlarms[1].value,fd2->rssiAlarms[1].value);
str.append("
"+QString::number(fd1->rssiAlarms[1].value,10)+" | ");
str.append("");
+#if 0
if (GetEepromInterface()->getCapability(TelemetryBars) || GetEepromInterface()->getCapability(TelemetryCSFields)) {
int cols=GetEepromInterface()->getCapability(TelemetryColsCSFields);
if (cols==0) cols=2;
@@ -1315,6 +1316,7 @@ void compareDialog::printFrSky()
}
}
}
+#endif
str.append("");
str.append("");
@@ -1377,7 +1379,7 @@ void compareDialog::printFrSky()
color=getColor2(fd1->rssiAlarms[1].value,fd2->rssiAlarms[1].value);
str.append("| "+QString::number(fd2->rssiAlarms[1].value,10)+" | ");
str.append(" ");
-
+#if 0
if (GetEepromInterface()->getCapability(TelemetryBars) || GetEepromInterface()->getCapability(TelemetryCSFields)) {
int cols=GetEepromInterface()->getCapability(TelemetryColsCSFields);
if (cols==0) cols=2;
@@ -1433,6 +1435,7 @@ void compareDialog::printFrSky()
}
}
}
+#endif
str.append(" | ");
te->append(str);
}
diff --git a/companion/src/eeprominterface.cpp b/companion/src/eeprominterface.cpp
index d0d639d8b..9b5126780 100644
--- a/companion/src/eeprominterface.cpp
+++ b/companion/src/eeprominterface.cpp
@@ -67,18 +67,15 @@ RawSourceRange RawSource::getRange(bool singleprec)
case TELEMETRY_SOURCE_A1:
case TELEMETRY_SOURCE_A2:
if (model) {
- if (model->frsky.channels[index-TELEMETRY_SOURCE_A1].type==0) {
- result.step = (model->frsky.channels[index-TELEMETRY_SOURCE_A1].ratio / 2550.0);
- result.min = (model->frsky.channels[index-TELEMETRY_SOURCE_A1].offset * model->frsky.channels[index-TELEMETRY_SOURCE_A1].ratio) / 2550.0;
- result.max = model->frsky.channels[index-TELEMETRY_SOURCE_A1].ratio - (model->frsky.channels[index-TELEMETRY_SOURCE_A1].offset * model->frsky.channels[index-TELEMETRY_SOURCE_A1].ratio) / 2550.0;
+ const FrSkyChannelData & channel = model->frsky.channels[index-TELEMETRY_SOURCE_A1];
+ float ratio = channel.getRatio();
+ if (channel.type==0 || channel.type==1 || channel.type==2)
result.decimals = 2;
- }
- else {
- result.step = (model->frsky.channels[index-TELEMETRY_SOURCE_A1].ratio / 255.0);
- result.min = (model->frsky.channels[index-TELEMETRY_SOURCE_A1].offset * model->frsky.channels[index-TELEMETRY_SOURCE_A1].ratio) / 255.0;
- result.max = model->frsky.channels[index-TELEMETRY_SOURCE_A1].ratio - (model->frsky.channels[index-TELEMETRY_SOURCE_A1].offset * model->frsky.channels[index-TELEMETRY_SOURCE_A1].ratio) / 255.0;
+ else
result.decimals = 0;
- }
+ result.step = ratio / 255;
+ result.min = channel.offset * result.step;
+ result.max = ratio + result.min;
}
break;
case TELEMETRY_SOURCE_ALT:
@@ -242,26 +239,34 @@ QString SwitchDn(const char sw)
QString RawSwitch::toString()
{
- static const QString switches9X[] = { QObject::tr("THR"), QObject::tr("RUD"), QObject::tr("ELE"),
- QObject::tr("ID0"), QObject::tr("ID1"), QObject::tr("ID2"),
- QObject::tr("AIL"), QObject::tr("GEA"), QObject::tr("TRN")
- };
+ static const QString switches9X[] = {
+ QString("THR"), QString("RUD"), QString("ELE"),
+ QString("ID0"), QString("ID1"), QString("ID2"),
+ QString("AIL"), QString("GEA"), QString("TRN")
+ };
- static const QString switchesX9D[] = { SwitchUp('A'), QString::fromUtf8("SA-"), SwitchDn('A'),
- SwitchUp('B'), QString::fromUtf8("SB-"), SwitchDn('B'),
- SwitchUp('C'), QString::fromUtf8("SC-"), SwitchDn('C'),
- SwitchUp('D'), QString::fromUtf8("SD-"), SwitchDn('D'),
- SwitchUp('E'), QString::fromUtf8("SE-"), SwitchDn('E'),
- SwitchUp('F'), SwitchDn('F'),
- SwitchUp('G'), QString::fromUtf8("SG-"), SwitchDn('G'),
- SwitchUp('H'), SwitchDn('H'),
- };
+ static const QString switchesX9D[] = {
+ SwitchUp('A'), QString::fromUtf8("SA-"), SwitchDn('A'),
+ SwitchUp('B'), QString::fromUtf8("SB-"), SwitchDn('B'),
+ SwitchUp('C'), QString::fromUtf8("SC-"), SwitchDn('C'),
+ SwitchUp('D'), QString::fromUtf8("SD-"), SwitchDn('D'),
+ SwitchUp('E'), QString::fromUtf8("SE-"), SwitchDn('E'),
+ SwitchUp('F'), SwitchDn('F'),
+ SwitchUp('G'), QString::fromUtf8("SG-"), SwitchDn('G'),
+ SwitchUp('H'), SwitchDn('H'),
+ };
- static const QString virtualSwitches[] = { QObject::tr("LS1"), QObject::tr("LS2"), QObject::tr("LS3"), QObject::tr("LS4"), QObject::tr("LS5"), QObject::tr("LS6"), QObject::tr("LS7"), QObject::tr("LS8"), QObject::tr("LS9"), QObject::tr("LSA"),
- QObject::tr("LSB"), QObject::tr("LSC"), QObject::tr("LSD"), QObject::tr("LSE"), QObject::tr("LSF"), QObject::tr("LSG"), QObject::tr("LSH"), QObject::tr("LSI"), QObject::tr("LSJ"), QObject::tr("LSK"),
- QObject::tr("LSL"), QObject::tr("LSM"), QObject::tr("LSN"), QObject::tr("LSO"), QObject::tr("LSP"), QObject::tr("LSQ"), QObject::tr("LSR"), QObject::tr("LSS"), QObject::tr("LST"), QObject::tr("LSU"),
- QObject::tr("LSV"), QObject::tr("LSW")
- };
+ static const QString virtualSwitches[] = {
+ QObject::tr("LS1"), QObject::tr("LS2"), QObject::tr("LS3"), QObject::tr("LS4"), QObject::tr("LS5"), QObject::tr("LS6"), QObject::tr("LS7"), QObject::tr("LS8"), QObject::tr("LS9"), QObject::tr("LSA"),
+ QObject::tr("LSB"), QObject::tr("LSC"), QObject::tr("LSD"), QObject::tr("LSE"), QObject::tr("LSF"), QObject::tr("LSG"), QObject::tr("LSH"), QObject::tr("LSI"), QObject::tr("LSJ"), QObject::tr("LSK"),
+ QObject::tr("LSL"), QObject::tr("LSM"), QObject::tr("LSN"), QObject::tr("LSO"), QObject::tr("LSP"), QObject::tr("LSQ"), QObject::tr("LSR"), QObject::tr("LSS"), QObject::tr("LST"), QObject::tr("LSU"),
+ QObject::tr("LSV"), QObject::tr("LSW")
+ };
+
+ static const QString multiposPots[] = {
+ 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")
+ };
switch(type) {
case SWITCH_TYPE_SWITCH:
@@ -271,6 +276,8 @@ QString RawSwitch::toString()
return index > 0 ? CHECK_IN_ARRAY(switches9X, index-1) : QString("!") + CHECK_IN_ARRAY(switches9X, -index-1);
case SWITCH_TYPE_VIRTUAL:
return index > 0 ? CHECK_IN_ARRAY(virtualSwitches, index-1) : QString("!") + CHECK_IN_ARRAY(virtualSwitches, -index-1);
+ case SWITCH_TYPE_MULTIPOS_POT:
+ return CHECK_IN_ARRAY(multiposPots, index);
case SWITCH_TYPE_ON:
return QObject::tr("ON");
case SWITCH_TYPE_ONM:
diff --git a/companion/src/eeprominterface.h b/companion/src/eeprominterface.h
index 6933ef46f..38b713c24 100644
--- a/companion/src/eeprominterface.h
+++ b/companion/src/eeprominterface.h
@@ -296,7 +296,7 @@ class RawSourceRange
}
float getValue(int value) {
- return round(float(value) * step);
+ return min + float(value) * step;
}
int decimals;
@@ -356,6 +356,7 @@ enum RawSwitchType {
SWITCH_TYPE_NONE,
SWITCH_TYPE_SWITCH,
SWITCH_TYPE_VIRTUAL,
+ SWITCH_TYPE_MULTIPOS_POT,
SWITCH_TYPE_MOMENT_SWITCH,
SWITCH_TYPE_MOMENT_VIRTUAL,
SWITCH_TYPE_ON,
@@ -503,6 +504,7 @@ class GeneralSettings {
unsigned int mavbaud;
unsigned int switchUnlockStates;
unsigned int hw_uartMode;
+ unsigned int potsType[8];
};
class CurveReference {
@@ -737,6 +739,14 @@ class FrSkyChannelData {
unsigned int multiplier;
FrSkyAlarmData alarms[2];
+ float getRatio() const
+ {
+ if (type==0 || type==1 || type==2)
+ return float(ratio << multiplier) / 10.0;
+ else
+ return ratio << multiplier;
+ }
+
void clear() { memset(this, 0, sizeof(FrSkyChannelData)); }
};
@@ -1007,8 +1017,8 @@ enum Capability {
GvarsHaveSources,
GvarsName,
NoTelemetryProtocol,
- TelemetryCSFields,
- TelemetryColsCSFields,
+ TelemetryCustomScreens,
+ TelemetryCustomScreensFieldsPerLine,
TelemetryRSSIModel,
TelemetryAlarm,
TelemetryInternalAlarm,
@@ -1044,7 +1054,9 @@ enum Capability {
EnhancedCurves,
TelemetryInternalAlarms,
HasFasOffset,
- HasMahPersistent
+ HasMahPersistent,
+ MultiposPots,
+ MultiposPotsPositions
};
enum UseContext {
diff --git a/companion/src/firmwares/opentx/opentxeeprom.cpp b/companion/src/firmwares/opentx/opentxeeprom.cpp
index a238d344d..0febeaf4e 100644
--- a/companion/src/firmwares/opentx/opentxeeprom.cpp
+++ b/companion/src/firmwares/opentx/opentxeeprom.cpp
@@ -56,21 +56,29 @@ class SwitchesConversionTable: public ConversionTable {
addConversion(RawSwitch(SWITCH_TYPE_VIRTUAL, i), val++);
}
+ if (IS_TARANIS(board) && version >= 216) {
+ for (int i=0; i<2; i++) {
+ for (int j=0; j<6; j++) {
+ addConversion(RawSwitch(SWITCH_TYPE_MULTIPOS_POT, i*6+j), val++);
+ }
+ }
+ }
+
addConversion(RawSwitch(SWITCH_TYPE_OFF), -val);
addConversion(RawSwitch(SWITCH_TYPE_ON), val++);
for (int i=1; i<=MAX_SWITCHES_POSITION(board); i++) {
int s = switchIndex(i, board, version);
- addConversion(RawSwitch(SWITCH_TYPE_MOMENT_SWITCH, -s), -val);
+ // addConversion(RawSwitch(SWITCH_TYPE_MOMENT_SWITCH, -s), -val);
addConversion(RawSwitch(SWITCH_TYPE_MOMENT_SWITCH, s), val++);
}
for (int i=1; i<=MAX_CUSTOM_SWITCHES(board, version); i++) {
- addConversion(RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, -i), -val);
+ // addConversion(RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, -i), -val);
addConversion(RawSwitch(SWITCH_TYPE_MOMENT_VIRTUAL, i), val++);
}
- addConversion(RawSwitch(SWITCH_TYPE_ONM, 1 ), -val);
+ // addConversion(RawSwitch(SWITCH_TYPE_ONM, 1 ), -val);
addConversion(RawSwitch(SWITCH_TYPE_ONM, 0 ), val++);
addConversion(RawSwitch(SWITCH_TYPE_TRN, 0), val++);
addConversion(RawSwitch(SWITCH_TYPE_TRN, 1), val++);
@@ -2011,12 +2019,21 @@ Open9xGeneralDataNew::Open9xGeneralDataNew(GeneralSettings & generalData, BoardE
if (version >= 213 || (!IS_ARM(board) && version >= 212))
internalField.Append(new UnsignedField<16>(generalData.variant));
- for (int i=0; i(generalData.calibMid[i]));
- for (int i=0; i(generalData.calibSpanNeg[i]));
- for (int i=0; i(generalData.calibSpanPos[i]));
+ if (version >= 216) {
+ for (int i=0; i(generalData.calibMid[i]));
+ internalField.Append(new SignedField<16>(generalData.calibSpanNeg[i]));
+ internalField.Append(new SignedField<16>(generalData.calibSpanPos[i]));
+ }
+ }
+ else {
+ for (int i=0; i(generalData.calibMid[i]));
+ for (int i=0; i(generalData.calibSpanNeg[i]));
+ for (int i=0; i(generalData.calibSpanPos[i]));
+ }
internalField.Append(new UnsignedField<16>(chkSum));
internalField.Append(new UnsignedField<8>(generalData.currModel));
@@ -2110,8 +2127,11 @@ Open9xGeneralDataNew::Open9xGeneralDataNew(GeneralSettings & generalData, BoardE
internalField.Append(new SignedField<8>(generalData.varioVolume));
internalField.Append(new SignedField<8>(generalData.backgroundVolume));
}
- if (version >= 216) {
+ if (IS_TARANIS(board) && version >= 216) {
internalField.Append(new UnsignedField<8>(generalData.hw_uartMode));
+ for (int i=0; i<8; i++) {
+ internalField.Append(new UnsignedField<1>(generalData.potsType[i]));
+ }
}
}
}
diff --git a/companion/src/firmwares/opentx/opentxinterface.cpp b/companion/src/firmwares/opentx/opentxinterface.cpp
index 392a062b4..b70ef9d8a 100644
--- a/companion/src/firmwares/opentx/opentxinterface.cpp
+++ b/companion/src/firmwares/opentx/opentxinterface.cpp
@@ -610,24 +610,12 @@ int Open9xInterface::getCapability(const Capability capability)
return TM_HASTELEMETRY|TM_HASOFFSET|TM_HASWSHH;
case TelemetryBars:
return 1;
- case TelemetryCSFields:
- if (IS_TARANIS(board)) {
- return 36;
- } else {
- return IS_ARM(board) ? 24 : 16;
- }
- case TelemetryColsCSFields:
- if (IS_TARANIS(board)) {
- return 3;
- } else {
- return 2;
- }
+ case TelemetryCustomScreens:
+ return IS_TARANIS(board) ? 3 : 2;
+ case TelemetryCustomScreensFieldsPerLine:
+ return IS_TARANIS(board) ? 3 : 2;
case NoTelemetryProtocol:
- if (IS_TARANIS(board)) {
- return 1;
- } else {
- return 0;
- }
+ return IS_TARANIS(board) ? 1 : 0;
case TelemetryUnits:
return 0;
case TelemetryBlades:
@@ -694,6 +682,10 @@ int Open9xInterface::getCapability(const Capability capability)
return (IS_STOCK(board) ? false : true);
case HasMahPersistent:
return (IS_ARM(board) ? true : false);
+ case MultiposPots:
+ return IS_TARANIS(board) ? 2 : 0;
+ case MultiposPotsPositions:
+ return IS_TARANIS(board) ? 6 : 0;
default:
return 0;
}
diff --git a/companion/src/generaledit.cpp b/companion/src/generaledit.cpp
index fdff37ae9..f197eb7b1 100644
--- a/companion/src/generaledit.cpp
+++ b/companion/src/generaledit.cpp
@@ -64,7 +64,8 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
}
this->layout()->removeItem(ui->TaranisReadOnlyUnlock);
}
- } else {
+ }
+ else {
for (int i=0; pmsl[i]; i++) {
pmsl[i]->hide();
}
@@ -373,6 +374,18 @@ GeneralEdit::GeneralEdit(RadioData &radioData, QWidget *parent) :
for (int i=0; tpmsld[i]; i++) {
connect(tpmsld[i], SIGNAL(valueChanged(int)),this,SLOT(unlockSwitchEdited()));
}
+
+ if (GetEepromInterface()->getCapability(MultiposPots)) {
+ ui->pot1Type->setCurrentIndex(g_eeGeneral.potsType[0]);
+ ui->pot2Type->setCurrentIndex(g_eeGeneral.potsType[1]);
+ }
+ else {
+ ui->potsTypeSeparator->hide();
+ ui->pot1Type->hide();
+ ui->pot1TypeLabel->hide();
+ ui->pot2Type->hide();
+ ui->pot2TypeLabel->hide();
+ }
}
GeneralEdit::~GeneralEdit()
@@ -380,6 +393,18 @@ GeneralEdit::~GeneralEdit()
delete ui;
}
+void GeneralEdit::on_pot1Type_currentIndexChanged(int index)
+{
+ g_eeGeneral.potsType[0] = index;
+ updateSettings();
+}
+
+void GeneralEdit::on_pot2Type_currentIndexChanged(int index)
+{
+ g_eeGeneral.potsType[1] = index;
+ updateSettings();
+}
+
void GeneralEdit::unlockSwitchEdited()
{
int i=0;
diff --git a/companion/src/generaledit.h b/companion/src/generaledit.h
index eb6895d13..ce160dc0b 100644
--- a/companion/src/generaledit.h
+++ b/companion/src/generaledit.h
@@ -119,6 +119,9 @@ private slots:
void on_varioVolume_SL_valueChanged();
void on_wavVolume_SL_valueChanged();
+ void on_pot1Type_currentIndexChanged(int index);
+ void on_pot2Type_currentIndexChanged(int index);
+
void on_stickmodeCB_currentIndexChanged(int index);
void on_channelorderCB_currentIndexChanged(int index);
void on_beeperCB_currentIndexChanged(int index);
diff --git a/companion/src/generaledit.ui b/companion/src/generaledit.ui
index 48a7445b5..29b17eb7d 100644
--- a/companion/src/generaledit.ui
+++ b/companion/src/generaledit.ui
@@ -110,7 +110,7 @@
These will be relevant for all models in the same EEPROM.
- 0
+ 3
@@ -3494,6 +3494,91 @@ p, li { white-space: pre-wrap; }
+ -
+
+
+
+ 0
+ 10
+
+
+
+ Qt::Horizontal
+
+
+
+ -
+
+
+
+
+
+
+
+
+ Beeper volume
+
+0 - Quiet. No beeps at all.
+1 - No Keys. Normal beeps but menu keys do not beep.
+2 - Normal.
+3 - Loud.
+4 - Extra loud.
+
+
-
+
+ Pot (normal)
+
+
+ -
+
+ Multipos Switch
+
+
+
+
+ -
+
+
+ S1 Type
+
+
+
+ -
+
+
+
+
+
+
+
+
+ Beeper volume
+
+0 - Quiet. No beeps at all.
+1 - No Keys. Normal beeps but menu keys do not beep.
+2 - Normal.
+3 - Loud.
+4 - Extra loud.
+
+
-
+
+ Pot (normal)
+
+
+ -
+
+ Multipos Switch
+
+
+
+
+ -
+
+
+ S2 Type
+
+
+
diff --git a/companion/src/helpers.cpp b/companion/src/helpers.cpp
index 1c69e2207..2a5e4f2fc 100644
--- a/companion/src/helpers.cpp
+++ b/companion/src/helpers.cpp
@@ -842,6 +842,8 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr,
return;
}
+#if 0
+ // TODO check ... I removed negative toggle switches in the FW, no?
if (attr & POPULATE_MSWITCHES) {
if (attr & POPULATE_ONOFF) {
item = RawSwitch(SWITCH_TYPE_ONM, 1);
@@ -860,6 +862,7 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr,
if (item == value) b->setCurrentIndex(b->count()-1);
}
}
+#endif
if (attr & POPULATE_ONOFF) {
item = RawSwitch(SWITCH_TYPE_OFF);
@@ -905,6 +908,14 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, unsigned long attr,
if (item == value) b->setCurrentIndex(b->count()-1);
}
+ if (IS_TARANIS(GetEepromInterface()->getBoard())) {
+ for (int i=0; igetCapability(MultiposPots) * GetEepromInterface()->getCapability(MultiposPotsPositions); i++) {
+ item = RawSwitch(SWITCH_TYPE_MULTIPOS_POT, i);
+ b->addItem(item.toString(), item.toValue());
+ if (item == value) b->setCurrentIndex(b->count()-1);
+ }
+ }
+
if (attr & POPULATE_ONOFF) {
item = RawSwitch(SWITCH_TYPE_ON);
b->addItem(item.toString(), item.toValue());
@@ -1086,7 +1097,8 @@ void populateSourceCB(QComboBox *b, const RawSource & source, const ModelData &
b->addItem(item.toString(), item.toValue());
if (item == source) b->setCurrentIndex(b->count()-1);
}
- } else if (flags & POPULATE_TELEMETRY) {
+ }
+ else if (flags & POPULATE_TELEMETRY) {
for (int i=0; iaddItem(item.toString(), item.toValue());
diff --git a/companion/src/images/originals/scripts/addblackoutline.sh b/companion/src/images/originals/scripts/addblackoutline.sh
new file mode 100755
index 000000000..41e2876bd
--- /dev/null
+++ b/companion/src/images/originals/scripts/addblackoutline.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+for file in $(ls *png)
+do
+ convert $file \( +clone \
+ -channel A -morphology EdgeOut Diamond +channel \
+ +level-colors black \
+ \) -compose DstOver -composite $file
+done
+
+
diff --git a/companion/src/modeledit/CMakeLists.txt b/companion/src/modeledit/CMakeLists.txt
index 28c752d64..827ecf656 100644
--- a/companion/src/modeledit/CMakeLists.txt
+++ b/companion/src/modeledit/CMakeLists.txt
@@ -42,6 +42,7 @@ set(modeledit_UIS
setup_module.ui
flightmode.ui
telemetry_analog.ui
+ telemetry_customscreen.ui
)
foreach(name ${modeledit_NAMES})
diff --git a/companion/src/modeledit/telemetry.cpp b/companion/src/modeledit/telemetry.cpp
index 1f008d71b..014def777 100644
--- a/companion/src/modeledit/telemetry.cpp
+++ b/companion/src/modeledit/telemetry.cpp
@@ -1,6 +1,7 @@
#include "telemetry.h"
#include "ui_telemetry.h"
#include "ui_telemetry_analog.h"
+#include "ui_telemetry_customscreen.h"
#include "helpers.h"
TelemetryAnalog::TelemetryAnalog(QWidget *parent, FrSkyChannelData & analog):
@@ -11,15 +12,13 @@ TelemetryAnalog::TelemetryAnalog(QWidget *parent, FrSkyChannelData & analog):
{
ui->setupUi(this);
- float ratio;
+ float ratio = analog.getRatio();
if (analog.type==0 || analog.type==1 || analog.type==2) {
- ratio = (analog.ratio<RatioSB->setDecimals(1);
ui->RatioSB->setMaximum(25.5*GetEepromInterface()->getCapability(TelemetryMaxMultiplier));
}
else {
- ratio = analog.ratio<RatioSB->setDecimals(0);
ui->RatioSB->setMaximum(255*GetEepromInterface()->getCapability(TelemetryMaxMultiplier));
}
@@ -44,69 +43,44 @@ TelemetryAnalog::TelemetryAnalog(QWidget *parent, FrSkyChannelData & analog):
void TelemetryAnalog::update()
{
- float ratio, alarm1value, alarm2value;
- if (analog.ratio==0) {
- ui->alarm1ValueSB->setMinimum(0);
- ui->alarm1ValueSB->setMaximum(0);
- ui->alarm2ValueSB->setMinimum(0);
- ui->alarm2ValueSB->setMaximum(0);
- ui->CalibSB->setMinimum(0);
- ui->CalibSB->setMaximum(0);
- ui->CalibSB->setValue(0);
- ui->alarm1ValueSB->setValue(0);
- ui->alarm2ValueSB->setValue(0);
- return;
- }
+ float ratio = analog.getRatio();
+ float step = ratio / 255;
+ float mini = (ratio * analog.offset) / 255;
+ float maxi = mini + ratio;
- if (analog.type==0 || analog.type==1 || analog.type==2) {
- ratio=(analog.ratio<alarm1ValueSB->setDecimals(2);
- ui->alarm1ValueSB->setSingleStep(ratio/255.0);
- ui->alarm2ValueSB->setDecimals(2);
- ui->alarm2ValueSB->setSingleStep(ratio/255.0);
- ui->alarm1ValueSB->setMinimum((analog.ratio*1.0*analog.offset)/2550.0);
- ui->alarm1ValueSB->setMaximum(ratio+(analog.ratio*1.0*analog.offset)/2550.0);
- ui->alarm2ValueSB->setMinimum((analog.offset*1.0*analog.ratio)/2550.0);
- ui->alarm2ValueSB->setMaximum(ratio+(analog.offset*1.0*analog.ratio)/2550.0);
- }
- else {
- ratio=analog.ratio<alarm1ValueSB->setDecimals(2);
- ui->alarm1ValueSB->setSingleStep(ratio/255.0);
- ui->alarm2ValueSB->setDecimals(2);
- ui->alarm2ValueSB->setSingleStep(ratio/255.0);
- ui->alarm1ValueSB->setMinimum((analog.offset*1.0*analog.ratio)/255.0);
- ui->alarm1ValueSB->setMaximum(ratio+(analog.offset*1.0*analog.ratio)/255.0);
- ui->alarm2ValueSB->setMinimum((analog.offset*1.0*analog.ratio)/255.0);
- ui->alarm2ValueSB->setMaximum(ratio+(analog.offset*1.0*analog.ratio)/255.0);
- }
- ui->CalibSB->setDecimals(2);
- ui->CalibSB->setMaximum((ratio*127)/255.0);
- ui->CalibSB->setMinimum((-ratio*128)/255.0);
- ui->CalibSB->setSingleStep(ratio/255.0);
- ui->CalibSB->setValue((analog.offset*ratio)/255);
- alarm1value=ratio*(analog.alarms[0].value/255.0+analog.offset/255.0);
- alarm2value=ratio*(analog.alarms[1].value/255.0+analog.offset/255.0);;
- ui->alarm1ValueSB->setValue(alarm1value);
- ui->alarm2ValueSB->setValue(alarm2value);
+ ui->alarm1ValueSB->setDecimals(2);
+ ui->alarm1ValueSB->setSingleStep(step);
+ ui->alarm1ValueSB->setMinimum(mini);
+ ui->alarm1ValueSB->setMaximum(maxi);
+ ui->alarm1ValueSB->setValue(mini + step*analog.alarms[0].value);
+
+ ui->alarm2ValueSB->setDecimals(2);
+ ui->alarm2ValueSB->setSingleStep(step);
+ ui->alarm2ValueSB->setMinimum(mini);
+ ui->alarm2ValueSB->setMaximum(maxi);
+ ui->alarm2ValueSB->setValue(mini + step*analog.alarms[1].value);
+
+ ui->CalibSB->setDecimals(2);
+ ui->CalibSB->setMaximum(step*127);
+ ui->CalibSB->setMinimum(-step*128);
+ ui->CalibSB->setSingleStep(step);
+ ui->CalibSB->setValue(mini);
}
void TelemetryAnalog::on_UnitCB_currentIndexChanged(int index)
{
- float ratio;
- analog.type=index;
+ float ratio = analog.getRatio();
+ analog.type = index;
switch (index) {
case 0:
case 1:
case 2:
ui->RatioSB->setDecimals(1);
ui->RatioSB->setMaximum(25.5*GetEepromInterface()->getCapability(TelemetryMaxMultiplier));
- ratio=(analog.ratio<RatioSB->setDecimals(0);
ui->RatioSB->setMaximum(255*GetEepromInterface()->getCapability(TelemetryMaxMultiplier));
- ratio=(analog.ratio<RatioSB->setValue(ratio);
@@ -127,7 +101,7 @@ void TelemetryAnalog::on_RatioSB_valueChanged()
}
else {
analog.multiplier = findmult(ui->RatioSB->value(), 255);
- float singlestep =(1<RatioSB->setSingleStep(singlestep);
ui->RatioSB->setValue(round(ui->RatioSB->value()/singlestep)*singlestep);
@@ -139,15 +113,17 @@ void TelemetryAnalog::on_RatioSB_valueChanged()
void TelemetryAnalog::on_RatioSB_editingFinished()
{
+ if (!lock) {
float ratio, calib, alarm1value,alarm2value;
- if (lock) return;
+
if (analog.type==0 || analog.type==1 || analog.type==2) {
analog.multiplier = findmult(ui->RatioSB->value(), 25.5);
ui->CalibSB->setSingleStep((1<alarm1ValueSB->setSingleStep((1<alarm2ValueSB->setSingleStep((1<RatioSB->value()*10))/(1 <RatioSB->value(), 255);
ui->CalibSB->setSingleStep(1<alarm1ValueSB->setSingleStep(1<0) {
if (calib>((ratio*127)/255)) {
analog.offset=127;
- } else {
+ }
+ else {
analog.offset=round(calib*255/ratio);
}
}
@@ -185,18 +162,15 @@ void TelemetryAnalog::on_RatioSB_editingFinished()
analog.alarms[0].value=round((alarm1value*255-analog.offset*(analog.ratio<CalibSB->value()/ratio));
calib=ratio*analog.offset/255.0;
@@ -204,7 +178,8 @@ void TelemetryAnalog::on_CalibSB_editingFinished()
alarm2value=ui->alarm2ValueSB->value();
if (alarm1value(ratio+calib)) {
+ }
+ else if (alarm1value>(ratio+calib)) {
alarm1value=ratio+calib;
}
if (alarm2valuealarm1ValueSB->value();
- if (analog.type==0) {
- ratio/=10;
- }
+
if (alarm1value<((calib*ratio)/255)) {
analog.alarms[0].value=0;
- } else if (alarm1value>(ratio+(calib*ratio)/255)) {
+ }
+ else if (alarm1value>(ratio+(calib*ratio)/255)) {
analog.alarms[0].value=255;
- } else {
+ }
+ else {
analog.alarms[0].value = round((alarm1value-((calib*ratio)/255))/ratio*255);
}
update();
@@ -259,28 +234,26 @@ void TelemetryAnalog::on_alarm1ValueSB_editingFinished()
void TelemetryAnalog::on_alarm2LevelCB_currentIndexChanged(int index)
{
- analog.alarms[1].level = index;
- emit modified();
+ analog.alarms[1].level = index;
+ emit modified();
}
void TelemetryAnalog::on_alarm2GreaterCB_currentIndexChanged(int index)
{
- analog.alarms[1].greater = index;
- emit modified();
+ analog.alarms[1].greater = index;
+ emit modified();
}
void TelemetryAnalog::on_alarm2ValueSB_editingFinished()
{
- float ratio, calib, alarm2value;
- ratio = analog.ratio<alarm2ValueSB->value();
- if (analog.type==0) {
- ratio/=10;
- }
if (alarm2value<((calib*ratio)/255)) {
analog.alarms[1].value=0;
- } else if (alarm2value>(ratio+(calib*ratio)/255)) {
+ }
+ else if (alarm2value>(ratio+(calib*ratio)/255)) {
analog.alarms[1].value=255;
} else {
analog.alarms[1].value = round((alarm2value-((calib*ratio)/255))/ratio*255);
@@ -296,41 +269,182 @@ TelemetryAnalog::~TelemetryAnalog()
/******************************************************/
+TelemetryCustomScreen::TelemetryCustomScreen(QWidget *parent, ModelData & model, FrSkyScreenData & screen):
+ ModelPanel(parent, model),
+ ui(new Ui::TelemetryCustomScreen),
+ screen(screen)
+{
+ ui->setupUi(this);
+
+ for (int l=0; l<4; l++) {
+ for (int c=0; cgetCapability(TelemetryCustomScreensFieldsPerLine); c++) {
+ fieldsCB[l][c] = new QComboBox(this);
+ fieldsCB[l][c]->setProperty("index", c + (l<<8));
+ populateCustomScreenFieldCB(fieldsCB[l][c], screen.body.lines[l].source[c], (l<4), model.frsky.usrProto);
+ ui->screenNumsLayout->addWidget(fieldsCB[l][c], l, c, 1, 1);
+ connect(fieldsCB[l][c], SIGNAL(currentIndexChanged(int)), this, SLOT(customFieldChanged(int)));
+ }
+ }
+
+ for (int l=0; l<4; l++) {
+ barsCB[l] = new QComboBox(this);
+ barsCB[l]->setProperty("index", l);
+ populateCustomScreenFieldCB(barsCB[l], screen.body.bars[l].source, false, model.frsky.usrProto);
+ connect(barsCB[l], SIGNAL(currentIndexChanged(int)), this, SLOT(barSourceChanged(int)));
+ ui->screenBarsLayout->addWidget(barsCB[l], l, 0, 1, 1);
+
+ minSB[l] = new QDoubleSpinBox(this);
+ minSB[l]->setProperty("index", l);
+ connect(minSB[l], SIGNAL(valueChanged(double)), this, SLOT(barMinChanged(double)));
+ ui->screenBarsLayout->addWidget(minSB[l], l, 1, 1, 1);
+
+ QLabel * label = new QLabel(this);
+ label->setAutoFillBackground(false);
+ label->setStyleSheet(QString::fromUtf8("Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),)\n"""));
+ label->setFrameShape(QFrame::Panel);
+ label->setFrameShadow(QFrame::Raised);
+ label->setAlignment(Qt::AlignCenter);
+ ui->screenBarsLayout->addWidget(label, l, 2, 1, 1);
+
+ maxSB[l] = new QDoubleSpinBox(this);
+ maxSB[l]->setProperty("index", l);
+ connect(maxSB[l], SIGNAL(valueChanged(double)), this, SLOT(barMaxChanged(double)));
+ ui->screenBarsLayout->addWidget(maxSB[l], l, 3, 1, 1);
+ }
+
+ update();
+}
+
+TelemetryCustomScreen::~TelemetryCustomScreen()
+{
+ delete ui;
+}
+
+void TelemetryCustomScreen::update()
+{
+ lock = true;
+
+ ui->screenType->setCurrentIndex(screen.type);
+ ui->screenNums->setVisible(screen.type == 0);
+ ui->screenBars->setVisible(screen.type != 0);
+
+ if (screen.type == 0) {
+ for (int l=0; l<4; l++) {
+ for (int c=0; cgetCapability(TelemetryCustomScreensFieldsPerLine); c++) {
+ fieldsCB[l][c]->setCurrentIndex(screen.body.lines[l].source[c]);
+ }
+ }
+ }
+ else {
+ for (int i=0; i<4; i++) {
+ updateBar(i);
+ }
+ }
+
+ lock = false;
+}
+
+void TelemetryCustomScreen::updateBar(int line)
+{
+ int index = screen.body.bars[line].source;
+ barsCB[line]->setCurrentIndex(index);
+ if (index) {
+ RawSource source = RawSource(SOURCE_TYPE_TELEMETRY, index-1, &model);
+ RawSourceRange range = source.getRange(true);
+ int max = round((range.max - range.min) / range.step);
+ if (255-screen.body.bars[line].barMax > max)
+ screen.body.bars[line].barMax = 255 - max;
+ minSB[line]->setEnabled(true);
+ minSB[line]->setDecimals(range.decimals);
+ minSB[line]->setMinimum(range.min);
+ minSB[line]->setMaximum(range.max);
+ minSB[line]->setSingleStep(range.step);
+ minSB[line]->setValue(range.getValue(screen.body.bars[line].barMin));
+ maxSB[line]->setEnabled(true);
+ maxSB[line]->setDecimals(range.decimals);
+ maxSB[line]->setMinimum(range.min);
+ maxSB[line]->setMaximum(range.max);
+ maxSB[line]->setSingleStep(range.step);
+ maxSB[line]->setValue(range.getValue(255 - screen.body.bars[line].barMax));
+ }
+ else {
+ minSB[line]->setDisabled(true);
+ maxSB[line]->setDisabled(true);
+ }
+}
+
+void TelemetryCustomScreen::on_screenType_currentIndexChanged(int index)
+{
+ if (!lock) {
+ memset(&screen.body, 0, sizeof(screen.body));
+ screen.type = index;
+ update();
+ emit modified();
+ }
+}
+
+void TelemetryCustomScreen::customFieldChanged(int value)
+{
+ int index = sender()->property("index").toInt();
+ screen.body.lines[index/256].source[index%256] = value;
+ emit modified();
+}
+
+void TelemetryCustomScreen::barSourceChanged(int index)
+{
+ QComboBox * cb = qobject_cast(sender());
+ int line = cb->property("index").toInt();
+ screen.body.bars[line].source = index;
+ screen.body.bars[line].barMin = 0;
+ screen.body.bars[line].barMax = 0;
+ updateBar(line);
+ emit modified();
+}
+
+void TelemetryCustomScreen::barMinChanged(double value)
+{
+ if (!lock) {
+ int line = sender()->property("index").toInt();
+ screen.body.bars[line].barMin = round((value-minSB[line]->minimum()) / minSB[line]->singleStep());
+ // TODO set min (maxSB)
+ emit modified();
+ }
+}
+
+void TelemetryCustomScreen::barMaxChanged(double value)
+{
+ if (!lock) {
+ int line = sender()->property("index").toInt();
+ screen.body.bars[line].barMax = 255 - round((value-minSB[line]->minimum()) / maxSB[line]->singleStep());
+ // TODO set max (minSB)
+ emit modified();
+ }
+}
+
+/******************************************************/
+
TelemetryPanel::TelemetryPanel(QWidget *parent, ModelData & model):
ModelPanel(parent, model),
ui(new Ui::Telemetry)
{
ui->setupUi(this);
+ if (GetEepromInterface()->getCapability(NoTelemetryProtocol)) {
+ model.frsky.usrProto = 1;
+ }
+
analogs[0] = new TelemetryAnalog(this, model.frsky.channels[0]);
ui->A1Layout->addWidget(analogs[0]);
connect(analogs[0], SIGNAL(modified()), this, SLOT(onAnalogModified()));
+
analogs[1] = new TelemetryAnalog(this, model.frsky.channels[1]);
ui->A2Layout->addWidget(analogs[1]);
connect(analogs[1], SIGNAL(modified()), this, SLOT(onAnalogModified()));
- QGroupBox* barsgb[3] = { ui->CS1Bars, ui->CS2Bars, ui->CS3Bars };
- QGroupBox* numsgb[3] = { ui->CS1Nums, ui->CS2Nums, ui->CS3Nums };
-
- QComboBox* barscb[12] = { ui->telBarCS1B1_CB, ui->telBarCS1B2_CB, ui->telBarCS1B3_CB, ui->telBarCS1B4_CB,
- ui->telBarCS2B1_CB, ui->telBarCS2B2_CB, ui->telBarCS2B3_CB, ui->telBarCS2B4_CB,
- ui->telBarCS3B1_CB, ui->telBarCS3B2_CB, ui->telBarCS3B3_CB, ui->telBarCS3B4_CB};
- QDoubleSpinBox* minSB[12] = { ui->telMinCS1SB1, ui->telMinCS1SB2, ui->telMinCS1SB3, ui->telMinCS1SB4,
- ui->telMinCS2SB1, ui->telMinCS2SB2, ui->telMinCS2SB3, ui->telMinCS2SB4,
- ui->telMinCS3SB1, ui->telMinCS3SB2, ui->telMinCS3SB3, ui->telMinCS3SB4};
- QDoubleSpinBox* maxSB[12] = { ui->telMaxCS1SB1, ui->telMaxCS1SB2, ui->telMaxCS1SB3, ui->telMaxCS1SB4,
- ui->telMaxCS2SB1, ui->telMaxCS2SB2, ui->telMaxCS2SB3, ui->telMaxCS2SB4,
- ui->telMaxCS3SB1, ui->telMaxCS3SB2, ui->telMaxCS3SB3, ui->telMaxCS3SB4};
- QComboBox* tmp[36] = { ui->telemetryCS1F1_CB, ui->telemetryCS1F2_CB, ui->telemetryCS1F3_CB, ui->telemetryCS1F4_CB, ui->telemetryCS1F5_CB, ui->telemetryCS1F6_CB, ui->telemetryCS1F7_CB, ui->telemetryCS1F8_CB, ui->telemetryCS1F9_CB, ui->telemetryCS1F10_CB, ui->telemetryCS1F11_CB, ui->telemetryCS1F12_CB,
- ui->telemetryCS2F1_CB, ui->telemetryCS2F2_CB, ui->telemetryCS2F3_CB, ui->telemetryCS2F4_CB, ui->telemetryCS2F5_CB, ui->telemetryCS2F6_CB, ui->telemetryCS2F7_CB, ui->telemetryCS2F8_CB, ui->telemetryCS2F9_CB, ui->telemetryCS2F10_CB, ui->telemetryCS2F11_CB, ui->telemetryCS2F12_CB,
- ui->telemetryCS3F1_CB, ui->telemetryCS3F2_CB, ui->telemetryCS3F3_CB, ui->telemetryCS3F4_CB, ui->telemetryCS3F5_CB, ui->telemetryCS3F6_CB, ui->telemetryCS3F7_CB, ui->telemetryCS3F8_CB, ui->telemetryCS3F9_CB, ui->telemetryCS3F10_CB, ui->telemetryCS3F11_CB, ui->telemetryCS3F12_CB};
-
- memcpy(barsGB, barsgb, sizeof(barsGB));
- memcpy(numsGB, numsgb, sizeof(numsGB));
- memcpy(barsCB, barscb, sizeof(barsCB));
- memcpy(this->maxSB, maxSB, sizeof(this->maxSB));
- memcpy(this->minSB, minSB, sizeof(this->minSB));
- memcpy(csf, tmp, sizeof(csf));
+ for (int i=0; igetCapability(TelemetryCustomScreens); i++) {
+ TelemetryCustomScreen * tab = new TelemetryCustomScreen(this, model, model.frsky.screens[i]);
+ ui->customScreens->addTab(tab, tr("Telemetry screen %1").arg(i+1));
+ }
setup();
}
@@ -346,19 +460,6 @@ void TelemetryPanel::setup()
QString firmware_id = settings.value("firmware", default_firmware_variant.id).toString();
lock=true;
- ui->telemetryCSType1->setCurrentIndex(model.frsky.screens[0].type);
- ui->telemetryCSType2->setCurrentIndex(model.frsky.screens[1].type);
- ui->telemetryCSType3->setCurrentIndex(model.frsky.screens[2].type);
-
- for (int i=0; i<3; i++) {
- bool isNum = (model.frsky.screens[i].type==0);
- barsGB[i]->setVisible(!isNum);
- numsGB[i]->setVisible(isNum);
- }
-
- connect(ui->telemetryCSType1,SIGNAL(currentIndexChanged(int)),this,SLOT(ScreenTypeCBcurrentIndexChanged(int)));
- connect(ui->telemetryCSType2,SIGNAL(currentIndexChanged(int)),this,SLOT(ScreenTypeCBcurrentIndexChanged(int)));
- connect(ui->telemetryCSType3,SIGNAL(currentIndexChanged(int)),this,SLOT(ScreenTypeCBcurrentIndexChanged(int)));
//frsky Settings
if (!GetEepromInterface()->getCapability(TelemetryRSSIModel) ) {
@@ -397,7 +498,8 @@ void TelemetryPanel::setup()
ui->VarioLabel_4->hide();
ui->varioSourceCB->hide();
ui->varioSource_label->hide();
- } else {
+ }
+ else {
if (!GetEepromInterface()->getCapability(HasVarioSink)) {
ui->varioLimitMinOff_ChkB->hide();
ui->varioLimitMin_DSB->hide();
@@ -431,44 +533,12 @@ void TelemetryPanel::setup()
if (!(GetEepromInterface()->getCapability(HasAltitudeSel)||GetEepromInterface()->getCapability(HasVario))) {
ui->altimetryGB->hide();
}
- if (GetEepromInterface()->getCapability(NoTelemetryProtocol)) {
- model.frsky.usrProto=1;
- ui->frskyProtoCB->setDisabled(true);
- } else {
- ui->frskyProtoCB->setEnabled(true);
- }
- if (GetEepromInterface()->getCapability(TelemetryCSFields)==0) {
- ui->groupBox_5->hide();
- } else {
- if (GetEepromInterface()->getCapability(TelemetryCSFields)==8) {
- ui->tabCsView->removeTab(1);
- ui->tabCsView->removeTab(2);
- }
- if (GetEepromInterface()->getCapability(TelemetryCSFields)==16) {
- ui->tabCsView->removeTab(2);
- }
- int cols=GetEepromInterface()->getCapability(TelemetryColsCSFields);
- if (cols==0) cols=2;
- for (int screen=0; screen<(GetEepromInterface()->getCapability(TelemetryCSFields)/(4*cols)); screen++) {
- for (int c=0; chide();
- }
- }
- }
+ if (GetEepromInterface()->getCapability(NoTelemetryProtocol)) {
+ ui->frskyProtoCB->setDisabled(true);
+ }
+ else {
+ ui->frskyProtoCB->setEnabled(true);
}
if (!GetEepromInterface()->getCapability(TelemetryUnits)) {
@@ -479,9 +549,11 @@ void TelemetryPanel::setup()
}
ui->frskyUnitsCB->setCurrentIndex(index);
}
+
if ((GetEepromInterface()->getCapability(Telemetry)&TM_HASWSHH)) {
ui->frskyProtoCB->addItem(tr("Winged Shadow How High"));
- } else {
+ }
+ else {
ui->frskyProtoCB->addItem(tr("Winged Shadow How High (not supported)"));
}
@@ -517,40 +589,6 @@ void TelemetryPanel::setup()
ui->frskyCurrentCB->setCurrentIndex(model.frsky.currentSource);
ui->frskyVoltCB->setCurrentIndex(model.frsky.voltsSource);
- for (int screen=0; screen<2;screen++) {
- for (int rows=0; rows<4; rows++) {
- for (int cols=0; cols<3; cols++) {
- int index=screen*12+cols*4+rows;
- populateCustomScreenFieldCB(csf[index], model.frsky.screens[screen].body.lines[rows].source[cols], (rows<4), model.frsky.usrProto);
- }
- }
- }
-
- for (int j=0; j<12; j++) {
- int screen = j/4;
- int field = j%4;
- populateCustomScreenFieldCB(barsCB[j], model.frsky.screens[screen].body.bars[field].source, false, model.frsky.usrProto);
- RawSource source = RawSource(SOURCE_TYPE_TELEMETRY, model.frsky.screens[screen].body.bars[field].source, &model);
- RawSourceRange range = source.getRange(true);
- minSB[j]->setDecimals(range.decimals);
- minSB[j]->setMinimum(range.min);
- minSB[j]->setMaximum(range.max);
- minSB[j]->setSingleStep(range.step);
- minSB[j]->setValue(range.getValue(model.frsky.screens[screen].body.bars[field].barMin));
- maxSB[j]->setDecimals(range.decimals);
- maxSB[j]->setMinimum(range.min);
- maxSB[j]->setMaximum(range.max);
- maxSB[j]->setSingleStep(range.step);
- maxSB[j]->setValue(range.getValue(255 - model.frsky.screens[screen].body.bars[field].barMax));
- if (model.frsky.screens[screen].body.bars[field].source==0 || model.frsky.screens[screen].type==0) {
- minSB[j]->setDisabled(true);
- maxSB[j]->setDisabled(true);
- }
- connect(barsCB[j], SIGNAL(currentIndexChanged(int)), this, SLOT(telBarCBcurrentIndexChanged(int)));
- connect(maxSB[j], SIGNAL(editingFinished()), this, SLOT(telMaxSBeditingFinished()));
- connect(minSB[j], SIGNAL(editingFinished()), this, SLOT(telMinSBeditingFinished()));
- }
-
lock=false;
}
@@ -585,316 +623,119 @@ void TelemetryPanel::on_frskyVoltCB_currentIndexChanged(int index)
void TelemetryPanel::on_frskyProtoCB_currentIndexChanged(int index)
{
- if (lock) return;
- int bindex[12];
- lock=true;
- for (int i=0; i<12; i++) {
- bindex[i]=barsCB[i]->currentIndex();
- model.frsky.usrProto=index;
- populateCustomScreenFieldCB(barsCB[i], bindex[i], false, model.frsky.usrProto);
- }
- if (!GetEepromInterface()->getCapability(TelemetryCSFields)) {
- ui->groupBox_5->hide();
- } else {
- for (int screen=0; screen<2;screen++) {
- for (int rows=0; rows<4; rows++) {
- for (int cols=0; cols<3; cols++) {
- int index=screen*12+cols*4+rows;
- populateCustomScreenFieldCB(csf[index], model.frsky.screens[screen].body.lines[rows].source[cols], (rows<4), model.frsky.usrProto);
- }
- }
- }
- }
- lock=false;
- if (index==0) {
- for (int i=0; i<12; i++) {
- if (bindex[i]>2) {
- barsCB[i]->setCurrentIndex(0);
- } else {
- barsCB[i]->setCurrentIndex(bindex[i]);
- }
- }
- } else if (index==2) {
- for (int i=0; i<12; i++) {
- if (bindex[i]>3) {
- barsCB[i]->setCurrentIndex(0);
- } else {
- barsCB[i]->setCurrentIndex(bindex[i]);
- }
- }
- } else {
- for (int i=0; i<12; i++) {
- barsCB[i]->setCurrentIndex(bindex[i]);
- }
- }
- emit modified();
+ model.frsky.usrProto = index;
+ emit modified();
}
-void TelemetryPanel::on_rssiAlarm1CB_currentIndexChanged(int index) {
- if (lock) return;
- model.frsky.rssiAlarms[0].level=index;
- emit modified();
+void TelemetryPanel::on_rssiAlarm1CB_currentIndexChanged(int index)
+{
+ model.frsky.rssiAlarms[0].level = index;
+ emit modified();
}
-void TelemetryPanel::on_rssiAlarm2CB_currentIndexChanged(int index) {
- if (lock) return;
- model.frsky.rssiAlarms[1].level=index;
- emit modified();
+void TelemetryPanel::on_rssiAlarm2CB_currentIndexChanged(int index)
+{
+ model.frsky.rssiAlarms[1].level = index;
+ emit modified();
}
void TelemetryPanel::on_rssiAlarm1SB_editingFinished()
{
- if (lock) return;
- model.frsky.rssiAlarms[0].value=(ui->rssiAlarm1SB->value());
- emit modified();
+ model.frsky.rssiAlarms[0].value = ui->rssiAlarm1SB->value();
+ emit modified();
}
void TelemetryPanel::on_rssiAlarm2SB_editingFinished()
{
- if (lock) return;
- model.frsky.rssiAlarms[1].value=(ui->rssiAlarm2SB->value());
- emit modified();
+ model.frsky.rssiAlarms[1].value = ui->rssiAlarm2SB->value();
+ emit modified();
}
void TelemetryPanel::on_AltitudeGPS_ChkB_toggled(bool checked)
{
- if (lock) return;
- model.frsky.FrSkyGpsAlt = checked;
- emit modified();
+ model.frsky.FrSkyGpsAlt = checked;
+ emit modified();
}
void TelemetryPanel::on_AltitudeToolbar_ChkB_toggled(bool checked)
{
- model.frsky.altitudeDisplayed = checked;
- emit modified();
+ model.frsky.altitudeDisplayed = checked;
+ emit modified();
}
void TelemetryPanel::on_varioSourceCB_currentIndexChanged(int index)
{
- if (lock) return;
- model.frsky.varioSource = index;
- emit modified();
+ model.frsky.varioSource = index;
+ emit modified();
}
void TelemetryPanel::on_varioLimitMin_DSB_editingFinished()
{
- if (lock) return;
- model.frsky.varioMin= round(ui->varioLimitMin_DSB->value()+10);
- emit modified();
+ model.frsky.varioMin = round(ui->varioLimitMin_DSB->value()+10);
+ emit modified();
}
void TelemetryPanel::on_varioLimitMax_DSB_editingFinished()
{
- if (lock) return;
- model.frsky.varioMax= round(ui->varioLimitMax_DSB->value()-10);
- emit modified();
+ model.frsky.varioMax = round(ui->varioLimitMax_DSB->value()-10);
+ emit modified();
}
void TelemetryPanel::on_varioLimitCenterMin_DSB_editingFinished()
{
- if (lock) return;
+ if (!lock) {
if (ui->varioLimitCenterMin_DSB->value()>ui->varioLimitCenterMax_DSB->value()) {
ui->varioLimitCenterMax_DSB->setValue(ui->varioLimitCenterMin_DSB->value());
}
- model.frsky.varioCenterMin= round((ui->varioLimitCenterMin_DSB->value()+0.5)*10);
+ model.frsky.varioCenterMin = round((ui->varioLimitCenterMin_DSB->value()+0.5)*10);
emit modified();
+ }
}
void TelemetryPanel::on_varioLimitMinOff_ChkB_toggled(bool checked)
{
- if (lock) return;
+ if (!lock) {
model.frsky.varioCenterMin = -16;
if (!checked) {
lock=true;
ui->varioLimitCenterMin_DSB->setValue(-2.0);
ui->varioLimitCenterMin_DSB->setEnabled(true);
lock=false;
- } else {
+ }
+ else {
ui->varioLimitCenterMin_DSB->setValue(-2.0);
ui->varioLimitCenterMin_DSB->setDisabled(true);
}
emit modified();
+ }
}
void TelemetryPanel::on_varioLimitCenterMax_DSB_editingFinished()
{
- if (lock) return;
+ if (!lock) {
if (ui->varioLimitCenterMin_DSB->value()>ui->varioLimitCenterMax_DSB->value()) {
ui->varioLimitCenterMax_DSB->setValue(ui->varioLimitCenterMin_DSB->value());
}
- model.frsky.varioCenterMax= round((ui->varioLimitCenterMax_DSB->value()-0.5)*10);
+ model.frsky.varioCenterMax = round((ui->varioLimitCenterMax_DSB->value()-0.5)*10);
emit modified();
+ }
}
void TelemetryPanel::on_fasOffset_DSB_editingFinished()
{
- model.frsky.fasOffset = ui->fasOffset_DSB->value()*10;
- emit modified();
+ model.frsky.fasOffset = ui->fasOffset_DSB->value() * 10;
+ emit modified();
}
void TelemetryPanel::on_mahCount_SB_editingFinished()
{
- model.frsky.storedMah = ui->mahCount_SB->value();
- emit modified();
+ model.frsky.storedMah = ui->mahCount_SB->value();
+ emit modified();
}
void TelemetryPanel::on_mahCount_ChkB_toggled(bool checked)
{
- model.frsky.mAhPersistent = checked;
- ui->mahCount_SB->setDisabled(!checked);
- emit modified();
+ model.frsky.mAhPersistent = checked;
+ ui->mahCount_SB->setDisabled(!checked);
+ emit modified();
}
-
-void TelemetryPanel::telBarUpdate()
-{
- int index;
- lock=true;
- for (int i=0; i<12; i++) {
- int screen=i/4;
- index=barsCB[i]->currentIndex();
- if (index==TELEMETRY_SOURCE_A1 || index==TELEMETRY_SOURCE_A1 || index==TELEMETRY_SOURCE_A1_MIN || index==TELEMETRY_SOURCE_A2_MIN) {
- RawSource source = RawSource(SOURCE_TYPE_TELEMETRY, index, &model);
- RawSourceRange range = source.getRange(true);
- minSB[i]->setMinimum(range.min);
- minSB[i]->setMaximum(range.max);
- minSB[i]->setSingleStep(range.step);
- maxSB[i]->setMinimum(range.min);
- maxSB[i]->setMaximum(range.max);
- maxSB[i]->setSingleStep(range.step);
- minSB[i]->setValue(range.getValue(model.frsky.screens[screen].body.bars[i%4].barMin));
- maxSB[i]->setValue(range.getValue(255 - model.frsky.screens[screen].body.bars[i%4].barMax));
- }
- }
- lock=false;
-}
-
-void TelemetryPanel::ScreenTypeCBcurrentIndexChanged(int index)
-{
- if (!lock) {
- lock = true;
- QComboBox *comboBox = qobject_cast(sender());
- int screen = comboBox->objectName().right(1).toInt() -1;
- model.frsky.screens[screen].type = index;
- for (int i=0; i<3; i++) {
- bool isNum = (model.frsky.screens[i].type==0);
- barsGB[i]->setVisible(!isNum);
- numsGB[i]->setVisible(isNum);
- }
- lock = false;
- emit modified();
- }
-}
-
-void TelemetryPanel::telBarCBcurrentIndexChanged(int index)
-{
- if (!lock) {
- lock = true;
- QComboBox *comboBox = qobject_cast(sender());
- int screenId = comboBox->objectName().mid(8,1).toInt() - 1;
- int barId = comboBox->objectName().mid(10,1).toInt() - 1;
- int bar=barId+screenId*4;
- model.frsky.screens[screenId].body.bars[barId].source=index;
- if (index==0) {
- model.frsky.screens[screenId].body.bars[barId].barMin=0;
- model.frsky.screens[screenId].body.bars[barId].barMax=0;
- minSB[bar]->setDisabled(true);
- maxSB[bar]->setDisabled(true);
- }
- else {
- minSB[bar]->setEnabled(true);
- maxSB[bar]->setEnabled(true);
- }
- RawSource source = RawSource(SOURCE_TYPE_TELEMETRY, index-1, &model);
- RawSourceRange range = source.getRange(true);
- minSB[bar]->setDecimals(range.decimals);
- minSB[bar]->setMinimum(range.min);
- minSB[bar]->setMaximum(range.max);
- minSB[bar]->setSingleStep(range.step);
- maxSB[bar]->setDecimals(range.decimals);
- maxSB[bar]->setMinimum(range.min);
- maxSB[bar]->setMaximum(range.max);
- maxSB[bar]->setSingleStep(range.step);
- minSB[bar]->setValue(range.getValue(model.frsky.screens[screenId].body.bars[barId].barMin));
- maxSB[bar]->setValue(range.getValue(255 - model.frsky.screens[screenId].body.bars[barId].barMax));
- lock = false;
- emit modified();
- }
-}
-
-void TelemetryPanel::telMinSBeditingFinished()
-{
- if (!lock) {
- lock = true;
- QDoubleSpinBox *spinBox = qobject_cast(sender());
- int screenId = spinBox->objectName().mid(8,1).toInt() - 1;
- int barId = spinBox->objectName().right(1).toInt() - 1;
- int minId = barId+screenId*4;
- RawSource source = RawSource(SOURCE_TYPE_TELEMETRY, model.frsky.screens[screenId].body.bars[barId].source, &model);
- RawSourceRange range = source.getRange(true);
- if (model.frsky.screens[screenId].body.bars[barId].source==TELEMETRY_SOURCE_A1 || model.frsky.screens[screenId].body.bars[barId].source==TELEMETRY_SOURCE_A1_MIN) {
- model.frsky.screens[screenId].body.bars[barId].barMin = round((minSB[minId]->value()-analogs[0]->ui->CalibSB->value())/range.step);
- }
- else if (model.frsky.screens[screenId].body.bars[minId].source==TELEMETRY_SOURCE_A2 || model.frsky.screens[screenId].body.bars[minId].source==TELEMETRY_SOURCE_A2_MIN) {
- model.frsky.screens[screenId].body.bars[barId].barMin = round((minSB[minId]->value()-analogs[1]->ui->CalibSB->value())/range.step);
- }
- else {
- model.frsky.screens[screenId].body.bars[barId].barMin = round((minSB[minId]->value()-range.getValue(0))/range.step);
- }
- spinBox->setValue(range.getValue(model.frsky.screens[screenId].body.bars[barId].barMin));
- if (maxSB[minId]->value()value()) {
- model.frsky.screens[screenId].body.bars[minId].barMax = (255-model.frsky.screens[screenId].body.bars[barId].barMin+1);
- maxSB[minId]->setValue(range.getValue(255 - model.frsky.screens[screenId].body.bars[barId].barMax));
- }
- maxSB[minId]->setMinimum(range.getValue((model.frsky.screens[screenId].body.bars[barId].barMin+1)));
-
- lock = false;
- emit modified();
- }
-}
-
-void TelemetryPanel::telMaxSBeditingFinished()
-{
- if (!lock) {
- QDoubleSpinBox *spinBox = qobject_cast(sender());
- int screenId = spinBox->objectName().mid(8,1).toInt() - 1;
- int barId = spinBox->objectName().right(1).toInt() - 1;
- lock = true;
- RawSource source = RawSource(SOURCE_TYPE_TELEMETRY, model.frsky.screens[screenId].body.bars[barId].source, &model);
- RawSourceRange range = source.getRange(true);
- if (model.frsky.screens[screenId].body.bars[barId].source==5) {
- model.frsky.screens[screenId].body.bars[barId].barMax = (255-round((spinBox->value()-analogs[0]->ui->CalibSB->value())/range.step));
- }
- else if (model.frsky.screens[screenId].body.bars[barId].source==6) {
- model.frsky.screens[screenId].body.bars[barId].barMax = (255-round((spinBox->value()-analogs[1]->ui->CalibSB->value())/range.step));
- }
- else {
- model.frsky.screens[screenId].body.bars[barId].barMax = (255-round((spinBox->value()-range.getValue(0))/range.step));
- }
- spinBox->setValue(range.getValue(255-model.frsky.screens[screenId].body.bars[barId].barMax));
- lock = false;
- emit modified();
- }
-}
-
-void TelemetryPanel::customFieldEdited()
-{
- if (!lock) {
- lock = true;
-
- int cols = GetEepromInterface()->getCapability(TelemetryColsCSFields);
- if (cols==0) cols=2;
-
- for (int i=0; igetCapability(TelemetryCSFields); i++) {
- int screen=i/(4*cols);
- int r=((i%(4*cols))%4);
- int c=((i%(4*cols))/4);
- if (model.frsky.screens[screen].type==0) {
- model.frsky.screens[screen].body.lines[r].source[c]=csf[i]->currentIndex();
- }
- }
-
- lock = false;
- emit modified();
- }
-}
-
diff --git a/companion/src/modeledit/telemetry.h b/companion/src/modeledit/telemetry.h
index f8dc1c35e..44233f79c 100644
--- a/companion/src/modeledit/telemetry.h
+++ b/companion/src/modeledit/telemetry.h
@@ -8,6 +8,7 @@
namespace Ui {
class TelemetryAnalog;
+ class TelemetryCustomScreen;
class Telemetry;
}
@@ -44,6 +45,32 @@ class TelemetryAnalog : public QWidget
void update();
};
+class TelemetryCustomScreen : public ModelPanel
+{
+ Q_OBJECT
+
+ public:
+ TelemetryCustomScreen(QWidget *parent, ModelData & model, FrSkyScreenData & screen);
+ ~TelemetryCustomScreen();
+ void update();
+
+ private slots:
+ void on_screenType_currentIndexChanged(int index);
+ void customFieldChanged(int index);
+ void barSourceChanged(int index);
+ void barMinChanged(double value);
+ void barMaxChanged(double value);
+
+ private:
+ void updateBar(int line);
+ Ui::TelemetryCustomScreen * ui;
+ FrSkyScreenData & screen;
+ QComboBox * fieldsCB[4][3];
+ QComboBox * barsCB[4];
+ QDoubleSpinBox * minSB[4];
+ QDoubleSpinBox * maxSB[4];
+};
+
class TelemetryPanel : public ModelPanel
{
Q_OBJECT
@@ -77,21 +104,10 @@ class TelemetryPanel : public ModelPanel
void on_fasOffset_DSB_editingFinished();
void on_mahCount_SB_editingFinished();
void on_mahCount_ChkB_toggled(bool checked);
- void telBarCBcurrentIndexChanged(int index);
- void ScreenTypeCBcurrentIndexChanged(int index);
- void telMaxSBeditingFinished();
- void telMinSBeditingFinished();
- void customFieldEdited();
private:
Ui::Telemetry *ui;
TelemetryAnalog * analogs[2];
- QGroupBox* barsGB[3];
- QGroupBox* numsGB[3];
- QComboBox* barsCB[12];
- QDoubleSpinBox* minSB[12];
- QDoubleSpinBox* maxSB[12];
- QComboBox* csf[36];
void setup();
void telBarUpdate();
diff --git a/companion/src/modeledit/telemetry.ui b/companion/src/modeledit/telemetry.ui
index bb6bae9c9..6a3a6d618 100644
--- a/companion/src/modeledit/telemetry.ui
+++ b/companion/src/modeledit/telemetry.ui
@@ -7,7 +7,7 @@
0
0
692
- 568
+ 457
@@ -871,1240 +871,17 @@
-
-
-
-
-
-
-
- 0
- 0
-
-
-
-
-
-
-
- 1
-
-
- 1
-
-
-
-
-
-
- 0
- 0
-
-
-
- 0
-
-
-
- Telemetry screen 1
-
-
-
-
-
-
-
-
-
-
- 0
- 0
-
-
-
-
- 0
- 0
-
-
-
- Custom Screen Type
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 90
- 0
-
-
-
-
-
- Nums
-
-
- -
-
- Bars
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
- Source
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Min
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Gauge
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Max
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- false
-
-
- Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),)
-
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- Gauge 1
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- false
-
-
- Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),)
-
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- Gauge 2
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- false
-
-
- Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),)
-
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- Gauge 3
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- false
-
-
- Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),)
-
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- Gauge 4
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- 0
-
-
-
-
-
-
-
-
-
-
- Telemetry screen 2
-
-
- -
-
-
-
-
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
- Source
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Min
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Gauge
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Max
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- false
-
-
- Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),)
-
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- Gauge 1
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- false
-
-
- Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),)
-
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- Gauge 2
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- false
-
-
- Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),)
-
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- Gauge 3
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- false
-
-
- Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),)
-
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- Gauge 4
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- 0
-
-
-
-
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
- Custom Screen Type
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 90
- 0
-
-
-
-
-
- Nums
-
-
- -
-
- Bars
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
-
-
-
-
- Telemetry screen 3
-
-
- -
-
-
-
-
-
-
- 0
- 0
-
-
-
- Custom Screen Type
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- 90
- 0
-
-
-
-
-
- Nums
-
-
- -
-
- Bars
-
-
-
-
- -
-
-
- Qt::Horizontal
-
-
-
- 40
- 20
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
- Source
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Min
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Gauge
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- Max
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
-
- 0
- 0
-
-
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- false
-
-
- Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),)
-
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- Gauge 1
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- false
-
-
- Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),)
-
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- Gauge 2
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- false
-
-
- Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),)
-
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- Gauge 3
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- -
-
-
- 0
-
-
-
- -
-
-
- false
-
-
- Background:qlineargradient(spread:pad, x1:0, y1:0, x2:1, y2:0, stop:0 rgba(0, 0, 128, 255), stop:0.339795 rgba(0, 0, 128, 255), stop:0.339799 rgba(255, 255, 255, 255), stop:0.662444 rgba(255, 255, 255, 255),)
-
-
-
- QFrame::Panel
-
-
- QFrame::Raised
-
-
- Gauge 4
-
-
- Qt::AlignCenter
-
-
-
- -
-
-
- 0
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ 0
+ 0
+
+
+
+ -1
+
+
-
diff --git a/companion/src/modeledit/telemetry_customscreen.ui b/companion/src/modeledit/telemetry_customscreen.ui
new file mode 100644
index 000000000..b01417450
--- /dev/null
+++ b/companion/src/modeledit/telemetry_customscreen.ui
@@ -0,0 +1,138 @@
+
+
+ TelemetryCustomScreen
+
+
+
+ 0
+ 0
+ 650
+ 393
+
+
+
+ Form
+
+
+
-
+
+
-
+
+
+
+ 0
+ 0
+
+
+
+
+ 0
+ 0
+
+
+
+ Custom Screen Type
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 90
+ 0
+
+
+
-
+
+ Nums
+
+
+ -
+
+ Bars
+
+
+
+
+ -
+
+
+ Qt::Horizontal
+
+
+
+ 40
+ 20
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+
+ -
+
+
+
-
+
+
+ Min
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Source
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Gauge
+
+
+ Qt::AlignCenter
+
+
+
+ -
+
+
+ Max
+
+
+ Qt::AlignCenter
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/companion/src/printdialog.cpp b/companion/src/printdialog.cpp
index 86f1dc775..45d149c97 100644
--- a/companion/src/printdialog.cpp
+++ b/companion/src/printdialog.cpp
@@ -796,7 +796,7 @@ void printDialog::printFrSky()
str.append("| "+tr("System of units")+" | "+getFrSkyMeasure(fd->imperial)+" |
");
str.append("| "+tr("Propeller blades")+" | "+getFrSkyBlades(fd->blades)+" |
");
str.append(" |
");
-
+#if 0
if (GetEepromInterface()->getCapability(TelemetryBars) || (GetEepromInterface()->getCapability(TelemetryCSFields))) {
int cols=GetEepromInterface()->getCapability(TelemetryColsCSFields);
if (cols==0) cols=2;
@@ -840,6 +840,7 @@ void printDialog::printFrSky()
}
}
}
+#endif
if (tc>0)
te->append(str);
}
diff --git a/companion/src/themes/monowhite/16/add.png b/companion/src/themes/monowhite/16/add.png
index 0d768aa67..e2cb16737 100644
Binary files a/companion/src/themes/monowhite/16/add.png and b/companion/src/themes/monowhite/16/add.png differ
diff --git a/companion/src/themes/monowhite/16/arrow-left.png b/companion/src/themes/monowhite/16/arrow-left.png
index 66e5655a6..df382a723 100644
Binary files a/companion/src/themes/monowhite/16/arrow-left.png and b/companion/src/themes/monowhite/16/arrow-left.png differ
diff --git a/companion/src/themes/monowhite/16/arrow-right.png b/companion/src/themes/monowhite/16/arrow-right.png
index bb5de71d8..c2cf8ab8b 100644
Binary files a/companion/src/themes/monowhite/16/arrow-right.png and b/companion/src/themes/monowhite/16/arrow-right.png differ
diff --git a/companion/src/themes/monowhite/16/changelog.png b/companion/src/themes/monowhite/16/changelog.png
index 3a20018b3..e1eba6ff6 100644
Binary files a/companion/src/themes/monowhite/16/changelog.png and b/companion/src/themes/monowhite/16/changelog.png differ
diff --git a/companion/src/themes/monowhite/16/clear.png b/companion/src/themes/monowhite/16/clear.png
index b76693837..3d142f8af 100644
Binary files a/companion/src/themes/monowhite/16/clear.png and b/companion/src/themes/monowhite/16/clear.png differ
diff --git a/companion/src/themes/monowhite/16/compare.png b/companion/src/themes/monowhite/16/compare.png
index cd3ac1c4a..553ddaa10 100644
Binary files a/companion/src/themes/monowhite/16/compare.png and b/companion/src/themes/monowhite/16/compare.png differ
diff --git a/companion/src/themes/monowhite/16/configure.png b/companion/src/themes/monowhite/16/configure.png
index 80ad99455..6a3295aab 100644
Binary files a/companion/src/themes/monowhite/16/configure.png and b/companion/src/themes/monowhite/16/configure.png differ
diff --git a/companion/src/themes/monowhite/16/contributors.png b/companion/src/themes/monowhite/16/contributors.png
index f7a642e0d..ca7664737 100644
Binary files a/companion/src/themes/monowhite/16/contributors.png and b/companion/src/themes/monowhite/16/contributors.png differ
diff --git a/companion/src/themes/monowhite/16/copy.png b/companion/src/themes/monowhite/16/copy.png
index 955d49339..ffb5ad2f9 100644
Binary files a/companion/src/themes/monowhite/16/copy.png and b/companion/src/themes/monowhite/16/copy.png differ
diff --git a/companion/src/themes/monowhite/16/currentmodel.png b/companion/src/themes/monowhite/16/currentmodel.png
index 380545d7a..2f9d72888 100644
Binary files a/companion/src/themes/monowhite/16/currentmodel.png and b/companion/src/themes/monowhite/16/currentmodel.png differ
diff --git a/companion/src/themes/monowhite/16/cut.png b/companion/src/themes/monowhite/16/cut.png
index 4805fef12..b590d2f13 100644
Binary files a/companion/src/themes/monowhite/16/cut.png and b/companion/src/themes/monowhite/16/cut.png differ
diff --git a/companion/src/themes/monowhite/16/duplicate.png b/companion/src/themes/monowhite/16/duplicate.png
index a87833097..e2f532dfb 100644
Binary files a/companion/src/themes/monowhite/16/duplicate.png and b/companion/src/themes/monowhite/16/duplicate.png differ
diff --git a/companion/src/themes/monowhite/16/edit.png b/companion/src/themes/monowhite/16/edit.png
index 8c7d5ecac..f4786d4b0 100644
Binary files a/companion/src/themes/monowhite/16/edit.png and b/companion/src/themes/monowhite/16/edit.png differ
diff --git a/companion/src/themes/monowhite/16/exit.png b/companion/src/themes/monowhite/16/exit.png
index dba574237..b2b3c569c 100644
Binary files a/companion/src/themes/monowhite/16/exit.png and b/companion/src/themes/monowhite/16/exit.png differ
diff --git a/companion/src/themes/monowhite/16/fuses.png b/companion/src/themes/monowhite/16/fuses.png
index f49e7fc46..521de6d3a 100644
Binary files a/companion/src/themes/monowhite/16/fuses.png and b/companion/src/themes/monowhite/16/fuses.png differ
diff --git a/companion/src/themes/monowhite/16/information.png b/companion/src/themes/monowhite/16/information.png
index d31b660b5..d7016086e 100644
Binary files a/companion/src/themes/monowhite/16/information.png and b/companion/src/themes/monowhite/16/information.png differ
diff --git a/companion/src/themes/monowhite/16/library.png b/companion/src/themes/monowhite/16/library.png
index 0073fb1e2..62b811606 100644
Binary files a/companion/src/themes/monowhite/16/library.png and b/companion/src/themes/monowhite/16/library.png differ
diff --git a/companion/src/themes/monowhite/16/list.png b/companion/src/themes/monowhite/16/list.png
index e79516bbf..5e71cd167 100644
Binary files a/companion/src/themes/monowhite/16/list.png and b/companion/src/themes/monowhite/16/list.png differ
diff --git a/companion/src/themes/monowhite/16/logs.png b/companion/src/themes/monowhite/16/logs.png
index 887c222db..0cc2864d4 100644
Binary files a/companion/src/themes/monowhite/16/logs.png and b/companion/src/themes/monowhite/16/logs.png differ
diff --git a/companion/src/themes/monowhite/16/movedown.png b/companion/src/themes/monowhite/16/movedown.png
index 917982429..ed017edfb 100644
Binary files a/companion/src/themes/monowhite/16/movedown.png and b/companion/src/themes/monowhite/16/movedown.png differ
diff --git a/companion/src/themes/monowhite/16/moveup.png b/companion/src/themes/monowhite/16/moveup.png
index bd7f80940..0430b1a8e 100644
Binary files a/companion/src/themes/monowhite/16/moveup.png and b/companion/src/themes/monowhite/16/moveup.png differ
diff --git a/companion/src/themes/monowhite/16/new.png b/companion/src/themes/monowhite/16/new.png
index 86e90a978..34930ebba 100644
Binary files a/companion/src/themes/monowhite/16/new.png and b/companion/src/themes/monowhite/16/new.png differ
diff --git a/companion/src/themes/monowhite/16/open.png b/companion/src/themes/monowhite/16/open.png
index a5b958161..4ee6b1cbd 100644
Binary files a/companion/src/themes/monowhite/16/open.png and b/companion/src/themes/monowhite/16/open.png differ
diff --git a/companion/src/themes/monowhite/16/paintbrush.png b/companion/src/themes/monowhite/16/paintbrush.png
index c2724c510..4333818ef 100644
Binary files a/companion/src/themes/monowhite/16/paintbrush.png and b/companion/src/themes/monowhite/16/paintbrush.png differ
diff --git a/companion/src/themes/monowhite/16/paste.png b/companion/src/themes/monowhite/16/paste.png
index c24f818b7..e5d50479d 100644
Binary files a/companion/src/themes/monowhite/16/paste.png and b/companion/src/themes/monowhite/16/paste.png differ
diff --git a/companion/src/themes/monowhite/16/play.png b/companion/src/themes/monowhite/16/play.png
index a3bb9afc2..d4720f2d8 100644
Binary files a/companion/src/themes/monowhite/16/play.png and b/companion/src/themes/monowhite/16/play.png differ
diff --git a/companion/src/themes/monowhite/16/preferences.png b/companion/src/themes/monowhite/16/preferences.png
index e0b1438ee..7b6770309 100644
Binary files a/companion/src/themes/monowhite/16/preferences.png and b/companion/src/themes/monowhite/16/preferences.png differ
diff --git a/companion/src/themes/monowhite/16/print.png b/companion/src/themes/monowhite/16/print.png
index 81033fef9..39191c939 100644
Binary files a/companion/src/themes/monowhite/16/print.png and b/companion/src/themes/monowhite/16/print.png differ
diff --git a/companion/src/themes/monowhite/16/profiles.png b/companion/src/themes/monowhite/16/profiles.png
index 6039ba23c..01b13e3c7 100644
Binary files a/companion/src/themes/monowhite/16/profiles.png and b/companion/src/themes/monowhite/16/profiles.png differ
diff --git a/companion/src/themes/monowhite/16/read_eeprom.png b/companion/src/themes/monowhite/16/read_eeprom.png
index da655ea1c..b58582958 100644
Binary files a/companion/src/themes/monowhite/16/read_eeprom.png and b/companion/src/themes/monowhite/16/read_eeprom.png differ
diff --git a/companion/src/themes/monowhite/16/read_eeprom_file.png b/companion/src/themes/monowhite/16/read_eeprom_file.png
index beda75e23..214e82c4d 100644
Binary files a/companion/src/themes/monowhite/16/read_eeprom_file.png and b/companion/src/themes/monowhite/16/read_eeprom_file.png differ
diff --git a/companion/src/themes/monowhite/16/read_flash.png b/companion/src/themes/monowhite/16/read_flash.png
index 5c96aea72..530c62174 100644
Binary files a/companion/src/themes/monowhite/16/read_flash.png and b/companion/src/themes/monowhite/16/read_flash.png differ
diff --git a/companion/src/themes/monowhite/16/recentdocument.png b/companion/src/themes/monowhite/16/recentdocument.png
index 9ac53e0f3..d3cf237f5 100644
Binary files a/companion/src/themes/monowhite/16/recentdocument.png and b/companion/src/themes/monowhite/16/recentdocument.png differ
diff --git a/companion/src/themes/monowhite/16/save.png b/companion/src/themes/monowhite/16/save.png
index 25c1dc9b8..dbf6d8695 100644
Binary files a/companion/src/themes/monowhite/16/save.png and b/companion/src/themes/monowhite/16/save.png differ
diff --git a/companion/src/themes/monowhite/16/saveas.png b/companion/src/themes/monowhite/16/saveas.png
index 129a54394..791c7be33 100644
Binary files a/companion/src/themes/monowhite/16/saveas.png and b/companion/src/themes/monowhite/16/saveas.png differ
diff --git a/companion/src/themes/monowhite/16/simulate.png b/companion/src/themes/monowhite/16/simulate.png
index 981976c19..5ce854790 100644
Binary files a/companion/src/themes/monowhite/16/simulate.png and b/companion/src/themes/monowhite/16/simulate.png differ
diff --git a/companion/src/themes/monowhite/16/stop.png b/companion/src/themes/monowhite/16/stop.png
index 886a8459c..42610e416 100644
Binary files a/companion/src/themes/monowhite/16/stop.png and b/companion/src/themes/monowhite/16/stop.png differ
diff --git a/companion/src/themes/monowhite/16/update.png b/companion/src/themes/monowhite/16/update.png
index ce5250fad..31b90cf36 100644
Binary files a/companion/src/themes/monowhite/16/update.png and b/companion/src/themes/monowhite/16/update.png differ
diff --git a/companion/src/themes/monowhite/16/wizard.png b/companion/src/themes/monowhite/16/wizard.png
index 09f0ac05d..d1301c613 100644
Binary files a/companion/src/themes/monowhite/16/wizard.png and b/companion/src/themes/monowhite/16/wizard.png differ
diff --git a/companion/src/themes/monowhite/16/write_eeprom.png b/companion/src/themes/monowhite/16/write_eeprom.png
index e5f1f5dc5..6815c7668 100644
Binary files a/companion/src/themes/monowhite/16/write_eeprom.png and b/companion/src/themes/monowhite/16/write_eeprom.png differ
diff --git a/companion/src/themes/monowhite/16/write_eeprom_file.png b/companion/src/themes/monowhite/16/write_eeprom_file.png
index 6bcdbc23b..a7e7c36f8 100644
Binary files a/companion/src/themes/monowhite/16/write_eeprom_file.png and b/companion/src/themes/monowhite/16/write_eeprom_file.png differ
diff --git a/companion/src/themes/monowhite/16/write_flash.png b/companion/src/themes/monowhite/16/write_flash.png
index 50350ff62..81cdccdbc 100644
Binary files a/companion/src/themes/monowhite/16/write_flash.png and b/companion/src/themes/monowhite/16/write_flash.png differ
diff --git a/companion/src/themes/monowhite/24/add.png b/companion/src/themes/monowhite/24/add.png
index fb461e23a..6ca6fad8b 100644
Binary files a/companion/src/themes/monowhite/24/add.png and b/companion/src/themes/monowhite/24/add.png differ
diff --git a/companion/src/themes/monowhite/24/arrow-left.png b/companion/src/themes/monowhite/24/arrow-left.png
index 5a0d451f4..ae050e675 100644
Binary files a/companion/src/themes/monowhite/24/arrow-left.png and b/companion/src/themes/monowhite/24/arrow-left.png differ
diff --git a/companion/src/themes/monowhite/24/arrow-right.png b/companion/src/themes/monowhite/24/arrow-right.png
index ae71f1037..6c1ce6b77 100644
Binary files a/companion/src/themes/monowhite/24/arrow-right.png and b/companion/src/themes/monowhite/24/arrow-right.png differ
diff --git a/companion/src/themes/monowhite/24/changelog.png b/companion/src/themes/monowhite/24/changelog.png
index b57433a35..456160d83 100644
Binary files a/companion/src/themes/monowhite/24/changelog.png and b/companion/src/themes/monowhite/24/changelog.png differ
diff --git a/companion/src/themes/monowhite/24/clear.png b/companion/src/themes/monowhite/24/clear.png
index 204df5685..64a23752d 100644
Binary files a/companion/src/themes/monowhite/24/clear.png and b/companion/src/themes/monowhite/24/clear.png differ
diff --git a/companion/src/themes/monowhite/24/compare.png b/companion/src/themes/monowhite/24/compare.png
index 696cc9ee4..d56fa1116 100644
Binary files a/companion/src/themes/monowhite/24/compare.png and b/companion/src/themes/monowhite/24/compare.png differ
diff --git a/companion/src/themes/monowhite/24/configure.png b/companion/src/themes/monowhite/24/configure.png
index 10933599f..ad431d59f 100644
Binary files a/companion/src/themes/monowhite/24/configure.png and b/companion/src/themes/monowhite/24/configure.png differ
diff --git a/companion/src/themes/monowhite/24/contributors.png b/companion/src/themes/monowhite/24/contributors.png
index 240b20e65..a5fb08873 100644
Binary files a/companion/src/themes/monowhite/24/contributors.png and b/companion/src/themes/monowhite/24/contributors.png differ
diff --git a/companion/src/themes/monowhite/24/copy.png b/companion/src/themes/monowhite/24/copy.png
index 7f2c32d2a..09063a0d0 100644
Binary files a/companion/src/themes/monowhite/24/copy.png and b/companion/src/themes/monowhite/24/copy.png differ
diff --git a/companion/src/themes/monowhite/24/currentmodel.png b/companion/src/themes/monowhite/24/currentmodel.png
index b42dce8da..dc2ed26e1 100644
Binary files a/companion/src/themes/monowhite/24/currentmodel.png and b/companion/src/themes/monowhite/24/currentmodel.png differ
diff --git a/companion/src/themes/monowhite/24/cut.png b/companion/src/themes/monowhite/24/cut.png
index 819a864a7..68fa0ee49 100644
Binary files a/companion/src/themes/monowhite/24/cut.png and b/companion/src/themes/monowhite/24/cut.png differ
diff --git a/companion/src/themes/monowhite/24/duplicate.png b/companion/src/themes/monowhite/24/duplicate.png
index 16a36c3f5..367f931f1 100644
Binary files a/companion/src/themes/monowhite/24/duplicate.png and b/companion/src/themes/monowhite/24/duplicate.png differ
diff --git a/companion/src/themes/monowhite/24/edit.png b/companion/src/themes/monowhite/24/edit.png
index 1a50c1a29..0f5ddf04f 100644
Binary files a/companion/src/themes/monowhite/24/edit.png and b/companion/src/themes/monowhite/24/edit.png differ
diff --git a/companion/src/themes/monowhite/24/exit.png b/companion/src/themes/monowhite/24/exit.png
index 1b240513f..6940f1534 100644
Binary files a/companion/src/themes/monowhite/24/exit.png and b/companion/src/themes/monowhite/24/exit.png differ
diff --git a/companion/src/themes/monowhite/24/fuses.png b/companion/src/themes/monowhite/24/fuses.png
index 38f4a0cf7..0b00dcf56 100644
Binary files a/companion/src/themes/monowhite/24/fuses.png and b/companion/src/themes/monowhite/24/fuses.png differ
diff --git a/companion/src/themes/monowhite/24/information.png b/companion/src/themes/monowhite/24/information.png
index 3404bc82b..d08603e7d 100644
Binary files a/companion/src/themes/monowhite/24/information.png and b/companion/src/themes/monowhite/24/information.png differ
diff --git a/companion/src/themes/monowhite/24/library.png b/companion/src/themes/monowhite/24/library.png
index 433519ac6..bf2869b45 100644
Binary files a/companion/src/themes/monowhite/24/library.png and b/companion/src/themes/monowhite/24/library.png differ
diff --git a/companion/src/themes/monowhite/24/list.png b/companion/src/themes/monowhite/24/list.png
index ba570f3e9..4ced8a69f 100644
Binary files a/companion/src/themes/monowhite/24/list.png and b/companion/src/themes/monowhite/24/list.png differ
diff --git a/companion/src/themes/monowhite/24/logs.png b/companion/src/themes/monowhite/24/logs.png
index dd75b973e..6297517b2 100644
Binary files a/companion/src/themes/monowhite/24/logs.png and b/companion/src/themes/monowhite/24/logs.png differ
diff --git a/companion/src/themes/monowhite/24/movedown.png b/companion/src/themes/monowhite/24/movedown.png
index 7d99daf0a..1110545aa 100644
Binary files a/companion/src/themes/monowhite/24/movedown.png and b/companion/src/themes/monowhite/24/movedown.png differ
diff --git a/companion/src/themes/monowhite/24/moveup.png b/companion/src/themes/monowhite/24/moveup.png
index fd887b4f0..1c9f4d9d6 100644
Binary files a/companion/src/themes/monowhite/24/moveup.png and b/companion/src/themes/monowhite/24/moveup.png differ
diff --git a/companion/src/themes/monowhite/24/new.png b/companion/src/themes/monowhite/24/new.png
index 35b2f9dc4..7f20e1049 100644
Binary files a/companion/src/themes/monowhite/24/new.png and b/companion/src/themes/monowhite/24/new.png differ
diff --git a/companion/src/themes/monowhite/24/open.png b/companion/src/themes/monowhite/24/open.png
index dac2360a0..ed4759765 100644
Binary files a/companion/src/themes/monowhite/24/open.png and b/companion/src/themes/monowhite/24/open.png differ
diff --git a/companion/src/themes/monowhite/24/paintbrush.png b/companion/src/themes/monowhite/24/paintbrush.png
index bbb1bad65..9ce5d2435 100644
Binary files a/companion/src/themes/monowhite/24/paintbrush.png and b/companion/src/themes/monowhite/24/paintbrush.png differ
diff --git a/companion/src/themes/monowhite/24/paste.png b/companion/src/themes/monowhite/24/paste.png
index b18ede978..e4ed5b989 100644
Binary files a/companion/src/themes/monowhite/24/paste.png and b/companion/src/themes/monowhite/24/paste.png differ
diff --git a/companion/src/themes/monowhite/24/play.png b/companion/src/themes/monowhite/24/play.png
index 4d469ea5f..1fc7079ab 100644
Binary files a/companion/src/themes/monowhite/24/play.png and b/companion/src/themes/monowhite/24/play.png differ
diff --git a/companion/src/themes/monowhite/24/preferences.png b/companion/src/themes/monowhite/24/preferences.png
index 06571c513..c08987642 100644
Binary files a/companion/src/themes/monowhite/24/preferences.png and b/companion/src/themes/monowhite/24/preferences.png differ
diff --git a/companion/src/themes/monowhite/24/print.png b/companion/src/themes/monowhite/24/print.png
index 58fb27833..6826507cb 100644
Binary files a/companion/src/themes/monowhite/24/print.png and b/companion/src/themes/monowhite/24/print.png differ
diff --git a/companion/src/themes/monowhite/24/profiles.png b/companion/src/themes/monowhite/24/profiles.png
index 45d781190..259727fd0 100644
Binary files a/companion/src/themes/monowhite/24/profiles.png and b/companion/src/themes/monowhite/24/profiles.png differ
diff --git a/companion/src/themes/monowhite/24/read_eeprom.png b/companion/src/themes/monowhite/24/read_eeprom.png
index 1f7fb9e4f..6c99de805 100644
Binary files a/companion/src/themes/monowhite/24/read_eeprom.png and b/companion/src/themes/monowhite/24/read_eeprom.png differ
diff --git a/companion/src/themes/monowhite/24/read_eeprom_file.png b/companion/src/themes/monowhite/24/read_eeprom_file.png
index 53d89e9c0..bd203689c 100644
Binary files a/companion/src/themes/monowhite/24/read_eeprom_file.png and b/companion/src/themes/monowhite/24/read_eeprom_file.png differ
diff --git a/companion/src/themes/monowhite/24/read_flash.png b/companion/src/themes/monowhite/24/read_flash.png
index 816ac9bcf..020e56684 100644
Binary files a/companion/src/themes/monowhite/24/read_flash.png and b/companion/src/themes/monowhite/24/read_flash.png differ
diff --git a/companion/src/themes/monowhite/24/recentdocument.png b/companion/src/themes/monowhite/24/recentdocument.png
index bee2f4c59..1aff5f44a 100644
Binary files a/companion/src/themes/monowhite/24/recentdocument.png and b/companion/src/themes/monowhite/24/recentdocument.png differ
diff --git a/companion/src/themes/monowhite/24/save.png b/companion/src/themes/monowhite/24/save.png
index 6861f1349..938c53959 100644
Binary files a/companion/src/themes/monowhite/24/save.png and b/companion/src/themes/monowhite/24/save.png differ
diff --git a/companion/src/themes/monowhite/24/saveas.png b/companion/src/themes/monowhite/24/saveas.png
index 2dfa4f21e..31c3bfb73 100644
Binary files a/companion/src/themes/monowhite/24/saveas.png and b/companion/src/themes/monowhite/24/saveas.png differ
diff --git a/companion/src/themes/monowhite/24/simulate.png b/companion/src/themes/monowhite/24/simulate.png
index a836dd016..12eec8c6a 100644
Binary files a/companion/src/themes/monowhite/24/simulate.png and b/companion/src/themes/monowhite/24/simulate.png differ
diff --git a/companion/src/themes/monowhite/24/stop.png b/companion/src/themes/monowhite/24/stop.png
index d882a7270..4b1da49b0 100644
Binary files a/companion/src/themes/monowhite/24/stop.png and b/companion/src/themes/monowhite/24/stop.png differ
diff --git a/companion/src/themes/monowhite/24/update.png b/companion/src/themes/monowhite/24/update.png
index 64f732f1c..baf7f5ba2 100644
Binary files a/companion/src/themes/monowhite/24/update.png and b/companion/src/themes/monowhite/24/update.png differ
diff --git a/companion/src/themes/monowhite/24/wizard.png b/companion/src/themes/monowhite/24/wizard.png
index d25dcf529..88e5941d7 100644
Binary files a/companion/src/themes/monowhite/24/wizard.png and b/companion/src/themes/monowhite/24/wizard.png differ
diff --git a/companion/src/themes/monowhite/24/write_eeprom.png b/companion/src/themes/monowhite/24/write_eeprom.png
index 481cefa9e..6a82777ad 100644
Binary files a/companion/src/themes/monowhite/24/write_eeprom.png and b/companion/src/themes/monowhite/24/write_eeprom.png differ
diff --git a/companion/src/themes/monowhite/24/write_eeprom_file.png b/companion/src/themes/monowhite/24/write_eeprom_file.png
index 2401be1a2..7cb6182bb 100644
Binary files a/companion/src/themes/monowhite/24/write_eeprom_file.png and b/companion/src/themes/monowhite/24/write_eeprom_file.png differ
diff --git a/companion/src/themes/monowhite/24/write_flash.png b/companion/src/themes/monowhite/24/write_flash.png
index dc0ba7db2..9103fc23e 100644
Binary files a/companion/src/themes/monowhite/24/write_flash.png and b/companion/src/themes/monowhite/24/write_flash.png differ
diff --git a/companion/src/themes/monowhite/32/add.png b/companion/src/themes/monowhite/32/add.png
index cea176a31..13447d37e 100644
Binary files a/companion/src/themes/monowhite/32/add.png and b/companion/src/themes/monowhite/32/add.png differ
diff --git a/companion/src/themes/monowhite/32/arrow-left.png b/companion/src/themes/monowhite/32/arrow-left.png
index 48deb7182..060c33ea9 100644
Binary files a/companion/src/themes/monowhite/32/arrow-left.png and b/companion/src/themes/monowhite/32/arrow-left.png differ
diff --git a/companion/src/themes/monowhite/32/arrow-right.png b/companion/src/themes/monowhite/32/arrow-right.png
index 3e6566edb..0375c2026 100644
Binary files a/companion/src/themes/monowhite/32/arrow-right.png and b/companion/src/themes/monowhite/32/arrow-right.png differ
diff --git a/companion/src/themes/monowhite/32/changelog.png b/companion/src/themes/monowhite/32/changelog.png
index 397a99c2c..e547df71e 100644
Binary files a/companion/src/themes/monowhite/32/changelog.png and b/companion/src/themes/monowhite/32/changelog.png differ
diff --git a/companion/src/themes/monowhite/32/clear.png b/companion/src/themes/monowhite/32/clear.png
index ac0931302..9449dfe4f 100644
Binary files a/companion/src/themes/monowhite/32/clear.png and b/companion/src/themes/monowhite/32/clear.png differ
diff --git a/companion/src/themes/monowhite/32/compare.png b/companion/src/themes/monowhite/32/compare.png
index 415091a75..90cec9602 100644
Binary files a/companion/src/themes/monowhite/32/compare.png and b/companion/src/themes/monowhite/32/compare.png differ
diff --git a/companion/src/themes/monowhite/32/configure.png b/companion/src/themes/monowhite/32/configure.png
index 9f32d1d02..3ba9a08b4 100644
Binary files a/companion/src/themes/monowhite/32/configure.png and b/companion/src/themes/monowhite/32/configure.png differ
diff --git a/companion/src/themes/monowhite/32/contributors.png b/companion/src/themes/monowhite/32/contributors.png
index 89fbf7950..c9cd49ff1 100644
Binary files a/companion/src/themes/monowhite/32/contributors.png and b/companion/src/themes/monowhite/32/contributors.png differ
diff --git a/companion/src/themes/monowhite/32/copy.png b/companion/src/themes/monowhite/32/copy.png
index 837b2365d..5499776ec 100644
Binary files a/companion/src/themes/monowhite/32/copy.png and b/companion/src/themes/monowhite/32/copy.png differ
diff --git a/companion/src/themes/monowhite/32/currentmodel.png b/companion/src/themes/monowhite/32/currentmodel.png
index 89af84e37..9868bfdf2 100644
Binary files a/companion/src/themes/monowhite/32/currentmodel.png and b/companion/src/themes/monowhite/32/currentmodel.png differ
diff --git a/companion/src/themes/monowhite/32/cut.png b/companion/src/themes/monowhite/32/cut.png
index c67cdbc05..985993e04 100644
Binary files a/companion/src/themes/monowhite/32/cut.png and b/companion/src/themes/monowhite/32/cut.png differ
diff --git a/companion/src/themes/monowhite/32/duplicate.png b/companion/src/themes/monowhite/32/duplicate.png
index 5bbda5fa9..2484c87a7 100644
Binary files a/companion/src/themes/monowhite/32/duplicate.png and b/companion/src/themes/monowhite/32/duplicate.png differ
diff --git a/companion/src/themes/monowhite/32/edit.png b/companion/src/themes/monowhite/32/edit.png
index 8076a8794..c5b4d36f5 100644
Binary files a/companion/src/themes/monowhite/32/edit.png and b/companion/src/themes/monowhite/32/edit.png differ
diff --git a/companion/src/themes/monowhite/32/exit.png b/companion/src/themes/monowhite/32/exit.png
index 47e97403a..bc7b0b16f 100644
Binary files a/companion/src/themes/monowhite/32/exit.png and b/companion/src/themes/monowhite/32/exit.png differ
diff --git a/companion/src/themes/monowhite/32/fuses.png b/companion/src/themes/monowhite/32/fuses.png
index 9df1d5ff4..940fc2c91 100644
Binary files a/companion/src/themes/monowhite/32/fuses.png and b/companion/src/themes/monowhite/32/fuses.png differ
diff --git a/companion/src/themes/monowhite/32/information.png b/companion/src/themes/monowhite/32/information.png
index 04344bd26..ac1591066 100644
Binary files a/companion/src/themes/monowhite/32/information.png and b/companion/src/themes/monowhite/32/information.png differ
diff --git a/companion/src/themes/monowhite/32/library.png b/companion/src/themes/monowhite/32/library.png
index a7b1a1e61..bec53f490 100644
Binary files a/companion/src/themes/monowhite/32/library.png and b/companion/src/themes/monowhite/32/library.png differ
diff --git a/companion/src/themes/monowhite/32/list.png b/companion/src/themes/monowhite/32/list.png
index b88fb9322..ba08fe0be 100644
Binary files a/companion/src/themes/monowhite/32/list.png and b/companion/src/themes/monowhite/32/list.png differ
diff --git a/companion/src/themes/monowhite/32/logs.png b/companion/src/themes/monowhite/32/logs.png
index 6a67d1060..a234b09cf 100644
Binary files a/companion/src/themes/monowhite/32/logs.png and b/companion/src/themes/monowhite/32/logs.png differ
diff --git a/companion/src/themes/monowhite/32/movedown.png b/companion/src/themes/monowhite/32/movedown.png
index 89429747d..0f8c0c6fe 100644
Binary files a/companion/src/themes/monowhite/32/movedown.png and b/companion/src/themes/monowhite/32/movedown.png differ
diff --git a/companion/src/themes/monowhite/32/moveup.png b/companion/src/themes/monowhite/32/moveup.png
index a241f0d7f..adeb2f651 100644
Binary files a/companion/src/themes/monowhite/32/moveup.png and b/companion/src/themes/monowhite/32/moveup.png differ
diff --git a/companion/src/themes/monowhite/32/new.png b/companion/src/themes/monowhite/32/new.png
index 5f70d2256..324d274c3 100644
Binary files a/companion/src/themes/monowhite/32/new.png and b/companion/src/themes/monowhite/32/new.png differ
diff --git a/companion/src/themes/monowhite/32/open.png b/companion/src/themes/monowhite/32/open.png
index 36416d017..3ae76d223 100644
Binary files a/companion/src/themes/monowhite/32/open.png and b/companion/src/themes/monowhite/32/open.png differ
diff --git a/companion/src/themes/monowhite/32/paintbrush.png b/companion/src/themes/monowhite/32/paintbrush.png
index 62cefc607..04e19c28a 100644
Binary files a/companion/src/themes/monowhite/32/paintbrush.png and b/companion/src/themes/monowhite/32/paintbrush.png differ
diff --git a/companion/src/themes/monowhite/32/paste.png b/companion/src/themes/monowhite/32/paste.png
index 1a38652de..c1c049a28 100644
Binary files a/companion/src/themes/monowhite/32/paste.png and b/companion/src/themes/monowhite/32/paste.png differ
diff --git a/companion/src/themes/monowhite/32/play.png b/companion/src/themes/monowhite/32/play.png
index 6e56f6766..c42949fab 100644
Binary files a/companion/src/themes/monowhite/32/play.png and b/companion/src/themes/monowhite/32/play.png differ
diff --git a/companion/src/themes/monowhite/32/preferences.png b/companion/src/themes/monowhite/32/preferences.png
index 2fc0fcada..d6134a847 100644
Binary files a/companion/src/themes/monowhite/32/preferences.png and b/companion/src/themes/monowhite/32/preferences.png differ
diff --git a/companion/src/themes/monowhite/32/print.png b/companion/src/themes/monowhite/32/print.png
index 95a8e23bd..b7cc71425 100644
Binary files a/companion/src/themes/monowhite/32/print.png and b/companion/src/themes/monowhite/32/print.png differ
diff --git a/companion/src/themes/monowhite/32/profiles.png b/companion/src/themes/monowhite/32/profiles.png
index 1a2317540..49aa0f929 100644
Binary files a/companion/src/themes/monowhite/32/profiles.png and b/companion/src/themes/monowhite/32/profiles.png differ
diff --git a/companion/src/themes/monowhite/32/read_eeprom.png b/companion/src/themes/monowhite/32/read_eeprom.png
index b5f4060f1..926fa49ac 100644
Binary files a/companion/src/themes/monowhite/32/read_eeprom.png and b/companion/src/themes/monowhite/32/read_eeprom.png differ
diff --git a/companion/src/themes/monowhite/32/read_eeprom_file.png b/companion/src/themes/monowhite/32/read_eeprom_file.png
index 85d75a31d..ce28b5565 100644
Binary files a/companion/src/themes/monowhite/32/read_eeprom_file.png and b/companion/src/themes/monowhite/32/read_eeprom_file.png differ
diff --git a/companion/src/themes/monowhite/32/read_flash.png b/companion/src/themes/monowhite/32/read_flash.png
index af4186962..4fb96674a 100644
Binary files a/companion/src/themes/monowhite/32/read_flash.png and b/companion/src/themes/monowhite/32/read_flash.png differ
diff --git a/companion/src/themes/monowhite/32/recentdocument.png b/companion/src/themes/monowhite/32/recentdocument.png
index 4a4f21252..c44509b05 100644
Binary files a/companion/src/themes/monowhite/32/recentdocument.png and b/companion/src/themes/monowhite/32/recentdocument.png differ
diff --git a/companion/src/themes/monowhite/32/save.png b/companion/src/themes/monowhite/32/save.png
index 461af833d..166b9a40c 100644
Binary files a/companion/src/themes/monowhite/32/save.png and b/companion/src/themes/monowhite/32/save.png differ
diff --git a/companion/src/themes/monowhite/32/saveas.png b/companion/src/themes/monowhite/32/saveas.png
index cf56da9b6..aea4d8850 100644
Binary files a/companion/src/themes/monowhite/32/saveas.png and b/companion/src/themes/monowhite/32/saveas.png differ
diff --git a/companion/src/themes/monowhite/32/simulate.png b/companion/src/themes/monowhite/32/simulate.png
index 9fe222a8a..de935c6a5 100644
Binary files a/companion/src/themes/monowhite/32/simulate.png and b/companion/src/themes/monowhite/32/simulate.png differ
diff --git a/companion/src/themes/monowhite/32/stop.png b/companion/src/themes/monowhite/32/stop.png
index 4feabacb9..b529d5cc0 100644
Binary files a/companion/src/themes/monowhite/32/stop.png and b/companion/src/themes/monowhite/32/stop.png differ
diff --git a/companion/src/themes/monowhite/32/update.png b/companion/src/themes/monowhite/32/update.png
index 88e4c4638..9c7fcee0e 100644
Binary files a/companion/src/themes/monowhite/32/update.png and b/companion/src/themes/monowhite/32/update.png differ
diff --git a/companion/src/themes/monowhite/32/wizard.png b/companion/src/themes/monowhite/32/wizard.png
index a9cfa82e9..732b57421 100644
Binary files a/companion/src/themes/monowhite/32/wizard.png and b/companion/src/themes/monowhite/32/wizard.png differ
diff --git a/companion/src/themes/monowhite/32/write_eeprom.png b/companion/src/themes/monowhite/32/write_eeprom.png
index 0dc5c1f57..b07c6e03f 100644
Binary files a/companion/src/themes/monowhite/32/write_eeprom.png and b/companion/src/themes/monowhite/32/write_eeprom.png differ
diff --git a/companion/src/themes/monowhite/32/write_eeprom_file.png b/companion/src/themes/monowhite/32/write_eeprom_file.png
index 9dfe9a116..192df62e7 100644
Binary files a/companion/src/themes/monowhite/32/write_eeprom_file.png and b/companion/src/themes/monowhite/32/write_eeprom_file.png differ
diff --git a/companion/src/themes/monowhite/32/write_flash.png b/companion/src/themes/monowhite/32/write_flash.png
index 4d8d752ea..eeba1bc9c 100644
Binary files a/companion/src/themes/monowhite/32/write_flash.png and b/companion/src/themes/monowhite/32/write_flash.png differ
diff --git a/companion/src/themes/monowhite/48/add.png b/companion/src/themes/monowhite/48/add.png
index 827d7b244..cc8812cf4 100644
Binary files a/companion/src/themes/monowhite/48/add.png and b/companion/src/themes/monowhite/48/add.png differ
diff --git a/companion/src/themes/monowhite/48/arrow-left.png b/companion/src/themes/monowhite/48/arrow-left.png
index e4220b5dd..b571db825 100644
Binary files a/companion/src/themes/monowhite/48/arrow-left.png and b/companion/src/themes/monowhite/48/arrow-left.png differ
diff --git a/companion/src/themes/monowhite/48/arrow-right.png b/companion/src/themes/monowhite/48/arrow-right.png
index 52b41558c..233997acf 100644
Binary files a/companion/src/themes/monowhite/48/arrow-right.png and b/companion/src/themes/monowhite/48/arrow-right.png differ
diff --git a/companion/src/themes/monowhite/48/changelog.png b/companion/src/themes/monowhite/48/changelog.png
index c9e897edb..454dd7ad0 100644
Binary files a/companion/src/themes/monowhite/48/changelog.png and b/companion/src/themes/monowhite/48/changelog.png differ
diff --git a/companion/src/themes/monowhite/48/clear.png b/companion/src/themes/monowhite/48/clear.png
index 5ff3688e2..e09993be5 100644
Binary files a/companion/src/themes/monowhite/48/clear.png and b/companion/src/themes/monowhite/48/clear.png differ
diff --git a/companion/src/themes/monowhite/48/compare.png b/companion/src/themes/monowhite/48/compare.png
index 87e99c8c5..6f07fcc8a 100644
Binary files a/companion/src/themes/monowhite/48/compare.png and b/companion/src/themes/monowhite/48/compare.png differ
diff --git a/companion/src/themes/monowhite/48/configure.png b/companion/src/themes/monowhite/48/configure.png
index 6ace3af19..f4ba9449f 100644
Binary files a/companion/src/themes/monowhite/48/configure.png and b/companion/src/themes/monowhite/48/configure.png differ
diff --git a/companion/src/themes/monowhite/48/contributors.png b/companion/src/themes/monowhite/48/contributors.png
index ab347bfb7..4c59eaeef 100644
Binary files a/companion/src/themes/monowhite/48/contributors.png and b/companion/src/themes/monowhite/48/contributors.png differ
diff --git a/companion/src/themes/monowhite/48/copy.png b/companion/src/themes/monowhite/48/copy.png
index dd08c322b..f2f6d533b 100644
Binary files a/companion/src/themes/monowhite/48/copy.png and b/companion/src/themes/monowhite/48/copy.png differ
diff --git a/companion/src/themes/monowhite/48/currentmodel.png b/companion/src/themes/monowhite/48/currentmodel.png
index 9c5e3a5ee..7002db951 100644
Binary files a/companion/src/themes/monowhite/48/currentmodel.png and b/companion/src/themes/monowhite/48/currentmodel.png differ
diff --git a/companion/src/themes/monowhite/48/cut.png b/companion/src/themes/monowhite/48/cut.png
index b81fb0d9d..34462d12d 100644
Binary files a/companion/src/themes/monowhite/48/cut.png and b/companion/src/themes/monowhite/48/cut.png differ
diff --git a/companion/src/themes/monowhite/48/duplicate.png b/companion/src/themes/monowhite/48/duplicate.png
index a5f716f82..44c8fe5cd 100644
Binary files a/companion/src/themes/monowhite/48/duplicate.png and b/companion/src/themes/monowhite/48/duplicate.png differ
diff --git a/companion/src/themes/monowhite/48/edit.png b/companion/src/themes/monowhite/48/edit.png
index c318f72b6..4fa0accd5 100644
Binary files a/companion/src/themes/monowhite/48/edit.png and b/companion/src/themes/monowhite/48/edit.png differ
diff --git a/companion/src/themes/monowhite/48/exit.png b/companion/src/themes/monowhite/48/exit.png
index e0f7e38fe..2b4be6230 100644
Binary files a/companion/src/themes/monowhite/48/exit.png and b/companion/src/themes/monowhite/48/exit.png differ
diff --git a/companion/src/themes/monowhite/48/fuses.png b/companion/src/themes/monowhite/48/fuses.png
index 37ad3a434..c246f6c02 100644
Binary files a/companion/src/themes/monowhite/48/fuses.png and b/companion/src/themes/monowhite/48/fuses.png differ
diff --git a/companion/src/themes/monowhite/48/information.png b/companion/src/themes/monowhite/48/information.png
index dfc2f154f..90b518899 100644
Binary files a/companion/src/themes/monowhite/48/information.png and b/companion/src/themes/monowhite/48/information.png differ
diff --git a/companion/src/themes/monowhite/48/library.png b/companion/src/themes/monowhite/48/library.png
index 5d363913a..35b42d937 100644
Binary files a/companion/src/themes/monowhite/48/library.png and b/companion/src/themes/monowhite/48/library.png differ
diff --git a/companion/src/themes/monowhite/48/list.png b/companion/src/themes/monowhite/48/list.png
index 1f516f5fd..e603c79da 100644
Binary files a/companion/src/themes/monowhite/48/list.png and b/companion/src/themes/monowhite/48/list.png differ
diff --git a/companion/src/themes/monowhite/48/logs.png b/companion/src/themes/monowhite/48/logs.png
index 12e4dad65..300d7c774 100644
Binary files a/companion/src/themes/monowhite/48/logs.png and b/companion/src/themes/monowhite/48/logs.png differ
diff --git a/companion/src/themes/monowhite/48/movedown.png b/companion/src/themes/monowhite/48/movedown.png
index fcf443163..0b7a36667 100644
Binary files a/companion/src/themes/monowhite/48/movedown.png and b/companion/src/themes/monowhite/48/movedown.png differ
diff --git a/companion/src/themes/monowhite/48/moveup.png b/companion/src/themes/monowhite/48/moveup.png
index 937bb7d5e..f219acca8 100644
Binary files a/companion/src/themes/monowhite/48/moveup.png and b/companion/src/themes/monowhite/48/moveup.png differ
diff --git a/companion/src/themes/monowhite/48/new.png b/companion/src/themes/monowhite/48/new.png
index f5ddb9077..d5c749528 100644
Binary files a/companion/src/themes/monowhite/48/new.png and b/companion/src/themes/monowhite/48/new.png differ
diff --git a/companion/src/themes/monowhite/48/open.png b/companion/src/themes/monowhite/48/open.png
index 2e705e8f0..a06e13571 100644
Binary files a/companion/src/themes/monowhite/48/open.png and b/companion/src/themes/monowhite/48/open.png differ
diff --git a/companion/src/themes/monowhite/48/paintbrush.png b/companion/src/themes/monowhite/48/paintbrush.png
index 8d73a2df3..186cc1768 100644
Binary files a/companion/src/themes/monowhite/48/paintbrush.png and b/companion/src/themes/monowhite/48/paintbrush.png differ
diff --git a/companion/src/themes/monowhite/48/paste.png b/companion/src/themes/monowhite/48/paste.png
index f10703657..d912c3963 100644
Binary files a/companion/src/themes/monowhite/48/paste.png and b/companion/src/themes/monowhite/48/paste.png differ
diff --git a/companion/src/themes/monowhite/48/play.png b/companion/src/themes/monowhite/48/play.png
index 8f5a7f6bd..fb1ee191f 100644
Binary files a/companion/src/themes/monowhite/48/play.png and b/companion/src/themes/monowhite/48/play.png differ
diff --git a/companion/src/themes/monowhite/48/preferences.png b/companion/src/themes/monowhite/48/preferences.png
index 67221199e..f0d8136c0 100644
Binary files a/companion/src/themes/monowhite/48/preferences.png and b/companion/src/themes/monowhite/48/preferences.png differ
diff --git a/companion/src/themes/monowhite/48/print.png b/companion/src/themes/monowhite/48/print.png
index 0a82c819b..37c2d1185 100644
Binary files a/companion/src/themes/monowhite/48/print.png and b/companion/src/themes/monowhite/48/print.png differ
diff --git a/companion/src/themes/monowhite/48/profiles.png b/companion/src/themes/monowhite/48/profiles.png
index 520c7def6..781f883d2 100644
Binary files a/companion/src/themes/monowhite/48/profiles.png and b/companion/src/themes/monowhite/48/profiles.png differ
diff --git a/companion/src/themes/monowhite/48/read_eeprom.png b/companion/src/themes/monowhite/48/read_eeprom.png
index 2c919f049..85ede191e 100644
Binary files a/companion/src/themes/monowhite/48/read_eeprom.png and b/companion/src/themes/monowhite/48/read_eeprom.png differ
diff --git a/companion/src/themes/monowhite/48/read_eeprom_file.png b/companion/src/themes/monowhite/48/read_eeprom_file.png
index dc05a30e3..e85724d00 100644
Binary files a/companion/src/themes/monowhite/48/read_eeprom_file.png and b/companion/src/themes/monowhite/48/read_eeprom_file.png differ
diff --git a/companion/src/themes/monowhite/48/read_flash.png b/companion/src/themes/monowhite/48/read_flash.png
index 39ffc14fa..d9fc13673 100644
Binary files a/companion/src/themes/monowhite/48/read_flash.png and b/companion/src/themes/monowhite/48/read_flash.png differ
diff --git a/companion/src/themes/monowhite/48/recentdocument.png b/companion/src/themes/monowhite/48/recentdocument.png
index 4390a48a7..90c3b1e1d 100644
Binary files a/companion/src/themes/monowhite/48/recentdocument.png and b/companion/src/themes/monowhite/48/recentdocument.png differ
diff --git a/companion/src/themes/monowhite/48/save.png b/companion/src/themes/monowhite/48/save.png
index b6d380085..e29b45ab3 100644
Binary files a/companion/src/themes/monowhite/48/save.png and b/companion/src/themes/monowhite/48/save.png differ
diff --git a/companion/src/themes/monowhite/48/saveas.png b/companion/src/themes/monowhite/48/saveas.png
index 94fccbe10..cb5c738ad 100644
Binary files a/companion/src/themes/monowhite/48/saveas.png and b/companion/src/themes/monowhite/48/saveas.png differ
diff --git a/companion/src/themes/monowhite/48/simulate.png b/companion/src/themes/monowhite/48/simulate.png
index 9f448daef..c5ebb9504 100644
Binary files a/companion/src/themes/monowhite/48/simulate.png and b/companion/src/themes/monowhite/48/simulate.png differ
diff --git a/companion/src/themes/monowhite/48/stop.png b/companion/src/themes/monowhite/48/stop.png
index 7818a3d4c..028180e0f 100644
Binary files a/companion/src/themes/monowhite/48/stop.png and b/companion/src/themes/monowhite/48/stop.png differ
diff --git a/companion/src/themes/monowhite/48/update.png b/companion/src/themes/monowhite/48/update.png
index 29eacea07..1368d4b4d 100644
Binary files a/companion/src/themes/monowhite/48/update.png and b/companion/src/themes/monowhite/48/update.png differ
diff --git a/companion/src/themes/monowhite/48/wizard.png b/companion/src/themes/monowhite/48/wizard.png
index 7a61ffae7..17e476414 100644
Binary files a/companion/src/themes/monowhite/48/wizard.png and b/companion/src/themes/monowhite/48/wizard.png differ
diff --git a/companion/src/themes/monowhite/48/write_eeprom.png b/companion/src/themes/monowhite/48/write_eeprom.png
index 1563c9de3..b406ca98a 100644
Binary files a/companion/src/themes/monowhite/48/write_eeprom.png and b/companion/src/themes/monowhite/48/write_eeprom.png differ
diff --git a/companion/src/themes/monowhite/48/write_eeprom_file.png b/companion/src/themes/monowhite/48/write_eeprom_file.png
index 9ae0c19c7..d22daf82f 100644
Binary files a/companion/src/themes/monowhite/48/write_eeprom_file.png and b/companion/src/themes/monowhite/48/write_eeprom_file.png differ
diff --git a/companion/src/themes/monowhite/48/write_flash.png b/companion/src/themes/monowhite/48/write_flash.png
index d66faf613..0c4594941 100644
Binary files a/companion/src/themes/monowhite/48/write_flash.png and b/companion/src/themes/monowhite/48/write_flash.png differ
diff --git a/radio/src/.gitignore b/radio/src/.gitignore
index 31c048a1d..0f2d1136d 100644
--- a/radio/src/.gitignore
+++ b/radio/src/.gitignore
@@ -6,3 +6,4 @@
/opentx.map
/simu.d
/snapshot_*.png
+/*.sh
diff --git a/radio/src/eeprom_conversions.cpp b/radio/src/eeprom_conversions.cpp
index 24d4bb3a5..b78db9acb 100644
--- a/radio/src/eeprom_conversions.cpp
+++ b/radio/src/eeprom_conversions.cpp
@@ -193,6 +193,21 @@ void ConvertGeneralSettings_215_to_216(EEGeneral &settings)
settings.version = 216;
}
+#if defined(PCBTARANIS)
+int ConvertSwitch_215_to_216(int swtch)
+{
+ if (swtch < SWSRC_ON)
+ return swtch;
+ else
+ return swtch + (2*6); // 2 * 6-pos pots added as switches
+}
+#else
+inline int ConvertSwitch_215_to_216(int swtch)
+{
+ return swtch;
+}
+#endif
+
void ConvertModel_215_to_216(ModelData &model)
{
// Virtual inputs added instead of Expo/DR
@@ -204,6 +219,7 @@ void ConvertModel_215_to_216(ModelData &model)
// Custom Switches: better precision for x when A comes from telemetry
// Main View: altitude in top bar
// Mixes: GVARS in weight moved from 512 to 4096 and -512 to -4096, because GVARS may be used in limits [-1250:1250]
+ // Switches: two 6-pos pots added
TRACE("Model conversion from v215 to v216");
@@ -237,7 +253,7 @@ void ConvertModel_215_to_216(ModelData &model)
g_model.mixData[i].phases = oldModel.mixData[i].phases;
g_model.mixData[i].mltpx = oldModel.mixData[i].mltpx;
g_model.mixData[i].weight = oldModel.mixData[i].weight;
- g_model.mixData[i].swtch = oldModel.mixData[i].swtch;
+ g_model.mixData[i].swtch = ConvertSwitch_215_to_216(oldModel.mixData[i].swtch);
if (oldModel.mixData[i].curveMode==0/*differential*/) {
g_model.mixData[i].curve.type = CURVE_REF_DIFF;
g_model.mixData[i].curve.value = oldModel.mixData[i].curveParam;
@@ -297,7 +313,7 @@ void ConvertModel_215_to_216(ModelData &model)
}
g_model.expoData[i].srcRaw = MIXSRC_Rud+chn;
g_model.expoData[i].chn = chn;
- g_model.expoData[i].swtch = oldModel.expoData[i].swtch;
+ g_model.expoData[i].swtch = ConvertSwitch_215_to_216(oldModel.expoData[i].swtch);
g_model.expoData[i].phases = oldModel.expoData[i].phases;
g_model.expoData[i].weight = oldModel.expoData[i].weight;
memcpy(&g_model.expoData[i].name, &oldModel.expoData[i].name, LEN_EXPOMIX_NAME);
diff --git a/radio/src/gtests.cpp b/radio/src/gtests.cpp
index 2b8d8f2e8..fe6cb1a0a 100644
--- a/radio/src/gtests.cpp
+++ b/radio/src/gtests.cpp
@@ -295,8 +295,8 @@ TEST(FrSkySPORT, checkCrc)
TEST(getSwitch, undefCSW)
{
MODEL_RESET();
- EXPECT_EQ(getSwitch(MAX_PSWITCH), false);
- EXPECT_EQ(getSwitch(-MAX_PSWITCH), true); // no good answer there!
+ EXPECT_EQ(getSwitch(NUM_PSWITCH), false);
+ EXPECT_EQ(getSwitch(-NUM_PSWITCH), true); // no good answer there!
}
#endif
diff --git a/radio/src/gui/menu_general.cpp b/radio/src/gui/menu_general.cpp
index ba165de4c..e422861fd 100644
--- a/radio/src/gui/menu_general.cpp
+++ b/radio/src/gui/menu_general.cpp
@@ -1168,6 +1168,8 @@ void menuGeneralDiagAna(uint8_t event)
#if defined(PCBTARANIS)
enum menuGeneralHwItems {
+ ITEM_SETUP_HW_POT1,
+ ITEM_SETUP_HW_POT2,
ITEM_SETUP_HW_UART3_MODE,
ITEM_SETUP_HW_MAX
};
@@ -1181,9 +1183,22 @@ void menuGeneralHardware(uint8_t event)
uint8_t sub = m_posVert - 1;
for (uint8_t i=0; i0) ? BLINK|INVERS : INVERS) : 0);
+ uint8_t y = 1 + 1*FH + i*FH;
+ uint8_t attr = (sub == i ? ((s_editMode>0) ? BLINK|INVERS : INVERS) : 0);
switch(i) {
+ case ITEM_SETUP_HW_POT1:
+ case ITEM_SETUP_HW_POT2:
+ {
+ int idx = i - ITEM_SETUP_HW_POT1;
+ uint8_t mask = (1<> idx, 0, 1, attr, event);
+ if (potType)
+ g_eeGeneral.potsType |= mask;
+ else
+ g_eeGeneral.potsType &= ~mask;
+ break;
+ }
+
case ITEM_SETUP_HW_UART3_MODE:
g_eeGeneral.hw_uartMode = selectMenuItem(HW_SETTINGS_COLUMN, y, STR_UART3MODE, STR_UART3MODES, g_eeGeneral.hw_uartMode, 0, 2, attr, event);
break;
@@ -1265,19 +1280,48 @@ void menuGeneralHardware(uint8_t event)
}
#endif
+#define XPOT_DELTA 5
void menuCommonCalib(uint8_t event)
{
- for (uint8_t i=0; i= NUM_STICKS && i < NUM_STICKS+NUM_POTS-2) {
-#else
- if (i >= NUM_STICKS) {
-#endif
+ if (i >= POT1 && i <= POT_LAST) {
reusableBuffer.calib.midVals[i] = (reusableBuffer.calib.hiVals[i] + reusableBuffer.calib.loVals[i]) / 2;
+#if defined(PCBTARANIS)
+ uint8_t idx = i - POT1;
+ int count = reusableBuffer.calib.xpotsCalib[idx].stepsCount;
+ if (IS_MULTIPOS_POT(i) && count <= POTS_POS_COUNT) {
+ 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].lastCount = 1;
+ }
+ else {
+ if (reusableBuffer.calib.xpotsCalib[idx].lastCount < 255) reusableBuffer.calib.xpotsCalib[idx].lastCount++;
+ }
+ if (reusableBuffer.calib.xpotsCalib[idx].lastCount == 8/*80ms*/) {
+ int16_t position = reusableBuffer.calib.xpotsCalib[idx].lastPosition;
+ bool found = false;
+ for (int j=0; j= reusableBuffer.calib.xpotsCalib[idx].steps[j]-XPOT_DELTA && position <= reusableBuffer.calib.xpotsCalib[idx].steps[j]+XPOT_DELTA) {
+ found = true;
+ break;
+ }
+ }
+ if (!found) {
+ if (count < POTS_POS_COUNT) {
+ reusableBuffer.calib.xpotsCalib[idx].steps[count] = position;
+ }
+ else {
+ g_eeGeneral.potsType &= !(1<50) {
- g_eeGeneral.calibMid[i] = reusableBuffer.calib.midVals[i];
+ if (abs(reusableBuffer.calib.loVals[i]-reusableBuffer.calib.hiVals[i]) > 50) {
+ g_eeGeneral.calib[i].mid = reusableBuffer.calib.midVals[i];
int16_t v = reusableBuffer.calib.midVals[i] - reusableBuffer.calib.loVals[i];
- g_eeGeneral.calibSpanNeg[i] = v - v/STICK_TOLERANCE;
+ g_eeGeneral.calib[i].spanNeg = v - v/STICK_TOLERANCE;
v = reusableBuffer.calib.hiVals[i] - reusableBuffer.calib.midVals[i];
- g_eeGeneral.calibSpanPos[i] = v - v/STICK_TOLERANCE;
+ g_eeGeneral.calib[i].spanPos = v - v/STICK_TOLERANCE;
}
}
break;
case 3:
+#if defined(PCBTARANIS)
+ for (uint8_t i=POT1; i<=POT_LAST; i++) {
+ int idx = i - POT1;
+ int count = reusableBuffer.calib.xpotsCalib[idx].stepsCount;
+ if (IS_MULTIPOS_POT(i) && count > 1 && count <= POTS_POS_COUNT) {
+ for (int j=0; jcount = count - 1;
+ for (int j=0; jcount; j++) {
+ calib->steps[j] = (reusableBuffer.calib.xpotsCalib[idx].steps[j+1] + reusableBuffer.calib.xpotsCalib[idx].steps[j]) >> 5;
+ }
+ }
+ }
+#endif
g_eeGeneral.chkSum = evalChkSum();
eeDirty(EE_GENERAL);
reusableBuffer.calib.state = 4;
@@ -1343,8 +1413,22 @@ void menuCommonCalib(uint8_t event)
}
doMainScreenGraphics();
+
#if defined(PCBTARANIS)
drawPotsBars();
+ for (int i=POT1; i<=POT_LAST; i++) {
+ uint8_t steps = 0;
+ if (reusableBuffer.calib.state == 2) {
+ steps = reusableBuffer.calib.xpotsCalib[i-POT1].stepsCount;
+ }
+ else if (IS_MULTIPOS_POT(i)) {
+ StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[i];
+ steps = calib->count + 1;
+ }
+ if (steps > 0 && steps <= POTS_POS_COUNT) {
+ lcd_outdezAtt(LCD_W/2-2+(i-POT1)*5, LCD_H-6, steps, TINSIZE);
+ }
+ }
#endif
}
diff --git a/radio/src/gui/menu_model.cpp b/radio/src/gui/menu_model.cpp
index 2954cc5d8..55f61707f 100644
--- a/radio/src/gui/menu_model.cpp
+++ b/radio/src/gui/menu_model.cpp
@@ -1060,7 +1060,7 @@ void menuModelSetup(uint8_t event)
div_t qr = div(timer->start, 60);
switch (m_posHorz) {
case 0:
- CHECK_INCDEC_MODELVAR(event, timer->mode, -2*(MAX_PSWITCH+NUM_CSW), TMR_VAROFS-1+2*(MAX_PSWITCH+NUM_CSW));
+ CHECK_INCDEC_MODELVAR(event, timer->mode, -2*(NUM_PSWITCH+NUM_CSW), TMR_VAROFS-1+2*(NUM_PSWITCH+NUM_CSW));
break;
case 1:
CHECK_INCDEC_MODELVAR_ZERO(event, qr.quot, 59);
@@ -1840,7 +1840,7 @@ void menuModelFlightModesAll(uint8_t event)
}
else {
putsSwitches((5+LEN_FP_NAME)*FW+FW/2, y, p->swtch, attr);
- if (active) CHECK_INCDEC_MODELSWITCH(event, p->swtch, -MAX_SWITCH, MAX_SWITCH);
+ if (active) CHECK_INCDEC_MODELSWITCH(event, p->swtch, -NUM_SWITCH, NUM_SWITCH);
}
break;
@@ -4297,7 +4297,7 @@ void menuModelCustomSwitchOne(uint8_t event)
case CSW_FIELD_ANDSW:
lcd_putsLeft(y, STR_AND_SWITCH);
putsSwitches(CSWONE_2ND_COLUMN, y, cs->andsw, attr);
- if (attr) CHECK_INCDEC_MODELVAR(event, cs->andsw, -MAX_SWITCH, MAX_SWITCH);
+ if (attr) CHECK_INCDEC_MODELVAR(event, cs->andsw, -NUM_SWITCH, NUM_SWITCH);
break;
case CSW_FIELD_DURATION:
lcd_putsLeft(y, STR_DURATION);
diff --git a/radio/src/gui/menus.cpp b/radio/src/gui/menus.cpp
index 5580a998d..9277f05b3 100644
--- a/radio/src/gui/menus.cpp
+++ b/radio/src/gui/menus.cpp
@@ -232,13 +232,13 @@ int16_t checkIncDec(uint8_t event, int16_t val, int16_t i_min, int16_t i_max, ui
if (event == EVT_KEY_LONG(KEY_ENTER) && i_max > SWSRC_ON) {
s_editMode = !s_editMode;
if (newval > SWSRC_ON)
- newval -= (MAX_SWITCH+1);
+ newval -= (NUM_SWITCH+1);
else if (newval > 0)
- newval += (MAX_SWITCH+1);
+ newval += (NUM_SWITCH+1);
else if (newval < SWSRC_OFF)
- newval += (MAX_SWITCH+1);
+ newval += (NUM_SWITCH+1);
else if (newval < 0)
- newval -= (MAX_SWITCH+1);
+ newval -= (NUM_SWITCH+1);
}
}
#endif
@@ -976,7 +976,7 @@ int8_t switchMenuItem(uint8_t x, uint8_t y, int8_t value, LcdFlags attr, uint8_t
{
lcd_putsColumnLeft(x, y, STR_SWITCH);
putsSwitches(x, y, value, attr);
- if (attr) CHECK_INCDEC_MODELSWITCH(event, value, -MAX_SWITCH, MAX_SWITCH);
+ if (attr) CHECK_INCDEC_MODELSWITCH(event, value, -NUM_SWITCH, NUM_SWITCH);
return value;
}
@@ -1263,7 +1263,20 @@ bool isSwitchAvailable(int16_t swtch)
swtch = -swtch;
}
- if (swtch>=SWSRC_FIRST_CSW && swtch<=SWSRC_LAST_CSW) {
+#if defined(PCBTARANIS)
+ if (swtch >= SWSRC_P11 && swtch <= SWSRC_P26) {
+ int index = (swtch - SWSRC_P11) / POTS_POS_COUNT;
+ if (g_eeGeneral.potsType & (1<count >= ((swtch - SWSRC_P11) % POTS_POS_COUNT));
+ }
+ else {
+ return false;
+ }
+ }
+#endif
+
+ if (swtch >= SWSRC_FIRST_CSW && swtch <= SWSRC_LAST_CSW) {
CustomSwData * cs = cswAddress(swtch-SWSRC_FIRST_CSW);
return (cs->func != CS_OFF);
}
diff --git a/radio/src/gui/view_main.cpp b/radio/src/gui/view_main.cpp
index 6855ab618..93c6e0dfa 100644
--- a/radio/src/gui/view_main.cpp
+++ b/radio/src/gui/view_main.cpp
@@ -120,9 +120,9 @@
void drawPotsBars()
{
// Optimization by Mike Blandford
- uint8_t x, y, len ; // declare temporary variables
- for (x=LCD_W/2-5, y=NUM_STICKS; y= TMR_VAROFS+MAX_PSWITCH+NUM_CSW) {
+ if (mode >= TMR_VAROFS+NUM_PSWITCH+NUM_CSW) {
mode++;
}
diff --git a/radio/src/myeeprom.h b/radio/src/myeeprom.h
index d91b0d507..0a0eaffcf 100644
--- a/radio/src/myeeprom.h
+++ b/radio/src/myeeprom.h
@@ -221,7 +221,7 @@ enum BeeperMode {
};
#if defined(CPUARM)
- #define EXTRA_GENERAL_FIELDS \
+ #define EXTRA_GENERAL_FIELDS_ARM \
uint8_t backlightBright; \
int8_t currentCalib; \
int8_t temperatureWarn; \
@@ -239,8 +239,16 @@ enum BeeperMode {
int8_t beepVolume; \
int8_t wavVolume; \
int8_t varioVolume; \
- int8_t backgroundVolume; \
- uint8_t hw_uartMode;
+ int8_t backgroundVolume;
+#endif
+
+#if defined(PCBTARANIS)
+#define EXTRA_GENERAL_FIELDS \
+ EXTRA_GENERAL_FIELDS_ARM \
+ uint8_t hw_uartMode; \
+ uint8_t potsType;
+#elif defined(CPUARM)
+ #define EXTRA_GENERAL_FIELDS EXTRA_GENERAL_FIELDS_ARM
#elif defined(PXX)
#define EXTRA_GENERAL_FIELDS uint8_t countryCode;
#else
@@ -304,13 +312,25 @@ enum BacklightMode {
#define SPLASH_MODE uint8_t splashMode:1; uint8_t spare4:2
#endif
+#if defined(PCBTARANIS)
+#define POTS_POS_COUNT 6
+PACK(typedef struct {
+ uint8_t count;
+ uint8_t steps[POTS_POS_COUNT-1];
+}) StepsCalibData;
+#endif
+
+PACK(typedef struct {
+ int16_t mid;
+ int16_t spanNeg;
+ int16_t spanPos;
+}) CalibData;
+
#define ALTERNATE_VIEW 0x10
PACK(typedef struct t_EEGeneral {
uint8_t version;
uint16_t variant;
- int16_t calibMid[NUM_STICKS+NUM_POTS];
- int16_t calibSpanNeg[NUM_STICKS+NUM_POTS];
- int16_t calibSpanPos[NUM_STICKS+NUM_POTS];
+ CalibData calib[NUM_STICKS+NUM_POTS];
uint16_t chkSum;
int8_t currModel;
uint8_t contrast;
@@ -640,7 +660,7 @@ PACK( union u_int8int16_t {
#if defined(CPUARM)
#define MAX_CSW_DURATION 120 /*60s*/
#define MAX_CSW_DELAY 120 /*60s*/
-#define MAX_CSW_ANDSW MAX_SWITCH
+#define MAX_CSW_ANDSW NUM_SWITCH
typedef int16_t csw_telemetry_value_t;
PACK(typedef struct t_CustomSwData { // Custom Switches data
int16_t v1;
@@ -1143,6 +1163,8 @@ enum SwitchSources {
#endif
SWSRC_FIRST_CSW,
+ SWSRC_LAST_SWITCH = SWSRC_FIRST_CSW-1,
+
SWSRC_SW1 = SWSRC_FIRST_CSW,
SWSRC_SW2,
SWSRC_SW3,
@@ -1157,10 +1179,17 @@ enum SwitchSources {
SWSRC_SWC,
SWSRC_LAST_CSW = SWSRC_SW1+NUM_CSW-1,
+#if defined(PCBTARANIS)
+ SWSRC_P11,
+ SWSRC_P16 = SWSRC_P11+5,
+ SWSRC_P21,
+ SWSRC_P26 = SWSRC_P21+5,
+#endif
+
SWSRC_ON,
SWSRC_FIRST_MOMENT_SWITCH,
- SWSRC_LAST_MOMENT_SWITCH = SWSRC_FIRST_MOMENT_SWITCH+SWSRC_ON-1,
+ SWSRC_LAST_MOMENT_SWITCH = SWSRC_FIRST_MOMENT_SWITCH+SWSRC_LAST_CSW,
#if !defined(PCBSTD)
SWSRC_TRAINER_SHORT,
diff --git a/radio/src/opentx.cpp b/radio/src/opentx.cpp
index 80df58ebd..b1d0ef3b0 100644
--- a/radio/src/opentx.cpp
+++ b/radio/src/opentx.cpp
@@ -503,7 +503,7 @@ void generalDefault()
uint16_t evalChkSum()
{
uint16_t sum = 0;
- const int16_t *calibValues = &g_eeGeneral.calibMid[0];
+ const int16_t *calibValues = (const int16_t *) &g_eeGeneral.calib[0];
for (int i=0; icount>0 && calib->countcount);
+ uint8_t previousPos = potsPos[i] >> 4;
+ if (pos != previousPos) {
+ potsLastposStart[i] = get_tmr10ms();
+ potsPos[i] = (pos << 4) | (potsPos[i] & 0x0f);
+ }
+ else if ((tmr10ms_t)(get_tmr10ms() - potsLastposStart[i]) > DELAY_SWITCH_3POS) {
+ potsLastposStart[i] = 0;
+ potsPos[i] = (pos << 4) | (pos);
+ }
+ }
+ }
+ }
+#endif
}
+#define SWITCH_POSITION(sw) (switchesPos & (1<<(sw)))
+#define POT_POSITION(sw) ((potsPos[(sw)/POTS_POS_COUNT] & 0x0f) == ((sw) % POTS_POS_COUNT))
#else
-#define get3POSSwitchesPosition()
+#define getSwitchesPosition()
+#define SWITCH_POSITION(idx) switchState((EnumKeys)(SW_BASE+(idx)))
#endif
int16_t csLastValue[NUM_CSW];
@@ -1360,15 +1384,16 @@ bool getSwitch(int8_t swtch)
if (cs_idx == SWSRC_ON) {
result = true;
}
- else if (cs_idx <= MAX_PSWITCH) {
-#if defined(PCBTARANIS)
- result = SWITCH_POSITION(cs_idx-SWSRC_SA0);
-#else
- result = switchState((EnumKeys)(SW_BASE+cs_idx-1));
-#endif
+ else if (cs_idx <= SWSRC_LAST_SWITCH) {
+ result = SWITCH_POSITION(cs_idx-SWSRC_FIRST_SWITCH);
}
+#if defined(PCBTARANIS)
+ else if (cs_idx >= SWSRC_P11 && cs_idx <= SWSRC_P26) {
+ result = POT_POSITION(cs_idx-SWSRC_P11);
+ }
+#endif
else {
- cs_idx -= MAX_PSWITCH+1;
+ cs_idx -= SWSRC_FIRST_CSW;
GETSWITCH_RECURSIVE_TYPE mask = ((GETSWITCH_RECURSIVE_TYPE)1 << cs_idx);
if (s_last_switch_used & mask) {
@@ -1552,7 +1577,7 @@ int8_t getMovedSwitch()
}
}
#else
- for (uint8_t i=MAX_PSWITCH; i>0; i--) {
+ for (uint8_t i=NUM_PSWITCH; i>0; i--) {
bool prev;
swstate_t mask = 0;
if (i <= 3) {
@@ -1564,7 +1589,7 @@ int8_t getMovedSwitch()
}
bool next = getSwitch(i);
if (prev != next) {
- if (i!=MAX_PSWITCH || next==true)
+ if (i!=NUM_PSWITCH || next==true)
result = next ? i : -i;
if (mask)
switches_states ^= mask;
@@ -2148,8 +2173,9 @@ void checkTHR()
int16_t lowLim = THRCHK_DEADBAND - 1024 ;
#else
getADC(); // if thr is down - do not display warning at all
- int16_t lowLim = g_eeGeneral.calibMid[thrchn];
- lowLim = (g_model.throttleReversed ? - lowLim - g_eeGeneral.calibSpanPos[thrchn] : lowLim - g_eeGeneral.calibSpanNeg[thrchn]);
+ CalibData * calib = &g_eeGeneral.calib[thrchn];
+ int16_t lowLim = calib->mid;
+ lowLim = (g_model.throttleReversed ? - lowLim - calib->spanPos : lowLim - calib->spanNeg);
lowLim += THRCHK_DEADBAND;
#endif
int16_t v = thrAnaIn(thrchn);
@@ -2214,7 +2240,7 @@ void checkSwitches()
}
#else
uint8_t x = 2;
- for (uint8_t i=1; i2?(i+1):1+((states>>1)&0x3)), attr);
if (i == 1 && attr) i++;
@@ -2483,10 +2509,29 @@ void getADC()
for (uint32_t x=0; x> 3;
+ uint16_t v = temp[x] >> 3;
+#if defined(PCBTARANIS)
+ if (s_noScroll) v = temp[x] >> 1;
+ StepsCalibData * calib = (StepsCalibData *) &g_eeGeneral.calib[x];
+ if (IS_MULTIPOS_POT(x) && calib->count>0 && calib->count> 4);
+ s_anaFilt[x] = 2*RESX;
+ for (int i=0; icount; i++) {
+ if (vShifted < calib->steps[i]) {
+ s_anaFilt[x] = i*2*RESX/calib->count;
+ break;
+ }
+ }
+ }
+ else
+#endif
+ s_anaFilt[x] = v;
}
}
#else
@@ -2734,10 +2779,14 @@ void evalInputs(uint8_t mode)
#ifndef SIMU
if (i < NUM_STICKS+NUM_POTS) {
- v -= g_eeGeneral.calibMid[i];
- v = v * (int32_t)RESX / (max((int16_t)100,(v>0 ?
- g_eeGeneral.calibSpanPos[i] :
- g_eeGeneral.calibSpanNeg[i])));
+ if (IS_MULTIPOS_POT(i)) {
+ v -= RESX;
+ }
+ else {
+ CalibData * calib = &g_eeGeneral.calib[i];
+ v -= calib->mid;
+ v = v * (int32_t)RESX / (max((int16_t)100, (v>0 ? calib->spanPos : calib->spanNeg)));
+ }
}
#endif
@@ -3063,13 +3112,13 @@ void evalFunctions()
#endif
- if (swtch > MAX_SWITCH+1) {
+ if (swtch > NUM_SWITCH+1) {
momentary = 1;
- swtch -= MAX_SWITCH+1;
+ swtch -= NUM_SWITCH+1;
}
- if (swtch < -MAX_SWITCH-1) {
+ if (swtch < -NUM_SWITCH-1) {
momentary = 1;
- swtch += MAX_SWITCH+1;
+ swtch += NUM_SWITCH+1;
}
bool active = getSwitch(swtch);
@@ -3697,10 +3746,10 @@ void doMixerCalculations()
// therefore forget the exact calculation and use only 1 instead; good compromise
lastTMR = tmr10ms;
- get3POSSwitchesPosition();
-
getADC();
+ getSwitchesPosition();
+
#if defined(PCBSKY9X) && !defined(REVA) && !defined(SIMU)
Current_analogue = (Current_analogue*31 + s_anaFilt[8] ) >> 5 ;
if (Current_analogue > Current_max)
@@ -3884,9 +3933,9 @@ void doMixerCalculations()
timerState->sum+=val;
}
- if (atm>=(TMR_VAROFS+MAX_SWITCH)){ // toggeled switch
+ if (atm>=(TMR_VAROFS+NUM_SWITCH)){ // toggeled switch
if(!(timerState->toggled | timerState->sum | timerState->cnt | timerState->lastPos)) { timerState->lastPos = tm < 0; timerState->sum = 1; } // if initializing then init the lastPos
- uint8_t swPos = getSwitch(tm>0 ? tm-(TMR_VAROFS+MAX_SWITCH-1) : tm+MAX_SWITCH);
+ uint8_t swPos = getSwitch(tm>0 ? tm-(TMR_VAROFS+NUM_SWITCH-1) : tm+NUM_SWITCH);
if (swPos && !timerState->lastPos) timerState->toggled = !timerState->toggled; // if switch is flipped first time -> change counter state
timerState->lastPos = swPos;
}
@@ -3923,7 +3972,7 @@ void doMixerCalculations()
newTimerVal++;
}
else {
- if (atm<(TMR_VAROFS+MAX_SWITCH))
+ if (atm<(TMR_VAROFS+NUM_SWITCH))
timerState->toggled = tm>0 ? getSwitch(tm-(TMR_VAROFS-1)) : !getSwitch(-tm); // normal switch
if (timerState->toggled)
newTimerVal++;
diff --git a/radio/src/opentx.h b/radio/src/opentx.h
index 9c9ea12c3..981d360bd 100644
--- a/radio/src/opentx.h
+++ b/radio/src/opentx.h
@@ -376,8 +376,8 @@ enum EnumKeys {
#if defined(PCBTARANIS)
#define NUM_SWITCHES 8
#define IS_3POS(sw) ((sw) != 5 && (sw) != 7)
- #define MAX_PSWITCH (SW_SH2-SW_SA0+1)
#define NUM_POTS 4
+ #define NUM_XPOTS 2
#define NUM_SW_SRCRAW 8
#define SWSRC_THR SWSRC_SF2
#define SWSRC_GEA SWSRC_SG2
@@ -389,27 +389,35 @@ enum EnumKeys {
#define NUM_SWITCHES 7
#define IS_3POS(sw) ((sw) == 0)
#define IS_MOMENTARY(sw) (sw == SWSRC_TRN)
- #define MAX_PSWITCH (SW_TRN-SW_ID0+1) // 9 physical switches
#define NUM_POTS 3
+ #define NUM_XPOTS 0
#define NUM_SW_SRCRAW 1
#define SW_DSM2_BIND SW_TRN
#endif
-#define MAX_SWITCH (MAX_PSWITCH+NUM_CSW)
+#define NUM_PSWITCH (SWSRC_LAST_SWITCH-SWSRC_FIRST_SWITCH+1)
+#define NUM_POTSSW (NUM_XPOTS*6)
+#define NUM_SWITCH (NUM_PSWITCH+NUM_CSW+NUM_POTSSW)
#if defined(PCBTARANIS)
-#define KEY_RIGHT KEY_PLUS
-#define KEY_LEFT KEY_MINUS
-#define KEY_UP KEY_PLUS
-#define KEY_DOWN KEY_MINUS
+ #define KEY_RIGHT KEY_PLUS
+ #define KEY_LEFT KEY_MINUS
+ #define KEY_UP KEY_PLUS
+ #define KEY_DOWN KEY_MINUS
#else
-#define KEY_ENTER KEY_MENU
-#define KEY_PLUS KEY_RIGHT
-#define KEY_MINUS KEY_LEFT
+ #define KEY_ENTER KEY_MENU
+ #define KEY_PLUS KEY_RIGHT
+ #define KEY_MINUS KEY_LEFT
#endif
#include "myeeprom.h"
+#if defined(PCBTARANIS)
+ #define IS_MULTIPOS_POT(x) ((x)>=POT1 && (x)<=POT_LAST && (g_eeGeneral.potsType & (1 << ((x)-POT1))))
+#else
+ #define IS_MULTIPOS_POT(x) (false)
+#endif
+
#if ROTARY_ENCODERS > 0
#define IF_ROTARY_ENCODERS(x) x,
#else
@@ -1041,12 +1049,14 @@ enum Analogs {
#if defined(PCBTARANIS)
POT1,
POT2,
+ POT_LAST = POT2,
SLIDER1,
SLIDER2,
#else
POT1,
POT2,
POT3,
+ POT_LAST = POT3,
#endif
TX_VOLTAGE,
#if defined(PCBSKY9X) && !defined(REVA)
@@ -1094,6 +1104,7 @@ template FORCEINLINE t min(t a, t b) { return a FORCEINLINE t max(t a, t b) { return a>b?a:b; }
template FORCEINLINE t sgn(t a) { return a>0 ? 1 : (a < 0 ? -1 : 0); }
template FORCEINLINE t limit(t mi, t x, t ma) { return min(max(mi,x),ma); }
+template void swap(t & a, t & b) { t tmp = b; b = a; a = tmp; }
#if defined(HELI) || defined(FRSKY_HUB)
uint16_t isqrt32(uint32_t n);
@@ -1564,6 +1575,14 @@ union ReusableBuffer
int16_t loVals[NUM_STICKS+NUM_POTS];
int16_t hiVals[NUM_STICKS+NUM_POTS];
uint8_t state;
+#if defined(PCBTARANIS)
+ struct {
+ uint8_t stepsCount;
+ int16_t steps[POTS_POS_COUNT];
+ uint8_t lastCount;
+ int16_t lastPosition;
+ } xpotsCalib[NUM_XPOTS];
+#endif
} calib;
#if defined(SDCARD)
diff --git a/radio/src/translations.cpp b/radio/src/translations.cpp
index f031ba40b..de37b6ee2 100644
--- a/radio/src/translations.cpp
+++ b/radio/src/translations.cpp
@@ -57,6 +57,7 @@ const pm_char STR_OPEN9X[] PROGMEM =
ISTR(TRNCHN)
#if defined(PCBTARANIS)
ISTR(UART3MODES)
+ ISTR(POTTYPES)
#endif
ISTR(VTRIMINC)
ISTR(RETA123)
@@ -496,6 +497,8 @@ const pm_char STR_VIEW_TEXT[] PROGMEM = "View text";
const pm_char STR_VIEW_CHANNELS[] PROGMEM = "View Channels";
const pm_char STR_VIEW_NOTES[] PROGMEM = "View Notes";
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
#if MENUS_LOCK == 1
diff --git a/radio/src/translations.h b/radio/src/translations.h
index 0c7f7af19..794c6b342 100644
--- a/radio/src/translations.h
+++ b/radio/src/translations.h
@@ -100,10 +100,11 @@ extern const pm_char STR_OPEN9X[];
#endif
#define OFS_TRNCHN (OFS_TRNMODE + sizeof(TR_TRNMODE))
#if defined(PCBTARANIS)
-#define OFS_UART3MODES (OFS_TRNCHN + sizeof(TR_TRNCHN))
-#define OFS_VTRIMINC (OFS_UART3MODES + sizeof(TR_UART3MODES))
+ #define OFS_UART3MODES (OFS_TRNCHN + sizeof(TR_TRNCHN))
+ #define OFS_POTTYPES (OFS_UART3MODES + sizeof(TR_UART3MODES))
+ #define OFS_VTRIMINC (OFS_POTTYPES + sizeof(TR_POTTYPES))
#else
-#define OFS_VTRIMINC (OFS_TRNCHN + sizeof(TR_TRNCHN))
+ #define OFS_VTRIMINC (OFS_TRNCHN + sizeof(TR_TRNCHN))
#endif
#define OFS_RETA123 (OFS_VTRIMINC + sizeof(TR_VTRIMINC))
#define OFS_VPROTOS (OFS_RETA123 + sizeof(TR_RETA123))
@@ -196,6 +197,7 @@ extern const pm_char STR_OPEN9X[];
#define STR_TRNMODE (STR_OPEN9X + OFS_TRNMODE)
#define STR_TRNCHN (STR_OPEN9X + OFS_TRNCHN)
#define STR_UART3MODES (STR_OPEN9X + OFS_UART3MODES)
+#define STR_POTTYPES (STR_OPEN9X + OFS_POTTYPES)
#define STR_VTRIMINC (STR_OPEN9X + OFS_VTRIMINC)
#define STR_RETA123 (STR_OPEN9X + OFS_RETA123)
#define STR_VPROTOS (STR_OPEN9X + OFS_VPROTOS)
@@ -683,6 +685,8 @@ extern const pm_char STR_VIEW_TEXT[];
extern const pm_char STR_VIEW_CHANNELS[];
extern const pm_char STR_VIEW_NOTES[];
extern const pm_char STR_UART3MODE[];
+ extern const pm_char STR_POT1TYPE[];
+ extern const pm_char STR_POT2TYPE[];
#endif
#if MENUS_LOCK == 1
diff --git a/radio/src/translations/cz.h.txt b/radio/src/translations/cz.h.txt
index f99387065..1fabbcc80 100644
--- a/radio/src/translations/cz.h.txt
+++ b/radio/src/translations/cz.h.txt
@@ -331,7 +331,8 @@
#endif
#if defined(PCBTARANIS)
- #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_CUSTOMSW "*1 "
+ #define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
+ #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_CUSTOMSW TR_6POS_POTS "*1 "
#else
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_CUSTOMSW "*1 "
#endif
diff --git a/radio/src/translations/de.h.txt b/radio/src/translations/de.h.txt
index e5b10c4db..45355f3f4 100644
--- a/radio/src/translations/de.h.txt
+++ b/radio/src/translations/de.h.txt
@@ -71,6 +71,9 @@
#define LEN_UART3MODES "\017"
#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART"
+#define LEN_POTTYPES "\017"
+#define TR_POTTYPES "Pot\0 ""Multipos Switch"
+
#define LEN_DATETIME "\005"
#define TR_DATETIME "DATE:""ZEIT:"
@@ -331,7 +334,8 @@
#endif
#if defined(PCBTARANIS)
- #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_CUSTOMSW "ONE"
+ #define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
+ #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_CUSTOMSW TR_6POS_POTS "ONE"
#else
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_CUSTOMSW "ONE"
#endif
@@ -679,6 +683,8 @@
#define TR_PERSISTENT_MAH INDENT "Store mAh"
#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"
#if defined(MAVLINK)
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
diff --git a/radio/src/translations/en.h b/radio/src/translations/en.h
index 9339ce7df..1c9054538 100644
--- a/radio/src/translations/en.h
+++ b/radio/src/translations/en.h
@@ -71,6 +71,9 @@
#define LEN_UART3MODES "\017"
#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART"
+#define LEN_POTTYPES "\017"
+#define TR_POTTYPES "Pot\0 ""Multipos Switch"
+
#define LEN_DATETIME "\005"
#define TR_DATETIME "DATE:""TIME:"
@@ -331,7 +334,8 @@
#endif
#if defined(PCBTARANIS)
- #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_CUSTOMSW "One"
+ #define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
+ #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_CUSTOMSW TR_6POS_POTS "One"
#else
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_CUSTOMSW "One"
#endif
@@ -679,6 +683,8 @@
#define TR_PERSISTENT_MAH INDENT "Store mAh"
#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"
#if defined(MAVLINK)
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
diff --git a/radio/src/translations/es.h.txt b/radio/src/translations/es.h.txt
index bc4cf77fc..65108e25f 100644
--- a/radio/src/translations/es.h.txt
+++ b/radio/src/translations/es.h.txt
@@ -1,4 +1,4 @@
-/*
+/*
* Authors (alphabetical order)
* - Bertrand Songis
* - Bernet Andre
@@ -71,6 +71,9 @@
#define LEN_UART3MODES "\017"
#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART"
+#define LEN_POTTYPES "\017"
+#define TR_POTTYPES "Pot\0 ""Multipos Switch"
+
#define LEN_DATETIME "\005"
#define TR_DATETIME "DATA:""HORA:"
@@ -331,7 +334,8 @@
#endif
#if defined(PCBTARANIS)
- #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_CUSTOMSW "Uno"
+ #define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
+ #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_CUSTOMSW TR_6POS_POTS "Uno"
#else
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "ACE""DIR""ELE""ALE""GEA""TRN" TR_CUSTOMSW "Uno"
#endif
@@ -679,6 +683,8 @@
#define TR_PERSISTENT_MAH INDENT "Valor mAh"
#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"
#if defined(MAVLINK)
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
diff --git a/radio/src/translations/fr.h.txt b/radio/src/translations/fr.h.txt
index ac546bc96..09c7f0854 100644
--- a/radio/src/translations/fr.h.txt
+++ b/radio/src/translations/fr.h.txt
@@ -1,4 +1,4 @@
-/*
+/*
* Authors (alphabetical order)
* - Bertrand Songis
* - Bernet Andre
@@ -71,6 +71,9 @@
#define LEN_UART3MODES "\017"
#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART"
+#define LEN_POTTYPES "\017"
+#define TR_POTTYPES "Pot\0 ""Multipos Switch"
+
#define LEN_DATETIME "\005"
#define TR_DATETIME "DATE:""HEURE"
@@ -331,7 +334,8 @@
#endif
#if defined(PCBTARANIS)
- #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_CUSTOMSW "1*\0"
+ #define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
+ #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_CUSTOMSW TR_6POS_POTS "1*\0"
#else
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_CUSTOMSW "1*\0"
#endif
@@ -679,6 +683,8 @@
#define TR_PERSISTENT_MAH TR(INDENT "Enr. mAh",INDENT "Enregistrer mAh")
#define TR_FAS_OFFSET TR(INDENT "Corr FAS", INDENT "Correction FAS")
#define TR_UART3MODE "Port série"
+#define TR_POT1TYPE "S1 Type"
+#define TR_POT2TYPE "S2 Type"
#if defined(MAVLINK)
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "RSSI Max"
diff --git a/radio/src/translations/it.h.txt b/radio/src/translations/it.h.txt
index 7e5183ecf..4326c226f 100644
--- a/radio/src/translations/it.h.txt
+++ b/radio/src/translations/it.h.txt
@@ -71,14 +71,17 @@
#define LEN_UART3MODES "\017"
#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART"
+#define LEN_POTTYPES "\017"
+#define TR_POTTYPES "Pot\0 ""Multipos Switch"
+
#define LEN_DATETIME "\005"
#define TR_DATETIME "DATA:""ORA :"
#define LEN_VLCD "\006"
#define TR_VLCD "NormalOptrex"
-#define LEN_COUNTRYCODES TR("\002", "\007")
-#define TR_COUNTRYCODES TR("US""JP""EU", "America""Japan\0 ""Europe\0")
+#define LEN_COUNTRYCODES TR("\002", "\007")
+#define TR_COUNTRYCODES TR("US""JP""EU", "America""Japan\0 ""Europe\0")
#define LEN_VTRIMINC "\006"
#define TR_VTRIMINC "Exp ""ExFine""Fine ""Medio ""Ampio "
@@ -331,7 +334,8 @@
#endif
#if defined(PCBTARANIS)
- #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_CUSTOMSW "One"
+ #define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
+ #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_CUSTOMSW TR_6POS_POTS "1*\0"
#else
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_CUSTOMSW "One"
#endif
@@ -679,6 +683,8 @@
#define TR_PERSISTENT_MAH INDENT "Store mAh"
#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"
#if defined(MAVLINK)
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
diff --git a/radio/src/translations/pl.h.txt b/radio/src/translations/pl.h.txt
index c012bb207..f04d171cf 100644
--- a/radio/src/translations/pl.h.txt
+++ b/radio/src/translations/pl.h.txt
@@ -331,7 +331,8 @@
#endif
#if defined(PCBTARANIS)
- #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_CUSTOMSW " * "
+ #define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
+ #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_CUSTOMSW TR_6POS_POTS " * "
#else
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "GAZ""SK ""LOT""SW ""GEA""TRN" TR_CUSTOMSW " * "
#endif
diff --git a/radio/src/translations/pt.h.txt b/radio/src/translations/pt.h.txt
index eeb98b1ef..33e9d16fe 100644
--- a/radio/src/translations/pt.h.txt
+++ b/radio/src/translations/pt.h.txt
@@ -71,6 +71,9 @@
#define LEN_UART3MODES "\017"
#define TR_UART3MODES "OFF\0 ""SPORT Mirror\0 ""Virtual SP2UART"
+#define LEN_POTTYPES "\017"
+#define TR_POTTYPES "Pot\0 ""Multipos Switch"
+
#define LEN_DATETIME "\005"
#define TR_DATETIME "DATA:""HORA:"
@@ -331,7 +334,8 @@
#endif
#if defined(PCBTARANIS)
- #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_CUSTOMSW "1*\0"
+ #define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
+ #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_CUSTOMSW TR_6POS_POTS "1*\0"
#else
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_CUSTOMSW "1*\0"
#endif
@@ -679,6 +683,8 @@
#define TR_PERSISTENT_MAH INDENT "Store mAh"
#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"
#if defined(MAVLINK)
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"
diff --git a/radio/src/translations/se.h.txt b/radio/src/translations/se.h.txt
index fe453f4ff..ad1277001 100644
--- a/radio/src/translations/se.h.txt
+++ b/radio/src/translations/se.h.txt
@@ -71,6 +71,9 @@
#define LEN_UART3MODES "\017"
#define TR_UART3MODES "Av\0 ""SPORT-spegel\0 ""VirtuellSP2UART"
+#define LEN_POTTYPES "\017"
+#define TR_POTTYPES "Pot\0 ""Multipos Switch"
+
#define LEN_DATETIME "\005"
#define TR_DATETIME "DAG: ""TID: "
@@ -331,7 +334,8 @@
#endif
#if defined(PCBTARANIS)
- #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_CUSTOMSW "One"
+ #define TR_6POS_POTS "P11""P12""P13""P14""P15""P16""P21""P22""P23""P24""P25""P26"
+ #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_CUSTOMSW TR_6POS_POTS "One"
#else
#define TR_VSWITCHES TR_9X_3POS_SWITCHES "THR""RUD""ELE""AIL""GEA""TRN" TR_CUSTOMSW "One"
#endif
@@ -679,6 +683,8 @@
#define TR_PERSISTENT_MAH INDENT "Store mAh"
#define TR_FAS_OFFSET TR(INDENT "FAS Ofs", INDENT "FAS Offset")
#define TR_UART3MODE "Serieport"
+#define TR_POT1TYPE "S1 Type"
+#define TR_POT2TYPE "S2 Type"
#if defined(MAVLINK)
#define TR_MAVLINK_RC_RSSI_SCALE_LABEL "Max RSSI"