Skip to content

Commit

Permalink
Update WhmDelegateImpl.cpp
Browse files Browse the repository at this point in the history
EnergyManagementLED
  • Loading branch information
lboue authored Nov 22, 2024
1 parent 099d173 commit 7d544fc
Showing 1 changed file with 21 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,27 @@ bool WaterHeaterManagementDelegate::HasWaterTemperatureReachedTarget() const
return true;
}

void WaterHeaterManagementDelegate::UpdateEnergyManagementLed()
{
uint8_t mode = WaterHeaterMode::Instance()->GetCurrentMode();
sEnergyManagementLED.Set(false);

switch (opState)
{
case WaterHeaterMode::kModeManual:
sEnergyManagementLED.Set(true);
break;
case WaterHeaterMode::kModeOff:
sEnergyManagementLED.Blink(300, 700);
break;
case WaterHeaterMode::kModeTimed:
sEnergyManagementLED.Blink(100);
break;
default:
break;
}
}

Status WaterHeaterManagementDelegate::ChangeHeatingIfNecessary()
{
VerifyOrReturnError(mpWhmManufacturer != nullptr, Status::InvalidInState);
Expand Down

0 comments on commit 7d544fc

Please sign in to comment.