AC_InputManager.h 865 B

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. /// @file AC_InputManager.h
  3. /// @brief Pilot manual control input library
  4. #include <AP_Common/AP_Common.h>
  5. #include <AP_Param/AP_Param.h>
  6. #include <AP_Math/AP_Math.h>
  7. /// @class AC_InputManager
  8. /// @brief Class managing the pilot's control inputs
  9. class AC_InputManager{
  10. public:
  11. AC_InputManager() {
  12. // setup parameter defaults
  13. AP_Param::setup_object_defaults(this, var_info);
  14. }
  15. /* Do not allow copies */
  16. AC_InputManager(const AC_InputManager &other) = delete;
  17. AC_InputManager &operator=(const AC_InputManager&) = delete;
  18. static const struct AP_Param::GroupInfo var_info[];
  19. void set_loop_rate(uint16_t loop_rate) { _loop_rate = loop_rate; }
  20. protected:
  21. // internal variables
  22. uint16_t _loop_rate; // rate at which output() function is called (normally 400hz)
  23. };