public class VictorSP extends SafePWM implements SpeedController
PWM.PeriodMultiplier
kDefaultPwmCenter, kDefaultPwmPeriod, kDefaultPwmStepsDown, kPwmDisabled
kAnalogInputChannels, kAnalogOutputChannels, kDigitalChannels, kPDPChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond
DEFAULT_SAFETY_EXPIRATION
Constructor and Description |
---|
VictorSP(int channel)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
get()
Get the recently set value of the PWM.
|
protected void |
initVictorSP()
Common initialization code called by all constructors.
|
void |
pidWrite(double output)
Write out the PID value as seen in the PIDOutput base object.
|
void |
set(double speed)
Set the PWM value.
|
void |
set(double speed,
byte syncGroup)
Deprecated.
For compatibility with CANJaguar
The PWM value is set using a range of -1.0 to 1.0, appropriately
scaling the value for the FPGA.
|
disable, Feed, getDescription, getExpiration, isAlive, isSafetyEnabled, setExpiration, setSafetyEnabled, stopMotor
enableDeadbandElimination, free, getChannel, getPosition, getRaw, getSmartDashboardType, getSpeed, getTable, initTable, setBounds, setBounds, setPeriodMultiplier, setPosition, setRaw, setZeroLatch, startLiveWindowMode, stopLiveWindowMode, updateTable
checkAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPDPChannel, checkPWMChannel, checkRelayChannel, checkSolenoidChannel, checkSolenoidModule, getDefaultSolenoidModule, setDefaultSolenoidModule
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disable
public VictorSP(int channel)
channel
- The PWM channel that the VictorSP is attached to. 0-9 are on-board, 10-19 are on the MXP portprotected void initVictorSP()
public void set(double speed, byte syncGroup)
set
in interface SpeedController
speed
- The speed to set. Value should be between -1.0 and 1.0.syncGroup
- The update group to add this Set() to, pending UpdateSyncGroup(). If 0, update immediately.public void set(double speed)
set
in interface SpeedController
speed
- The speed value between -1.0 and 1.0 to set.public double get()
get
in interface SpeedController
Copyright © 2015. All rights reserved.