2010 FRC Java API


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.Jaguar
All Implemented Interfaces:
PIDOutput, SpeedController

public class Jaguar
extends PWM
implements SpeedController

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
 
Fields inherited from class edu.wpi.first.wpilibj.SensorBase
kAnalogChannels, kAnalogModules, kChassisSlots, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond
 
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.
 
Methods inherited from class edu.wpi.first.wpilibj.PWM
enableDeadbandElimination, free, 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, setDefaultAnalogModule, setDefaultDigitalModule, setDefaultSolenoidModule
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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)
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

2010 FRC Java API


Copyright © 2006-2009 Sun Microsystems, Inc. All Rights Reserved.