@@ -95,7 +95,6 @@ void uiTurnedOn(void);
95
95
void uiTurnOff (void );
96
96
void uiTurnedOff (void );
97
97
98
-
99
98
#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR
100
99
static DefaultOTARequestor sRequestorCore ;
101
100
static DefaultOTARequestorStorage sRequestorStorage ;
@@ -148,7 +147,7 @@ void identify_TakeAction(void)
148
147
#ifdef LED_ENABLE
149
148
LED_setOn (sAppGreenHandle , LED_BRIGHTNESS_MAX);
150
149
LED_startBlinking (sAppGreenHandle , 1000 , LED_BLINK_FOREVER);
151
- #endif // LED_ENABLE
150
+ #endif // LED_ENABLE
152
151
}
153
152
154
153
// Identify stop action
@@ -157,7 +156,7 @@ void identify_StopAction(void)
157
156
#ifdef LED_ENABLE
158
157
LED_stopBlinking (sAppGreenHandle );
159
158
LED_setOff (sAppGreenHandle );
160
- #endif // LED_ENABLE
159
+ #endif // LED_ENABLE
161
160
}
162
161
163
162
int AppTask::Init ()
@@ -189,8 +188,8 @@ int AppTask::Init()
189
188
ret = ConnectivityMgr ().SetThreadDeviceType (ConnectivityManager::kThreadDeviceType_SleepyEndDevice );
190
189
#else
191
190
ret = ConnectivityMgr ().SetThreadDeviceType (ConnectivityManager::kThreadDeviceType_MinimalEndDevice );
192
- #endif // CHIP_DEVICE_CONFIG_ENABLE_SED
193
- #endif // CHIP_DEVICE_CONFIG_THREAD_FTD
191
+ #endif // CHIP_DEVICE_CONFIG_ENABLE_SED
192
+ #endif // CHIP_DEVICE_CONFIG_THREAD_FTD
194
193
if (ret != CHIP_NO_ERROR)
195
194
{
196
195
PLAT_LOG (" ConnectivityMgr().SetThreadDeviceType() failed" );
@@ -483,7 +482,7 @@ void uiTurnOn(void)
483
482
#ifdef LED_ENABLE
484
483
LED_setOn (sAppRedHandle , LED_BRIGHTNESS_MAX);
485
484
LED_startBlinking (sAppRedHandle , 110 /* ms */ , LED_BLINK_FOREVER);
486
- #endif // LED_ENABLE
485
+ #endif // LED_ENABLE
487
486
}
488
487
489
488
// Action completed callback
@@ -493,7 +492,7 @@ void uiTurnedOn(void)
493
492
#ifdef LED_ENABLE
494
493
LED_stopBlinking (sAppRedHandle );
495
494
LED_setOn (sAppRedHandle , LED_BRIGHTNESS_MAX);
496
- #endif // LED_ENABLE
495
+ #endif // LED_ENABLE
497
496
}
498
497
499
498
// Action initiated callback
@@ -503,7 +502,7 @@ void uiTurnOff(void)
503
502
#ifdef LED_ENABLE
504
503
LED_setOn (sAppRedHandle , LED_BRIGHTNESS_MAX);
505
504
LED_startBlinking (sAppRedHandle , 110 /* ms */ , LED_BLINK_FOREVER);
506
- #endif // LED_ENABLE
505
+ #endif // LED_ENABLE
507
506
}
508
507
509
508
// Action completed callback
@@ -513,10 +512,9 @@ void uiTurnedOff(void)
513
512
#ifdef LED_ENABLE
514
513
LED_stopBlinking (sAppRedHandle );
515
514
LED_setOff (sAppRedHandle );
516
- #endif // LED_ENABLE
515
+ #endif // LED_ENABLE
517
516
}
518
517
519
-
520
518
#ifdef BUTTON_ENABLE
521
519
void AppTask::ButtonLeftEventHandler (Button_Handle handle, Button_EventMask events)
522
520
{
@@ -557,44 +555,44 @@ void AppTask::ButtonRightEventHandler(Button_Handle handle, Button_EventMask eve
557
555
/* Failed to post the message */
558
556
}
559
557
}
560
- #endif // BUTTON_ENABLE
558
+ #endif // BUTTON_ENABLE
561
559
562
560
void AppTask::uiInit (void )
563
561
{
564
- #ifdef LED_ENABLE
562
+ #ifdef LED_ENABLE
565
563
566
- LED_Params ledParams;
564
+ LED_Params ledParams;
567
565
568
- // Initialize LEDs
569
- PLAT_LOG (" Initialize LEDs" );
570
- LED_init ();
566
+ // Initialize LEDs
567
+ PLAT_LOG (" Initialize LEDs" );
568
+ LED_init ();
571
569
572
- LED_Params_init (&ledParams); // default PWM LED
573
- sAppRedHandle = LED_open (CONFIG_LED_RED, &ledParams);
574
- LED_setOff (sAppRedHandle );
570
+ LED_Params_init (&ledParams); // default PWM LED
571
+ sAppRedHandle = LED_open (CONFIG_LED_RED, &ledParams);
572
+ LED_setOff (sAppRedHandle );
575
573
576
- LED_Params_init (&ledParams); // default PWM LED
577
- sAppGreenHandle = LED_open (CONFIG_LED_GREEN, &ledParams);
578
- LED_setOff (sAppGreenHandle );
579
- #endif // LED ENABLE
574
+ LED_Params_init (&ledParams); // default PWM LED
575
+ sAppGreenHandle = LED_open (CONFIG_LED_GREEN, &ledParams);
576
+ LED_setOff (sAppGreenHandle );
577
+ #endif // LED ENABLE
580
578
581
579
#ifdef BUTTON_ENABLE
582
- Button_Params buttonParams;
583
-
584
- // Initialize buttons
585
- PLAT_LOG (" Initialize buttons" );
586
- Button_init ();
587
-
588
- Button_Params_init (&buttonParams);
589
- buttonParams.buttonEventMask = Button_EV_CLICKED | Button_EV_LONGCLICKED;
590
- buttonParams.longPressDuration = 1000U ; // ms
591
- sAppLeftHandle = Button_open (CONFIG_BTN_LEFT, &buttonParams);
592
- Button_setCallback (sAppLeftHandle , ButtonLeftEventHandler);
593
-
594
- Button_Params_init (&buttonParams);
595
- buttonParams.buttonEventMask = Button_EV_CLICKED | Button_EV_LONGCLICKED;
596
- buttonParams.longPressDuration = 1000U ; // ms
597
- sAppRightHandle = Button_open (CONFIG_BTN_RIGHT, &buttonParams);
598
- Button_setCallback (sAppRightHandle , ButtonRightEventHandler);
599
- #endif // BUTTON ENABLE
580
+ Button_Params buttonParams;
581
+
582
+ // Initialize buttons
583
+ PLAT_LOG (" Initialize buttons" );
584
+ Button_init ();
585
+
586
+ Button_Params_init (&buttonParams);
587
+ buttonParams.buttonEventMask = Button_EV_CLICKED | Button_EV_LONGCLICKED;
588
+ buttonParams.longPressDuration = 1000U ; // ms
589
+ sAppLeftHandle = Button_open (CONFIG_BTN_LEFT, &buttonParams);
590
+ Button_setCallback (sAppLeftHandle , ButtonLeftEventHandler);
591
+
592
+ Button_Params_init (&buttonParams);
593
+ buttonParams.buttonEventMask = Button_EV_CLICKED | Button_EV_LONGCLICKED;
594
+ buttonParams.longPressDuration = 1000U ; // ms
595
+ sAppRightHandle = Button_open (CONFIG_BTN_RIGHT, &buttonParams);
596
+ Button_setCallback (sAppRightHandle , ButtonRightEventHandler);
597
+ #endif // BUTTON ENABLE
600
598
}
0 commit comments