CLS_VehicleStatus added unlocked signal
This commit is contained in:
4
CLS.c
4
CLS.c
@@ -42,6 +42,10 @@ void CLS_SendEventChangeTypePostion(CanDataId canid, CLS_Type_t newType, CLS_Pos
|
||||
CLS_BSP_CAN_AddMessageToSend(&cls_hartbeat_header, (uint8_t*)&EventChangeTypeData);
|
||||
}
|
||||
|
||||
const CLS_VehicleStatus_t * CLS_GetVehicleStatus(void) {
|
||||
return &cls_vehicle;
|
||||
}
|
||||
|
||||
void CLS_OnVehicleStatus(CanDataId canid, uint8_t* data, uint8_t len) {
|
||||
if(len == 8) {
|
||||
memcpy((uint8_t*)&cls_vehicle, data, 8);
|
||||
|
||||
4
CLS.h
4
CLS.h
@@ -36,7 +36,8 @@ typedef struct CLS_VehicleStatus {
|
||||
uint8_t headlight;
|
||||
uint8_t engine;
|
||||
uint8_t speed;
|
||||
uint8_t reserved[4];
|
||||
uint8_t unlocked;
|
||||
uint8_t reserved[3];
|
||||
} CLS_VehicleStatus_t;
|
||||
|
||||
extern uint8_t gCLS_DEVICE_ADDRESS;
|
||||
@@ -45,5 +46,6 @@ extern uint8_t gCLS_DEVICE_ADDRESS;
|
||||
void CLS_Init(void);
|
||||
void CLS_SendEventChangeTypePostion(uint16_t canid, CLS_Type_t newType, CLS_Position_t newPostion);
|
||||
|
||||
const CLS_VehicleStatus_t * CLS_GetVehicleStatus(void);
|
||||
|
||||
void CLS_VehicleHeatbeat(void *argument);
|
||||
Reference in New Issue
Block a user