C# Class CyrusBuilt.MonoPi.Components.Gyroscope.AxisGyroscope

A generic gyroscope device abstraction component.
Inheritance: ComponentBase, IGyroscope
Mostra file Open project: cyrusbuilt/MonoPi

Public Methods

Method Description
AxisGyroscope ( IMultiAxisGyro multiAxisGyro ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Gyroscope.AxisGyroscope class with the multi-axis gyro to read from.

AxisGyroscope ( IMultiAxisGyro multiAxisGyro, float degPerSecondFactor ) : System

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Gyroscope.AxisGyroscope class with the multi-axis gyro to read from and the degrees-per-second factor value.

Dispose ( ) : void

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Call Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Gyroscope.AxisGyroscope. The Dispose method leaves the CyrusBuilt.MonoPi.Components.Gyroscope.AxisGyroscope in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Gyroscope.AxisGyroscope so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Gyroscope.AxisGyroscope was occupying.

ReadAndUpdateAngle ( ) : float

Reads the and updates angle.

RecalibrateOffset ( ) : void

Recalibrates the offset.

SetReadTrigger ( GyroTriggerMode readTrigger ) : void

Sets the read trigger.

Method Details

AxisGyroscope() public method

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Gyroscope.AxisGyroscope class with the multi-axis gyro to read from.
/// cannot be null. ///
public AxisGyroscope ( IMultiAxisGyro multiAxisGyro ) : System
multiAxisGyro IMultiAxisGyro /// The multi-axis gyro to read from. ///
return System

AxisGyroscope() public method

Initializes a new instance of the CyrusBuilt.MonoPi.Components.Gyroscope.AxisGyroscope class with the multi-axis gyro to read from and the degrees-per-second factor value.
/// cannot be null. ///
public AxisGyroscope ( IMultiAxisGyro multiAxisGyro, float degPerSecondFactor ) : System
multiAxisGyro IMultiAxisGyro /// The multi-axis gyro to read from. ///
degPerSecondFactor float /// The degrees-per-second factor value. ///
return System

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Call Dispose when you are finished using the CyrusBuilt.MonoPi.Components.Gyroscope.AxisGyroscope. The Dispose method leaves the CyrusBuilt.MonoPi.Components.Gyroscope.AxisGyroscope in an unusable state. After calling Dispose, you must release all references to the CyrusBuilt.MonoPi.Components.Gyroscope.AxisGyroscope so the garbage collector can reclaim the memory that the CyrusBuilt.MonoPi.Components.Gyroscope.AxisGyroscope was occupying.
public Dispose ( ) : void
return void

ReadAndUpdateAngle() public method

Reads the and updates angle.
public ReadAndUpdateAngle ( ) : float
return float

RecalibrateOffset() public method

Recalibrates the offset.
public RecalibrateOffset ( ) : void
return void

SetReadTrigger() public method

Sets the read trigger.
public SetReadTrigger ( GyroTriggerMode readTrigger ) : void
readTrigger GyroTriggerMode /// The trigger mode to re-read the gyro value. ///
return void