From 29344e688d92f0b0af83d65a2b3895963c434349 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 10 Sep 2012 11:50:48 +1000 Subject: [PATCH] APM: reboot only works on the APM2 --- ArduPlane/GCS_Mavlink.pde | 2 ++ ArduPlane/system.pde | 2 ++ 2 files changed, 4 insertions(+) diff --git a/ArduPlane/GCS_Mavlink.pde b/ArduPlane/GCS_Mavlink.pde index ccd824003d..6ceb2a8037 100644 --- a/ArduPlane/GCS_Mavlink.pde +++ b/ArduPlane/GCS_Mavlink.pde @@ -1112,8 +1112,10 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) case MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN: if (packet.param1 == 1) { +#if CONFIG_APM_HARDWARE == APM_HARDWARE_APM2 reboot_apm(); result = MAV_RESULT_ACCEPTED; +#endif } break; diff --git a/ArduPlane/system.pde b/ArduPlane/system.pde index 5c58249cb3..e13f38348b 100644 --- a/ArduPlane/system.pde +++ b/ArduPlane/system.pde @@ -571,6 +571,7 @@ uint16_t board_voltage(void) } +#if CONFIG_APM_HARDWARE == APM_HARDWARE_APM2 /* force a software reset of the APM */ @@ -584,3 +585,4 @@ static void reboot_apm(void) wdt_enable(WDTO_15MS); while (1); } +#endif