inititalize loop indexes
Some checks are pending
EIVE/eive-obsw/pipeline/head Build queued...
EIVE/eive-obsw/pipeline/pr-develop Build started...

This commit is contained in:
Robin Müller 2023-04-04 14:24:57 +02:00
parent e10359077c
commit 38a0c14940
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -172,7 +172,7 @@ void ThermalController::performControlOperation() {
transitionToOffCycles++; transitionToOffCycles++;
// if heater still ON after 10 cycles, switch OFF again // if heater still ON after 10 cycles, switch OFF again
if (transitionToOffCycles == 10) { if (transitionToOffCycles == 10) {
for (uint8_t i; i < heater::Switchers::NUMBER_OF_SWITCHES; i++) { for (uint8_t i = 0; i < heater::Switchers::NUMBER_OF_SWITCHES; i++) {
heaterHandler.switchHeater(static_cast<heater::Switchers>(i), heaterHandler.switchHeater(static_cast<heater::Switchers>(i),
HeaterHandler::SwitchState::OFF); HeaterHandler::SwitchState::OFF);
} }
@ -1745,7 +1745,7 @@ void ThermalController::tooHotHandlerWhichClearsOneShotFlag(object_id_t object,
void ThermalController::startTransition(Mode_t mode_, Submode_t submode_) { void ThermalController::startTransition(Mode_t mode_, Submode_t submode_) {
triggerEvent(CHANGING_MODE, mode_, submode_); triggerEvent(CHANGING_MODE, mode_, submode_);
if (mode_ == MODE_OFF) { if (mode_ == MODE_OFF) {
for (uint8_t i; i < heater::Switchers::NUMBER_OF_SWITCHES; i++) { for (uint8_t i = 0; i < heater::Switchers::NUMBER_OF_SWITCHES; i++) {
heaterHandler.switchHeater(static_cast<heater::Switchers>(i), heaterHandler.switchHeater(static_cast<heater::Switchers>(i),
HeaterHandler::SwitchState::OFF); HeaterHandler::SwitchState::OFF);
} }