edu.wpi.first.wpilibj
Class Jaguar

java.lang.Object
  extended by edu.wpi.first.wpilibj.SensorBase
      extended by edu.wpi.first.wpilibj.PWM
          extended by edu.wpi.first.wpilibj.SafePWM
              extended by edu.wpi.first.wpilibj.Jaguar
All Implemented Interfaces:
MotorSafety, IDevice, IDeviceController, PIDOutput, SpeedController, FrcBotSimComponent

public class Jaguar
extends SafePWM
implements SpeedController, IDeviceController

Luminary Micro Jaguar Speed Control


Nested Class Summary
 
Nested classes/interfaces inherited from class edu.wpi.first.wpilibj.PWM
PWM.PeriodMultiplier
 
Field Summary
 
Fields inherited from class edu.wpi.first.wpilibj.PWM
kDefaultMinPwmHigh, kDefaultPwmPeriod, kPwmDisabled
 
Fields inherited from class edu.wpi.first.wpilibj.SensorBase
kAnalogChannels, kAnalogModules, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond, n_simProperties
 
Fields inherited from interface edu.wpi.first.wpilibj.MotorSafety
DEFAULT_SAFETY_EXPIRATION
 
Constructor Summary
Jaguar(int channel)
          Constructor that assumes the default digital module.
Jaguar(int slot, int channel)
          Constructor that specifies the digital module.
 
Method Summary
 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.
 
Methods inherited from class edu.wpi.first.wpilibj.SafePWM
disable, Feed, getDescription, getExpiration, isAlive, isSafetyEnabled, setExpiration, setSafetyEnabled, stopMotor
 
Methods inherited from class edu.wpi.first.wpilibj.PWM
enableDeadbandElimination, free, getChannel, getModuleNumber, getPosition, getRaw, getSpeed, setBounds, setPeriodMultiplier, setPosition, setRaw
 
Methods inherited from class edu.wpi.first.wpilibj.SensorBase
checkAnalogChannel, checkAnalogModule, checkDigitalChannel, checkDigitalModule, checkPWMChannel, checkPWMModule, checkRelayChannel, checkRelayModule, checkSolenoidChannel, checkSolenoidModule, getDefaultAnalogModule, getDefaultDigitalModule, getDefaultSolenoidModule, getSimProperties, setDefaultAnalogModule, setDefaultDigitalModule, setDefaultSolenoidModule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.wpi.first.wpilibj.SpeedController
disable
 

Constructor Detail

Jaguar

public Jaguar(int channel)
Constructor that assumes the default digital module.

Parameters:
channel - The PWM channel on the digital module that the Jaguar is attached to.

Jaguar

public Jaguar(int slot,
              int channel)
Constructor that specifies the digital module.

Parameters:
slot - The slot in the chassis that the digital module is plugged into.
channel - The PWM channel on the digital module that the Jaguar is attached to.
Method Detail

set

public 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.

Set the PWM value.

Specified by:
set in interface SpeedController
Parameters:
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.

set

public void set(double speed)
Set the PWM value. The PWM value is set using a range of -1.0 to 1.0, appropriately scaling the value for the FPGA.

Specified by:
set in interface SpeedController
Parameters:
speed - The speed value between -1.0 and 1.0 to set.

get

public double get()
Get the recently set value of the PWM.

Specified by:
get in interface SpeedController
Returns:
The most recently set value for the PWM between -1.0 and 1.0.

pidWrite

public void pidWrite(double output)
Write out the PID value as seen in the PIDOutput base object.

Specified by:
pidWrite in interface PIDOutput
Parameters:
output - Write out the PWM value as was found in the PIDController