Update main.c no reboot

beta-v1.3.1.1-hab-2
Alan Johnston 2 years ago committed by GitHub
parent 524c9ad270
commit 3267f7e16f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -2318,7 +2318,8 @@ if (setting == ON) {
fprintf(stderr,"Turning Battery saver mode ON\n");
command = popen("if ! grep -q force_turbo=1 /boot/config.txt ; then sudo sh -c 'echo force_turbo=1 >> /boot/config.txt'; fi", "r");
pclose(command);
command = popen("sudo reboot now", "r");
// command = popen("sudo reboot now", "r");
command = popen("sudo systemctl restart cubesatsim, "r");
pclose(command);
sleep(60);
return;
@ -2333,8 +2334,9 @@ if (setting == ON) {
fprintf(stderr,"Turning Battery saver mode OFF\n");
command = popen("sudo sed -i ':a;N;$!ba;s/\'$'\n''force_turbo=1//g' /boot/config.txt", "r");
pclose(command);
command = popen("sudo reboot now", "r");
pclose(command);
// command = popen("sudo reboot now", "r");
command = popen("sudo systemctl restart cubesatsim, "r");
pclose(command);
sleep(60);
return;
} else

Loading…
Cancel
Save

Powered by TurnKey Linux.