fix curve and add headlights
This commit is contained in:
2023-09-07 14:18:29 +02:00
parent 5c555f6ee1
commit 8f1b0c2c13
3 changed files with 231 additions and 203 deletions

View File

@@ -224,7 +224,12 @@ void CM_processIncome(uint8_t idSender, uint8_t idMsg, bool rtr, uint32_t data){
if(idMsg == 0xF) { // DISPLAY_ALIVE
// powerMode - - -
// TODO display say ALIVE
eKart.powerMode = incomeData.separate.byte0;
if (eKart.powerMode == 0) {
CM_HEADLIGHTS(&ALWAYSFALSE);
} else {
CM_HEADLIGHTS(&ALWAYSTRUE);
}
}
break;
@@ -441,3 +446,9 @@ void CM_SUPPLY_SETUP(void* p) {
supply.separate.byte3 = KART_CST.BATTERY_ALIVE_TIME;
CAN_Send(6, 0, supply.full);
}
void CM_HEADLIGHTS(void* p) {
// status - - -
bool status = *((bool*) p);
CAN_send_1_byte(0, 4, status);
}