Skip to content

Commit

Permalink
Address some further useful comments from Boris Zbarsky
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterC1965 committed Jun 10, 2024
1 parent 956c311 commit 40b185f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ void Instance::HandleRequestConstraintBasedForecast(HandlerContext & ctx,
}

uint32_t currentUtcTime = 0;
status = GetCurrentTimeEpochS(currentUtcTime);
status = GetMatterEpochTimeFromUnixTime(currentUtcTime);
if (status != Status::Success)
{
ChipLogError(Zcl, "DEM: Failed to get UTC time");
Expand Down Expand Up @@ -815,7 +815,7 @@ void Instance::HandleRequestConstraintBasedForecast(HandlerContext & ctx,

if (constraint.loadControl.Value() < -100 || constraint.loadControl.Value() > 100)
{
ChipLogError(Zcl, "DEM: RequestConstraintBasedForecast bad loadControl %d", constraint.loadControl.HasValue());
ChipLogError(Zcl, "DEM: RequestConstraintBasedForecast bad loadControl %d", constraint.loadControl.Value());
ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError);
return;
}
Expand Down Expand Up @@ -849,7 +849,7 @@ void Instance::HandleRequestConstraintBasedForecast(HandlerContext & ctx,
return;
}

prevConstraint = iterator.GetValue();
prevConstraint = constraint;
}
}

Expand Down Expand Up @@ -892,7 +892,7 @@ void Instance::HandleCancelRequest(HandlerContext & ctx, const Commands::CancelR
ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status);
}

Status Instance::GetCurrentTimeEpochS(uint32_t & currentUtcTime) const
Status Instance::GetMatterEpochTimeFromUnixTime(uint32_t & currentUtcTime) const
{
currentUtcTime = 0;
System::Clock::Milliseconds64 cTMs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface
bool HasFeature(Feature aFeature) const;

private:
Protocols::InteractionModel::Status GetCurrentTimeEpochS(uint32_t & currentUtcTime) const;
Protocols::InteractionModel::Status GetMatterEpochTimeFromUnixTime(uint32_t & currentUtcTime) const;

private:
Delegate & mDelegate;
Expand Down

0 comments on commit 40b185f

Please sign in to comment.