Skip to content

Commit

Permalink
Rename kLowest to kLowestSpeed
Browse files Browse the repository at this point in the history
  • Loading branch information
erwinpan1 committed Jan 11, 2024
1 parent 1140a94 commit 06c066b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/chef/common/chef-fan-control-manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ Status ChefFanControlManager::HandleStep(StepDirectionEnum aDirection, bool aWra
VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, Status::InvalidCommand);

uint8_t newSpeedSetting = speedSetting.ValueOr(0);
const uint8_t kLowest = aLowestOff ? 0 : 1;
const uint8_t kLowestSpeed = aLowestOff ? 0 : 1;

if (aDirection == StepDirectionEnum::kIncrease)
{
Expand All @@ -107,15 +107,15 @@ Status ChefFanControlManager::HandleStep(StepDirectionEnum aDirection, bool aWra
{
if (aWrap)
{
newSpeedSetting = kLowest;
newSpeedSetting = kLowestSpeed;
}
}
}
else if (aDirection == StepDirectionEnum::kDecrease)
{
if (speedSetting.IsNull())
{
newSpeedSetting = kLowest;
newSpeedSetting = kLowestSpeed;
}
else if ((speedSetting.Value() > 1) && (speedSetting.Value() <= speedMax))
{
Expand Down

0 comments on commit 06c066b

Please sign in to comment.