add code
This commit is contained in:
parent
8baccebd76
commit
4d4c31944f
@ -18,7 +18,7 @@ enum enumZigBeeTransmitStatus {
|
|||||||
|
|
||||||
|
|
||||||
//#define NR5G_MODULE
|
//#define NR5G_MODULE
|
||||||
#define Q4G_MODULE
|
//#define Q4G_MODULE
|
||||||
//#define WIFI_MODULE
|
//#define WIFI_MODULE
|
||||||
//#define NR5G_MEIGE
|
//#define NR5G_MEIGE
|
||||||
//#define BLUETEETH_MODULE
|
//#define BLUETEETH_MODULE
|
||||||
|
|||||||
5
main.cpp
5
main.cpp
@ -119,7 +119,6 @@ int main(int argc, char *argv[]) {
|
|||||||
uart_inst::instance().ZigbeeParameterConfig();
|
uart_inst::instance().ZigbeeParameterConfig();
|
||||||
sleep(1);
|
sleep(1);
|
||||||
uart_inst::instance().UpdateZigbeeInfoCtrl();
|
uart_inst::instance().UpdateZigbeeInfoCtrl();
|
||||||
|
|
||||||
//启动 mqtt客户端
|
//启动 mqtt客户端
|
||||||
boost::thread startMqtt(StartMqttClient);
|
boost::thread startMqtt(StartMqttClient);
|
||||||
startMqtt.detach();
|
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)");
|
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;
|
int count = 0;
|
||||||
while (GlobalConfig::QuitFlag_G) {
|
while (GlobalConfig::QuitFlag_G) {
|
||||||
gpio_set(GlobalConfig::GPIO_G.hardWatchDog, 1);
|
gpio_set(GlobalConfig::GPIO_G.hardWatchDog, 1);
|
||||||
usleep(20000);
|
usleep(20000);
|
||||||
gpio_set(GlobalConfig::GPIO_G.hardWatchDog, 0);
|
gpio_set(GlobalConfig::GPIO_G.hardWatchDog, 0);
|
||||||
WriteWatchDog(fd);
|
//WriteWatchDog(fd);
|
||||||
sleep(20);
|
sleep(20);
|
||||||
if (GlobalConfig::threadStatus == 0) {
|
if (GlobalConfig::threadStatus == 0) {
|
||||||
count++;
|
count++;
|
||||||
|
|||||||
@ -157,7 +157,7 @@ Uart::~Uart() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void Uart::InitUart(speed_t speed) {
|
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);
|
zlog_info(zct, "InitUart fd = %d", fd);
|
||||||
if (fd < 0) {
|
if (fd < 0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user