C# Class BrickPi.Sensors.EV3GyroSensor

Inheritance: INotifyPropertyChanged, ISensor
Datei anzeigen Open project: Ellerbach/BrickPi

Public Methods

Method 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

Method Description
OnPropertyChanged ( string name ) : void
Reset ( ) : void

Reset the sensor

StopTimerInternal ( ) : void

Method Details

EV3GyroSensor() public method

Initialize an EV3 Gyro Sensor
public EV3GyroSensor ( BrickPortSensor port ) : BrickPi.Extensions
port BrickPortSensor Sensor port
return BrickPi.Extensions

EV3GyroSensor() public method

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

EV3GyroSensor() public method

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
return BrickPi.Extensions

GetSensorName() public method

public GetSensorName ( ) : string
return string

NumberOfModes() public method

public NumberOfModes ( ) : int
return int

Read() public method

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

ReadAsString() public method

Reads the sensor value as a string.
public ReadAsString ( ) : string
return string

ReadRaw() public method

Read the sensor value
public ReadRaw ( ) : int
return int

RotationCount() public method

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

SelectNextMode() public method

public SelectNextMode ( ) : void
return void

SelectPreviousMode() public method

public SelectPreviousMode ( ) : void
return void

SelectedMode() public method

public SelectedMode ( ) : string
return string

UpdateSensor() public method

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