mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-07 01:04:19 +08:00
FMUV2 Moved magic numbers for battery V div and A per V to board_config.h
This commit is contained in:
committed by
Lorenz Meier
parent
0baefec09f
commit
e0fa53f444
@@ -159,6 +159,12 @@
|
||||
#define ADC_5V_RAIL_SENSE 4
|
||||
#define ADC_AIRSPEED_VOLTAGE_CHANNEL 15
|
||||
|
||||
/* Define Battery 1 Voltage Divider and A per V
|
||||
*/
|
||||
|
||||
#define BOARD_BATTERY1_V_DIV (10.177939394f)
|
||||
#define BOARD_BATTERY1_A_PER_V (15.391030303f)
|
||||
|
||||
/* User GPIOs
|
||||
*
|
||||
* GPIO0-5 are the PWM servo outputs.
|
||||
|
||||
@@ -419,7 +419,7 @@ int update_parameters(const ParameterHandles ¶meter_handles, Parameters &par
|
||||
|
||||
parameters.battery_v_div = BOARD_BATTERY1_V_DIV;
|
||||
|
||||
#if defined (CONFIG_ARCH_BOARD_PX4FMU_V2) || defined ( CONFIG_ARCH_BOARD_MINDPX_V2 )
|
||||
#if defined ( CONFIG_ARCH_BOARD_MINDPX_V2 )
|
||||
parameters.battery_v_div = 10.177939394f;
|
||||
#elif defined (CONFIG_ARCH_BOARD_AEROCORE)
|
||||
parameters.battery_v_div = 7.8196363636f;
|
||||
@@ -438,7 +438,7 @@ int update_parameters(const ParameterHandles ¶meter_handles, Parameters &par
|
||||
|
||||
parameters.battery_a_per_v = BOARD_BATTERY1_A_PER_V;
|
||||
|
||||
#if defined (CONFIG_ARCH_BOARD_PX4FMU_V2) || defined (CONFIG_ARCH_BOARD_MINDPX_V2) || defined (CONFIG_ARCH_BOARD_AEROCORE) || defined (CONFIG_ARCH_BOARD_PX4FMU_V1)
|
||||
#if defined (CONFIG_ARCH_BOARD_MINDPX_V2) || defined (CONFIG_ARCH_BOARD_AEROCORE) || defined (CONFIG_ARCH_BOARD_PX4FMU_V1)
|
||||
/* current scaling for 3DR power brick */
|
||||
parameters.battery_a_per_v = 15.391030303f;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user