46 float voltageToPressure(
float voltage)
override
48 return (((voltage /
supplyVoltage) + CONST_B) / CONST_A) * 1000.0;
52 static constexpr float CONST_A = 0.007826;
53 static constexpr float CONST_B = 0.07739;
Common class for all analog pressure sensors.
std::function< ADCData()> getVoltage
const float supplyVoltage
Driver for NXP's MPXHZ6130A pressure sensor.
MPXHZ6130A(std::function< ADCData()> getVoltage, const float supplyVoltage=5.0)
This file includes all the types the logdecoder script will decode.
Structure to handle ADC data.