Skip to content

Commit

Permalink
Restyled by whitespace
Browse files Browse the repository at this point in the history
  • Loading branch information
restyled-commits authored and liangpy4 committed Nov 29, 2023
1 parent f8733cd commit d4a9b56
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class ExampleMicrowaveOvenDevice : public MicrowaveOvenControl::Delegate, public
};


//Operational States
//Operational States
const OperationalState::GenericOperationalState opStateList[4] = {
OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped)),
OperationalState::GenericOperationalState(to_underlying(OperationalState::OperationalStateEnum::kRunning)),
Expand Down Expand Up @@ -98,7 +98,7 @@ class ExampleMicrowaveOvenDevice : public MicrowaveOvenControl::Delegate, public
*/
void MicrowaveOvenInit(EndpointId aEndpoint);

//delegates from MicrowaveOvenControl cluster
//delegates from MicrowaveOvenControl cluster
/**
* handle command for microwave oven control: set cooking parameters
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ExampleMicrowaveOvenDevice::HandleSetCookingParametersCallback(Optional<uint8_t>
uint8_t reqCookMode;
if(cookMode.HasValue()){
reqCookMode = cookMode.Value();

}
else
{
Expand Down Expand Up @@ -210,4 +210,4 @@ CHIP_ERROR ExampleMicrowaveOvenDevice::GetModeTagsByIndex(uint8_t modeIndex, Lis
tags.reduce_size(kModeOptions[modeIndex].modeTags.size());

return CHIP_NO_ERROR;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ namespace MicrowaveOvenControl {

Instance::Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClusterId, Clusters::OperationalState::Instance * aOpStateInstance, Clusters::ModeBase::Instance * aMicrowaveOvenModeInstance) :
CommandHandlerInterface(MakeOptional(aEndpointId), aClusterId), AttributeAccessInterface(MakeOptional(aEndpointId), aClusterId),
mDelegate(aDelegate), mEndpointId(aEndpointId), mClusterId(aClusterId),
mDelegate(aDelegate), mEndpointId(aEndpointId), mClusterId(aClusterId),
mOpStateInstance(aOpStateInstance), mMicrowaveOvenModeInstance(aMicrowaveOvenModeInstance)
{
mDelegate->SetInstance(this);
Expand Down Expand Up @@ -192,8 +192,8 @@ void Instance::HandleSetCookingParameters(HandlerContext & ctx, const Commands::
ChipLogError(Zcl, "Failed to set cookPower, cookPower value is out of range");
goto exit;
}
//get current operational state

//get current operational state
opState = mOpStateInstance->GetCurrentOperationalState();
if(opState != to_underlying(OperationalStateEnum::kStopped))
{
Expand Down Expand Up @@ -237,7 +237,7 @@ void Instance::HandleAddMoreTime(HandlerContext & ctx, const Commands::AddMoreTi
Status status;
uint8_t opState;

//get current operational state
//get current operational state
opState = mOpStateInstance->GetCurrentOperationalState();
if (opState == to_underlying(OperationalStateEnum::kStopped) || opState == to_underlying(OperationalStateEnum::kRunning) ||
opState == to_underlying(OperationalStateEnum::kPaused))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,10 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface
* Note: the caller must ensure that the delegate lives throughout the instance's lifetime.
* @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration.
* @param aClusterId The ID of the Microwave Oven Control cluster to be instantiated.
* @param aOpStateInstance The pointer of Operational State Instance.
* @param aMicrowaveOvenModeInstance The pointer of Microwave Oven Mode Instance.
* Note: a MicrowaveOvenControl instance must live relying on an Operational State instance and a Microwave Oven Mode instance,
* caller should be initialized that 2 instances before initializing MicorwaveOvenControl instance.
* @param aOpStateInstance The pointer of Operational State Instance.
* @param aMicrowaveOvenModeInstance The pointer of Microwave Oven Mode Instance.
* Note: a MicrowaveOvenControl instance must live relying on an Operational State instance and a Microwave Oven Mode instance,
* caller should be initialized that 2 instances before initializing MicorwaveOvenControl instance.
*/
Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClusterId, Clusters::OperationalState::Instance * aOpStateInstance, Clusters::ModeBase::Instance * aMicrowaveOvenModeInstance);

Expand Down Expand Up @@ -79,11 +79,11 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface
EndpointId mEndpointId;
ClusterId mClusterId;
/**
* Operational State instance
* Operational State instance
*/
Clusters::OperationalState::Instance * mOpStateInstance = nullptr;
/**
* Microwave Oven Mode instance
* Microwave Oven Mode instance
*/
Clusters::ModeBase::Instance * mMicrowaveOvenModeInstance = nullptr;

Expand Down Expand Up @@ -140,7 +140,7 @@ class Delegate
/**
* @brief Handle Command Callback in application: AddMoreTime
* @return Returns the Interaction Model status code which was user determined in the business logic
* @param finalCookTime: the cook time value after adding input time
* @param finalCookTime: the cook time value after adding input time
*/
virtual Protocols::InteractionModel::Status HandleModifyCookTimeCallback(uint32_t finalCookTime) = 0;

Expand Down

0 comments on commit d4a9b56

Please sign in to comment.