Update main.c

pull/28/head
alanbjohnston 6 years ago committed by GitHub
parent 45bc295287
commit 2d49ce36fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -636,15 +636,15 @@ int get_tlm_fox() {
printf("Reset Count: %d Uptime since Reset: %ld \n", reset_count, uptime);
h[0] = (h[0] & 0xf8) | (id & 0x07); // 3 bits
printf("h[0] %x\n", h[0]);
// printf("h[0] %x\n", h[0]);
h[0] = (h[0] & 0x07)| ((reset_count & 0x1f) << 3);
printf("h[0] %x\n", h[0]);
// printf("h[0] %x\n", h[0]);
h[1] = (reset_count >> 5) & 0xff;
printf("h[1] %x\n", h[1]);
// printf("h[1] %x\n", h[1]);
h[2] = (h[2] & 0xf8) | ((reset_count >> 13) & 0x07);
printf("h[2] %x\n", h[2]);
// printf("h[2] %x\n", h[2]);
h[2] = (h[2] & 0x0e) | ((uptime & 0x1f) << 3);
printf("h[2] %x\n", h[2]);
// printf("h[2] %x\n", h[2]);
h[3] = (uptime >> 5) & 0xff;
h[4] = (uptime >> 13) & 0xff;
h[5] = (h[5] & 0xf0) | ((uptime >> 21) & 0x0f);

Loading…
Cancel
Save

Powered by TurnKey Linux.