MEGA2560 board added to Companion

This commit is contained in:
Bertrand Songis
2014-12-11 21:11:19 +01:00
committed by bsongis
parent 5ddc741732
commit b66096107f
4 changed files with 26 additions and 17 deletions
+2 -4
View File
@@ -694,6 +694,8 @@ void SetupPanel::updateStartupSwitches()
unsigned int switchStates = model->switchWarningStates;
for (int i=0; i<firmware->getCapability(Switches); i++) {
if (!IS_TARANIS(firmware->getBoard()) && i==firmware->getCapability(Switches)-1)
continue;
QSlider * slider = startupSwitchesSliders[i];
QCheckBox * cb = startupSwitchesCheckboxes[i];
bool enabled = !(model->switchWarningEnable & (1 << i));
@@ -704,10 +706,6 @@ void SetupPanel::updateStartupSwitches()
switchStates >>= 2;
}
else {
if (i == firmware->getCapability(Switches)-1) {
// Trainer switch, no switch warning
continue;
}
slider->setValue(i==0 ? switchStates & 0x3 : switchStates & 0x1);
switchStates >>= (i==0 ? 2 : 1);
}