C# Class Emlid.WindowsIot.Hardware.Components.Ms5611.Ms5611Device

MS5611 barometric pressure and temperature sensor (hardware device), connected via I2C.
Inheritance: DisposableObject
Afficher le fichier Open project: emlid/Navio-SDK-Windows-IoT

Private Properties

Свойство Type Description
Ms5611Device System

Méthodes publiques

Méthode Description
Reset ( ) : void

Resets the device, updates PROM data and clears current measurements

Update ( ) : void

Converts then calculates the Measurement.

Méthodes protégées

Méthode Description
Calculate ( int rawPressure, int rawTemperature ) : void

Calculates the Measurement by applying the Prom coefficients and other rules to the raw measurements.

ConvertPressure ( Ms5611Osr rate ) : int

Executes the Ms5611Command.ConvertD1Pressure command to measure pressure at the specified OSR, waits then returns the result.

ConvertTemperature ( Ms5611Osr rate ) : int

Executes the Ms5611Command.ConvertD2Temperature command to measure pressure at the specified OSR, waits then returns the result.

Dispose ( bool disposing ) : void

DisposableObject.Dispose(bool).

GetConvertDelay ( Ms5611Osr rate ) : int

Gets the time to wait in milliseconds for conversion with the specified OSR.

ReadProm ( ) : bool

Reads calibration data from PROM, validates and updates the PROM data.

Should only be executed after Reset to get accurate values.

ReadPromCoefficient ( int index, byte buffer, int offset ) : void

Reads a coefficient value from the PROM.

Reads Ms5611PromData.CoefficientSize bytes into the target buffer at the specified offset.

WaitForConversion ( Ms5611Osr rate ) : void

Waits for conversion at the specified OSR.

Private Methods

Méthode Description
Ms5611Device ( Windows.Devices.I2c.I2cDevice device, Ms5611Osr rate ) : System

Method Details

Calculate() protected méthode

Calculates the Measurement by applying the Prom coefficients and other rules to the raw measurements.
protected Calculate ( int rawPressure, int rawTemperature ) : void
rawPressure int
rawTemperature int
Résultat void

ConvertPressure() protected méthode

Executes the Ms5611Command.ConvertD1Pressure command to measure pressure at the specified OSR, waits then returns the result.
protected ConvertPressure ( Ms5611Osr rate ) : int
rate Ms5611Osr
Résultat int

ConvertTemperature() protected méthode

Executes the Ms5611Command.ConvertD2Temperature command to measure pressure at the specified OSR, waits then returns the result.
protected ConvertTemperature ( Ms5611Osr rate ) : int
rate Ms5611Osr
Résultat int

Dispose() protected méthode

DisposableObject.Dispose(bool).
protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

GetConvertDelay() protected méthode

Gets the time to wait in milliseconds for conversion with the specified OSR.
protected GetConvertDelay ( Ms5611Osr rate ) : int
rate Ms5611Osr Over-Sampling Rate for which to return the delay.
Résultat int

ReadProm() protected méthode

Reads calibration data from PROM, validates and updates the PROM data.
Should only be executed after Reset to get accurate values.
protected ReadProm ( ) : bool
Résultat bool

ReadPromCoefficient() protected méthode

Reads a coefficient value from the PROM.
Reads Ms5611PromData.CoefficientSize bytes into the target buffer at the specified offset.
protected ReadPromCoefficient ( int index, byte buffer, int offset ) : void
index int Coefficient index (0-7).
buffer byte Target buffer.
offset int Target offset.
Résultat void

Reset() public méthode

Resets the device, updates PROM data and clears current measurements
public Reset ( ) : void
Résultat void

Update() public méthode

Converts then calculates the Measurement.
public Update ( ) : void
Résultat void

WaitForConversion() protected méthode

Waits for conversion at the specified OSR.
protected WaitForConversion ( Ms5611Osr rate ) : void
rate Ms5611Osr Over-Sampling Rate to wait for.
Résultat void