From 048532ae98577841a47c6fdbb007014e18704d6a Mon Sep 17 00:00:00 2001 From: Jason Short Date: Fri, 6 Jan 2012 21:43:37 -0800 Subject: [PATCH] scaled to 0-1023 --- ArduCopter/defines.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArduCopter/defines.h b/ArduCopter/defines.h index ff145e2e5b..cd0efba163 100644 --- a/ArduCopter/defines.h +++ b/ArduCopter/defines.h @@ -283,8 +283,8 @@ enum gcs_severity { #define ALTITUDE_HISTORY_LENGTH 8 //Number of (time,altitude) points to regress a climb rate from -#define BATTERY_VOLTAGE(x) (x*(g.input_voltage/1024.0))*VOLT_DIV_RATIO -#define CURRENT_AMPS(x) ((x*(g.input_voltage/1024.0))-CURR_AMPS_OFFSET)*CURR_AMP_PER_VOLT +#define BATTERY_VOLTAGE(x) (x*(g.input_voltage/1023.0))*VOLT_DIV_RATIO +#define CURRENT_AMPS(x) ((x*(g.input_voltage/1023.0))-CURR_AMPS_OFFSET)*CURR_AMP_PER_VOLT //#define BARO_FILTER_SIZE 8 /* ************************************************************** */