AP_Proximity_MorseSITL.h 734 B

123456789101112131415161718192021222324252627282930
  1. #pragma once
  2. #include "AP_Proximity.h"
  3. #include "AP_Proximity_Backend.h"
  4. #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
  5. #include <SITL/SITL.h>
  6. class AP_Proximity_MorseSITL : public AP_Proximity_Backend
  7. {
  8. public:
  9. // constructor
  10. AP_Proximity_MorseSITL(AP_Proximity &_frontend, AP_Proximity::Proximity_State &_state);
  11. // update state
  12. void update(void) override;
  13. // get maximum and minimum distances (in meters) of sensor
  14. float distance_max() const override;
  15. float distance_min() const override;
  16. // get distance upwards in meters. returns true on success
  17. bool get_upward_distance(float &distance) const override;
  18. private:
  19. SITL::SITL *sitl;
  20. float distance_maximum;
  21. };
  22. #endif // CONFIG_HAL_BOARD