From 683b1595260e638d1d3c6cc0d6543a72f6d6f925 Mon Sep 17 00:00:00 2001
From: yy1717 <fctom1215@outlook.com>
Date: 星期二, 12 一月 2021 14:36:42 +0800
Subject: [PATCH] 扣分码标准化

---
 lib/src/main/cpp/rtk_platform/platform.h |   34 +++++++++++++++++++---------------
 1 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/lib/src/main/cpp/rtk_platform/platform.h b/lib/src/main/cpp/rtk_platform/platform.h
index 8e88ffe..5c2136f 100644
--- a/lib/src/main/cpp/rtk_platform/platform.h
+++ b/lib/src/main/cpp/rtk_platform/platform.h
@@ -7,20 +7,24 @@
 
 #include "../rtk_module/rtk.h"
 
-#define PLATFORM_CONNECT_EVT                         0x0001
-#define PLATFORM_DISCONNECT_EVT                      0x0002
-#define PLATFORM_REGISTER_EVT                        0x0004
-#define PLATFORM_LOGIN_EVT                           0x0008
-#define RTK_UPDATE_EVT                               0x0010
-#define GPS_UPDATE_EVT                              0x0020
-#define MCU_UPDATE_EVT                              0x0040
-#define CARD_UPDATE_EVT                             0x0080
-#define PLAY_TTS_DONE_EVT                           0x0100
-#define CAR_SENSOR_UPDATE_EVT                       0x0200
-#define MASTER_COMM_EVT                             0x0400
-#define CAN_UPDATE_EVT                              0x0800
-#define BLUETOOTH_DATA_EVT                          0x1000
-#define BLUETOOTH_STATUS_EVT                        0x2000
+enum {
+    PLATFORM_CONNECT_EVT,
+    PLATFORM_DISCONNECT_EVT,
+    PLATFORM_REGISTER_EVT,
+    PLATFORM_LOGIN_EVT,
+    RTK_UPDATE_EVT,
+    RTK_STATUS_EVT,
+    GPS_UPDATE_EVT,
+    MCU_UPDATE_EVT,
+    CARD_UPDATE_EVT,
+    PLAY_TTS_DONE_EVT,
+    CAR_SENSOR_UPDATE_EVT,
+    MASTER_COMM_EVT,
+    CAN_UPDATE_EVT,
+    BLUETOOTH_DATA_EVT,
+    BLUETOOTH_STATUS_EVT,
+    SENSOR_CHANGE_EVT
+};
 
 typedef struct {
     char domain_name[32];
@@ -36,7 +40,7 @@
     int rtk_interval;
 } rtk_platform_cfg_t;
 
-void InitPlatform(const uint8_t *phone, const char *domain_name, int port);
+void InitPlatform(bool ayDevice, const uint8_t *phone, const char *domain_name, int port);
 void ConfigPlatform(const rtk_platform_cfg_t *p);
 
 void PlatformStatusChanged(uint32_t event, const uint8_t *data, int length);

--
Gitblit v1.8.0