Struct i2cdev::sensors::mpl115a2_barometer::MPL115A2RawReading [] [src]

pub struct MPL115A2RawReading {
    // some fields omitted
}

In order to get either the temperature or humdity it is necessary to read several different values from the chip.

These are not generally useful in and of themselves but are used for calculating temperature/pressure. The structure is exposed externally as they could be useful for some unknown use case. Generally, you shouldn't ever need to use this directly.

One use case for use of this struct directly would be for getting both temperature and pressure in a single call.

Methods

impl MPL115A2RawReading

fn new(i2cdev: &mut I2CDevice) -> I2CResult<MPL115A2RawReading>

Create a new reading from the provided I2C Device

fn temperature_celsius(&self) -> f32

Calculate the temperature in centrigrade for this reading

fn pressure_kpa(&self, coeff: &MPL115A2Coefficients) -> f32

Calculate the pressure in pascals for this reading

Trait Implementations

Derived Implementations

impl Debug for MPL115A2RawReading

fn fmt(&self, __arg_0: &mut Formatter) -> Result