Skip to content
Browse files

Rover: port rover code to PX4

  • Loading branch information...
1 parent 7365ec1 commit 0162559b6cb5312651099c85e814b82ae1ad1996 @tridge tridge committed Jan 2, 2013
Showing with 20 additions and 1 deletion.
  1. +3 −0 APMrover2/APMrover2.pde
  2. +1 −1 APMrover2/GCS_Mavlink.pde
  3. +16 −0 APMrover2/config.h
View
3 APMrover2/APMrover2.pde
@@ -105,6 +105,7 @@ version 2.1 of the License, or (at your option) any later version.
#include <AP_HAL_AVR.h>
#include <AP_HAL_AVR_SITL.h>
+#include <AP_HAL_PX4.h>
#include <AP_HAL_Empty.h>
#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
View
2 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
View
16 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

0 comments on commit 0162559

Please sign in to comment.
Something went wrong with that request. Please try again.