public class Talon 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 |
---|
Talon(int channel)
Constructor for a Talon (original or Talon SR)
|
Modifier and Type | Method and Description |
---|---|
double |
get()
Get the recently set value of the PWM.
|
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 Talon(int channel)
channel
- The PWM channel that the Talon is attached to. 0-9 are on-board, 10-19 are on the MXP portpublic 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.