mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-02 14:13:42 -04:00
25c409d4a2
See discussion here: https://github.com/ArduPilot/ardupilot/issues/7331 we were getting some uninitialised variables. While it only showed up in AP_SbusOut, it means we can't be sure it won't happen on other objects, so safest to remove the approach Thanks to assistance from Lucas, Peter and Francisco
31 lines
865 B
C++
31 lines
865 B
C++
#pragma once
|
|
|
|
/// @file AC_InputManager.h
|
|
/// @brief Pilot manual control input library
|
|
|
|
#include <AP_Common/AP_Common.h>
|
|
#include <AP_Param/AP_Param.h>
|
|
#include <AP_Math/AP_Math.h>
|
|
|
|
/// @class AC_InputManager
|
|
/// @brief Class managing the pilot's control inputs
|
|
class AC_InputManager{
|
|
public:
|
|
AC_InputManager() {
|
|
// setup parameter defaults
|
|
AP_Param::setup_object_defaults(this, var_info);
|
|
}
|
|
|
|
/* Do not allow copies */
|
|
AC_InputManager(const AC_InputManager &other) = delete;
|
|
AC_InputManager &operator=(const AC_InputManager&) = delete;
|
|
|
|
static const struct AP_Param::GroupInfo var_info[];
|
|
void set_loop_rate(uint16_t loop_rate) { _loop_rate = loop_rate; }
|
|
|
|
protected:
|
|
// internal variables
|
|
uint16_t _loop_rate; // rate at which output() function is called (normally 400hz)
|
|
|
|
};
|