add code
This commit is contained in:
parent
4d4c31944f
commit
7df0cad3d3
7
main.cpp
7
main.cpp
@ -78,8 +78,8 @@ int main(int argc, char *argv[]) {
|
||||
boost::thread uartWaveReadTh(UartStartWave);
|
||||
uartWaveReadTh.detach();
|
||||
//启动 RUN LED
|
||||
boost::thread startRunLED(RunLED);
|
||||
startRunLED.detach();
|
||||
// boost::thread startRunLED(RunLED);
|
||||
// startRunLED.detach();
|
||||
|
||||
|
||||
#ifdef NR5G_MODULE
|
||||
@ -146,9 +146,6 @@ int main(int argc, char *argv[]) {
|
||||
//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);
|
||||
sleep(20);
|
||||
if (GlobalConfig::threadStatus == 0) {
|
||||
|
||||
@ -69,22 +69,22 @@ void HeartRep() {
|
||||
zlog_info(zct, "heart = %s,iRet = %d", strJson.c_str(), iRet);
|
||||
}
|
||||
|
||||
if (iRet != 0) {
|
||||
gpio_set(GlobalConfig::GPIO_G.errorLed, 1);
|
||||
sleep(1);
|
||||
gpio_set(GlobalConfig::GPIO_G.errorLed, 0);
|
||||
sleep(1);
|
||||
gpio_set(GlobalConfig::GPIO_G.errorLed, 1);
|
||||
sleep(1);
|
||||
gpio_set(GlobalConfig::GPIO_G.errorLed, 0);
|
||||
sleep(1);
|
||||
gpio_set(GlobalConfig::GPIO_G.errorLed, 1);
|
||||
sleep(1);
|
||||
GlobalConfig::serverStatus = 1;
|
||||
} else {
|
||||
GlobalConfig::serverStatus = 0;
|
||||
gpio_set(GlobalConfig::GPIO_G.errorLed, 0);
|
||||
}
|
||||
// if (iRet != 0) {
|
||||
// gpio_set(GlobalConfig::GPIO_G.errorLed, 1);
|
||||
// sleep(1);
|
||||
// gpio_set(GlobalConfig::GPIO_G.errorLed, 0);
|
||||
// sleep(1);
|
||||
// gpio_set(GlobalConfig::GPIO_G.errorLed, 1);
|
||||
// sleep(1);
|
||||
// gpio_set(GlobalConfig::GPIO_G.errorLed, 0);
|
||||
// sleep(1);
|
||||
// gpio_set(GlobalConfig::GPIO_G.errorLed, 1);
|
||||
// sleep(1);
|
||||
// GlobalConfig::serverStatus = 1;
|
||||
// } else {
|
||||
// GlobalConfig::serverStatus = 0;
|
||||
// gpio_set(GlobalConfig::GPIO_G.errorLed, 0);
|
||||
// }
|
||||
sleep(30);
|
||||
count ++;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user