event spam has stopped
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
@ -259,7 +259,7 @@ void HeaterHandler::handleSwitchOnCommand(heater::Switchers heaterIdx) {
|
||||
// Check state of main line switch
|
||||
ReturnValue_t mainSwitchState = mainLineSwitcher->getSwitchState(mainLineSwitch);
|
||||
if (mainSwitchState == PowerSwitchIF::SWITCH_ON) {
|
||||
if (checkSwitchState(heaterIdx) == SwitchState::OFF) {
|
||||
if (getSwitchState(heaterIdx) == SwitchState::OFF) {
|
||||
gpioId_t gpioId = heater.gpioId;
|
||||
result = gpioInterface->pullHigh(gpioId);
|
||||
if (result != returnvalue::OK) {
|
||||
@ -310,7 +310,7 @@ void HeaterHandler::handleSwitchOffCommand(heater::Switchers heaterIdx) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
auto& heater = heaterVec.at(heaterIdx);
|
||||
// Check whether switch is already off
|
||||
if (checkSwitchState(heaterIdx)) {
|
||||
if (getSwitchState(heaterIdx)) {
|
||||
gpioId_t gpioId = heater.gpioId;
|
||||
result = gpioInterface->pullLow(gpioId);
|
||||
if (result != returnvalue::OK) {
|
||||
@ -344,7 +344,7 @@ void HeaterHandler::handleSwitchOffCommand(heater::Switchers heaterIdx) {
|
||||
heater.cmdActive = false;
|
||||
}
|
||||
|
||||
HeaterHandler::SwitchState HeaterHandler::checkSwitchState(heater::Switchers switchNr) const {
|
||||
HeaterHandler::SwitchState HeaterHandler::getSwitchState(heater::Switchers switchNr) const {
|
||||
MutexGuard mg(handlerLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
||||
return heaterVec.at(switchNr).switchState;
|
||||
}
|
||||
@ -428,7 +428,7 @@ ReturnValue_t HeaterHandler::getSwitchState(uint8_t switchNr) const {
|
||||
if (switchNr > 7) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
if (checkSwitchState(static_cast<heater::Switchers>(switchNr)) == SwitchState::ON) {
|
||||
if (getSwitchState(static_cast<heater::Switchers>(switchNr)) == SwitchState::ON) {
|
||||
return PowerSwitchIF::SWITCH_ON;
|
||||
}
|
||||
return PowerSwitchIF::SWITCH_OFF;
|
||||
|
Reference in New Issue
Block a user