mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_Notify: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1
This commit is contained in:
parent
d00c8e3a34
commit
d2c18a5c7b
@ -25,19 +25,7 @@
|
||||
#define HIGH 1
|
||||
#define LOW 0
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1
|
||||
# define HAL_GPIO_A_LED_PIN 37
|
||||
# define HAL_GPIO_B_LED_PIN 36
|
||||
# define HAL_GPIO_C_LED_PIN 35
|
||||
# define HAL_GPIO_LED_ON HIGH
|
||||
# define HAL_GPIO_LED_OFF LOW
|
||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_APM2
|
||||
# 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
|
||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_PX4
|
||||
#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
|
||||
|
@ -30,11 +30,6 @@ struct AP_Notify::notify_events_type AP_Notify::events;
|
||||
#else
|
||||
NotifyDevice *AP_Notify::_devices[] = {&boardled, &toshibaled, &tonealarm};
|
||||
#endif
|
||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_APM1 || CONFIG_HAL_BOARD == HAL_BOARD_APM2
|
||||
AP_BoardLED boardled;
|
||||
ExternalLED externalled;
|
||||
Buzzer buzzer;
|
||||
NotifyDevice *AP_Notify::_devices[] = {&boardled, &externalled, &buzzer};
|
||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
|
||||
Buzzer buzzer;
|
||||
#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_VRBRAIN_V45
|
||||
|
@ -18,11 +18,7 @@
|
||||
#ifndef __BUZZER_H__
|
||||
#define __BUZZER_H__
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1
|
||||
# define BUZZER_PIN 63 // pin 63 on APM1
|
||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_APM2
|
||||
# define BUZZER_PIN 59 // pin 59 on APM2
|
||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
|
||||
# define BUZZER_PIN 32
|
||||
#else
|
||||
# define BUZZER_PIN 0 // pin undefined on other boards
|
||||
|
@ -23,24 +23,14 @@
|
||||
#include <AP_Param/AP_Param.h>
|
||||
#include "NotifyDevice.h"
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_APM2
|
||||
#define EXTERNAL_LED_ARMED 61 // Armed LED - AN7
|
||||
#define EXTERNAL_LED_GPS 60 // GPS LED - AN6
|
||||
#define EXTERNAL_LED_MOTOR1 58 // Motor1 LED - AN4
|
||||
#define EXTERNAL_LED_MOTOR2 62 // Motor2 LED - AN8
|
||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_APM1
|
||||
#define EXTERNAL_LED_GPS 64 // GPS LED - AN10
|
||||
#define EXTERNAL_LED_ARMED 65 // Armed LED - AN11
|
||||
#define EXTERNAL_LED_MOTOR1 62 // Motor1 LED - AN8
|
||||
#define EXTERNAL_LED_MOTOR2 66 // Motor2 LED - AN12
|
||||
#elif CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
|
||||
#define EXTERNAL_LED_GPS 28 // GPS LED - AN10
|
||||
#define EXTERNAL_LED_ARMED 29 // Armed LED - AN11
|
||||
#define EXTERNAL_LED_MOTOR1 30 // Motor1 LED - AN8
|
||||
#define EXTERNAL_LED_MOTOR2 31 // Motor2 LED - AN12
|
||||
#else
|
||||
#define EXTERNAL_LED_GPS 0 // pin definitions to allow this lib to build for
|
||||
#define EXTERNAL_LED_ARMED 0 // for other boards besides APM1, APM2 even though
|
||||
#define EXTERNAL_LED_ARMED 0 // for other boards even though
|
||||
#define EXTERNAL_LED_MOTOR1 0 // they will never be used
|
||||
#define EXTERNAL_LED_MOTOR2 0
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user