if uptime = 0, reset count = 0 so fill frames are ignored at start

pull/104/head
alanbjohnston 5 years ago committed by GitHub
parent c47bb85d1c
commit 8752822a3e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1756,6 +1756,7 @@ void get_tlm_fox() {
// printf("h[0] %x\n", h[0]); // printf("h[0] %x\n", h[0]);
h[1] = (short int) ((reset_count >> 5) & 0xff); h[1] = (short int) ((reset_count >> 5) & 0xff);
// printf("h[1] %x\n", h[1]); // printf("h[1] %x\n", h[1]);
if (uptime != 0) // if uptime is 0, leave reset count at 0
h[2] = (short int) ((h[2] & 0xf8) | ((reset_count >> 13) & 0x07)); h[2] = (short int) ((h[2] & 0xf8) | ((reset_count >> 13) & 0x07));
// printf("h[2] %x\n", h[2]); // printf("h[2] %x\n", h[2]);
h[2] = (short int) ((h[2] & 0x0e) | ((uptime & 0x1f) << 3)); h[2] = (short int) ((h[2] & 0x0e) | ((uptime & 0x1f) << 3));

Loading…
Cancel
Save

Powered by TurnKey Linux.