45 float voltageToPressure(
float voltage)
override
47 return (((voltage /
supplyVoltage) + CONST_B) / CONST_A) * 1000.0;
51 static constexpr float CONST_A = 0.09;
52 static constexpr float CONST_B = 0.04;
Common class for all analog pressure sensors.
std::function< ADCData()> getVoltage
const float supplyVoltage
Driver for NXP's MPX5010 pressure sensor.
MPX5010(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.