Update main.c start and stop pacsatsim.service

pacsat-v2.2-tlm3
Alan Johnston 4 weeks ago committed by GitHub
parent 74cdc3609a
commit f68ac49095
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -236,7 +236,7 @@ int main(int argc, char * argv[]) {
printf("Mode is Transmit Command\n");
} else if ( mode_string == 'p') {
mode = PACSAT;
printf("Mode is Pacsat\n");
printf("Mode is Pacsat\n");
} else if ( mode_string == 'P') {
mode = PACSATGND;
printf("Mode is Pacsat Ground Station\n");
@ -246,6 +246,15 @@ int main(int argc, char * argv[]) {
}
}
if ( mode == PACSAT) {
FILE * pacsat_file = popen("sudo systemctl start cubesatsim", "r");
pclose(pacsat_file);
}
else {
FILE * pacsat_file = popen("sudo systemctl stop cubesatsim", "r");
pclose(pacsat_file);
}
// Open telemetry file with STEM Payload Data
telem_file = fopen("/home/pi/CubeSatSim/telem.txt", "a");
if (telem_file == NULL)

Loading…
Cancel
Save

Powered by TurnKey Linux.