From 46f19c091685483aa622193ee3e2dcf213b38bc7 Mon Sep 17 00:00:00 2001
From: yy1717 <fctom1215@outlook.com>
Date: 星期日, 19 一月 2020 16:26:13 +0800
Subject: [PATCH] updatecrr

---
 lib/src/main/cpp/rtk_module/rtk.cpp |   14 ++++++++++----
 1 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/lib/src/main/cpp/rtk_module/rtk.cpp b/lib/src/main/cpp/rtk_module/rtk.cpp
index 4621444..9d3a6e1 100644
--- a/lib/src/main/cpp/rtk_module/rtk.cpp
+++ b/lib/src/main/cpp/rtk_module/rtk.cpp
@@ -352,8 +352,14 @@
     str2float(&CurrRTKInfo.y, s->nmea_value[2].data, s->nmea_value[2].length);
     str2float(&CurrRTKInfo.x, s->nmea_value[4].data, s->nmea_value[4].length);
 
-    CurrRTKInfo.x = -12;
-    CurrRTKInfo.y = 27;
+    static double sbx = -12;
+    static double sby = 27;
+
+//    CurrRTKInfo.x = sbx;
+//    CurrRTKInfo.y = sby;
+
+    sbx += 0.01;
+    sby += 0.01;
 
 //    const double by1 = 28.013;
 //    const double bx1 = -11.9669;
@@ -403,9 +409,9 @@
 //    CurrRTKInfo.heading = 60;
 
     static double deg = 0;
-    CurrRTKInfo.heading = deg;
-
+//    CurrRTKInfo.heading = deg;
     deg += 2.0;
+    if (deg >= 360) deg = 0;
 
     if (CurrRTKInfo.hh == hh && CurrRTKInfo.mm == mm && CurrRTKInfo.ss == ss && CurrRTKInfo.dss == dss) {
         PlatformStatusChanged(RTK_UPDATE_EVT, (uint8_t *)&CurrRTKInfo, sizeof(CurrRTKInfo));

--
Gitblit v1.8.0