Skip to content

Commit

Permalink
Address further review comments from JamesH
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterC1965 committed Jul 28, 2024
1 parent 44c333f commit c13aca1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ class WhmManufacturer

private:
WaterHeaterManagementInstance * mWhmInstance;
bool mBoostActive;
};

/** @brief Helper function to return the singleton WhmManufacturer instance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,6 @@ CHIP_ERROR WhmManufacturer::Init()
return CHIP_ERROR_UNINITIALIZED;
}

mBoostActive = false;

dg->SetHeaterTypes(BitMask<WaterHeaterTypeBitmap>(WaterHeaterTypeBitmap::kImmersionElement1));
dg->SetHeatDemand(BitMask<WaterHeaterDemandBitmap>(WaterHeaterDemandBitmap::kImmersionElement1));
dg->SetEstimatedHeatRequired(10000);
Expand Down Expand Up @@ -109,13 +107,10 @@ Status WhmManufacturer::TurnHeatingOn(bool emergencyBoost)

WaterHeaterManagementDelegate * dg = GetWhmDelegate();

if (dg->GetBoostState() == BoostStateEnum::kActive)
{
mBoostActive = true;
}

if (emergencyBoost)
{
// emergencyBoost that the consumer wants the water to be heated as quickly as practicable.
// Thus, cause multiple heat sources to be activated
dg->SetHeatDemand(BitMask<WaterHeaterDemandBitmap>(WaterHeaterDemandBitmap::kImmersionElement1,
WaterHeaterDemandBitmap::kImmersionElement2));
}
Expand All @@ -133,11 +128,6 @@ Status WhmManufacturer::TurnHeatingOff()

ChipLogProgress(AppServer, "WhmManufacturer::TurnHeatingOff");

if (mBoostActive)
{
mBoostActive = false;
}

WaterHeaterManagementDelegate * dg = GetWhmDelegate();

dg->SetHeatDemand(BitMask<WaterHeaterDemandBitmap>(0));
Expand Down

0 comments on commit c13aca1

Please sign in to comment.