C# Class CSharpRoboticsLib.WPIExtensions.RampMotor

A subclass of a motor controller intended to allow controlled change in power, for safety or voltage regulation.
Inheritance: ISpeedController
Datei anzeigen Open project: shockwave4488/CSharpRoboticsLib Class Usage Examples

Public Methods

Method Description
Disable ( ) : void

Disable the speed controller

Dispose ( ) : void

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

ForcePower ( double value ) : void

Set the power of a motor regardless of the ramping limitations

Get ( ) : double

Returns the last value set to this controller

PidWrite ( double value ) : void

Set the output to the value calculated by the PIDController

RampMotor ( ISpeedController motorController ) : System

Wraps an existing ISpeedController with RampMotor{T}

RampMotor ( Type controllerType, int port ) : System

Opens a new RampingMotor of a specific motor type

Set ( double value ) : void

Sets the value to the motor, within the change limitations

Set ( double value, byte syncGroup ) : void

Sets the output value for this controller

Method Details

Disable() public method

Disable the speed controller
public Disable ( ) : void
return void

Dispose() public method

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources
public Dispose ( ) : void
return void

ForcePower() public method

Set the power of a motor regardless of the ramping limitations
public ForcePower ( double value ) : void
value double Power to set to
return void

Get() public method

Returns the last value set to this controller
public Get ( ) : double
return double

PidWrite() public method

Set the output to the value calculated by the PIDController
public PidWrite ( double value ) : void
value double
return void

RampMotor() public method

Wraps an existing ISpeedController with RampMotor{T}
public RampMotor ( ISpeedController motorController ) : System
motorController ISpeedController existing Motor Controller
return System

RampMotor() public method

Opens a new RampingMotor of a specific motor type
public RampMotor ( Type controllerType, int port ) : System
controllerType System.Type Type of motor controller (Jaguar, Victor, Spark, CAN Talon, etc.)
port int The PWM channel that the motor is attached to. 0-9 are on-board, 10-19 are on the MXP port
return System

Set() public method

Sets the value to the motor, within the change limitations
public Set ( double value ) : void
value double value to set to or approach
return void

Set() public method

Sets the output value for this controller
public Set ( double value, byte syncGroup ) : void
value double
syncGroup byte
return void