From 7767fabebbe6b1a4894d7734591e2ecdeb26d9ad Mon Sep 17 00:00:00 2001 From: Alan Johnston Date: Thu, 30 Jan 2025 11:29:32 -0500 Subject: [PATCH] Update main.c fix b --- main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.c b/main.c index 213f4150..046bea92 100644 --- a/main.c +++ b/main.c @@ -2333,8 +2333,8 @@ void get_tlm_fc() { source_bytes[FC_EPS + 4] = 0xff & (z >> 4); // mV source_bytes[FC_EPS + 5] = 0xc0 & (z << 4); - source_bytes[FC_EPS + 5] = source_bytes[FC_EPS + 5] | (0x0d & (b >> 8)); // mV - source_bytes[FC_EPS + 6] = 0xff & (b << 6); + source_bytes[FC_EPS + 5] = source_bytes[FC_EPS + 5] | (0x3f & (b >> 10)); // mV + source_bytes[FC_EPS + 6] = 0xff & (b << 2); /* source_bytes[FC_EPS + 0] = 0xff & (((unsigned int)((voltage[map[PLUS_X]] + voltage[map[MINUS_X]]) * 1000) >> 8)); // mV source_bytes[FC_EPS + 1] = 0xff & ((unsigned int)((voltage[map[PLUS_X]] + voltage[map[MINUS_X]]) * 1000));