APM:Libraries
libraries
AP_Airspeed
AP_Airspeed_analog.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <
AP_HAL/AP_HAL.h
>
4
#include <
AP_Param/AP_Param.h
>
5
6
#include "
AP_Airspeed_Backend.h
"
7
8
class
AP_Airspeed_Analog
:
public
AP_Airspeed_Backend
9
{
10
public
:
11
AP_Airspeed_Analog
(
AP_Airspeed
&
frontend
, uint8_t _instance);
12
13
// probe and initialise the sensor
14
bool
init
(
void
)
override
;
15
16
// return the current differential_pressure in Pascal
17
bool
get_differential_pressure
(
float
&pressure)
override
;
18
19
// temperature not available via analog backend
20
bool
get_temperature
(
float
&
temperature
)
override
{
return
false
; }
21
22
private
:
23
AP_HAL::AnalogSource
*
_source
;
24
};
AP_Airspeed
Definition:
AP_Airspeed.h:35
AP_Airspeed_Analog::AP_Airspeed_Analog
AP_Airspeed_Analog(AP_Airspeed &frontend, uint8_t _instance)
Definition:
AP_Airspeed_analog.cpp:30
AP_HAL.h
AP_Airspeed_Backend.h
AP_Airspeed_Analog::get_temperature
bool get_temperature(float &temperature) override
Definition:
AP_Airspeed_analog.h:20
AP_Param.h
A system for managing and storing variables that are of general interest to the system.
temperature
float temperature
Definition:
Airspeed.cpp:32
AP_Airspeed_Analog::init
bool init(void) override
Definition:
AP_Airspeed_analog.cpp:36
AP_Airspeed_Analog::_source
AP_HAL::AnalogSource * _source
Definition:
AP_Airspeed_analog.h:23
AP_Airspeed_Backend::frontend
AP_Airspeed & frontend
Definition:
AP_Airspeed_Backend.h:71
AP_HAL::AnalogSource
Definition:
AnalogIn.h:7
AP_Airspeed_Analog::get_differential_pressure
bool get_differential_pressure(float &pressure) override
Definition:
AP_Airspeed_analog.cpp:42
AP_Airspeed_Backend
Definition:
AP_Airspeed_Backend.h:25
AP_Airspeed_Analog
Definition:
AP_Airspeed_analog.h:8
Generated on Sun Jun 17 2018 14:18:47 for APM:Libraries by
1.8.13