C# Class CSharpRoboticsLib.Drive.Interfaces.TankDriveExtensions

Provides extentions for ITankDrive. These methods do not need to be called statically. You will never need to reference this class.
ファイルを表示 Open project: shockwave4488/CSharpRoboticsLib

Public Methods

Method Description
DriveForTime ( this d, double lPower, double rPower, double time, bool brake, double interval = 0.02 ) : void

Drives both motors at a set speed for a set time

DynamicDriveForTime ( this d, Action expression, double time, double interval = 0.02 ) : void

Drives accordingly to an action

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

Drives according to a function given the time

StraightForTime ( this d, double power, double time, bool brake, double interval = 0.02 ) : void

Drives at a speed for a set time

TurnForTime ( this d, double power, double time, bool brake, double interval = 0.02 ) : void

Turns the robot in place for a set time

Method Details

DriveForTime() public static method

Drives both motors at a set speed for a set time
public static DriveForTime ( this d, double lPower, double rPower, double time, bool brake, double interval = 0.02 ) : void
d this
lPower double
rPower double
time double
brake bool Set motors to zero when this is finished?
interval double
return void

DynamicDriveForTime() public static method

Drives accordingly to an action
public static DynamicDriveForTime ( this d, Action expression, double time, double interval = 0.02 ) : void
d this
expression Action Parameter: Time elapsed
time double
interval double
return void

DynamicDriveForTime() public static method

Drives according to a function given the time
public static DynamicDriveForTime ( this d, bool>.Func expression, double interval = 0.02 ) : void
d this
expression bool>.Func Returns: done driving | Arg1: Time elapsed
interval double
return void

StraightForTime() public static method

Drives at a speed for a set time
public static StraightForTime ( this d, double power, double time, bool brake, double interval = 0.02 ) : void
d this
power double
time double
brake bool Set motors to zero when this is finished?
interval double
return void

TurnForTime() public static method

Turns the robot in place for a set time
public static TurnForTime ( this d, double power, double time, bool brake, double interval = 0.02 ) : void
d this
power double
time double
brake bool Set motors to zero when this is finished?
interval double
return void