small fix for mode event heater
This commit is contained in:
parent
fe34f69abe
commit
7811a4cc6b
@ -269,7 +269,7 @@ void HeaterHandler::handleSwitchOnCommand(heater::Switch heaterIdx) {
|
|||||||
} else {
|
} else {
|
||||||
triggerEvent(HEATER_WENT_ON, heaterIdx, 0);
|
triggerEvent(HEATER_WENT_ON, heaterIdx, 0);
|
||||||
EventManagerIF::triggerEvent(helper.heaters[heaterIdx].first->getObjectId(), MODE_INFO,
|
EventManagerIF::triggerEvent(helper.heaters[heaterIdx].first->getObjectId(), MODE_INFO,
|
||||||
MODE_ON, MODE_OFF);
|
MODE_ON, 0);
|
||||||
{
|
{
|
||||||
MutexGuard mg(handlerLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
MutexGuard mg(handlerLock, LOCK_TYPE, LOCK_TIMEOUT, LOCK_CTX);
|
||||||
heater.switchState = ON;
|
heater.switchState = ON;
|
||||||
@ -327,7 +327,7 @@ void HeaterHandler::handleSwitchOffCommand(heater::Switch heaterIdx) {
|
|||||||
}
|
}
|
||||||
triggerEvent(HEATER_WENT_OFF, heaterIdx, 0);
|
triggerEvent(HEATER_WENT_OFF, heaterIdx, 0);
|
||||||
EventManagerIF::triggerEvent(helper.heaters[heaterIdx].first->getObjectId(), MODE_INFO,
|
EventManagerIF::triggerEvent(helper.heaters[heaterIdx].first->getObjectId(), MODE_INFO,
|
||||||
MODE_OFF, MODE_ON);
|
MODE_OFF, 0);
|
||||||
// When all switches are off, also main line switch will be turned off
|
// When all switches are off, also main line switch will be turned off
|
||||||
if (allSwitchesOff()) {
|
if (allSwitchesOff()) {
|
||||||
mainLineSwitcher->sendSwitchCommand(mainLineSwitch, PowerSwitchIF::SWITCH_OFF);
|
mainLineSwitcher->sendSwitchCommand(mainLineSwitch, PowerSwitchIF::SWITCH_OFF);
|
||||||
|
Loading…
Reference in New Issue
Block a user