From e880a5db734b481815695c411ae02d47e4b99c4b Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Thu, 10 Jun 2021 14:30:42 -0400 Subject: [PATCH] changed tlm[3][A] to go negative --- afsk/main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/afsk/main.c b/afsk/main.c index 94b8721e..ca039eba 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -897,7 +897,8 @@ void get_tlm(void) { tlm[2][C] = (int)(99.5 - current[map[MINUS_Z]] / 10.0) % 100; // -Z current (was timestamp) tlm[2][D] = (int)(50.5 + current[map[BAT]] / 10.0) % 100; // NiMH Battery current - tlm[3][A] = abs((int)((voltage[map[BAT]] * 10.0) - 65.5) % 100); +// tlm[3][A] = abs((int)((voltage[map[BAT]] * 10.0) - 65.5) % 100); + tlm[3][A] = (int)((voltage[map[BAT]] * 10.0) - 65.5) % 100; // allow it to go negative for voltages less than 6.5 V tlm[3][B] = (int)(voltage[map[BUS]] * 10.0) % 100; // 5V supply to Pi tlm[4][B] = (int)((95.8 - cpuTemp) / 1.48 + 0.5) % 100;