|
|
@ -4,21 +4,30 @@ |
|
|
|
#include <AP_Progmem.h> |
|
|
|
#include <AP_Progmem.h> |
|
|
|
#include <AP_Math.h> // ArduPilot Mega Vector/Matrix math Library |
|
|
|
#include <AP_Math.h> // ArduPilot Mega Vector/Matrix math Library |
|
|
|
#include <AP_Param.h> |
|
|
|
#include <AP_Param.h> |
|
|
|
|
|
|
|
#include <Filter.h> |
|
|
|
|
|
|
|
#include <AP_ADC.h> |
|
|
|
|
|
|
|
#include <GCS_MAVLink.h> |
|
|
|
|
|
|
|
#include <AP_Declination.h> |
|
|
|
#include <AP_HAL.h> |
|
|
|
#include <AP_HAL.h> |
|
|
|
#include <AP_HAL_AVR.h> |
|
|
|
#include <AP_HAL_AVR.h> |
|
|
|
|
|
|
|
#include <AP_HAL_AVR_SITL.h> |
|
|
|
|
|
|
|
#include <AP_HAL_Linux.h> |
|
|
|
|
|
|
|
#include <AP_HAL_PX4.h> |
|
|
|
|
|
|
|
#include <AP_HAL_Empty.h> |
|
|
|
|
|
|
|
#include <AP_HAL_FLYMAPLE.h> |
|
|
|
#include <AP_Notify.h> // Notify library |
|
|
|
#include <AP_Notify.h> // Notify library |
|
|
|
#include <ToshibaLED.h> |
|
|
|
#include <ToshibaLED.h> |
|
|
|
|
|
|
|
|
|
|
|
const AP_HAL::HAL& hal = AP_HAL_BOARD_DRIVER; |
|
|
|
const AP_HAL::HAL& hal = AP_HAL_BOARD_DRIVER; |
|
|
|
|
|
|
|
|
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_APM1 || CONFIG_HAL_BOARD == HAL_BOARD_APM2 |
|
|
|
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4 |
|
|
|
ToshibaLED_I2C toshiba_led; |
|
|
|
static ToshibaLED_PX4 toshiba_led; |
|
|
|
#elif CONFIG_HAL_BOARD == HAL_BOARD_PX4 |
|
|
|
#else |
|
|
|
ToshibaLED_PX4 toshiba_led; |
|
|
|
static ToshibaLED_I2C toshiba_led; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
uint8_t led_state; |
|
|
|
static uint8_t led_state; |
|
|
|
uint8_t red, green, blue; |
|
|
|
static uint8_t red, green, blue; |
|
|
|
|
|
|
|
|
|
|
|
void setup(void) |
|
|
|
void setup(void) |
|
|
|
{ |
|
|
|
{ |
|
|
|