From 1c457d84489206c379f3a3c4b78874e1699b06bc Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Wed, 5 Mar 2014 16:01:11 +0900 Subject: [PATCH] Mount: add get_mode and set_mode_to_default methods --- libraries/AP_Mount/AP_Mount.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libraries/AP_Mount/AP_Mount.h b/libraries/AP_Mount/AP_Mount.h index 3253b430dc..15a3a337d2 100644 --- a/libraries/AP_Mount/AP_Mount.h +++ b/libraries/AP_Mount/AP_Mount.h @@ -42,6 +42,13 @@ public: k_pan_tilt_roll = 3, ///< yaw-pitch-roll }; + // get_mode - return current mount mode + enum MAV_MOUNT_MODE get_mode() const { return (enum MAV_MOUNT_MODE)_mount_mode.get(); } + + // set_mode_to_default - restores the mode to it's default held in the MNT_MODE parameter + // this operation requires 2ms on an APM2, 0.7ms on a Pixhawk/PX4 + void set_mode_to_default() { _mount_mode.load(); } + // MAVLink methods void configure_msg(mavlink_message_t* msg); void control_msg(mavlink_message_t* msg);