diff --git a/libraries/AP_HAL_PX4/GPIO.h b/libraries/AP_HAL_PX4/GPIO.h index 249df28f49..82ebadec4c 100644 --- a/libraries/AP_HAL_PX4/GPIO.h +++ b/libraries/AP_HAL_PX4/GPIO.h @@ -16,12 +16,20 @@ */ #define PX4_GPIO_FMU_SERVO_PIN(n) (n+50) -#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 - # define HAL_GPIO_A_LED_PIN 27 - # define HAL_GPIO_B_LED_PIN 26 - # define HAL_GPIO_C_LED_PIN 25 - # define HAL_GPIO_LED_ON LOW - # define HAL_GPIO_LED_OFF HIGH +#ifndef HAL_GPIO_A_LED_PIN +#define HAL_GPIO_A_LED_PIN 27 +#endif +#ifndef HAL_GPIO_B_LED_PIN +#define HAL_GPIO_B_LED_PIN 26 +#endif +#ifndef HAL_GPIO_C_LED_PIN +#define HAL_GPIO_C_LED_PIN 25 +#endif +#ifndef HAL_GPIO_LED_ON +#define HAL_GPIO_LED_ON 0 +#endif +#ifndef HAL_GPIO_LED_OFF +#define HAL_GPIO_LED_OFF 1 #endif class PX4::PX4GPIO : public AP_HAL::GPIO {