File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -453,11 +453,15 @@ rcl_timer_t timer;
453
453
if (uxr_millis () - init > MS) { X; init = uxr_millis ();} \
454
454
} while (0 )\
455
455
456
- // Error handle loop
457
456
void error_loop () {
458
- while (1 ) {
459
- delay (100 );
460
- }
457
+ int error = 0 ;
458
+ while (error < 10 ) {
459
+ digitalWrite (LED_BUILTIN, !digitalRead (LED_BUILTIN));
460
+ delay (100 );
461
+
462
+ error++;
463
+ }
464
+ digitalWrite (LED_BUILTIN, HIGH);
461
465
}
462
466
463
467
enum states {
@@ -562,6 +566,7 @@ void reConnectUSB() {
562
566
563
567
void destroy_entities ()
564
568
{
569
+ digitalWrite (9 , HIGH);
565
570
reConnectUSB ();
566
571
rmw_context_t * rmw_context = rcl_context_get_rmw_context (&support.context );
567
572
(void ) rmw_uros_set_context_entity_destroy_session_timeout (rmw_context, 0 );
@@ -573,6 +578,7 @@ void destroy_entities()
573
578
rclc_executor_fini (&executor);
574
579
rcl_node_fini (&node);
575
580
rclc_support_fini (&support);
581
+ digitalWrite (9 , LOW);
576
582
}
577
583
578
584
void power_setup () {
You can’t perform that action at this time.
0 commit comments