// // Created by Administrator on 2022/11/15. // #ifndef MYAPPLICATION3_ADA_H #define MYAPPLICATION3_ADA_H #include #include #define ID_ADA_INFO_REQ 0x0001 #define ID_ADA_INFO_RESP 0x8001 #define ID_ADA_DFU_UPLOAD 0x0002 #define ID_ADA_DFU_RESP 0x8002 #define ID_ADA_OBD 0x800A typedef struct { std::string version; std::string sn; }ada_info_t; #pragma pack(push, 1) typedef struct { uint32_t total_odo; uint32_t this_odo; uint32_t this_time; uint16_t voltage; uint16_t speed; uint16_t rpm; int16_t steering_wheel; uint8_t key_status; uint8_t gear; uint8_t accelerator; uint8_t door; uint8_t seat_belt; uint8_t clutch; uint8_t horn; uint8_t wiper; uint8_t hand_break; uint8_t main_break; uint8_t left_sign; uint8_t right_sign; uint8_t clearance_lamp; uint8_t dipped_beam_lamp; uint8_t main_beam_lamp; uint8_t fog_lamp; uint8_t assist_break; uint8_t surround1; uint8_t surround2; uint8_t surround3; uint8_t surround4; uint8_t resever[3]; }car_sensor_t; #pragma pack(pop) void InitAda(void); #endif //MYAPPLICATION3_ADA_H