BattMon: fix compile warnings re float constants

This commit is contained in:
Tom Pittenger 2015-04-24 12:27:19 +09:00 committed by Randy Mackay
parent 8f11507594
commit 0926cf17dd

View File

@ -11,13 +11,13 @@
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1 #if CONFIG_HAL_BOARD == HAL_BOARD_APM1
# define AP_BATT_VOLT_PIN 0 // Battery voltage on A0 # define AP_BATT_VOLT_PIN 0 // Battery voltage on A0
# define AP_BATT_CURR_PIN 1 // Battery current on A1 # define AP_BATT_CURR_PIN 1 // Battery current on A1
# define AP_BATT_VOLTDIVIDER_DEFAULT 3.56 // on-board APM1 voltage divider with a 3.9kOhm resistor # define AP_BATT_VOLTDIVIDER_DEFAULT 3.56f // on-board APM1 voltage divider with a 3.9kOhm resistor
# define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 0 # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 0
#elif CONFIG_HAL_BOARD == HAL_BOARD_APM2 #elif CONFIG_HAL_BOARD == HAL_BOARD_APM2
# define AP_BATT_VOLT_PIN 13 // APM2.5/2.6 with 3dr power module # define AP_BATT_VOLT_PIN 13 // APM2.5/2.6 with 3dr power module
# define AP_BATT_CURR_PIN 12 # define AP_BATT_CURR_PIN 12
# define AP_BATT_VOLTDIVIDER_DEFAULT 10.1 # define AP_BATT_VOLTDIVIDER_DEFAULT 10.1f
# define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0 # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0f
#elif CONFIG_HAL_BOARD == HAL_BOARD_FLYMAPLE #elif CONFIG_HAL_BOARD == HAL_BOARD_FLYMAPLE
// Flymaple board pin 20 is connected to the external battery supply // Flymaple board pin 20 is connected to the external battery supply
// via a 24k/5.1k voltage divider. The schematic claims the divider is 25k/5k, // via a 24k/5.1k voltage divider. The schematic claims the divider is 25k/5k,
@ -25,53 +25,53 @@
// So the divider ratio is 5.70588 = (24000+5100)/5100 // So the divider ratio is 5.70588 = (24000+5100)/5100
# define AP_BATT_VOLT_PIN 20 # define AP_BATT_VOLT_PIN 20
# define AP_BATT_CURR_PIN 19 # define AP_BATT_CURR_PIN 19
# define AP_BATT_VOLTDIVIDER_DEFAULT 5.70588 # define AP_BATT_VOLTDIVIDER_DEFAULT 5.70588f
# define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0 # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0f
#elif CONFIG_HAL_BOARD == HAL_BOARD_PX4 && defined(CONFIG_ARCH_BOARD_PX4FMU_V1) #elif CONFIG_HAL_BOARD == HAL_BOARD_PX4 && defined(CONFIG_ARCH_BOARD_PX4FMU_V1)
// px4 // px4
# define AP_BATT_VOLT_PIN 100 # define AP_BATT_VOLT_PIN 100
# define AP_BATT_CURR_PIN 101 # define AP_BATT_CURR_PIN 101
# define AP_BATT_VOLTDIVIDER_DEFAULT 1.1 # define AP_BATT_VOLTDIVIDER_DEFAULT 1.1f
# define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0 # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0f
#elif CONFIG_HAL_BOARD == HAL_BOARD_PX4 && defined(CONFIG_ARCH_BOARD_PX4FMU_V2) #elif CONFIG_HAL_BOARD == HAL_BOARD_PX4 && defined(CONFIG_ARCH_BOARD_PX4FMU_V2)
// pixhawk // pixhawk
# define AP_BATT_VOLT_PIN 2 # define AP_BATT_VOLT_PIN 2
# define AP_BATT_CURR_PIN 3 # define AP_BATT_CURR_PIN 3
# define AP_BATT_VOLTDIVIDER_DEFAULT 10.1 # define AP_BATT_VOLTDIVIDER_DEFAULT 10.1f
# define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0 # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0f
#elif CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL #elif CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL
# define AP_BATT_VOLT_PIN 13 # define AP_BATT_VOLT_PIN 13
# define AP_BATT_CURR_PIN 12 # define AP_BATT_CURR_PIN 12
# define AP_BATT_VOLTDIVIDER_DEFAULT 10.1 # define AP_BATT_VOLTDIVIDER_DEFAULT 10.1f
# define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0 # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0f
#elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN #elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
#if defined(CONFIG_ARCH_BOARD_VRBRAIN_V45) || defined(CONFIG_ARCH_BOARD_VRBRAIN_V51) || defined(CONFIG_ARCH_BOARD_VRBRAIN_V52) #if defined(CONFIG_ARCH_BOARD_VRBRAIN_V45) || defined(CONFIG_ARCH_BOARD_VRBRAIN_V51) || defined(CONFIG_ARCH_BOARD_VRBRAIN_V52)
# define AP_BATT_VOLT_PIN 10 # define AP_BATT_VOLT_PIN 10
# define AP_BATT_CURR_PIN 11 # define AP_BATT_CURR_PIN 11
# define AP_BATT_VOLTDIVIDER_DEFAULT 10.1 # define AP_BATT_VOLTDIVIDER_DEFAULT 10.1f
# define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0 # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0f
#elif defined(CONFIG_ARCH_BOARD_VRUBRAIN_V51) #elif defined(CONFIG_ARCH_BOARD_VRUBRAIN_V51)
# define AP_BATT_VOLT_PIN 10 # define AP_BATT_VOLT_PIN 10
# define AP_BATT_CURR_PIN -1 # define AP_BATT_CURR_PIN -1
# define AP_BATT_VOLTDIVIDER_DEFAULT 10.1 # define AP_BATT_VOLTDIVIDER_DEFAULT 10.1f
# define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0 # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0f
#elif defined(CONFIG_ARCH_BOARD_VRUBRAIN_V52) #elif defined(CONFIG_ARCH_BOARD_VRUBRAIN_V52)
# define AP_BATT_VOLT_PIN 10 # define AP_BATT_VOLT_PIN 10
# define AP_BATT_CURR_PIN 1 # define AP_BATT_CURR_PIN 1
# define AP_BATT_VOLTDIVIDER_DEFAULT 10.1 # define AP_BATT_VOLTDIVIDER_DEFAULT 10.1f
# define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0 # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0f
#endif #endif
#elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN && defined(CONFIG_ARCH_BOARD_VRHERO_V10) #elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN && defined(CONFIG_ARCH_BOARD_VRHERO_V10)
# define AP_BATT_VOLT_PIN 100 # define AP_BATT_VOLT_PIN 100
# define AP_BATT_CURR_PIN 101 # define AP_BATT_CURR_PIN 101
# define AP_BATT_VOLTDIVIDER_DEFAULT 1.1 # define AP_BATT_VOLTDIVIDER_DEFAULT 1.1f
# define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0 # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0f
#else #else
# define AP_BATT_VOLT_PIN -1 # define AP_BATT_VOLT_PIN -1
# define AP_BATT_CURR_PIN -1 # define AP_BATT_CURR_PIN -1
# define AP_BATT_VOLTDIVIDER_DEFAULT 10.1 # define AP_BATT_VOLTDIVIDER_DEFAULT 10.1f
# define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0 # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0f
#endif #endif
// Other values normally set directly by mission planner // Other values normally set directly by mission planner