File tree 1 file changed +3
-3
lines changed
examples/all-clusters-app/all-clusters-common/src
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -316,8 +316,7 @@ uint16_t WaterHeaterManagementDelegate::GetActiveTargetWaterTemperature() const
316
316
317
317
uint8_t WaterHeaterManagementDelegate::CalculateTankPercentage () const
318
318
{
319
- int16_t tankPercentage =
320
- 100 * (static_cast <int16_t >(mWaterTemperature ) - static_cast <int16_t >(mColdWaterTemperature )) /
319
+ int16_t tankPercentage = 100 * (static_cast <int16_t >(mWaterTemperature ) - static_cast <int16_t >(mColdWaterTemperature )) /
321
320
(static_cast <int16_t >(GetActiveTargetWaterTemperature ()) - static_cast <int16_t >(mColdWaterTemperature ));
322
321
323
322
tankPercentage = std::min (tankPercentage, static_cast <int16_t >(100 ));
@@ -356,7 +355,8 @@ void WaterHeaterManagementDelegate::SetTargetWaterTemperature(uint16_t targetWat
356
355
void WaterHeaterManagementDelegate::DrawOffHotWater (Percent percentageReplaced, uint16_t replacedWaterTemperature)
357
356
{
358
357
// First calculate the new average water temperature
359
- mWaterTemperature = (mWaterTemperature * static_cast <uint16_t >(100 - percentageReplaced) + replacedWaterTemperature * percentageReplaced) / 100 ;
358
+ mWaterTemperature =
359
+ (mWaterTemperature * static_cast <uint16_t >(100 - percentageReplaced) + replacedWaterTemperature * percentageReplaced) / 100 ;
360
360
361
361
// Replaces percentageReplaced% of the water in the tank with water of a temperature replacedWaterTemperature
362
362
// Only supported if the kTankPercent feature is supported.
You can’t perform that action at this time.
0 commit comments