Update main.c don't write first tlm.bin

master-ba
Alan Johnston 2 months ago committed by GitHub
parent 465462c07b
commit 8271b7e437
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -2026,9 +2026,11 @@ void get_tlm_fox() {
encodeB(b_min, 52 + head_offset, rxAntennaDeployed + txAntennaDeployed * 2 + c2cStatus * 4);
}
int tlm_skip = FALSE
if (txAntennaDeployed == 0) {
txAntennaDeployed = 1;
printf("TX Antenna Deployed!\n");
tlm_skip = TRUE
}
if (rxAntennaDeployed == 0) {
rxAntennaDeployed = 1;
@ -2044,7 +2046,7 @@ void get_tlm_fox() {
encodeB(b, 74 + head_offset, 0xfff);
}
if ((mode == PACSAT) || (mode == PACSATGND))
if (((mode == PACSAT) || (mode == PACSATGND)) && (tlm_skip == FALSE))
{
FILE *telem_binary = fopen("/home/pi/CubeSatSim/tlm.bin", "wb");
if (telem_binary != NULL) {

Loading…
Cancel
Save

Powered by TurnKey Linux.