add const for TRUE or FALSE
This commit is contained in:
parent
3f1672996d
commit
473d71ff6b
@ -97,7 +97,7 @@ void CM_processIncome(uint8_t idSender, uint8_t idMsg, bool rtr, uint32_t data){
|
|||||||
// TODO set alive times
|
// TODO set alive times
|
||||||
// start alives
|
// start alives
|
||||||
CM_DISPLAY_SETUP(NULL);
|
CM_DISPLAY_SETUP(NULL);
|
||||||
CM_STEERING_SETUP(NULL);
|
CM_STEERING_SETUP(&ALWAYSFALSE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,7 +129,7 @@ void CM_processIncome(uint8_t idSender, uint8_t idMsg, bool rtr, uint32_t data){
|
|||||||
|
|
||||||
ALIVE_setAliveTime(&drive()->myChecker, KART_CST.DRIVE_ALIVE_TIME);
|
ALIVE_setAliveTime(&drive()->myChecker, KART_CST.DRIVE_ALIVE_TIME);
|
||||||
ALIVE_emitStart(&drive()->myChecker, 0, 0);
|
ALIVE_emitStart(&drive()->myChecker, 0, 0);
|
||||||
CM_DRIVE_SETUP(NULL);
|
CM_DRIVE_SETUP(&ALWAYSFALSE);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,6 +44,9 @@
|
|||||||
#define MEMADD_BATTERY_ENERGY_TIME 0x1C
|
#define MEMADD_BATTERY_ENERGY_TIME 0x1C
|
||||||
#define MEMADD_BATTERY_ALIVE_TIME 0x1D
|
#define MEMADD_BATTERY_ALIVE_TIME 0x1D
|
||||||
|
|
||||||
|
const bool ALWAYSTRUE = true;
|
||||||
|
const bool ALWAYSFALSE = false;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
uint8_t CONTROL_STEERING_MODE;
|
uint8_t CONTROL_STEERING_MODE;
|
||||||
uint8_t CONTROL_ALIVE_TIME;
|
uint8_t CONTROL_ALIVE_TIME;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
void DRIVE_init(DRIVE* me){
|
void DRIVE_init(DRIVE* me){
|
||||||
me->state = STDR_INIT;
|
me->state = STDR_INIT;
|
||||||
ALIVE_init(&me->myChecker);
|
ALIVE_init(&me->myChecker);
|
||||||
ALIVE_onSetup(&me->myChecker, CM_DRIVE_SETUP, NULL);
|
ALIVE_onSetup(&me->myChecker, CM_DRIVE_SETUP, &ALWAYSTRUE);
|
||||||
ALIVE_onWait(&me->myChecker, DRIVE_emitStart, me);
|
ALIVE_onWait(&me->myChecker, DRIVE_emitStart, me);
|
||||||
ALIVE_onDead(&me->myChecker, DRIVE_emitStop, me);
|
ALIVE_onDead(&me->myChecker, DRIVE_emitStop, me);
|
||||||
ALIVE_onBorn(&me->myChecker, DRIVE_emitResurrect, me);
|
ALIVE_onBorn(&me->myChecker, DRIVE_emitResurrect, me);
|
||||||
|
Reference in New Issue
Block a user