From 2fcd2edfc2263fab865fd3b09ab5346defd83a0f Mon Sep 17 00:00:00 2001 From: 3djc Date: Fri, 8 Nov 2019 08:41:08 +0100 Subject: [PATCH 1/6] Stop sensor discovery when table is already full (#7062) --- radio/src/gui/128x64/model_telemetry.cpp | 1 + radio/src/gui/212x64/model_telemetry.cpp | 1 + radio/src/gui/480x272/model_telemetry.cpp | 1 + 3 files changed, 3 insertions(+) diff --git a/radio/src/gui/128x64/model_telemetry.cpp b/radio/src/gui/128x64/model_telemetry.cpp index 289c73bba..12617e855 100644 --- a/radio/src/gui/128x64/model_telemetry.cpp +++ b/radio/src/gui/128x64/model_telemetry.cpp @@ -214,6 +214,7 @@ void menuModelTelemetry(event_t event) pushMenu(menuModelSensor); } else { + allowNewSensors = 0; POPUP_WARNING(STR_TELEMETRYFULL); } } diff --git a/radio/src/gui/212x64/model_telemetry.cpp b/radio/src/gui/212x64/model_telemetry.cpp index ab170895f..1f5223640 100644 --- a/radio/src/gui/212x64/model_telemetry.cpp +++ b/radio/src/gui/212x64/model_telemetry.cpp @@ -205,6 +205,7 @@ void menuModelTelemetry(event_t event) pushMenu(menuModelSensor); } else { + allowNewSensors = 0; POPUP_WARNING(STR_TELEMETRYFULL); } } diff --git a/radio/src/gui/480x272/model_telemetry.cpp b/radio/src/gui/480x272/model_telemetry.cpp index 06bc82f92..6bcf4ed20 100644 --- a/radio/src/gui/480x272/model_telemetry.cpp +++ b/radio/src/gui/480x272/model_telemetry.cpp @@ -195,6 +195,7 @@ bool menuModelTelemetry(event_t event) pushMenu(menuModelSensor); } else { + allowNewSensors = 0; POPUP_WARNING(STR_TELEMETRYFULL); } } From bb460089313544776759c179486c4307bb318967 Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Fri, 8 Nov 2019 09:23:44 +0100 Subject: [PATCH 2/6] Fixes #7059 Fixes #5264 --- radio/src/gui/480x272/zone.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/src/gui/480x272/zone.h b/radio/src/gui/480x272/zone.h index 196749522..2f3243d40 100644 --- a/radio/src/gui/480x272/zone.h +++ b/radio/src/gui/480x272/zone.h @@ -27,7 +27,7 @@ union ZoneOptionValue { uint32_t unsignedValue; int32_t signedValue; - bool boolValue; + uint32_t boolValue; char stringValue[LEN_ZONE_OPTION_STRING]; }; From 4bf5e8d6fc7ad92a282228283c5f5e2f58e95d6d Mon Sep 17 00:00:00 2001 From: 3djc Date: Fri, 8 Nov 2019 10:40:47 +0100 Subject: [PATCH 3/6] Fix PPM module max chanel number. This fixes #7057 --- companion/src/modeledit/setup.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/companion/src/modeledit/setup.cpp b/companion/src/modeledit/setup.cpp index 271dcd8b6..c996bc374 100644 --- a/companion/src/modeledit/setup.cpp +++ b/companion/src/modeledit/setup.cpp @@ -381,6 +381,7 @@ int ModulePanel::getMaxChannelCount() case PULSES_PXX_XJT_X16: case PULSES_CROSSFIRE: case PULSES_SBUS: + case PULSES_PPM: return 16; case PULSES_XJT_LITE_LR12: case PULSES_PXX_XJT_LR12: @@ -388,7 +389,6 @@ int ModulePanel::getMaxChannelCount() case PULSES_PXX_DJT: case PULSES_XJT_LITE_D8: case PULSES_PXX_XJT_D8: - case PULSES_PPM: return 8; case PULSES_LP45: case PULSES_DSM2: From 0dd8422f31eec9ed409ebe9b78ad89e6f5e11bf4 Mon Sep 17 00:00:00 2001 From: 3djc Date: Fri, 8 Nov 2019 18:14:46 +0100 Subject: [PATCH 4/6] Fix screenshot for x9d 2019 simu --- companion/src/companion.qrc | 1 + companion/src/simulation/simulateduiwidgetX9D2019.cpp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/companion/src/companion.qrc b/companion/src/companion.qrc index 32ace6a12..f91782c50 100644 --- a/companion/src/companion.qrc +++ b/companion/src/companion.qrc @@ -137,6 +137,7 @@ images/simulator/X9E/right_enter.png images/simulator/X9E/top.png images/simulator/X9D2019/bottom.png + images/simulator/X9D2019/bottom_scrnshot.png images/simulator/X9D2019/left.png images/simulator/X9D2019/left_exit.png images/simulator/X9D2019/left_menu.png diff --git a/companion/src/simulation/simulateduiwidgetX9D2019.cpp b/companion/src/simulation/simulateduiwidgetX9D2019.cpp index 828a946b8..414ba891b 100644 --- a/companion/src/simulation/simulateduiwidgetX9D2019.cpp +++ b/companion/src/simulation/simulateduiwidgetX9D2019.cpp @@ -51,7 +51,7 @@ SimulatedUIWidgetX9D2019::SimulatedUIWidgetX9D2019(SimulatorInterface *simulator m_mouseMidClickAction = new RadioUiAction(2, QList() << Qt::Key_Enter << Qt::Key_Return, SIMU_STR_HLP_KEYS_ACTIVATE, SIMU_STR_HLP_ACT_ROT_DN); addRadioWidget(ui->rightbuttons->addArea(QRect(40, 30, 80, 130), "X9D2019/right_enter.png", m_mouseMidClickAction)); - addRadioWidget(ui->leftbuttons->addArea(QRect(10, 170, 30, 30), "X9D2019/left_scrnshot.png", m_screenshotAction)); + addRadioWidget(ui->bottom->addArea(QRect(10, 5, 30, 30), "X9D2019/bottom_scrnshot.png", m_screenshotAction)); m_backlightColors << QColor(47, 123, 227); // Taranis Blue m_backlightColors << QColor(166,247,159); From 50008f9f8b6c9895f1be7557941f1022fdde9b5f Mon Sep 17 00:00:00 2001 From: Stefan Hezinger <47187139+SHezinger@users.noreply.github.com> Date: Fri, 8 Nov 2019 18:21:48 +0100 Subject: [PATCH 5/6] ui needs changes too --- companion/src/simulation/simulateduiwidgetX9D2019.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/companion/src/simulation/simulateduiwidgetX9D2019.ui b/companion/src/simulation/simulateduiwidgetX9D2019.ui index 4333f50ca..44a146b75 100644 --- a/companion/src/simulation/simulateduiwidgetX9D2019.ui +++ b/companion/src/simulation/simulateduiwidgetX9D2019.ui @@ -127,7 +127,7 @@ - + 0 From 356a39e01016a4b1341493afeb67a0779b84a85a Mon Sep 17 00:00:00 2001 From: Bertrand Songis Date: Fri, 8 Nov 2019 19:26:56 +0100 Subject: [PATCH 6/6] Simu switches fix --- radio/src/simu.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/radio/src/simu.cpp b/radio/src/simu.cpp index 78784e7ba..80ad85e80 100644 --- a/radio/src/simu.cpp +++ b/radio/src/simu.cpp @@ -303,20 +303,20 @@ void OpenTxSim::updateKeysAndSwitches(bool start) #define SWITCH_KEY(key, swtch, states) \ static bool state##key = 0; \ - static int8_t state_##swtch = 2; \ - static int8_t inc_##swtch = 1; \ + static int8_t state_##swtch = -1; \ + static int8_t inc_##swtch = 4-states; \ if (getApp()->getKeyState(KEY_##key)) { \ if (!state##key) { \ state_##swtch = (state_##swtch+inc_##swtch); \ - if (state_##swtch == 1+states) inc_##swtch = -1; \ - else if (state_##swtch == 2) inc_##swtch = 1; \ + if (state_##swtch == -1+((states-1)*inc_##swtch)) inc_##swtch = -4+states; \ + else if (state_##swtch == -1) inc_##swtch = 4-states; \ state##key = true; \ } \ } \ else { \ state##key = false; \ } \ - simuSetSwitch(swtch, state_##swtch-states) + simuSetSwitch(swtch, state_##swtch) \ #if defined(PCBSKY9X) SWITCH_KEY(1, 0, 3);