C# Class BrickPi.Sensors.EV3GyroSensor

Inheritance: INotifyPropertyChanged, ISensor
Afficher le fichier Open project: Ellerbach/BrickPi

Méthodes publiques

Méthode Description
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

Private Methods

Méthode Description
OnPropertyChanged ( string name ) : void
Reset ( ) : void

Reset the sensor

StopTimerInternal ( ) : void

Method Details

EV3GyroSensor() public méthode

Initialize an EV3 Gyro Sensor
public EV3GyroSensor ( BrickPortSensor port ) : BrickPi.Extensions
port BrickPortSensor Sensor port
Résultat BrickPi.Extensions

EV3GyroSensor() public méthode

Initialize an EV3 Gyro Sensor
public EV3GyroSensor ( BrickPortSensor port, GyroMode mode ) : BrickPi.Extensions
port BrickPortSensor Sensor port
mode GyroMode Gyro mode
Résultat BrickPi.Extensions

EV3GyroSensor() public méthode

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
Résultat BrickPi.Extensions

GetSensorName() public méthode

public GetSensorName ( ) : string
Résultat string

NumberOfModes() public méthode

public NumberOfModes ( ) : int
Résultat int

Read() public méthode

Read the gyro sensor value. The returned value depends on the mode.
public Read ( ) : int
Résultat int

ReadAsString() public méthode

Reads the sensor value as a string.
public ReadAsString ( ) : string
Résultat string

ReadRaw() public méthode

Read the sensor value
public ReadRaw ( ) : int
Résultat int

RotationCount() public méthode

Get the number of rotations (a rotation is 360 degrees) - only makes sense when in angle mode
public RotationCount ( ) : int
Résultat int

SelectNextMode() public méthode

public SelectNextMode ( ) : void
Résultat void

SelectPreviousMode() public méthode

public SelectPreviousMode ( ) : void
Résultat void

SelectedMode() public méthode

public SelectedMode ( ) : string
Résultat string

UpdateSensor() public méthode

Update the sensor and this will raised an event on the interface
public UpdateSensor ( object state ) : void
state object
Résultat void