|
|
|
|
@ -234,6 +234,9 @@ int main(int argc, char * argv[]) {
|
|
|
|
|
} else if ( mode_string == 'n') {
|
|
|
|
|
mode = TXCOMMAND;
|
|
|
|
|
printf("Mode is Transmit Command\n");
|
|
|
|
|
} else if ( mode_string == 'p') {
|
|
|
|
|
mode = PACSAT;
|
|
|
|
|
printf("Mode is Pacsat\n");
|
|
|
|
|
} else {
|
|
|
|
|
printf("Mode is BPSK\n");
|
|
|
|
|
}
|
|
|
|
|
@ -869,7 +872,7 @@ int main(int argc, char * argv[]) {
|
|
|
|
|
|
|
|
|
|
} else if ((mode == FSK) || (mode == BPSK)) {// FSK or BPSK
|
|
|
|
|
get_tlm_fox();
|
|
|
|
|
} else { // SSTV
|
|
|
|
|
} else { // SSTV or PACSAT
|
|
|
|
|
// fprintf(stderr, "Sleeping\n");
|
|
|
|
|
sleep(30);
|
|
|
|
|
}
|
|
|
|
|
@ -2205,7 +2208,7 @@ if (setting == ON) {
|
|
|
|
|
pclose(command);
|
|
|
|
|
fprintf(stderr,"Turning Safe Mode ON\n");
|
|
|
|
|
fprintf(stderr,"Turning Battery saver mode ON\n");
|
|
|
|
|
if ((mode == AFSK) || (mode == SSTV) || (mode == CW)) {
|
|
|
|
|
if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT)) {
|
|
|
|
|
command = popen("echo 'reboot due to turning ON Safe Mode!' | wall", "r");
|
|
|
|
|
pclose(command);
|
|
|
|
|
command = popen("sudo reboot now", "r");
|
|
|
|
|
@ -2221,7 +2224,7 @@ if (setting == ON) {
|
|
|
|
|
FILE *command = popen("rm /home/pi/CubeSatSim/battery_saver", "r");
|
|
|
|
|
pclose(command);
|
|
|
|
|
fprintf(stderr,"Turning Battery saver mode OFF\n");
|
|
|
|
|
if ((mode == AFSK) || (mode == SSTV) || (mode == CW)) {
|
|
|
|
|
if ((mode == AFSK) || (mode == SSTV) || (mode == CW) || (mode == PACSAT)) {
|
|
|
|
|
command = popen("echo 'reboot due to turning OFF Safe Mode!' | wall", "r");
|
|
|
|
|
pclose(command);
|
|
|
|
|
command = popen("sudo reboot now", "r");
|
|
|
|
|
|