C# Class CSharpRoboticsLib.Drive.Interfaces.GyroscopeDriveExtensions

Provides extentions for IGyroscopeDrive. These methods do not need to be called statically. You will never need to reference this class.
Mostra file Open project: shockwave4488/CSharpRoboticsLib

Public Methods

Method Description
DriveStraightForTime ( this d, IMotionController correction, double power, double time, bool brake, double interval = 0.02 ) : void

Drives the robot in a straight line for a set time using a IMotionController to correct heading

DynamicGyroscopeDrive ( this d, bool>.Func expression, double interval = 0.02 ) : void

Drives the robot according to a function

DynamicGyroscopeDrive ( this d, bool>.Func expression, double interval = 0.02 ) : void

Drives the robot according to a function

TurnForAngle ( this d, IMotionController controller, double angle, double tolerance, bool brake, double interval = 0.02 ) : void

Turns the robot for a relative angle amount using a IMotionController

TurnForAngle ( this d, double power, double angle, bool brake, double interval = 0.02 ) : void

Turns the robot at a set speed for a relative angle amount

TurnToAngle ( this d, IMotionController controller, double angle, double tolerance, bool brake, double interval = 0.02 ) : void

Turns the robot to an absolute angle using a SimplePID

TurnToAngle ( this d, double power, double angle, bool brake, double interval = 0.02 ) : void

Turns the robot to an absolute angle as reported by the gyroscope.

Method Details

DriveStraightForTime() public static method

Drives the robot in a straight line for a set time using a IMotionController to correct heading
public static DriveStraightForTime ( this d, IMotionController correction, double power, double time, bool brake, double interval = 0.02 ) : void
d this
correction IMotionController to use for correcting heading
power double
time double
brake bool
interval double
return void

DynamicGyroscopeDrive() public static method

Drives the robot according to a function
public static DynamicGyroscopeDrive ( this d, bool>.Func expression, double interval = 0.02 ) : void
d this
expression bool>.Func Returns : done driving | Arg1: robot's gyroscope
interval double
return void

DynamicGyroscopeDrive() public static method

Drives the robot according to a function
public static DynamicGyroscopeDrive ( this d, bool>.Func expression, double interval = 0.02 ) : void
d this
expression bool>.Func Returns: done driving | Arg1: gyroscope angle
interval double
return void

TurnForAngle() public static method

Turns the robot for a relative angle amount using a IMotionController
public static TurnForAngle ( this d, IMotionController controller, double angle, double tolerance, bool brake, double interval = 0.02 ) : void
d this
controller IMotionController
angle double
tolerance double
brake bool
interval double
return void

TurnForAngle() public static method

Turns the robot at a set speed for a relative angle amount
public static TurnForAngle ( this d, double power, double angle, bool brake, double interval = 0.02 ) : void
d this
power double
angle double
brake bool
interval double
return void

TurnToAngle() public static method

Turns the robot to an absolute angle using a SimplePID
public static TurnToAngle ( this d, IMotionController controller, double angle, double tolerance, bool brake, double interval = 0.02 ) : void
d this
controller IMotionController
angle double
tolerance double
brake bool
interval double
return void

TurnToAngle() public static method

Turns the robot to an absolute angle as reported by the gyroscope.
public static TurnToAngle ( this d, double power, double angle, bool brake, double interval = 0.02 ) : void
d this
power double
angle double
brake bool
interval double
return void