From ec519a606b6c104bbb72b20ba117acfa362c63fa Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Tue, 28 Jan 2025 15:50:54 -0500 Subject: [PATCH] Update main.c fix telem --- main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.c b/main.c index b8d3afcb..6d76c8cb 100644 --- a/main.c +++ b/main.c @@ -2305,9 +2305,9 @@ void get_tlm_fc() { source_bytes[0] = 0b00000001 ; // 10100000 10000001 01000001 10000001 10000001 source_bytes[1] = 0b10000010 ; source_bytes[10] = 0xff & ((unsigned int)(voltage[map[BAT]] * 1000) >> 8); - source_bytes[11] = 0xff & ((unsigned int)voltage[map[BAT]] * 1000); - source_bytes[10] = 0xff & (((unsigned int)current[map[BAT]] * 1000) >> 8); - source_bytes[11] = 0xff & ((unsigned int)current[map[BAT]] * 1000); + source_bytes[11] = 0xff & (unsigned int)(voltage[map[BAT]] * 1000); + source_bytes[10] = 0xff & ((unsigned int)(current[map[BAT]] * 100) >> 8); + source_bytes[11] = 0xff & (unsigned int)(current[map[BAT]] * 100); source_bytes[14] = 0xff & ((unsigned long int)reset_count >> 8); source_bytes[15] = 0xff & (unsigned long int)reset_count; source_bytes[50] = 0xff & ((unsigned long int)sequence >> 16); // Sequence number