diff --git a/APMrover2/APMrover2.pde b/APMrover2/APMrover2.pde index 382124c85f..fcd51d6ccb 100644 --- a/APMrover2/APMrover2.pde +++ b/APMrover2/APMrover2.pde @@ -105,6 +105,7 @@ version 2.1 of the License, or (at your option) any later version. #include #include +#include #include #include "compat.h" @@ -155,6 +156,8 @@ DataFlash_APM1 DataFlash; DataFlash_APM2 DataFlash; #elif CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL DataFlash_SITL DataFlash; +#elif CONFIG_HAL_BOARD == HAL_BOARD_PX4 +DataFlash_Empty DataFlash; #endif diff --git a/APMrover2/GCS_Mavlink.pde b/APMrover2/GCS_Mavlink.pde index bd3f2fb96f..22b53370ee 100644 --- a/APMrover2/GCS_Mavlink.pde +++ b/APMrover2/GCS_Mavlink.pde @@ -198,7 +198,7 @@ static NOINLINE void send_extended_status1(mavlink_channel_t chan, uint16_t pack static void NOINLINE send_meminfo(mavlink_channel_t chan) { -#if CONFIG_HAL_BOARD != HAL_BOARD_AVR_SITL +#if CONFIG_HAL_BOARD == HAL_BOARD_APM1 || CONFIG_HAL_BOARD == HAL_BOARD_APM2 extern unsigned __brkval; mavlink_msg_meminfo_send(chan, __brkval, memcheck_available_memory()); #endif diff --git a/APMrover2/config.h b/APMrover2/config.h index 81db8c8ece..fb1df0a85f 100644 --- a/APMrover2/config.h +++ b/APMrover2/config.h @@ -110,6 +110,22 @@ # define USB_MUX_PIN -1 # define BATTERY_PIN_1 1 # define CURRENT_PIN_1 2 +#elif CONFIG_HAL_BOARD == HAL_BOARD_PX4 +# define CONFIG_INS_TYPE CONFIG_INS_SITL +# define CONFIG_PUSHBUTTON DISABLED +# define CONFIG_RELAY DISABLED +# define CONFIG_SONAR_SOURCE SONAR_SOURCE_ANALOG_PIN +# define A_LED_PIN 27 +# define B_LED_PIN 26 +# define C_LED_PIN 25 +# define LED_ON LOW +# define LED_OFF HIGH +# define SLIDE_SWITCH_PIN (-1) +# define PUSHBUTTON_PIN (-1) +# define CLI_SLIDER_ENABLED DISABLED +# define USB_MUX_PIN -1 +# define BATTERY_PIN_1 -1 +# define CURRENT_PIN_1 -1 #endif #if CONFIG_HAL_BOARD == HAL_BOARD_AVR_SITL