From cb47cded255ac78dc788a336b18c5725f253ebae Mon Sep 17 00:00:00 2001 From: fctom1215 <fctom1215@outlook.com> Date: 星期六, 25 七月 2020 20:26:46 +0800 Subject: [PATCH] 坐标 --- lib/src/main/cpp/native-lib.cpp | 2 +- lib/src/main/cpp/rtk_module/rtk.cpp | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/src/main/cpp/native-lib.cpp b/lib/src/main/cpp/native-lib.cpp index 70aa448..c54b0c2 100644 --- a/lib/src/main/cpp/native-lib.cpp +++ b/lib/src/main/cpp/native-lib.cpp @@ -26,7 +26,7 @@ const int RTK_PLATFORM_PORT = 12125; const uint8_t phone[] = {0x20,0x19,0x10,0x15,0x00,0x00,0x00,0x01}; -const char *VIRTUAL_RTK_IP = "192.168.16.100"; +const char *VIRTUAL_RTK_IP = "192.168.1.16"; const int VIRTUAL_RTK_PORT = 9001; static pthread_mutex_t tts_mutex = PTHREAD_MUTEX_INITIALIZER; diff --git a/lib/src/main/cpp/rtk_module/rtk.cpp b/lib/src/main/cpp/rtk_module/rtk.cpp index 9c766f8..f064637 100644 --- a/lib/src/main/cpp/rtk_module/rtk.cpp +++ b/lib/src/main/cpp/rtk_module/rtk.cpp @@ -214,7 +214,7 @@ }*/ if (RxBufLen > 0) { -#if 0 +#if 1 const uint8_t *ptr = parseGPS(RxBuf, RxBuf + RxBufLen); if(ptr != RxBuf) { memcpy(RxBuf, ptr, RxBufLen - (ptr - RxBuf)); @@ -286,6 +286,8 @@ qfCnt++; if (needSetPjk && qfCnt >= 3) { needSetPjk = false; + + DEBUG("set pjkpara 鍘熷缁忓害 %f", lon1); SetPjkPara(((int) (lon1 / 3.0 + 0.5)) * 3); } } else { @@ -462,8 +464,8 @@ static void CheckPjkParam(void) { - WriteSerialPort(RTK_MODULE_UART, INQ_PJK_PARAM, strlen(INQ_PJK_PARAM)); - + int n = WriteSerialPort(RTK_MODULE_UART, INQ_PJK_PARAM, strlen(INQ_PJK_PARAM)); + DEBUG("CN = %d", n); AppTimer_delete(CheckPjkParamTimeout); AppTimer_add(CheckPjkParamTimeout, D_SEC(3)); } @@ -472,4 +474,8 @@ AppTimer_delete(CheckPjkParamTimeout); DEBUG("RTK Module failure!!"); + + PlayTTS("RTK妯″潡鏃犳硶閫氳"); + + CheckPjkParam(); } -- Gitblit v1.8.0