CLS_VehicleStatus added unlocked signal

This commit is contained in:
2024-05-28 04:15:52 +02:00
parent 4620d0a7ed
commit 4744762b4c
2 changed files with 7 additions and 1 deletions

4
CLS.c
View File

@@ -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
View File

@@ -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);