From 97b9e38665088c80062157a1797134f4f7855161 Mon Sep 17 00:00:00 2001 From: Klagarge Date: Fri, 25 Aug 2023 22:53:04 +0200 Subject: [PATCH] reconnect after death --- 306-controller_interface.X/app/can_message.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/306-controller_interface.X/app/can_message.c b/306-controller_interface.X/app/can_message.c index a746c18..468cc93 100644 --- a/306-controller_interface.X/app/can_message.c +++ b/306-controller_interface.X/app/can_message.c @@ -33,6 +33,10 @@ void CM_processIncome(uint8_t idSender, uint8_t idMsg, uint32_t data){ if(idMsg == 0xF) { // JOY_ALIVE ALIVE_CHECKER_ISALIVE(ACjoy()); + if(ACjoy()->state == STAC_DEAD){ + ALIVE_CHECKER_emitBorn(ACjoy(), 0, 0); + ALIVE_CHECKER_emitReady(ACjoy(), 100, 0); + } } break;