1
0
Fork 0
mirror of https://github.com/EdgeTX/edgetx.git synced 2025-07-24 00:35:14 +03:00

[Companion] Refactoring - fixes the X9E=>X7 conversion segfault

This commit is contained in:
Bertrand Songis 2017-01-24 20:08:48 +01:00
parent 8f970fdbbf
commit 57aafeb062
19 changed files with 289 additions and 208 deletions

View file

@ -413,7 +413,7 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, const GeneralSettin
}
for (int i=getCurrentFirmware()->getCapability(MultiposPots)-1; i>=0; i--) {
if (generalSettings.potConfig[i] == GeneralSettings::POT_MULTIPOS_SWITCH) {
if (generalSettings.potConfig[i] == POT_MULTIPOS_SWITCH) {
for (int j=-getCurrentFirmware()->getCapability(MultiposPotsPositions); j<0; j++) {
item = RawSwitch(SWITCH_TYPE_MULTIPOS_POT, -i*getCurrentFirmware()->getCapability(MultiposPotsPositions)+j);
b->addItem(item.toString(), item.toValue());
@ -454,7 +454,7 @@ void populateSwitchCB(QComboBox *b, const RawSwitch & value, const GeneralSettin
}
for (int i=0; i<getCurrentFirmware()->getCapability(MultiposPots); i++) {
if (generalSettings.potConfig[i] == GeneralSettings::POT_MULTIPOS_SWITCH) {
if (generalSettings.potConfig[i] == POT_MULTIPOS_SWITCH) {
for (int j=1; j<=getCurrentFirmware()->getCapability(MultiposPotsPositions); j++) {
item = RawSwitch(SWITCH_TYPE_MULTIPOS_POT, i*getCurrentFirmware()->getCapability(MultiposPotsPositions)+j);
b->addItem(item.toString(), item.toValue());