Update main.c remove sim_mode_auto if battery present

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

@ -390,7 +390,7 @@ int main(int argc, char * argv[]) {
sim_mode = TRUE; sim_mode = TRUE;
fprintf(stderr, "Simulated telemetry mode!\n"); fprintf(stderr, "Sim mode is ON!\n");
srand((unsigned int)time(0)); srand((unsigned int)time(0));
@ -701,6 +701,8 @@ int main(int argc, char * argv[]) {
if (sim_mode && !sim_config) { // if Voltage sensor on Battery board is present, exit simulated telemetry mode if (sim_mode && !sim_config) { // if Voltage sensor on Battery board is present, exit simulated telemetry mode
sim_mode = FALSE; sim_mode = FALSE;
fprintf(stderr, "Turning off sim_mode since battery sensor is present\n"); fprintf(stderr, "Turning off sim_mode since battery sensor is present\n");
FILE * sim_mode_auto = popen("sudo rm /home/pi/CubeSatSim/sim_mode_auto", "r"); // remove sim_mode_auto flag
pclose(sim_mode_auto);
} }
} }
batteryCurrent = current[map[BAT]] + current[map[BAT2]]; // Sum BAT and BAT2 currents batteryCurrent = current[map[BAT]] + current[map[BAT2]]; // Sum BAT and BAT2 currents

Loading…
Cancel
Save

Powered by TurnKey Linux.