From 7c575b251a2beb4fb5c69add7505314e1faf4cc7 Mon Sep 17 00:00:00 2001 From: squilter Date: Fri, 31 Jul 2015 15:39:36 -0700 Subject: [PATCH] Plane: init vehicle capabilities --- ArduPlane/Plane.h | 1 + ArduPlane/capabilities.cpp | 9 +++++++++ ArduPlane/system.cpp | 2 ++ 3 files changed, 12 insertions(+) create mode 100644 ArduPlane/capabilities.cpp diff --git a/ArduPlane/Plane.h b/ArduPlane/Plane.h index b9e4312600..db0e7d5c37 100644 --- a/ArduPlane/Plane.h +++ b/ArduPlane/Plane.h @@ -914,6 +914,7 @@ private: void log_init(); uint32_t millis() const; uint32_t micros() const; + void init_capabilities(void); public: void mavlink_delay_cb(); diff --git a/ArduPlane/capabilities.cpp b/ArduPlane/capabilities.cpp new file mode 100644 index 0000000000..fd9ab981be --- /dev/null +++ b/ArduPlane/capabilities.cpp @@ -0,0 +1,9 @@ +// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- + +#include "Plane.h" + +void Plane::init_capabilities(void) +{ + hal.util->set_capabilities(MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT); + hal.util->set_capabilities(MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT); +} diff --git a/ArduPlane/system.cpp b/ArduPlane/system.cpp index f6c1334f41..0ee00ea9ff 100644 --- a/ArduPlane/system.cpp +++ b/ArduPlane/system.cpp @@ -235,6 +235,8 @@ void Plane::init_ardupilot() } #endif // CLI_ENABLED + init_capabilities(); + startup_ground(); Log_Write_Startup(TYPE_GROUNDSTART_MSG);