From 7c5b25c8617807635e9f272ebe9e98304d07cf2f Mon Sep 17 00:00:00 2001
From: fctom1215 <fctom1215@outlook.com>
Date: 星期五, 14 二月 2020 14:28:25 +0800
Subject: [PATCH] 增加单片机信息传递。
---
lib/src/main/cpp/mcu/mcu_if.cpp | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/lib/src/main/cpp/mcu/mcu_if.cpp b/lib/src/main/cpp/mcu/mcu_if.cpp
index 44e0c9e..9821685 100644
--- a/lib/src/main/cpp/mcu/mcu_if.cpp
+++ b/lib/src/main/cpp/mcu/mcu_if.cpp
@@ -11,6 +11,7 @@
#include "../defs.h"
#include "../jni_log.h"
#include "../common/serial_port.h"
+#include "../rtk_platform/platform.h"
#define DEBUG(fmt, args...) LOGD("<mcu_if> <%s>: " fmt, __func__, ##args)
@@ -62,6 +63,7 @@
static int dfuTryCnt = 0;
const int DFU_MAX_TRY = 3;
const int DFU_FILE_BLOCK_SIZE = 896;
+
static void *UartThread1(void *p);
static void ParseMcuTimeout(union sigval sig);
@@ -357,12 +359,9 @@
break;
case ID_MC_CAR_INFO: {
DEBUG("ID_MC_CAR_INFO %d", lenth);
- char ver[64] = {0};
- memcpy(ver, data, 32);
-
- DEBUG("ID_MC_CAR_INFO %s", ver);
-
+ if (lenth > 0)
+ PlatformStatusChanged(MCU_UPDATE_EVT, data, lenth);
break;
}
case ID_MC_RTK_DATA:
--
Gitblit v1.8.0