|
MVMFirmwareCpp v0.1
|
The class provide support for TE 5525DSO Pressure sensor. More...
#include <driver_5525DSO.h>

Public Member Functions | |
| bool | Init (t_i2cdevices device, t_ps_sensor model, t_ps_resolution ps_resolution, void *hw_handle) |
| Init pressure sensor TE 5525DSO. More... | |
| bool | doMeasure (float *P, float *T) |
| Perform a full measure in blocking mode. More... | |
| bool | asyncMeasure () |
| Start an asynchronous measure process (NON BLOKING) More... | |
| bool | asyncGetResult (float *P, float *T) |
| Get result from an NON BLOCKING measure process. More... | |
| void | setZero (float value) |
| Calibrate sensor zero with a specified value. More... | |
| float | doZero () |
| Calculate sensor zero. More... | |
| void | correctZero (float value) |
| Incremental 0 correction for Venturi cycle to cycle adjust. More... | |
| float | GetConversionDelay () |
| Return correction delay. More... | |
Private Member Functions | |
| void | CalibrateDate_5525DSO (int32_t raw_temp, int32_t raw_pressure, float *T, float *P) |
| Convert row measure in P/V. More... | |
| bool | Reset_5525DSO () |
| Reset the sensor. More... | |
| uint8_t | GetResolutionByteCodeTemp () |
| Obtain the conversion code for T for specified resolution. More... | |
| uint8_t | GetResolutionByteCodePressure () |
| Obtain the conversion code for P for specified resolution. More... | |
| uint32_t | GetResolutionDelay () |
| Obtain the conversion time for specified resolution. More... | |
Private Attributes | |
| t_5525DSO_calibration_table | sensorCT |
| t_i2cdevices | i2c_device |
| t_ps_sensor | sensor_model |
| t_ps_resolution | sensor_resolution |
| HW * | hwi |
| DebugIfaceClass * | dbg |
| uint32_t | __chache_P |
| uint32_t | __chache_T |
| int | __TDiv |
| bool | __last_is_T |
| bool | __pending_meas |
| uint64_t | __last_millis |
| int | startup_counter |
| bool | data_valid |
| bool | _initialized = false |
The class provide support for TE 5525DSO Pressure sensor.
The class support both blocking and non blocking reading
Blocking Reading: The driver start conversion on the sensor and wait for the result. It require the full conversion time
Non Blocking reading: The readout process is spitted in two part 1) the measure is started on the device by asyncMeasure function 2) the result is get from the device by asyncGetResult function there is no delay and dead time
The class download calibration from the device to convert raw data to P/T automatically
Definition at line 42 of file driver_5525DSO.h.
| bool Sensor5525DSO::asyncGetResult | ( | float * | P, |
| float * | T | ||
| ) |
Get result from an NON BLOCKING measure process.
This function must be polled after asyncMeasure is called When conversion process ends the function return true
| P | OUT pressure |
| T | OUT T |
Definition at line 211 of file driver_5525DSO.cpp.


| bool Sensor5525DSO::asyncMeasure | ( | ) |
Start an asynchronous measure process (NON BLOKING)
This function start the measure process for P/T (alternating in internally managed) and start measure timer in order to correctly delay the end of measure
Definition at line 168 of file driver_5525DSO.cpp.


|
private |
Convert row measure in P/V.
| raw_temp | raw temperature measured |
| raw_pressure | raw pressure measured |
| T | OUT Temperature |
| P | OUT Pressure |
Definition at line 275 of file driver_5525DSO.cpp.

| void Sensor5525DSO::correctZero | ( | float | value | ) |
Incremental 0 correction for Venturi cycle to cycle adjust.
| value | Incremental correction |
Definition at line 455 of file driver_5525DSO.cpp.

| bool Sensor5525DSO::doMeasure | ( | float * | P, |
| float * | T | ||
| ) |
Perform a full measure in blocking mode.
| P | measured P in mbar |
| T | measured T in °C |
Definition at line 107 of file driver_5525DSO.cpp.


| float Sensor5525DSO::doZero | ( | ) |
Calculate sensor zero.
The function average 50 measure to extract the 0
Definition at line 422 of file driver_5525DSO.cpp.


| float Sensor5525DSO::GetConversionDelay | ( | ) |
Return correction delay.
Definition at line 465 of file driver_5525DSO.cpp.

|
private |
Obtain the conversion code for P for specified resolution.
Definition at line 341 of file driver_5525DSO.cpp.

|
private |
Obtain the conversion code for T for specified resolution.
Definition at line 317 of file driver_5525DSO.cpp.

|
private |
Obtain the conversion time for specified resolution.
Definition at line 366 of file driver_5525DSO.cpp.

| bool Sensor5525DSO::Init | ( | t_i2cdevices | device, |
| t_ps_sensor | model, | ||
| t_ps_resolution | ps_resolution, | ||
| void * | handle | ||
| ) |
Init pressure sensor TE 5525DSO.
The driver initialize the sensor and download the calibration table via I2C.
Calibration table is stored in the driver
The driver print the calibration table
| device | Name of the I2C device |
| model | Model of the sensor |
| ps_resolution | Resolution |
| handle | Handle to the DriverContext class |
Definition at line 24 of file driver_5525DSO.cpp.


|
private |
Reset the sensor.
Definition at line 390 of file driver_5525DSO.cpp.


| void Sensor5525DSO::setZero | ( | float | value | ) |
Calibrate sensor zero with a specified value.
| value | Value used to zero sensor |
Definition at line 409 of file driver_5525DSO.cpp.

|
private |
Definition at line 77 of file driver_5525DSO.h.
|
private |
Definition at line 78 of file driver_5525DSO.h.
|
private |
Definition at line 80 of file driver_5525DSO.h.
|
private |
Definition at line 82 of file driver_5525DSO.h.
|
private |
Definition at line 81 of file driver_5525DSO.h.
|
private |
Definition at line 79 of file driver_5525DSO.h.
|
private |
Definition at line 87 of file driver_5525DSO.h.
|
private |
Definition at line 85 of file driver_5525DSO.h.
|
private |
Definition at line 75 of file driver_5525DSO.h.
|
private |
Definition at line 74 of file driver_5525DSO.h.
|
private |
Definition at line 63 of file driver_5525DSO.h.
|
private |
Definition at line 64 of file driver_5525DSO.h.
|
private |
Definition at line 65 of file driver_5525DSO.h.
|
private |
Definition at line 62 of file driver_5525DSO.h.
|
private |
Definition at line 84 of file driver_5525DSO.h.
1.8.18