From e735a56c823f62ec26920e53600ee8265dc88e71 Mon Sep 17 00:00:00 2001 From: Georgii Staroselskii Date: Thu, 1 Dec 2016 15:32:11 +0300 Subject: [PATCH] AP_BattMonitor: add default PM definitions for Navio boards As it turns out we haven't had default PM defs for power modules intended to be used with Navio boards. --- libraries/AP_BattMonitor/AP_BattMonitor_Analog.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/AP_BattMonitor/AP_BattMonitor_Analog.h b/libraries/AP_BattMonitor/AP_BattMonitor_Analog.h index 14ef9989ef..9a4521bd96 100644 --- a/libraries/AP_BattMonitor/AP_BattMonitor_Analog.h +++ b/libraries/AP_BattMonitor/AP_BattMonitor_Analog.h @@ -58,6 +58,12 @@ # define AP_BATT_VOLTDIVIDER_DEFAULT 10.1f # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0f +#elif CONFIG_HAL_BOARD == HAL_BOARD_LINUX && (CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO || CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO2) + # define AP_BATT_VOLT_PIN 2 + # define AP_BATT_CURR_PIN 3 + # define AP_BATT_VOLTDIVIDER_DEFAULT 11.3f + # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT 17.0f + #else # define AP_BATT_VOLT_PIN -1 # define AP_BATT_CURR_PIN -1