From 4d4c31944fdb61f40ac3b97b89904ab809dda1f0 Mon Sep 17 00:00:00 2001 From: zhangsheng Date: Sat, 28 Feb 2026 10:34:05 +0800 Subject: [PATCH] add code --- common/global.hpp | 2 +- main.cpp | 5 ++--- uart/uart.cpp | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/common/global.hpp b/common/global.hpp index ec1f193..3567c20 100644 --- a/common/global.hpp +++ b/common/global.hpp @@ -18,7 +18,7 @@ enum enumZigBeeTransmitStatus { //#define NR5G_MODULE -#define Q4G_MODULE +//#define Q4G_MODULE //#define WIFI_MODULE //#define NR5G_MEIGE //#define BLUETEETH_MODULE diff --git a/main.cpp b/main.cpp index 1d82559..1fa9853 100644 --- a/main.cpp +++ b/main.cpp @@ -119,7 +119,6 @@ int main(int argc, char *argv[]) { uart_inst::instance().ZigbeeParameterConfig(); sleep(1); uart_inst::instance().UpdateZigbeeInfoCtrl(); - //启动 mqtt客户端 boost::thread startMqtt(StartMqttClient); startMqtt.detach(); @@ -144,13 +143,13 @@ int main(int argc, char *argv[]) { zlog_error(zbt, "(this usually indicates a compiler bug - try recompiling\nwithout optimizations, and enable '-DLZO_DEBUG' for diagnostics)"); } - int fd = OpenWatchDog(); + //int fd = OpenWatchDog(); int count = 0; while (GlobalConfig::QuitFlag_G) { gpio_set(GlobalConfig::GPIO_G.hardWatchDog, 1); usleep(20000); gpio_set(GlobalConfig::GPIO_G.hardWatchDog, 0); - WriteWatchDog(fd); + //WriteWatchDog(fd); sleep(20); if (GlobalConfig::threadStatus == 0) { count++; diff --git a/uart/uart.cpp b/uart/uart.cpp index 1f98b76..5b7045b 100644 --- a/uart/uart.cpp +++ b/uart/uart.cpp @@ -157,7 +157,7 @@ Uart::~Uart() { } void Uart::InitUart(speed_t speed) { - fd = config_uart("/dev/ttySC2", speed); + fd = config_uart("/dev/ttyS3", speed); zlog_info(zct, "InitUart fd = %d", fd); if (fd < 0) {