File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -443,7 +443,10 @@ char text[MAX_STRINGS][32]= {
443443void badge_init_entry (void * arg )
444444{
445445 LOG_INF ("Badge init entry" );
446-
446+ if (!device_is_ready (strip )){
447+ LOG_ERR ("LED strip not ready" );
448+ return ;
449+ }
447450 // Initialize display work queue
448451 k_work_queue_init (& display_work_q );
449452 k_work_queue_start (& display_work_q , display_stack , K_THREAD_STACK_SIZEOF (display_stack ),
@@ -487,7 +490,7 @@ void badge_idle_entry(void* arg)
487490 display_text ("Makerville Badge!" );
488491}
489492
490- void badge_idle_run (void * arg )
493+ enum smf_state_result badge_idle_run (void * arg )
491494{
492495 struct s_object * obj = (struct s_object * )arg ;
493496
@@ -578,10 +581,6 @@ int main(void)
578581 int32_t ret ;
579582 int rc ;
580583
581- if (!device_is_ready (strip )){
582- LOG_ERR ("LED strip not ready" );
583- return 0 ;
584- }
585584 set_led_color (RGB (0x0F , 0x0F , 0x0F )); // Default: white
586585 k_work_init (& led_blink_work , led_blink_work_handler );
587586 k_timer_stop (& led_blink_timer );
You can’t perform that action at this time.
0 commit comments