C# Класс Porrey.Uwp.IoT.SensorStability.StabilityMonitor

Measures the stability of multiple sensor readings over a period of time to determine if the reading is stable. This is useful, for example, for a sensor such as a scale where the weight will vary until while an object is placed on the scale but will eventually stabilize. This class aids in determining when such a sensor has a stable value.
Показать файл Открыть проект

Открытые методы

Метод Описание
AddReading ( double sensorReading ) : System.Threading.Tasks.Task

Adds a new reading to the meter and updates the stability measurement.

StabilityMonitor ( int sampleSize = 10 ) : System

Creates an instance of Windows.Devices.Sensors.SensorStability.StabilityMonitor with the specified Maximum Consecutive readings required for a stable sensor reading.

Описание методов

AddReading() публичный Метод

Adds a new reading to the meter and updates the stability measurement.
public AddReading ( double sensorReading ) : System.Threading.Tasks.Task
sensorReading double The sensor reading of type T.
Результат System.Threading.Tasks.Task

StabilityMonitor() публичный Метод

Creates an instance of Windows.Devices.Sensors.SensorStability.StabilityMonitor with the specified Maximum Consecutive readings required for a stable sensor reading.
public StabilityMonitor ( int sampleSize = 10 ) : System
sampleSize int Specifies the number of samples to collect.
Результат System