added sleep after shutdown command

pull/49/head
alanbjohnston 5 years ago committed by GitHub
parent 04bef68b47
commit a2015ca412
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -405,7 +405,7 @@ int main(int argc, char *argv[]) {
pinMode (onLed, OUTPUT); pinMode (onLed, OUTPUT);
digitalWrite (onLed, onLedOn); digitalWrite (onLed, onLedOn);
#ifdef DEBUG_LOGGING #ifdef DEBUG_LOGGING
printf("Tx LED On\n"); printf("Power LED On\n");
#endif #endif
// if ((cycle == ON) && !ax5043) // don't cycle modes if using AX5043 // if ((cycle == ON) && !ax5043) // don't cycle modes if using AX5043
@ -416,7 +416,6 @@ int main(int argc, char *argv[]) {
fclose(config_file); fclose(config_file);
config_file = fopen("sim.cfg","r"); config_file = fopen("sim.cfg","r");
if (vB4) if (vB4)
{ {
sensor[PLUS_X] = config_sensor("/dev/i2c-1", 0x40, 400); sensor[PLUS_X] = config_sensor("/dev/i2c-1", 0x40, 400);
@ -566,6 +565,7 @@ while (loop-- != 0)
digitalWrite (onLed, onLedOff); digitalWrite (onLed, onLedOff);
popen("sudo shutdown -h now > /dev/null 2>&1", "r"); popen("sudo shutdown -h now > /dev/null 2>&1", "r");
sleep(10);
} }
if (mode == FSK) { if (mode == FSK) {

Loading…
Cancel
Save

Powered by TurnKey Linux.