C# Класс BrickPi.Sensors.EV3GyroSensor

Наследование: INotifyPropertyChanged, ISensor
Показать файл Открыть проект

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

Метод Описание
EV3GyroSensor ( BrickPortSensor port ) : BrickPi.Extensions

Initialize an EV3 Gyro Sensor

EV3GyroSensor ( BrickPortSensor port, GyroMode mode ) : BrickPi.Extensions

Initialize an EV3 Gyro Sensor

EV3GyroSensor ( BrickPortSensor port, GyroMode mode, int timeout ) : BrickPi.Extensions

Initialize an EV3 Gyro Sensor

GetSensorName ( ) : string
NumberOfModes ( ) : int
Read ( ) : int

Read the gyro sensor value. The returned value depends on the mode.

ReadAsString ( ) : string

Reads the sensor value as a string.

ReadRaw ( ) : int

Read the sensor value

RotationCount ( ) : int

Get the number of rotations (a rotation is 360 degrees) - only makes sense when in angle mode

SelectNextMode ( ) : void
SelectPreviousMode ( ) : void
SelectedMode ( ) : string
UpdateSensor ( object state ) : void

Update the sensor and this will raised an event on the interface

Приватные методы

Метод Описание
OnPropertyChanged ( string name ) : void
Reset ( ) : void

Reset the sensor

StopTimerInternal ( ) : void

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

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

Initialize an EV3 Gyro Sensor
public EV3GyroSensor ( BrickPortSensor port ) : BrickPi.Extensions
port BrickPortSensor Sensor port
Результат BrickPi.Extensions

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

Initialize an EV3 Gyro Sensor
public EV3GyroSensor ( BrickPortSensor port, GyroMode mode ) : BrickPi.Extensions
port BrickPortSensor Sensor port
mode GyroMode Gyro mode
Результат BrickPi.Extensions

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

Initialize an EV3 Gyro Sensor
public EV3GyroSensor ( BrickPortSensor port, GyroMode mode, int timeout ) : BrickPi.Extensions
port BrickPortSensor Sensor port
mode GyroMode Gyro mode
timeout int Period in millisecond to check sensor value changes
Результат BrickPi.Extensions

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

public GetSensorName ( ) : string
Результат string

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

public NumberOfModes ( ) : int
Результат int

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

Read the gyro sensor value. The returned value depends on the mode.
public Read ( ) : int
Результат int

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

Reads the sensor value as a string.
public ReadAsString ( ) : string
Результат string

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

Read the sensor value
public ReadRaw ( ) : int
Результат int

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

Get the number of rotations (a rotation is 360 degrees) - only makes sense when in angle mode
public RotationCount ( ) : int
Результат int

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

public SelectNextMode ( ) : void
Результат void

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

public SelectPreviousMode ( ) : void
Результат void

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

public SelectedMode ( ) : string
Результат string

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

Update the sensor and this will raised an event on the interface
public UpdateSensor ( object state ) : void
state object
Результат void