From 32b67269685fff4d54560a3767faa96326a28507 Mon Sep 17 00:00:00 2001 From: bsongis Date: Mon, 19 Mar 2012 21:51:52 +0000 Subject: [PATCH] Temperature threshold missing --- src/frsky.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frsky.cpp b/src/frsky.cpp index 81c1788bb..b94c65a68 100644 --- a/src/frsky.cpp +++ b/src/frsky.cpp @@ -968,7 +968,7 @@ void menuProcFrsky(uint8_t event) int16_t barMin = convertTelemValue(source, bmin); int16_t barMax = convertTelemValue(source, bmax); if (threshold) { - thresholdX = (uint8_t)((int32_t)100 * (threshold - barMin) / (barMax - barMin)); + thresholdX = (uint8_t)(((int32_t)(threshold - barMin) * (int32_t)100) / (barMax - barMin)); if (thresholdX > 100) thresholdX = 0; }