From 6585294321300410377c3df51119cfdce7a2dc07 Mon Sep 17 00:00:00 2001 From: bsongis Date: Sat, 7 Jul 2012 08:36:26 +0000 Subject: [PATCH] When A1 or A2 are current sources they have to be / 10 for power calculations --- src/frsky.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/frsky.cpp b/src/frsky.cpp index 2cfcf62c0..dc86e0d47 100644 --- a/src/frsky.cpp +++ b/src/frsky.cpp @@ -647,10 +647,10 @@ void check_frsky() uint16_t current = frskyData.hub.current; if (g_model.frsky.currentSource >= FRSKY_SOURCE_A1 && g_model.frsky.currentSource <= FRSKY_SOURCE_A2) { uint8_t channel = g_model.frsky.currentSource - FRSKY_SOURCE_A1; - current = applyChannelRatio(channel, frskyData.analog[channel].value); + current = applyChannelRatio(channel, frskyData.analog[channel].value) / 10; } - frskyData.power = current * voltage / 100; + frskyData.power = (current * voltage) / 100; frskyData.currentPrescale += current; if (frskyData.currentPrescale >= currentConsumptionBoundary) {