Update main.c fix sleep 5

beta-ft
Alan Johnston 1 year ago committed by GitHub
parent 5582fecd11
commit 36b8811801
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -47,7 +47,7 @@ int main(int argc, char * argv[]) {
fprintf(stderr,"Config file /home/pi/CubeSatSim/sim.cfg contains %s %d %f %f %s %d %s %s %s %d %d\n", fprintf(stderr,"Config file /home/pi/CubeSatSim/sim.cfg contains %s %d %f %f %s %d %s %s %s %d %d\n",
call, reset_count, lat_file, long_file, sim_yes, squelch, tx, rx, hab_yes, rx_pl, tx_pl); call, reset_count, lat_file, long_file, sim_yes, squelch, tx, rx, hab_yes, rx_pl, tx_pl);
fprintf(stderr, "Transmit on %s Receive on %s\n", tx, rx); fprintf(stderr, "Transmit on %s MHz Receive on %s MHz\n", tx, rx);
// program_radio(); // do in rpitx instead // program_radio(); // do in rpitx instead
@ -1822,7 +1822,7 @@ void get_tlm_fox() {
error = 1; error = 1;
FILE * rpitx_restartf2 = popen("sudo systemctl restart rpitx", "r"); FILE * rpitx_restartf2 = popen("sudo systemctl restart rpitx", "r");
pclose(rpitx_restartf2); pclose(rpitx_restartf2);
sleep(5.0); // sleep if socket connection refused sleep(5); // sleep if socket connection refused
// try again // try again
error = 0; error = 0;
@ -1848,7 +1848,7 @@ void get_tlm_fox() {
error = 1; error = 1;
FILE * rpitx_restartf = popen("sudo systemctl restart rpitx", "r"); FILE * rpitx_restartf = popen("sudo systemctl restart rpitx", "r");
pclose(rpitx_restartf); pclose(rpitx_restartf);
sleep(5.0); // sleep if socket connection refused sleep(5); // sleep if socket connection refused
} }
} }
if (error == 1) if (error == 1)

Loading…
Cancel
Save

Powered by TurnKey Linux.