software:firmware
MakAir Firmware
PressureSensor Class Reference

Offset aware reading class for the pressure sensor. More...

#include <pressure.h>

Public Member Functions

 PressureSensor ()
 Default constructor. More...
 
int32_t read ()
 Read the current pressure for the feedback control. More...
 
void setPressureSensorOffset (int32_t p_pressureSensorOffest)
 Set the pressure sensor offset. More...
 

Private Attributes

int32_t m_PressureSensorOffset
 Pressure sensor offset in mmH2O. More...
 

Detailed Description

Offset aware reading class for the pressure sensor.

Definition at line 13 of file pressure.h.

Constructor & Destructor Documentation

◆ PressureSensor()

PressureSensor::PressureSensor ( )

Default constructor.

Definition at line 27 of file pressure.cpp.

int32_t m_PressureSensorOffset
Pressure sensor offset in mmH2O.
Definition: pressure.h:36

Member Function Documentation

◆ read()

int32_t PressureSensor::read ( )

Read the current pressure for the feedback control.

Returns
The current pressure in mmH2O

Definition at line 29 of file pressure.cpp.

29  {
30  int32_t withOffset =
32  return withOffset;
33 }
#define PIN_PRESSURE_SENSOR
Definition: parameters.h:273
int16_t convertSensor2Pressure(uint32_t sensorValue)
Convert the analog value from sensor to a pressure value.

◆ setPressureSensorOffset()

void PressureSensor::setPressureSensorOffset ( int32_t  p_pressureSensorOffest)
inline

Set the pressure sensor offset.

Parameters
p_pressureSensorOffestPressure offset in mmH2O

Definition at line 30 of file pressure.h.

30  {
31  m_PressureSensorOffset = p_pressureSensorOffest;
32  }

Member Data Documentation

◆ m_PressureSensorOffset

int32_t PressureSensor::m_PressureSensorOffset
private

Pressure sensor offset in mmH2O.

Definition at line 36 of file pressure.h.


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