When A1 or A2 are current sources they have to be / 10 for power calculations

This commit is contained in:
bsongis
2012-07-07 08:36:26 +00:00
parent 536f032a15
commit 6585294321
+2 -2
View File
@@ -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) {