Update main.c added PACSAT mode

pacsat-1
Alan Johnston 1 year ago committed by GitHub
parent a64c34c41a
commit 3422b19772
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -233,7 +233,10 @@ int main(int argc, char * argv[]) {
printf("Mode is Repeater\n");
} else if ( mode_string == 'n') {
mode = TXCOMMAND;
printf("Mode is Transmit Command\n");
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");

Loading…
Cancel
Save

Powered by TurnKey Linux.