From 9a9e715af872dab922e46a4ace5e2d922728befc Mon Sep 17 00:00:00 2001 From: Michael du Breuil Date: Sat, 10 Nov 2018 14:41:29 -0700 Subject: [PATCH] AP_HAL: Define HAL_HAVE_SERVO_VOLTAGE --- libraries/AP_HAL/board/chibios.h | 4 ++++ libraries/AP_HAL/board/empty.h | 1 + libraries/AP_HAL/board/linux.h | 6 ++++++ libraries/AP_HAL/board/px4.h | 4 ++++ libraries/AP_HAL/board/sitl.h | 1 + libraries/AP_HAL/board/vrbrain.h | 4 ++++ 6 files changed, 20 insertions(+) diff --git a/libraries/AP_HAL/board/chibios.h b/libraries/AP_HAL/board/chibios.h index 2b4c0e7cfa..468842a506 100644 --- a/libraries/AP_HAL/board/chibios.h +++ b/libraries/AP_HAL/board/chibios.h @@ -21,6 +21,10 @@ #define HAL_HAVE_BOARD_VOLTAGE 0 #endif +#ifndef HAL_HAVE_SERVO_VOLTAGE +#define HAL_HAVE_SERVO_VOLTAGE 0 +#endif + #ifdef HAL_GPIO_PIN_SAFETY_IN #define HAL_HAVE_SAFETY_SWITCH 1 #endif diff --git a/libraries/AP_HAL/board/empty.h b/libraries/AP_HAL/board/empty.h index 87f7424200..c2d9c3d370 100644 --- a/libraries/AP_HAL/board/empty.h +++ b/libraries/AP_HAL/board/empty.h @@ -10,6 +10,7 @@ #define CONFIG_HAL_BOARD_SUBTYPE HAL_BOARD_SUBTYPE_NONE #define HAL_HAVE_BOARD_VOLTAGE 1 +#define HAL_HAVE_SERVO_VOLTAGE 0 #define HAL_HAVE_SAFETY_SWITCH 1 #define HAL_Semaphore Empty::Semaphore diff --git a/libraries/AP_HAL/board/linux.h b/libraries/AP_HAL/board/linux.h index bd161e33c8..79662f54a8 100644 --- a/libraries/AP_HAL/board/linux.h +++ b/libraries/AP_HAL/board/linux.h @@ -137,6 +137,7 @@ #define HAL_COMPASS_HMC5843_I2C_BUS 1 #define HAL_COMPASS_HMC5843_I2C_ADDR 0x1E #elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_NAVIO2 +#define HAL_HAVE_SERVO_VOLTAGE 1 #define HAL_INS_DEFAULT HAL_INS_MPU9250_SPI #define HAL_INS_DEFAULT_ROTATION ROTATION_NONE #define HAL_INS_MPU9250_NAME "mpu9250" @@ -357,6 +358,11 @@ #define HAL_HAVE_BOARD_VOLTAGE 1 #define HAL_HAVE_SAFETY_SWITCH 0 + +#ifndef HAL_HAVE_SERVO_VOLTAGE +#define HAL_HAVE_SERVO_VOLTAGE 0 +#endif + #ifndef AP_STATEDIR #define HAL_BOARD_STATE_DIRECTORY "/var/lib/ardupilot" #else diff --git a/libraries/AP_HAL/board/px4.h b/libraries/AP_HAL/board/px4.h index 635624de51..86aac17f64 100644 --- a/libraries/AP_HAL/board/px4.h +++ b/libraries/AP_HAL/board/px4.h @@ -117,6 +117,10 @@ #define HAL_HAVE_BOARD_VOLTAGE 1 #endif +#ifndef HAL_HAVE_SERVO_VOLTAGE +#define HAL_HAVE_SERVO_VOLTAGE 1 +#endif + #ifndef HAL_PX4_HAVE_MTD_SUPPORT #define HAL_PX4_HAVE_MTD_SUPPORT 1 #endif diff --git a/libraries/AP_HAL/board/sitl.h b/libraries/AP_HAL/board/sitl.h index 71e6ff6fb9..d8d031008a 100644 --- a/libraries/AP_HAL/board/sitl.h +++ b/libraries/AP_HAL/board/sitl.h @@ -19,6 +19,7 @@ #define HAL_GPIO_LED_OFF 1 #define HAL_HAVE_BOARD_VOLTAGE 1 +#define HAL_HAVE_SERVO_VOLTAGE 1 #define HAL_HAVE_SAFETY_SWITCH 0 // allow for static semaphores diff --git a/libraries/AP_HAL/board/vrbrain.h b/libraries/AP_HAL/board/vrbrain.h index 156e53426a..7b8fe55d16 100644 --- a/libraries/AP_HAL/board/vrbrain.h +++ b/libraries/AP_HAL/board/vrbrain.h @@ -84,6 +84,10 @@ #define HAL_HAVE_BOARD_VOLTAGE 0 #endif +#ifndef HAL_HAVE_BOARD_VOLTAGE +#define HAL_HAVE_SERVO_VOLTAGE 1 +#endif + #ifndef HAL_PX4_HAVE_MTD_SUPPORT #define HAL_PX4_HAVE_MTD_SUPPORT 1 #endif