From c77182b748a8e9f718cf0a8b574d6f51a6f112f3 Mon Sep 17 00:00:00 2001 From: squilter Date: Fri, 31 Jul 2015 14:14:51 -0700 Subject: [PATCH] Rover: init vehicle capabilities --- APMrover2/Rover.h | 1 + APMrover2/capabilities.cpp | 9 +++++++++ APMrover2/system.cpp | 2 ++ 3 files changed, 12 insertions(+) create mode 100644 APMrover2/capabilities.cpp diff --git a/APMrover2/Rover.h b/APMrover2/Rover.h index 6102eb9dde..c271b345fa 100644 --- a/APMrover2/Rover.h +++ b/APMrover2/Rover.h @@ -498,6 +498,7 @@ private: void do_set_home(const AP_Mission::Mission_Command& cmd); void do_digicam_configure(const AP_Mission::Mission_Command& cmd); void do_digicam_control(const AP_Mission::Mission_Command& cmd); + void init_capabilities(void); public: bool print_log_menu(void); diff --git a/APMrover2/capabilities.cpp b/APMrover2/capabilities.cpp new file mode 100644 index 0000000000..7122eb84f5 --- /dev/null +++ b/APMrover2/capabilities.cpp @@ -0,0 +1,9 @@ +// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- + +#include "Rover.h" + +void Rover::init_capabilities(void) +{ + hal.util->set_capabilities(MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT); + hal.util->set_capabilities(MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT); +} diff --git a/APMrover2/system.cpp b/APMrover2/system.cpp index 4d70ff3029..bb5ed7fed8 100644 --- a/APMrover2/system.cpp +++ b/APMrover2/system.cpp @@ -210,6 +210,8 @@ void Rover::init_ardupilot() } #endif + init_capabilities(); + startup_ground(); Log_Write_Startup(TYPE_GROUNDSTART_MSG);