@@ -153,15 +153,17 @@ void OvenManager::OnOffAttributeChangeHandler(EndpointId endpointId, AttributeId
153153 switch (endpointId)
154154 {
155155 case kCookTopEndpoint :
156- InitiateAction (AppEvent::kEventType_CookTop , *value ? OvenManager::ON_ACTION : OvenManager::OFF_ACTION, value, kCookTopEndpoint );
156+ InitiateAction (AppEvent::kEventType_CookTop , *value ? OvenManager::ON_ACTION : OvenManager::OFF_ACTION, value,
157+ kCookTopEndpoint );
157158 // Update CookSurface states accordingly
158159 mCookSurfaceEndpoint1 .SetOnOffState (*value);
159160 mCookSurfaceEndpoint2 .SetOnOffState (*value);
160161 break ;
161162 case kCookSurfaceEndpoint1 :
162163 case kCookSurfaceEndpoint2 :
163164 // Handle On/Off attribute changes for the cook surface endpoints
164- InitiateAction (AppEvent::kEventType_CookSurface , *value ? OvenManager::ON_ACTION : OvenManager::OFF_ACTION, value, endpointId);
165+ InitiateAction (AppEvent::kEventType_CookSurface , *value ? OvenManager::ON_ACTION : OvenManager::OFF_ACTION, value,
166+ endpointId);
165167 {
166168 bool cookSurfaceEndpoint1State;
167169 bool cookSurfaceEndpoint2State;
@@ -205,17 +207,17 @@ bool OvenManager::InitiateAction(int32_t aActor, Action_t aAction, uint8_t * aVa
205207 if (endpointId == kCookTopEndpoint )
206208 {
207209 currentState = &mCookTopState ;
208- eventType = AppEvent::kEventType_CookTop ;
210+ eventType = AppEvent::kEventType_CookTop ;
209211 }
210212 else if (endpointId == kCookSurfaceEndpoint1 )
211213 {
212214 currentState = &mCookSurfaceState1 ;
213- eventType = AppEvent::kEventType_CookSurface ;
215+ eventType = AppEvent::kEventType_CookSurface ;
214216 }
215217 else if (endpointId == kCookSurfaceEndpoint2 )
216218 {
217219 currentState = &mCookSurfaceState2 ;
218- eventType = AppEvent::kEventType_CookSurface ;
220+ eventType = AppEvent::kEventType_CookSurface ;
219221 }
220222 else
221223 {
@@ -229,12 +231,12 @@ bool OvenManager::InitiateAction(int32_t aActor, Action_t aAction, uint8_t * aVa
229231 if (*currentState == kCookTopState_OffCompleted && aAction == ON_ACTION)
230232 {
231233 action_initiated = true ;
232- new_state = kCookTopState_OnInitiated ;
234+ new_state = kCookTopState_OnInitiated ;
233235 }
234236 else if (*currentState == kCookTopState_OnCompleted && aAction == OFF_ACTION)
235237 {
236238 action_initiated = true ;
237- new_state = kCookTopState_OffInitiated ;
239+ new_state = kCookTopState_OffInitiated ;
238240 }
239241 }
240242 else
@@ -243,12 +245,12 @@ bool OvenManager::InitiateAction(int32_t aActor, Action_t aAction, uint8_t * aVa
243245 if (*currentState == kCookSurfaceState_OffCompleted && aAction == ON_ACTION)
244246 {
245247 action_initiated = true ;
246- new_state = kCookSurfaceState_OnInitiated ;
248+ new_state = kCookSurfaceState_OnInitiated ;
247249 }
248250 else if (*currentState == kCookSurfaceState_OnCompleted && aAction == OFF_ACTION)
249251 {
250252 action_initiated = true ;
251- new_state = kCookSurfaceState_OffInitiated ;
253+ new_state = kCookSurfaceState_OffInitiated ;
252254 }
253255 }
254256
@@ -257,11 +259,11 @@ bool OvenManager::InitiateAction(int32_t aActor, Action_t aAction, uint8_t * aVa
257259 *currentState = new_state;
258260
259261 AppEvent event;
260- event.Type = eventType;
262+ event.Type = eventType;
261263 event.OvenEvent .Context = this ;
262264 event.OvenEvent .Action = aAction;
263265 event.OvenEvent .Actor = endpointId; // Store endpoint ID in Actor field
264- event.Handler = ActuatorMovementHandler;
266+ event.Handler = ActuatorMovementHandler;
265267
266268 AppTask::GetAppTask ().PostEvent (&event);
267269 }
0 commit comments