From ad240feba7e520bd7ec820b2fee496f799a8a80a Mon Sep 17 00:00:00 2001 From: Trey Henrichsen Date: Thu, 23 Jan 2020 11:20:17 -0700 Subject: [PATCH] Update documentation --- include/command_manager.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/command_manager.h b/include/command_manager.h index 66a94fab..5e98b428 100644 --- a/include/command_manager.h +++ b/include/command_manager.h @@ -192,7 +192,7 @@ class CommandManager : public ParamListenerInterface /** * @brief Checks which channels are overridden * @details There are many reasons that a channel could be overriden. These reasons include: - * - A stick is deviated + * - A stick is deflected * - The commanded throttle is less than the RC throttle, and the MIN_THROTTLE parameter is set * - The attitude or throttle override switch is flipped * - The onboard computer has not sent any commands recently @@ -212,6 +212,18 @@ class CommandManager : public ParamListenerInterface CommandManager(ROSflight &_rf); void init(); bool run(); + /** + * @brief Checks which channels are overridden, and why + * @details There are many reasons that a channel could be overriden. These reasons include: + * - A stick is deflected + * - The commanded throttle is less than the RC throttle, and the MIN_THROTTLE parameter is set + * - The attitude or throttle override switch is flipped + * - The onboard computer has not sent any commands recently + * The returned bitfield indicates which reasons have caused an override. + * Because c++ can use integers as booleans, this function can be treated as providing a boolean + * This value is updated when run is called if a new RC command is available + * @return A bitfield, with overriden reasons indicated + */ uint16_t get_rc_override(); bool offboard_control_active(); void set_new_offboard_command(control_t new_offboard_command);