From 1d27e0d1274475ca98be3d7bb484d96ad848f2d0 Mon Sep 17 00:00:00 2001
From: Emile Castelnuovo <emile.castelnuovo@gmail.com>
Date: Mon, 31 Mar 2014 19:52:18 +0200
Subject: [PATCH] AP_BattMonitor: added #defines for VRBRAIN board

---
 libraries/AP_BattMonitor/AP_BattMonitor.h | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/libraries/AP_BattMonitor/AP_BattMonitor.h b/libraries/AP_BattMonitor/AP_BattMonitor.h
index add101ae9..50148b74e 100644
--- a/libraries/AP_BattMonitor/AP_BattMonitor.h
+++ b/libraries/AP_BattMonitor/AP_BattMonitor.h
@@ -51,6 +51,21 @@
  # define AP_BATT_CURR_PIN                  12
  # define AP_BATT_VOLTDIVIDER_DEFAULT       10.1
  # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT  17.0
+#elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN && defined(CONFIG_ARCH_BOARD_VRBRAIN_V4)
+ # define AP_BATT_VOLT_PIN                  100
+ # define AP_BATT_CURR_PIN                   -1
+ # define AP_BATT_VOLTDIVIDER_DEFAULT       1.1
+ # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT  17.0
+#elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN && defined(CONFIG_ARCH_BOARD_VRBRAIN_V5)
+ # define AP_BATT_VOLT_PIN                  100
+ # define AP_BATT_CURR_PIN                  101
+ # define AP_BATT_VOLTDIVIDER_DEFAULT       1.1
+ # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT  17.0
+#elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN && defined(CONFIG_ARCH_BOARD_VRHERO_V1)
+ # define AP_BATT_VOLT_PIN                  100
+ # define AP_BATT_CURR_PIN                  101
+ # define AP_BATT_VOLTDIVIDER_DEFAULT       1.1
+ # define AP_BATT_CURR_AMP_PERVOLT_DEFAULT  17.0
 #else
  # define AP_BATT_VOLT_PIN                  -1
  # define AP_BATT_CURR_PIN                  -1
-- 
GitLab