From 03a05501800d2c02bca1c05ca6f7080d715aba23 Mon Sep 17 00:00:00 2001 From: yy1717 <fctom1215@outlook.com> Date: 星期五, 18 九月 2020 15:41:50 +0800 Subject: [PATCH] 坐标 --- lib/src/main/cpp/rtk_platform/platform.cpp | 16 ++++++++++++++++ 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/lib/src/main/cpp/rtk_platform/platform.cpp b/lib/src/main/cpp/rtk_platform/platform.cpp index a343c04..6060868 100644 --- a/lib/src/main/cpp/rtk_platform/platform.cpp +++ b/lib/src/main/cpp/rtk_platform/platform.cpp @@ -520,6 +520,22 @@ cb->callback(cb->seq); } } + if (events & MASTER_COMM_EVT) { + union { + int a; + uint8_t b[sizeof(int)]; + } c; + + c.b[0] = data[0]; + c.b[1] = data[1]; + c.b[2] = data[2]; + c.b[3] = data[3]; + + if (length == 4) + MA_MainProcMsgEntry(c.a, NULL); + else + MA_MainProcMsgEntry(c.a, (char *)data + 4); + } } static void *PlatformDataListenThread(void *p) { -- Gitblit v1.8.0