diff --git a/CMakeLists.txt b/CMakeLists.txt index 251780f..d956f7e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,7 +13,7 @@ set(CMAKE_BUILD_TYPE "Debug") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g") # 设置一个字符串变量,用与编译文件名称生成 -set(ProjectName "EMS_C_V1.0.0") +set(ProjectName "EMS_C_V") project(${ProjectName}) @@ -26,7 +26,6 @@ include_directories( ${PROJECT_SOURCE_DIR}/drv ${PROJECT_SOURCE_DIR}/lib ${PROJECT_SOURCE_DIR}/model - ${PROJECT_SOURCE_DIR}/test ) diff --git a/drv/drv_4g.h b/drv/drv_4g.h index bc2e63c..68e33b4 100644 --- a/drv/drv_4g.h +++ b/drv/drv_4g.h @@ -16,6 +16,10 @@ #include #include +#define INTERFACE "usb0" +#define SERVER_ADDR "47.120.14.45" +#define PORT 3001 + void client(char interface[], char server_addr[], int server_port); #endif diff --git a/drv/drv_can.h b/drv/drv_can.h index 331fa2c..ed45edd 100644 --- a/drv/drv_can.h +++ b/drv/drv_can.h @@ -12,6 +12,12 @@ #include #include +#define CANNUM_RECV "can0" +#define CANNUM_SEND "can1" +#define CANIDNUM 3 +#define CANDLC_RECV 8 +#define CANDLC_SEND 8 + void can_recv(char cannum[], unsigned int canID[], int canIDnum, int dataLength); void can_send(char cannum[], unsigned int canID, char* dataToSend, int dataLength); diff --git a/kit/kit_mqtt.c b/kit/kit_mqtt.c new file mode 100644 index 0000000..e69de29 diff --git a/kit/kit_mqtt.h b/kit/kit_mqtt.h new file mode 100644 index 0000000..e69de29 diff --git a/test/test.c b/test/test.c index 3b29277..704131d 100644 --- a/test/test.c +++ b/test/test.c @@ -8,6 +8,7 @@ #include "drv_uart.h" #include "drv_can.h" #include "drv_tcp.h" +#include "drv_4g.h" void runTest() {