From 0029161a1c25139a3108bd8d05a44a1dffbb86a6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 18 Jul 2022 12:30:24 +1000 Subject: [PATCH] hwdef: setup default power pins for Holybro Pixhawk6C --- .../AP_HAL_ChibiOS/hwdef/Pixhawk6C/defaults.parm | 13 +++++++++++++ libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/hwdef.dat | 5 +++++ 2 files changed, 18 insertions(+) create mode 100644 libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/defaults.parm diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/defaults.parm b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/defaults.parm new file mode 100644 index 0000000000..f6ef341a76 --- /dev/null +++ b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/defaults.parm @@ -0,0 +1,13 @@ +# setup correct defaults for battery monitoring for holybro power brick +BATT_MONITOR 4 +BATT_AMP_PERVLT 36.36 +BATT_VOLT_MULT 18.18 + +BATT2_AMP_PERVLT 36.36 +BATT2_VOLT_PIN 18.18 + +BATT2_CURR_PIN 14 +BATT2_VOLT_PIN 5 + +BATT2_AMP_PERVLT 36.36 +BATT2_VOLT_MULT 18.18 diff --git a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/hwdef.dat b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/hwdef.dat index f0a16789bf..51385a38b4 100644 --- a/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/hwdef.dat +++ b/libraries/AP_HAL_ChibiOS/hwdef/Pixhawk6C/hwdef.dat @@ -89,6 +89,11 @@ PC4 BATT_CURRENT_SENS ADC1 SCALE(1) PB1 BATT2_VOLTAGE_SENS ADC1 SCALE(1) PA2 BATT2_CURRENT_SENS ADC1 SCALE(1) +define HAL_BATT_VOLT_PIN 8 +define HAL_BATT_CURR_PIN 4 +define HAL_BATT_VOLT_SCALE 18.18 +define HAL_BATT_CURR_SCALE 36.36 + PA4 VDD_5V_SENS ADC1 SCALE(2) # SPI1 - IMUs