Skyward boardcore
Loading...
Searching...
No Matches
Boardcore::HoneywellPressureSensor< HoneywellPressureData > Class Template Reference

Driver for Honeywell's pressure sensors (absolute and differential) More...

#include <HoneywellPressureSensor.h>

Inheritance diagram for Boardcore::HoneywellPressureSensor< HoneywellPressureData >:
Collaboration diagram for Boardcore::HoneywellPressureSensor< HoneywellPressureData >:

Protected Member Functions

float voltageToPressure (float voltage)
 < Common transfer function from volts to pascals (from datasheet pag 11)
 
- Protected Member Functions inherited from Boardcore::AnalogPressureSensor< HoneywellPressureData >
HoneywellPressureData sampleImpl () override
 Conversion function from volts to pascals.
 

Additional Inherited Members

- Public Types inherited from Boardcore::Sensor< Data >
using DataType = Data
 
- Public Member Functions inherited from Boardcore::AnalogPressureSensor< HoneywellPressureData >
 AnalogPressureSensor (std::function< ADCData()> getVoltage, const float supplyVoltage=5.0, const float maxPressure=0, const float minPressure=0)
 
 AnalogPressureSensor (AnalogPressureSensor &&other)
 
bool init () override
 Initialize the sensor.
 
bool selfTest () override
 Check if the sensor is working.
 
void setOffset (float value)
 Set the current analog pressure sensor offset. Ignores any previous offsets.
 
void updateOffset (float value)
 Update the current analog pressure sensor offset. Adds the new value to the old offset.
 
float getOffset ()
 Retrieve the current offset.
 
- Public Member Functions inherited from Boardcore::Sensor< Data >
 Sensor ()
 
 Sensor (Sensor &&other)
 
virtual ~Sensor ()
 
void sample () override
 Sample the sensor.
 
virtual Data getLastSample ()
 
- Public Member Functions inherited from Boardcore::AbstractSensor
virtual ~AbstractSensor ()
 
SensorErrors getLastError ()
 Get last error for debugging purposes. Avoid silent fails.
 
- Protected Attributes inherited from Boardcore::AnalogPressureSensor< HoneywellPressureData >
std::function< ADCData()> getVoltage
 
miosix::FastMutex offsetMutex
 
float offset
 
const float supplyVoltage
 
const float maxPressure
 
const float minPressure
 
- Protected Attributes inherited from Boardcore::Sensor< Data >
DataType lastSample
 
miosix::FastMutex mutex
 
- Protected Attributes inherited from Boardcore::AbstractSensor
SensorErrors lastError = SensorErrors::NO_ERRORS
 

Detailed Description

template<typename HoneywellPressureData>
class Boardcore::HoneywellPressureSensor< HoneywellPressureData >

Driver for Honeywell's pressure sensors (absolute and differential)

All this sensors shares the same transfer function which varies only by few parameters: voltage supply and the sensor pressure range

Definition at line 37 of file HoneywellPressureSensor.h.

Member Function Documentation

◆ voltageToPressure()

template<typename HoneywellPressureData >
float Boardcore::HoneywellPressureSensor< HoneywellPressureData >::voltageToPressure ( float voltage)
inlineprotectedvirtual

< Common transfer function from volts to pascals (from datasheet pag 11)

Implements Boardcore::AnalogPressureSensor< HoneywellPressureData >.

Definition at line 45 of file HoneywellPressureSensor.h.


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