diff --git a/companion/src/eeprominterface.cpp b/companion/src/eeprominterface.cpp index 2e9e44422..7234a1155 100644 --- a/companion/src/eeprominterface.cpp +++ b/companion/src/eeprominterface.cpp @@ -1028,7 +1028,7 @@ bool GeneralSettings::switchPositionAllowedTaranis(int index) const if (index == 0) return true; - div_t qr = div(index-1, 3); + div_t qr = div(abs(index)-1, 3); if (index < 0 && switchConfig[qr.quot] != Board::SWITCH_3POS) return false; diff --git a/companion/src/helpers.cpp b/companion/src/helpers.cpp index 50756f67b..439098b7c 100644 --- a/companion/src/helpers.cpp +++ b/companion/src/helpers.cpp @@ -374,7 +374,7 @@ void populateGvarUseCB(QComboBox *b, unsigned int phase) } } -void populateSwitchCB(QComboBox *b, const RawSwitch & value, const GeneralSettings & generalSettings, SwitchContext context) +void populateSwitchCB(QComboBox * b, const RawSwitch & value, const GeneralSettings & generalSettings, SwitchContext context) { Board::Type board = getCurrentBoard(); RawSwitch item;