From 21834035950feaadac9d4c7cad82b90ee624c984 Mon Sep 17 00:00:00 2001
From: yy1717 <fctom1215@outlook.com>
Date: 星期一, 17 八月 2020 19:30:06 +0800
Subject: [PATCH] 传感器变更
---
lib/src/main/cpp/test_common/car_sensor.h | 33 +++++++++++++++++++++++++++++++++
1 files changed, 33 insertions(+), 0 deletions(-)
diff --git a/lib/src/main/cpp/test_common/car_sensor.h b/lib/src/main/cpp/test_common/car_sensor.h
index 20695f7..2818c27 100644
--- a/lib/src/main/cpp/test_common/car_sensor.h
+++ b/lib/src/main/cpp/test_common/car_sensor.h
@@ -62,9 +62,42 @@
SURROUND_CAR_ACTIVE
};
+typedef struct {
+ int odo;
+ int trip;
+ int tripTime;
+ double cellVolt;
+ double speed;
+ int engine;
+ int sas;
+ int key;
+ int gear;
+ int aps;
+ int lock;
+ int seatBelt;
+ int clutch;
+ int horn;
+ int wiper;
+ int handBreak;
+ int mainBreak;
+ int leftTurnLamp;
+ int rightTurnLamp;
+ int clearanceLamp;
+ int dippedBeamLamp;
+ int mainBeamLamp;
+ int fogLamp;
+ int assBreak;
+ int surround1;
+ int surround2;
+ int surround3;
+ int surround4;
+} car_sensor_t;
+
void CarSensorInit(void);
int ReadCarStatus(uint16_t id);
void UpdateSensor(uint16_t gpio, uint16_t speed, uint16_t rpm);
+void UpdateSensor(const car_sensor_t *s);
+
void SetSensorCfg(int (*sensor)[3], int sensorNum);
#endif //MYAPPLICATION2_COMM_TEST_H
--
Gitblit v1.8.0