mirror of https://github.com/ArduPilot/ardupilot
AP_Notify: add PX4_V4 check to PixRacerLED
This commit is contained in:
parent
4467a2cd16
commit
b5573f6665
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue