Skip to content

Commit

Permalink
Change the checking process from ordering of enums to EnsureKnownEnum…
Browse files Browse the repository at this point in the history
…Value function

Signed-off-by: Hunsup Jung <hunsup.jung@samsung.com>
  • Loading branch information
HunsupJung committed Jan 22, 2024
1 parent 965989b commit b292351
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/clusters/thermostat-server/thermostat-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttr
}
auto RequestedSystemMode = static_cast<SystemModeEnum>(*value);
if (ControlSequenceOfOperation > ControlSequenceOfOperationEnum::kCoolingAndHeatingWithReheat ||
RequestedSystemMode > SystemModeEnum::kSleep)
EnsureKnownEnumValue(RequestedSystemMode) != SystemModeEnum::kUnknownValue)
{
return imcode::InvalidValue;
}
Expand Down

0 comments on commit b292351

Please sign in to comment.