Update main.c turn off sim mode for payload present

master-psag-fm-only-fsk
Alan Johnston 1 week ago committed by GitHub
parent b4a1f6c0b8
commit 8b3f8511b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -374,6 +374,12 @@ int main(int argc, char * argv[]) {
payload = get_payload_serial(FALSE);
fprintf(stderr,"Get_payload_status: %d \n", payload); // not debug
if (sim_mode && payload && !sim_config) {
sim_mode = FALSE;
printf("Turning off Sim Mode since payload is present and Sim Mode not manually configured.");
FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag
pclose(sim_mode_auto);
}
} else {
fprintf(stderr, "Unable to open UART: %s\n -> Did you configure /boot/config.txt and /boot/cmdline.txt?\n", strerror(errno));
}
@ -706,11 +712,8 @@ int main(int argc, char * argv[]) {
}
}
batteryCurrent = current[map[BAT]] + current[map[BAT2]]; // Sum BAT and BAT2 currents
}
if (gps_status == OFF)
{
payload = get_payload_serial(FALSE); // not debug

Loading…
Cancel
Save

Powered by TurnKey Linux.