From dc2a01d4764efd33a23afcaf4f1d7543dc35c4fa Mon Sep 17 00:00:00 2001
From: fctom1215 <fctom1215@outlook.com>
Date: 星期三, 19 二月 2020 15:32:57 +0800
Subject: [PATCH] 上坡地图修正
---
lib/src/main/cpp/test_items/comm_test.h | 40 ++++++++++++++++++++++++++++++++++++----
1 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/lib/src/main/cpp/test_items/comm_test.h b/lib/src/main/cpp/test_items/comm_test.h
index a1f7a5c..568ee32 100644
--- a/lib/src/main/cpp/test_items/comm_test.h
+++ b/lib/src/main/cpp/test_items/comm_test.h
@@ -5,10 +5,42 @@
#ifndef MYAPPLICATION2_COMM_TEST_H
#define MYAPPLICATION2_COMM_TEST_H
-#define SENSOR_SEATBELT 0
-#define SENSOR_TURNRIGHT 1
-#define SENSOR_TURNLEFT 2
-#define SENSOR_HANDBREAK 3
+#include <cstdint>
+enum {
+ SENSOR_SEATBELT,
+ SENSOR_LEFT_TURN_SIGNAL,
+ SENSOR_RIGHT_TURN_SIGNAL,
+ SENSOR_HANDBREAK,
+ SENSOR_BREAK,
+ SENSOR_LIGHT,
+ SENSOR_FAR_LIGHT,
+ SENSOR_DOOR,
+ SENSOR_SHIFT_N,
+ SENSOR_SHIFT_1,
+ SENSOR_SHIFT_2,
+ SENSOR_SHIFT_3,
+ SENSOR_SHIFT_4,
+ SENSOR_SHIFT_5,
+ SENSOR_SHIFT_R,
+ SENSOR_ENGINE_START
+};
+
+enum {
+ SEATBELT,
+ LEFT_TURN_SIGNAL,
+ RIGHT_TURN_SIGNAL,
+ HANDBREAK,
+ SHIFT,
+ LIGHT,
+ FAR_LIGHT,
+ DOOR,
+ ENGINE_START
+};
+
+void CommTestInit(void);
+void CommTestStart(bool start);
+void UpdateSensor(uint16_t gpio, uint16_t speed, uint16_t engine);
+int CheckSensorX(int func);
#endif //MYAPPLICATION2_COMM_TEST_H
--
Gitblit v1.8.0