Bug on ID2 fixed

This commit is contained in:
Bertrand Songis
2014-02-10 10:22:12 +01:00
parent dc660d4ade
commit 12997bd169
3 changed files with 16 additions and 25 deletions
+2 -8
View File
@@ -588,12 +588,11 @@ void Setup::updateStartupSwitches()
lock = true;
unsigned int switchStates = model.switchWarningStates;
bool enabled;
for (int i=0; i<GetEepromInterface()->getCapability(Switches)-1; i++) {
QSlider * slider = startupSwitchesSliders[i];
QCheckBox * cb = startupSwitchesCheckboxes[i];
enabled = !(model.nSwToWarn & (1 << i));
bool enabled = !(model.nSwToWarn & (1 << i));
slider->setEnabled(enabled);
cb->setChecked(enabled);
if (IS_TARANIS(GetEepromInterface()->getBoard())) {
@@ -640,12 +639,7 @@ void Setup::startupSwitchEdited(int value)
model.switchWarningStates &= ~mask;
if (value) {
if (shift == 0) {
model.switchWarningStates |= value;
}
else {
model.switchWarningStates |= (value << shift);
}
model.switchWarningStates |= (value << shift);
}
updateStartupSwitches();