Update main.c handling telem_string error

beta-v1.3.1-python-sq
Alan Johnston 2 years ago committed by GitHub
parent 840c1fd870
commit 4b4dcb9edf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -841,9 +841,12 @@ int main(int argc, char * argv[]) {
} }
#endif #endif
FILE * fp = fopen("/home/pi/CubeSatSim/telem_string.txt", "w"); FILE * fp = fopen("/home/pi/CubeSatSim/telem_string.txt", "w");
printf("Writing telem_string.txt\n"); if (fp != NULL) {
fprintf(fp, "BAT %4.2fV %5.1fmA\n", batteryVoltage, batteryCurrent); printf("Writing telem_string.txt\n");
fclose(fp); fprintf(fp, "BAT %4.2fV %5.1fmA\n", batteryVoltage, batteryCurrent);
fclose(fp);
} else
printf("Error writing to telem_string.txt\n");
/**/ /**/
// sleep(1); // Delay 1 second // sleep(1); // Delay 1 second

Loading…
Cancel
Save

Powered by TurnKey Linux.