From 335b1428960ce16f2e0903e3e8ab37c5cc402cab Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Thu, 10 Dec 2020 17:18:12 -0500 Subject: [PATCH] fixed cpuTemp in APRS simulated mode --- afsk/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/afsk/main.c b/afsk/main.c index 017becda..c6302ae4 100644 --- a/afsk/main.c +++ b/afsk/main.c @@ -760,7 +760,7 @@ if (sim_mode) // printf("temp: %f Time: %f Eclipse: %d : %f %f | %f %f | %f %f\n",tempS, time, eclipse, voltage[map[PLUS_X]], voltage[map[MINUS_X]], voltage[map[PLUS_Y]], voltage[map[MINUS_Y]], current[map[PLUS_Z]], current[map[MINUS_Z]]); tempS += (eclipse > 0) ? ((temp_max - tempS)/50.0): ((temp_min - tempS)/50.0); - cpuTemp = (int)((tempS + rnd_float(-1.0, 1.0)) * 10 + 0.5); + cpuTemp = tempS + rnd_float(-1.0, 1.0); voltage[map[BUS]] = rnd_float(5.0, 5.005); current[map[BUS]] = rnd_float(158, 171);