software:firmware
MakAir Firmware
pressure.cpp
Go to the documentation of this file.
1 
8 // INCLUDES ==================================================================
9 
10 // Associated header
11 #include "../includes/pressure.h"
12 #include "../includes/pressure_utl.h"
13 
14 // External
15 #include "Arduino.h"
16 #include <algorithm>
17 
18 // Internal
19 #include "../includes/parameters.h"
20 
21 // INITIALISATION =============================================================
22 
24 
25 // FUNCTIONS ==================================================================
26 
28 
30  int32_t withOffset =
32  return withOffset;
33 }
Offset aware reading class for the pressure sensor.
Definition: pressure.h:13
int32_t read()
Read the current pressure for the feedback control.
Definition: pressure.cpp:29
PressureSensor()
Default constructor.
Definition: pressure.cpp:27
int32_t m_PressureSensorOffset
Pressure sensor offset in mmH2O.
Definition: pressure.h:36
#define PIN_PRESSURE_SENSOR
Definition: parameters.h:273
PressureSensor inspiratoryPressureSensor
Definition: pressure.cpp:23
int16_t convertSensor2Pressure(uint32_t sensorValue)
Convert the analog value from sensor to a pressure value.