AP_Notify: add PX4_V4 check to PixRacerLED

This commit is contained in:
Randy Mackay 2017-01-27 09:16:12 +09:00
parent 4467a2cd16
commit b5573f6665
1 changed files with 7 additions and 0 deletions

View File

@ -15,6 +15,8 @@
#include "PixRacerLED.h"
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 && CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_PX4_V4
extern const AP_HAL::HAL& hal;
PixRacerLED::PixRacerLED() :
@ -37,3 +39,8 @@ bool PixRacerLED::hw_set_rgb(uint8_t r, uint8_t g, uint8_t b)
hal.gpio->write(HAL_GPIO_C_LED_PIN, (b > 0));
return true;
}
#else
bool PixRacerLED::hw_init(void) { return true; }
bool PixRacerLED::hw_set_rgb(uint8_t r, uint8_t g, uint8_t b) { return true; }
#endif