From 4744762b4c3736d4ea2ec4dba3a70e996763841e Mon Sep 17 00:00:00 2001 From: Oliver Walter Date: Tue, 28 May 2024 04:15:52 +0200 Subject: [PATCH] CLS_VehicleStatus added unlocked signal --- CLS.c | 4 ++++ CLS.h | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CLS.c b/CLS.c index 8d8ed27..d27326d 100644 --- a/CLS.c +++ b/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); diff --git a/CLS.h b/CLS.h index 5cf93e9..7f675d8 100644 --- a/CLS.h +++ b/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); \ No newline at end of file