Skyward boardcore
Loading...
Searching...
No Matches
Boardcore::Pitot Class Reference

#include <Pitot.h>

Inheritance diagram for Boardcore::Pitot:
Collaboration diagram for Boardcore::Pitot:

Public Member Functions

 Pitot (std::function< float()> getTotalPressure, std::function< float()> getStaticPressure)
 
bool init () override
 Initialize the sensor.
 
bool selfTest () override
 Check if the sensor is working.
 
void setReferenceValues (const ReferenceValues reference)
 
ReferenceValues getReferenceValues ()
 
- Public Member Functions inherited from Boardcore::Sensor< PitotData >
 Sensor ()
 
 Sensor (Sensor &&other)
 
virtual ~Sensor ()
 
void sample () override
 Sample the sensor.
 
virtual PitotData getLastSample ()
 
- Public Member Functions inherited from Boardcore::AbstractSensor
virtual ~AbstractSensor ()
 
SensorErrors getLastError ()
 Get last error for debugging purposes. Avoid silent fails.
 

Protected Member Functions

PitotData sampleImpl () override
 Read a data sample from the sensor. In case of errors, the method should return the last available correct sample.
 

Additional Inherited Members

- Public Types inherited from Boardcore::Sensor< PitotData >
using DataType
 
- Protected Attributes inherited from Boardcore::Sensor< PitotData >
DataType lastSample
 
miosix::FastMutex mutex
 
- Protected Attributes inherited from Boardcore::AbstractSensor
SensorErrors lastError = SensorErrors::NO_ERRORS
 

Detailed Description

Definition at line 37 of file Pitot.h.

Constructor & Destructor Documentation

◆ Pitot()

Boardcore::Pitot::Pitot ( std::function< float()> getTotalPressure,
std::function< float()> getStaticPressure )
inline

Definition at line 40 of file Pitot.h.

Member Function Documentation

◆ getReferenceValues()

ReferenceValues Boardcore::Pitot::getReferenceValues ( )
inline

Definition at line 56 of file Pitot.h.

◆ init()

bool Boardcore::Pitot::init ( )
inlineoverridevirtual

Initialize the sensor.

Returns
boolean value indicating whether the operation succeded or not

Implements Boardcore::AbstractSensor.

Definition at line 47 of file Pitot.h.

◆ sampleImpl()

PitotData Boardcore::Pitot::sampleImpl ( )
inlineoverrideprotectedvirtual

Read a data sample from the sensor. In case of errors, the method should return the last available correct sample.

Returns
sensor data sample

Implements Boardcore::Sensor< PitotData >.

Definition at line 59 of file Pitot.h.

◆ selfTest()

bool Boardcore::Pitot::selfTest ( )
inlineoverridevirtual

Check if the sensor is working.

Returns
boolean indicating whether the sensor is correctly working or not

Implements Boardcore::AbstractSensor.

Definition at line 49 of file Pitot.h.

◆ setReferenceValues()

void Boardcore::Pitot::setReferenceValues ( const ReferenceValues reference)
inline

Definition at line 51 of file Pitot.h.


The documentation for this class was generated from the following file: