AP_IRLock_SITL.h 556 B

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