Update main.c with correct time

pacsat-v2.2-tlm2
Alan Johnston 4 weeks ago committed by GitHub
parent e686d1bf17
commit 19bed2ab73
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1569,7 +1569,7 @@ void get_tlm_fox() {
FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb"); FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb");
if (telem_binary != NULL) { if (telem_binary != NULL) {
time_t now = time(0); time_t now = time(0);
fwrite(b, sizeof(now), 1, &now); fwrite(b, sizeof(now), 1, now);
int bytes_written = fwrite(b, sizeof(char), 70, telem_binary); int bytes_written = fwrite(b, sizeof(char), 70, telem_binary);
printf("Writing %d bytes to tlm.bin\n", bytes_written + 4); printf("Writing %d bytes to tlm.bin\n", bytes_written + 4);
fclose(telem_binary); fclose(telem_binary);

Loading…
Cancel
Save

Powered by TurnKey Linux.