@@ -173,15 +173,17 @@ void OvenManager::OnOffAttributeChangeHandler(EndpointId endpointId, AttributeId
173173 switch (endpointId)
174174 {
175175 case kCookTopEndpoint :
176- InitiateAction (AppEvent::kEventType_CookTop , *value ? OvenManager::ON_ACTION : OvenManager::OFF_ACTION, value, kCookTopEndpoint );
176+ InitiateAction (AppEvent::kEventType_CookTop , *value ? OvenManager::ON_ACTION : OvenManager::OFF_ACTION, value,
177+ kCookTopEndpoint );
177178 // Update CookSurface states accordingly
178179 mCookSurfaceEndpoint1 .SetOnOffState (*value);
179180 mCookSurfaceEndpoint2 .SetOnOffState (*value);
180181 break ;
181182 case kCookSurfaceEndpoint1 :
182183 case kCookSurfaceEndpoint2 :
183184 // Handle On/Off attribute changes for the cook surface endpoints
184- InitiateAction (AppEvent::kEventType_CookSurface , *value ? OvenManager::ON_ACTION : OvenManager::OFF_ACTION, value, endpointId);
185+ InitiateAction (AppEvent::kEventType_CookSurface , *value ? OvenManager::ON_ACTION : OvenManager::OFF_ACTION, value,
186+ endpointId);
185187 {
186188 bool cookSurfaceEndpoint1State;
187189 bool cookSurfaceEndpoint2State;
@@ -225,17 +227,17 @@ bool OvenManager::InitiateAction(int32_t aActor, Action_t aAction, uint8_t * aVa
225227 if (endpointId == kCookTopEndpoint )
226228 {
227229 currentState = &mCookTopState ;
228- eventType = AppEvent::kEventType_CookTop ;
230+ eventType = AppEvent::kEventType_CookTop ;
229231 }
230232 else if (endpointId == kCookSurfaceEndpoint1 )
231233 {
232234 currentState = &mCookSurfaceState1 ;
233- eventType = AppEvent::kEventType_CookSurface ;
235+ eventType = AppEvent::kEventType_CookSurface ;
234236 }
235237 else if (endpointId == kCookSurfaceEndpoint2 )
236238 {
237239 currentState = &mCookSurfaceState2 ;
238- eventType = AppEvent::kEventType_CookSurface ;
240+ eventType = AppEvent::kEventType_CookSurface ;
239241 }
240242 else
241243 {
@@ -249,12 +251,12 @@ bool OvenManager::InitiateAction(int32_t aActor, Action_t aAction, uint8_t * aVa
249251 if (*currentState == kCookTopState_OffCompleted && aAction == ON_ACTION)
250252 {
251253 action_initiated = true ;
252- new_state = kCookTopState_OnInitiated ;
254+ new_state = kCookTopState_OnInitiated ;
253255 }
254256 else if (*currentState == kCookTopState_OnCompleted && aAction == OFF_ACTION)
255257 {
256258 action_initiated = true ;
257- new_state = kCookTopState_OffInitiated ;
259+ new_state = kCookTopState_OffInitiated ;
258260 }
259261 }
260262 else
@@ -263,12 +265,12 @@ bool OvenManager::InitiateAction(int32_t aActor, Action_t aAction, uint8_t * aVa
263265 if (*currentState == kCookSurfaceState_OffCompleted && aAction == ON_ACTION)
264266 {
265267 action_initiated = true ;
266- new_state = kCookSurfaceState_OnInitiated ;
268+ new_state = kCookSurfaceState_OnInitiated ;
267269 }
268270 else if (*currentState == kCookSurfaceState_OnCompleted && aAction == OFF_ACTION)
269271 {
270272 action_initiated = true ;
271- new_state = kCookSurfaceState_OffInitiated ;
273+ new_state = kCookSurfaceState_OffInitiated ;
272274 }
273275 }
274276
@@ -277,11 +279,11 @@ bool OvenManager::InitiateAction(int32_t aActor, Action_t aAction, uint8_t * aVa
277279 *currentState = new_state;
278280
279281 AppEvent event;
280- event.Type = eventType;
282+ event.Type = eventType;
281283 event.OvenEvent .Context = this ;
282284 event.OvenEvent .Action = aAction;
283285 event.OvenEvent .Actor = endpointId; // Store endpoint ID in Actor field
284- event.Handler = ActuatorMovementHandler;
286+ event.Handler = ActuatorMovementHandler;
285287
286288 AppTask::GetAppTask ().PostEvent (&event);
287289 }
0 commit comments