mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 04:23:34 +08:00
Configure led ring and enable heartbeat on it
This commit is contained in:
@@ -124,6 +124,7 @@ heartbeat_blink(void)
|
||||
{
|
||||
static bool heartbeat = false;
|
||||
LED_BLUE(heartbeat = !heartbeat);
|
||||
LED_RING(heartbeat);
|
||||
}
|
||||
|
||||
static uint64_t reboot_time;
|
||||
@@ -191,6 +192,7 @@ user_start(int argc, char *argv[])
|
||||
LED_AMBER(false);
|
||||
LED_BLUE(false);
|
||||
LED_SAFETY(false);
|
||||
LED_RING(false);
|
||||
|
||||
/* turn on servo power (if supported) */
|
||||
#ifdef POWER_SERVO
|
||||
|
||||
@@ -140,6 +140,7 @@ extern pwm_limit_t pwm_limit;
|
||||
#define LED_BLUE(_s) stm32_gpiowrite(GPIO_LED1, !(_s))
|
||||
#define LED_AMBER(_s) stm32_gpiowrite(GPIO_LED2, !(_s))
|
||||
#define LED_SAFETY(_s) stm32_gpiowrite(GPIO_LED3, !(_s))
|
||||
#define LED_RING(_s) stm32_gpiowrite(GPIO_LED4, !(_s))
|
||||
|
||||
#ifdef CONFIG_ARCH_BOARD_PX4IO_V1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user