fix bug in handling of missing default current scaling parameter

This commit is contained in:
Mark Whitehorn
2016-04-02 21:40:34 +01:00
committed by Lorenz Meier
parent 0d94800b50
commit 2f057939ad
+2 -2
View File
@@ -916,7 +916,7 @@ Sensors::parameters_update()
/* apply scaling according to defaults if set to default */
#if defined (CONFIG_ARCH_BOARD_PX4FMU_V4)
/* current scaling for ACSP4 */
_parameters.battery_current_scaling = 0.029296875f;
_parameters.battery_current_scaling = 0.0293f;
#elif defined (CONFIG_ARCH_BOARD_PX4FMU_V2) || defined ( CONFIG_ARCH_BOARD_MINDPX_V2 )
/* current scaling for 3DR power brick */
_parameters.battery_current_scaling = 0.0124f;
@@ -926,7 +926,7 @@ Sensors::parameters_update()
_parameters.battery_current_scaling = 0.0124f;
#else
/* ensure a missing default leads to an unrealistic current value */
_parameters.battery_voltage_scaling = 0.00001f;
_parameters.battery_current_scaling = 0.00001f;
#endif
}