APM:Libraries
libraries
AP_RangeFinder
AP_RangeFinder_analog.h
Go to the documentation of this file.
1
#pragma once
2
3
#include "
RangeFinder.h
"
4
#include "
RangeFinder_Backend.h
"
5
6
class
AP_RangeFinder_analog
:
public
AP_RangeFinder_Backend
7
{
8
public
:
9
// constructor
10
AP_RangeFinder_analog
(
RangeFinder::RangeFinder_State
&_state);
11
12
// static detection function
13
static
bool
detect
(
RangeFinder::RangeFinder_State
&_state);
14
15
// update state
16
void
update
(
void
);
17
18
protected
:
19
20
MAV_DISTANCE_SENSOR
_get_mav_distance_sensor_type
()
const override
{
21
return
MAV_DISTANCE_SENSOR_UNKNOWN;
22
}
23
24
private
:
25
// update raw voltage
26
void
update_voltage
(
void
);
27
28
AP_HAL::AnalogSource
*
source
;
29
};
AP_RangeFinder_analog::_get_mav_distance_sensor_type
MAV_DISTANCE_SENSOR _get_mav_distance_sensor_type() const override
Definition:
AP_RangeFinder_analog.h:20
AP_RangeFinder_analog::update
void update(void)
Definition:
AP_RangeFinder_analog.cpp:85
AP_RangeFinder_analog::detect
static bool detect(RangeFinder::RangeFinder_State &_state)
Definition:
AP_RangeFinder_analog.cpp:53
AP_RangeFinder_Backend
Definition:
RangeFinder_Backend.h:21
AP_RangeFinder_analog::update_voltage
void update_voltage(void)
Definition:
AP_RangeFinder_analog.cpp:65
AP_RangeFinder_analog
Definition:
AP_RangeFinder_analog.h:6
AP_RangeFinder_analog::AP_RangeFinder_analog
AP_RangeFinder_analog(RangeFinder::RangeFinder_State &_state)
Definition:
AP_RangeFinder_analog.cpp:34
RangeFinder_Backend.h
AP_HAL::AnalogSource
Definition:
AnalogIn.h:7
RangeFinder.h
RangeFinder::RangeFinder_State
Definition:
RangeFinder.h:82
AP_RangeFinder_analog::source
AP_HAL::AnalogSource * source
Definition:
AP_RangeFinder_analog.h:28
Generated on Sun Jun 17 2018 14:18:51 for APM:Libraries by
1.8.13