add code
This commit is contained in:
parent
8baccebd76
commit
4d4c31944f
@ -18,7 +18,7 @@ enum enumZigBeeTransmitStatus {
|
||||
|
||||
|
||||
//#define NR5G_MODULE
|
||||
#define Q4G_MODULE
|
||||
//#define Q4G_MODULE
|
||||
//#define WIFI_MODULE
|
||||
//#define NR5G_MEIGE
|
||||
//#define BLUETEETH_MODULE
|
||||
|
||||
5
main.cpp
5
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++;
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user