fix steering implementation
This commit is contained in:
parent
319ae576ad
commit
38b5f2d4e1
@ -240,10 +240,10 @@ void CM_processIncome(uint8_t idSender, uint8_t idMsg, bool rtr, uint32_t data){
|
|||||||
if(idMsg == 0xF) { // STEERING_ALIVE
|
if(idMsg == 0xF) { // STEERING_ALIVE
|
||||||
// statusH statusL - -
|
// statusH statusL - -
|
||||||
ALIVE_ISALIVE(&steering()->myChecker);
|
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);
|
KART_CST.STEERING_ALIVE_TIME = MEM_read_1_byte(MEMADD_STEERING_ALIVE_TIME);
|
||||||
ALIVE_emitResurrect(&steering()->myChecker, 0, 0);
|
ALIVE_emitResurrect(&steering()->myChecker, 500, 0);
|
||||||
ALIVE_emitBorn(&steering()->myChecker, 0, 0);
|
ALIVE_emitBorn(&steering()->myChecker, 1000, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -45,9 +45,9 @@ bool STEERING_processEvent(Event* ev) {
|
|||||||
if (ev->id == evSTstart) {
|
if (ev->id == evSTstart) {
|
||||||
me->state = STST_RUN;
|
me->state = STST_RUN;
|
||||||
}
|
}
|
||||||
ALIVE_setAliveTime(&me->myChecker, KART_CST.STEERING_ALIVE_TIME);
|
// ALIVE_setAliveTime(&me->myChecker, KART_CST.STEERING_ALIVE_TIME);
|
||||||
ALIVE_emitBorn(&me->myChecker, 100, 0);
|
// ALIVE_emitBorn(&me->myChecker, 500, 0);
|
||||||
ALIVE_emitReady(&me->myChecker, 200, 0);
|
// ALIVE_emitReady(&me->myChecker, 1000, 0);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case STST_RUN:
|
case STST_RUN:
|
||||||
@ -92,6 +92,9 @@ bool STEERING_processEvent(Event* ev) {
|
|||||||
if (me->wait.f != NULL) {
|
if (me->wait.f != NULL) {
|
||||||
me->wait.f(me->wait.p);
|
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;
|
break;
|
||||||
|
|
||||||
case STST_RUN:
|
case STST_RUN:
|
||||||
|
Reference in New Issue
Block a user