mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-26 01:17:51 +08:00
battery_status: do not publish if no voltage channel is defined
This is the case for boards with digital readout, like v5x, but still enable the battery_status module for external analog driver options. An alternative would be to not run battery_status depending on config.
This commit is contained in:
@@ -145,7 +145,10 @@
|
||||
# define BOARD_BATT_I_LIST {ADC_BATTERY_CURRENT_CHANNEL}
|
||||
# define BOARD_BRICK_VALID_LIST {BOARD_ADC_BRICK_VALID}
|
||||
#elif BOARD_NUMBER_BRICKS == 2
|
||||
# if !defined(BOARD_NUMBER_DIGITAL_BRICKS)
|
||||
# if defined(BOARD_NUMBER_DIGITAL_BRICKS)
|
||||
# define BOARD_BATT_V_LIST {-1, -1}
|
||||
# define BOARD_BATT_I_LIST {-1, -1}
|
||||
# else
|
||||
# define BOARD_BATT_V_LIST {ADC_BATTERY1_VOLTAGE_CHANNEL, ADC_BATTERY2_VOLTAGE_CHANNEL}
|
||||
# define BOARD_BATT_I_LIST {ADC_BATTERY1_CURRENT_CHANNEL, ADC_BATTERY2_CURRENT_CHANNEL}
|
||||
# endif
|
||||
|
||||
Reference in New Issue
Block a user