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

A generic gyroscope device abstraction component.
Inheritance: ComponentBase, IGyroscope
Afficher le fichier Open project: cyrusbuilt/MonoPi

Méthodes publiques

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

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. ///
Résultat System

AxisGyroscope() public méthode

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. ///
Résultat System

Dispose() public méthode

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
Résultat void

ReadAndUpdateAngle() public méthode

Reads the and updates angle.
public ReadAndUpdateAngle ( ) : float
Résultat float

RecalibrateOffset() public méthode

Recalibrates the offset.
public RecalibrateOffset ( ) : void
Résultat void

SetReadTrigger() public méthode

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