Update main.c change battery_saver_mode variable

pull/368/head
Alan Johnston 6 months ago committed by GitHub
parent 34c7db6a49
commit 29b823f5ee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2270,7 +2270,8 @@ if (setting == ON) {
FILE *command = popen("touch /home/pi/CubeSatSim/battery_saver", "r");
pclose(command);
fprintf(stderr,"Turning Safe Mode ON\n");
fprintf(stderr,"Turning Battery saver mode ON\n");
fprintf(stderr,"Turning Battery saver mode ON\n");
battery_saver_mode = ON;
if ((mode == AFSK) || (mode == SSTV) || (mode == CW)) {
command = popen("echo 'reboot due to turning ON Safe Mode!' | wall", "r");
pclose(command);
@ -2287,6 +2288,7 @@ if (setting == ON) {
FILE *command = popen("rm /home/pi/CubeSatSim/battery_saver", "r");
pclose(command);
fprintf(stderr,"Turning Battery saver mode OFF\n");
battery_saver_mode = OFF;
if ((mode == AFSK) || (mode == SSTV) || (mode == CW)) {
command = popen("echo 'reboot due to turning OFF Safe Mode!' | wall", "r");
pclose(command);

Loading…
Cancel
Save

Powered by TurnKey Linux.