From 7fef74d041bd32170382beccf273d1141eb07658 Mon Sep 17 00:00:00 2001 From: bsongis Date: Wed, 8 Feb 2012 21:22:46 +0000 Subject: [PATCH] Bad rounding for FRSKY values --- src/frsky.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frsky.cpp b/src/frsky.cpp index 5fbfd05cd..22181df90 100644 --- a/src/frsky.cpp +++ b/src/frsky.cpp @@ -494,7 +494,7 @@ void frskyAlarmsRefresh() void FrskyRSSI::set(uint8_t value) { - this->value = (((uint16_t)this->value * 7) + value) / 8; + this->value = (((uint16_t)this->value * 7) + value + 4) / 8; if (!min || min > value) min = value; }