From 1e3ed1055acc118d87fbd8f6b7a4762a57f329a1 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Tue, 8 Dec 2020 11:50:50 -0500 Subject: [PATCH] batt current typo --- afsk/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/afsk/main.c b/afsk/main.c index 7c04d3a8..3953f0d9 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -1064,7 +1064,7 @@ if (firstTime != ON) float charging = current[map[PLUS_X]] + current[map[MINUS_X]] + current[map[PLUS_Y]] + current[map[MINUS_Y]] + current[map[PLUS_Z]] + current[map[MINUS_Z]]; current[map[BAT]] = current[map[BUS]] - charging; - batt -= (batt > 3.5) ? current/20000: current/2000; + batt -= (batt > 3.5) ? current[map[BAT]]/20000: current[map[BAT]]/2000; voltage[map[BAT]] = batt; // end of simulated telemetry