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/driver_test.cpp | 4 ++-- lib/src/main/cpp/rtk_module/rtk.cpp | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/lib/src/main/cpp/driver_test.cpp b/lib/src/main/cpp/driver_test.cpp index 9b481cc..fc226e2 100644 --- a/lib/src/main/cpp/driver_test.cpp +++ b/lib/src/main/cpp/driver_test.cpp @@ -408,8 +408,8 @@ static int en = 0; static int gcc = 0; - if (gcc % 20 == 0) { - // AddExamFault(++en, &rtkTime); + if (gcc % 100 == 0) { + AddExamFault(++en, &rtkTime); } gcc++; 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