diff --git a/306-controller_interface.X/app/can_message.c b/306-controller_interface.X/app/can_message.c index 8e24eb7..2b812b1 100644 --- a/306-controller_interface.X/app/can_message.c +++ b/306-controller_interface.X/app/can_message.c @@ -240,10 +240,10 @@ void CM_processIncome(uint8_t idSender, uint8_t idMsg, bool rtr, uint32_t data){ if(idMsg == 0xF) { // STEERING_ALIVE // statusH statusL - - ALIVE_ISALIVE(&steering()->myChecker); - if(steering()->myChecker.state == STST_DEAD) { + if(steering()->myChecker.state == STAL_DEAD) { KART_CST.STEERING_ALIVE_TIME = MEM_read_1_byte(MEMADD_STEERING_ALIVE_TIME); - ALIVE_emitResurrect(&steering()->myChecker, 0, 0); - ALIVE_emitBorn(&steering()->myChecker, 0, 0); + ALIVE_emitResurrect(&steering()->myChecker, 500, 0); + ALIVE_emitBorn(&steering()->myChecker, 1000, 0); } } diff --git a/306-controller_interface.X/app/steering.c b/306-controller_interface.X/app/steering.c index 2d3a703..ab7ec23 100644 --- a/306-controller_interface.X/app/steering.c +++ b/306-controller_interface.X/app/steering.c @@ -45,9 +45,9 @@ bool STEERING_processEvent(Event* ev) { if (ev->id == evSTstart) { me->state = STST_RUN; } - ALIVE_setAliveTime(&me->myChecker, KART_CST.STEERING_ALIVE_TIME); - ALIVE_emitBorn(&me->myChecker, 100, 0); - ALIVE_emitReady(&me->myChecker, 200, 0); +// ALIVE_setAliveTime(&me->myChecker, KART_CST.STEERING_ALIVE_TIME); +// ALIVE_emitBorn(&me->myChecker, 500, 0); +// ALIVE_emitReady(&me->myChecker, 1000, 0); break; case STST_RUN: @@ -92,6 +92,9 @@ bool STEERING_processEvent(Event* ev) { if (me->wait.f != NULL) { me->wait.f(me->wait.p); } + ALIVE_setAliveTime(&me->myChecker, KART_CST.STEERING_ALIVE_TIME); + ALIVE_emitBorn(&me->myChecker, 500, 0); + ALIVE_emitReady(&me->myChecker, 1000, 0); break; case STST_RUN: