AP_IRLock_SITL_Gazebo.h 549 B

1234567891011121314151617181920212223242526272829
  1. /*
  2. * AP_IRLock_SITL.h
  3. *
  4. * Created on: June 09, 2016
  5. * Author: Ian Chen
  6. */
  7. #pragma once
  8. #include <AP_HAL/utility/Socket.h>
  9. #if CONFIG_HAL_BOARD == HAL_BOARD_SITL
  10. #include "IRLock.h"
  11. class AP_IRLock_SITL_Gazebo : public IRLock
  12. {
  13. public:
  14. AP_IRLock_SITL_Gazebo();
  15. // init - initialize sensor library
  16. void init(int8_t bus) override;
  17. // retrieve latest sensor data - returns true if new data is available
  18. bool update() override;
  19. private:
  20. uint32_t _last_timestamp;
  21. SocketAPM sock;
  22. };
  23. #endif // CONFIG_HAL_BOARD