APM:Libraries
AP_RangeFinder_LightWareI2C.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RangeFinder.h"
4 #include "RangeFinder_Backend.h"
5 #include <AP_HAL/I2CDevice.h>
6 
8 {
9 
10 public:
11  // static detection function
14 
15  // update state
16  void update(void);
17 
18 protected:
19 
20  virtual MAV_DISTANCE_SENSOR _get_mav_distance_sensor_type() const override {
21  return MAV_DISTANCE_SENSOR_LASER;
22  }
23 
24 private:
25  // constructor
27 
28  void init();
29  void timer();
30 
31  // get a reading
32  bool get_reading(uint16_t &reading_cm);
34 };
bool get_reading(uint16_t &reading_cm)
AP_RangeFinder_LightWareI2C(RangeFinder::RangeFinder_State &_state, AP_HAL::OwnPtr< AP_HAL::I2CDevice > dev)
static AP_HAL::OwnPtr< AP_HAL::Device > dev
Definition: ICM20789.cpp:16
AP_HAL::OwnPtr< AP_HAL::I2CDevice > _dev
virtual MAV_DISTANCE_SENSOR _get_mav_distance_sensor_type() const override
static AP_RangeFinder_Backend * detect(RangeFinder::RangeFinder_State &_state, AP_HAL::OwnPtr< AP_HAL::I2CDevice > dev)