CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
Ardupilot

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place. Commercial Alternative to JupyterHub.

GitHub Repository: Ardupilot/ardupilot
Path: blob/master/libraries/AP_Airspeed/AP_Airspeed_analog.h
Views: 1798
1
#pragma once
2
3
#include "AP_Airspeed_config.h"
4
5
#if AP_AIRSPEED_ANALOG_ENABLED
6
7
#include <AP_HAL/AP_HAL.h>
8
9
#include "AP_Airspeed_Backend.h"
10
11
class AP_Airspeed_Analog : public AP_Airspeed_Backend
12
{
13
public:
14
AP_Airspeed_Analog(AP_Airspeed &frontend, uint8_t _instance);
15
16
// probe and initialise the sensor
17
bool init(void) override;
18
19
// return the current differential_pressure in Pascal
20
bool get_differential_pressure(float &pressure) override;
21
22
// temperature not available via analog backend
23
bool get_temperature(float &temperature) override { return false; }
24
25
private:
26
AP_HAL::AnalogSource *_source;
27
};
28
29
#endif // AP_AIRSPEED_ANALOG_ENABLED
30
31