@@ -163,13 +163,12 @@ int AppTask::Init()
163
163
164
164
#if CHIP_DEVICE_CONFIG_THREAD_FTD
165
165
ret = ConnectivityMgr ().SetThreadDeviceType (ConnectivityManager::kThreadDeviceType_Router );
166
- #else
167
- #if CHIP_DEVICE_CONFIG_ENABLE_SED
166
+ #elif CHIP_CONFIG_ENABLE_ICD_SERVER
168
167
ret = ConnectivityMgr ().SetThreadDeviceType (ConnectivityManager::kThreadDeviceType_SleepyEndDevice );
169
168
#else
170
169
ret = ConnectivityMgr ().SetThreadDeviceType (ConnectivityManager::kThreadDeviceType_MinimalEndDevice );
171
- #endif // CHIP_DEVICE_CONFIG_ENABLE_SED
172
- # endif // CHIP_DEVICE_CONFIG_THREAD_FTD
170
+ #endif
171
+
173
172
if (ret != CHIP_NO_ERROR)
174
173
{
175
174
PLAT_LOG (" ConnectivityMgr().SetThreadDeviceType() failed" );
@@ -274,7 +273,7 @@ void AppTask::ActionInitiated(PumpManager::Action_t aAction, int32_t aActor)
274
273
PLAT_LOG (" Stop initiated" );
275
274
; // TODO
276
275
}
277
- #ifdef LED_ENABLE
276
+ #if ( LED_ENABLE == 1)
278
277
LED_setOn (sAppGreenHandle , LED_BRIGHTNESS_MAX);
279
278
LED_startBlinking (sAppGreenHandle , 50 /* ms */ , LED_BLINK_FOREVER);
280
279
LED_setOn (sAppRedHandle , LED_BRIGHTNESS_MAX);
@@ -290,7 +289,7 @@ void AppTask::ActionCompleted(PumpManager::Action_t aAction, int32_t aActor)
290
289
if (aAction == PumpManager::START_ACTION)
291
290
{
292
291
PLAT_LOG (" Pump start completed" );
293
- #ifdef LED_ENABLE
292
+ #if ( LED_ENABLE == 1)
294
293
LED_stopBlinking (sAppGreenHandle );
295
294
LED_setOn (sAppGreenHandle , LED_BRIGHTNESS_MAX);
296
295
LED_stopBlinking (sAppRedHandle );
@@ -302,7 +301,7 @@ void AppTask::ActionCompleted(PumpManager::Action_t aAction, int32_t aActor)
302
301
else if (aAction == PumpManager::STOP_ACTION)
303
302
{
304
303
PLAT_LOG (" Pump stop completed" );
305
- #ifdef LED_ENABLE
304
+ #if ( LED_ENABLE == 1)
306
305
LED_stopBlinking (sAppGreenHandle );
307
306
LED_setOff (sAppGreenHandle );
308
307
LED_stopBlinking (sAppRedHandle );
@@ -370,15 +369,15 @@ void AppTask::DispatchEvent(AppEvent * aEvent)
370
369
break ;
371
370
372
371
case AppEvent::kEventType_IdentifyStart :
373
- #ifdef LED_ENABLE
372
+ #if ( LED_ENABLE == 1)
374
373
LED_setOn (sAppGreenHandle , LED_BRIGHTNESS_MAX);
375
374
LED_startBlinking (sAppGreenHandle , sIdentifyBlinkRateMs , LED_BLINK_FOREVER);
376
375
#endif
377
376
PLAT_LOG (" Identify started" );
378
377
break ;
379
378
380
379
case AppEvent::kEventType_IdentifyStop :
381
- #ifdef LED_ENABLE
380
+ #if ( LED_ENABLE == 1)
382
381
LED_stopBlinking (sAppGreenHandle );
383
382
if (!PumpMgr ().IsStopped ())
384
383
{
@@ -633,7 +632,7 @@ void AppTask::TriggerIdentifyEffectHandler(::Identify * identify)
633
632
}
634
633
}
635
634
636
- #ifdef BUTTON_ENABLE
635
+ #if ( BUTTON_ENABLE == 1)
637
636
void AppTask::ButtonLeftEventHandler (Button_Handle handle, Button_EventMask events)
638
637
{
639
638
AppEvent event;
@@ -677,7 +676,7 @@ void AppTask::ButtonRightEventHandler(Button_Handle handle, Button_EventMask eve
677
676
678
677
void AppTask::uiInit (void )
679
678
{
680
- #ifdef LED_ENABLE
679
+ #if ( LED_ENABLE == 1)
681
680
682
681
LED_Params ledParams;
683
682
@@ -694,7 +693,7 @@ void AppTask::uiInit(void)
694
693
LED_setOff (sAppGreenHandle );
695
694
#endif // LED ENABLE
696
695
697
- #ifdef BUTTON_ENABLE
696
+ #if ( BUTTON_ENABLE == 1)
698
697
Button_Params buttonParams;
699
698
700
699
// Initialize buttons
0 commit comments