mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-02 03:49:12 +08:00
boards: move default battery calibration defines to parameter defaults
This commit is contained in:
@@ -3,26 +3,7 @@
|
||||
# board specific defaults
|
||||
#------------------------------------------------------------------------------
|
||||
|
||||
|
||||
# start MAVLink on Wifi (ESP8266 port). Except for the TealOne airframe.
|
||||
if ! param compare SYS_AUTOSTART 4250
|
||||
then
|
||||
param set-default MAV_2_CONFIG 301
|
||||
param set-default MAV_2_RATE 20000
|
||||
param set-default SER_WIFI_BAUD 921600
|
||||
fi
|
||||
|
||||
if param compare SER_WIFI_BAUD 1
|
||||
then
|
||||
# Transitional support: The Wifi port has not been configured by the user,
|
||||
# configure it for MAVLink via the ESP8266 Wifi module. Except for the TealOne airframe.
|
||||
if ! param compare SYS_AUTOSTART 4250
|
||||
then
|
||||
param set-default MAV_2_CONFIG 301
|
||||
param set-default MAV_2_RATE 20000
|
||||
param set-default SER_WIFI_BAUD 921600
|
||||
fi
|
||||
fi
|
||||
|
||||
param set-default BAT1_V_DIV 13.653333333
|
||||
param set-default BAT1_A_PER_V 36.367515152
|
||||
|
||||
safety_button start
|
||||
|
||||
@@ -83,11 +83,6 @@
|
||||
#define ADC_5V_RAIL_SENSE 4
|
||||
#define ADC_RC_RSSI_CHANNEL 11
|
||||
|
||||
/* Define Battery 1 Voltage Divider and A per V. */
|
||||
#define BOARD_BATTERY1_V_DIV (13.653333333f)
|
||||
#define BOARD_BATTERY1_A_PER_V (36.367515152f)
|
||||
|
||||
|
||||
/* Power supply control and monitoring GPIOs. */
|
||||
#define GPIO_VDD_BRICK_VALID (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTB|GPIO_PIN5)
|
||||
#define GPIO_VDD_USB_VALID (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN0)
|
||||
|
||||
Reference in New Issue
Block a user