yy1717
2020-01-08 8ebe83a59e982317a746e8dd61d87c4a2359b40d
实现rtk平台基础配置
11个文件已修改
34 ■■■■■ 已修改文件
lib/src/main/cpp/driver_test.cpp 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/cpp/jni_log.h 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/cpp/mcu/mcu_if.cpp 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/cpp/native-lib.cpp 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/cpp/rtk_module/parse_gps.cpp 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/cpp/rtk_module/rtk.cpp 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/cpp/rtk_platform/parse_net.cpp 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/cpp/rtk_platform/platform.cpp 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/cpp/test_items/park_bottom.cpp 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/cpp/test_items/turn_a90.cpp 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/java/com/anyun/exam/lib/RemoteService.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
lib/src/main/cpp/driver_test.cpp
@@ -25,6 +25,8 @@
#include "test_items/driving_curve.h"
#include "test_items/stop_and_start.h"
#define DEBUG(fmt, args...)     LOGD("<driver_test> <%s>: " fmt, __func__, ##args)
using namespace std;
#define RTK_INVALID         0
lib/src/main/cpp/jni_log.h
@@ -17,12 +17,4 @@
#define LOGMCUD(...)  __android_log_print(ANDROID_LOG_DEBUG,"MCU_DEBUG",__VA_ARGS__) // 定义LOGD类型
#define ENABLE_DEBUG_PROTOCOL
#ifdef ENABLE_DEBUG_PROTOCOL
#define DEBUG(...)                      LOGD(__VA_ARGS__)
#else
#define DEBUG(...)
#endif
#endif //JNI_LOG_H
lib/src/main/cpp/mcu/mcu_if.cpp
@@ -11,6 +11,8 @@
#include "../jni_log.h"
#include "../common/serial_port.h"
#define DEBUG(fmt, args...)     LOGD("<mcu_if> <%s>: " fmt, __func__, ##args)
#define MCU_UART            UART_1
enum parse_status_t {
lib/src/main/cpp/native-lib.cpp
@@ -15,6 +15,8 @@
#include "driver_test.h"
#include "master/comm_if.h"
#define DEBUG(fmt, args...)     LOGD("<native-lib> <%s>: " fmt, __func__, ##args)
static JavaVM *sg_jvm = NULL;
static jobject sg_obj = NULL;
lib/src/main/cpp/rtk_module/parse_gps.cpp
@@ -10,6 +10,8 @@
#include <stdlib.h>
#include <string.h>
#define DEBUG(fmt, args...)     LOGD("<parse_gps> <%s>: " fmt, __func__, ##args)
typedef const uint8_t *ptr;
static ptr skip1(ptr s, ptr e)
lib/src/main/cpp/rtk_module/rtk.cpp
@@ -19,6 +19,8 @@
#include "../rtk_platform/platform.h"
#include "../native-lib.h"
#define DEBUG(fmt, args...)     LOGD("<rtk> <%s>: " fmt, __func__, ##args)
#define RTK_MODULE_UART         UART_0
#define PARSE_BUFF_SIZE         4096
lib/src/main/cpp/rtk_platform/parse_net.cpp
@@ -19,6 +19,8 @@
#include "../mcu/mcu_if.h"
#include "../utils/xconvert.h"
#define DEBUG(fmt, args...)     LOGD("<parse_net> <%s>: " fmt, __func__, ##args)
using namespace std;
#define PKT_HEAD_CHAR           0x7E
lib/src/main/cpp/rtk_platform/platform.cpp
@@ -22,7 +22,7 @@
#define PARSE_BUFF_SIZE         4096
const char *VK_REG = "platform_register";
#define DEBUG(fmt, args...)     LOGD("<platform> <%s>: " fmt, __func__, ##args)
struct platformSocket {
    char domain_name[32];
@@ -84,6 +84,8 @@
void InitPlatform(const uint8_t *phone, const char *domain_name, int port)
{
    DEBUG("InitPlatform");
    pthread_mutex_init(&platform_tx_mutex, NULL);
    pthread_mutex_init(&events_mutex, NULL);
@@ -105,15 +107,16 @@
    pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);//detached
    pthread_create(&pid, &attr, StatusListenThread, NULL);
    MA_ReqRtkPlatformConfig();
    AppTimer_add(ReqRtkPlatformConfigTimeout, D_SEC(2));
    MA_ReqRtkPlatformConfig();
}
static void ReqRtkPlatformConfigTimeout(union sigval sig)
{
    AppTimer_delete(ReqRtkPlatformConfigTimeout);
    MA_ReqRtkPlatformConfig();
    AppTimer_add(ReqRtkPlatformConfigTimeout, D_SEC(2));
    MA_ReqRtkPlatformConfig();
}
void ConfigPlatform(const rtk_platform_cfg_t *p)
lib/src/main/cpp/test_items/park_bottom.cpp
@@ -10,6 +10,8 @@
#include "../driver_test.h"
#include <vector>
#define DEBUG(fmt, args...)     LOGD("<park_bottom> <%s>: " fmt, __func__, ##args)
using namespace std;
enum {
lib/src/main/cpp/test_items/turn_a90.cpp
@@ -10,6 +10,8 @@
#include <vector>
#define DEBUG(fmt, args...)     LOGD("<turn_a90> <%s>: " fmt, __func__, ##args)
using namespace std;
enum {
lib/src/main/java/com/anyun/exam/lib/RemoteService.java
@@ -51,6 +51,7 @@
        @Override
        public void SendCmd(int cmd, String value) throws RemoteException {
            Log.d(TAG, "RecvMsgFromMainProc cmd = " + String.format(" %04X ", cmd) + " value " + value);
            MainProcMsgEntry(cmd, value);
        }
    };