Add classes for VictorSP and TalonSRX PWM control.

Update documentation for existing classes to better describe what
they control

Change-Id: I1932b39a3f082c2eb57f41edb4ba55c73cce2938
This commit is contained in:
Joe Ross
2014-12-05 09:19:27 -08:00
committed by Brad Miller
parent d986ffac81
commit 52408e2658
15 changed files with 129 additions and 8 deletions

View File

@@ -20,7 +20,7 @@
#include <utility>
/**
* Luminary Micro Jaguar Speed Control
* Luminary Micro / Vex Robotics Jaguar Speed Control
*/
class CANJaguar : public MotorSafety,
public CANSpeedController,

View File

@@ -13,7 +13,7 @@
class CanTalonSRX;
/**
* CTRE Talon SRX Speed Controller
* CTRE Talon SRX Speed Controller with CAN Control
*/
class CANTalon : public MotorSafety,
public CANSpeedController,

View File

@@ -10,7 +10,7 @@
#include "PIDOutput.h"
/**
* Luminary Micro Jaguar Speed Control
* Luminary Micro / Vex Robotics Jaguar Speed Controller with PWM control
*/
class Jaguar : public SafePWM, public SpeedController
{

View File

@@ -10,7 +10,7 @@
#include "PIDOutput.h"
/**
* CTRE Talon Speed Controller
* Cross the Road Electronics (CTRE) Talon and Talon SR Speed Controller
*/
class Talon : public SafePWM, public SpeedController
{

View File

@@ -0,0 +1,18 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
/*----------------------------------------------------------------------------*/
#pragma once
#include "Talon.h"
/**
* Cross the Road Electronics (CTRE) Talon SRX Speed Controller with PWM control
* @see CANTalon for CAN control
*/
class TalonSRX: public Talon {
public:
explicit TalonSRX(uint32_t channel);
virtual ~TalonSRX();
};

View File

@@ -10,7 +10,10 @@
#include "PIDOutput.h"
/**
* IFI Victor Speed Controller
* Vex Robotics Victor 888 Speed Controller
*
* The Vex Robotics Victor 884 Speed Controller can also be used with this
* class but may need to be calibrated per the Victor 884 user manual.
*/
class Victor : public SafePWM, public SpeedController
{

View File

@@ -0,0 +1,17 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
/*----------------------------------------------------------------------------*/
#pragma once
#include "Talon.h"
/**
* Vex Robotics Victor SP Speed Controller
*/
class VictorSP: public Talon {
public:
explicit VictorSP(uint32_t channel);
virtual ~VictorSP();
};

View File

@@ -78,10 +78,12 @@
#include "SPI.h"
#include "HAL/cpp/Synchronized.hpp"
#include "Talon.h"
#include "TalonSRX.h"
#include "Task.h"
#include "Timer.h"
#include "Ultrasonic.h"
#include "Utility.h"
#include "Victor.h"
#include "VictorSP.h"
// XXX: #include "Vision/AxisCamera.h"
#include "WPIErrors.h"

View File

@@ -0,0 +1,15 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
/*----------------------------------------------------------------------------*/
#include "TalonSRX.h"
TalonSRX::TalonSRX(uint32_t channel) : Talon(channel) {
}
TalonSRX::~TalonSRX() {
}

View File

@@ -0,0 +1,15 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in $(WIND_BASE)/WPILib. */
/*----------------------------------------------------------------------------*/
#include "VictorSP.h"
VictorSP::VictorSP(uint32_t channel) : Talon(channel) {
}
VictorSP::~VictorSP() {
}

View File

@@ -12,7 +12,8 @@ import edu.wpi.first.wpilibj.communication.UsageReporting;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
/**
* Texas Instruments Jaguar Speed Controller as a PWM device.
* Texas Instruments / Vex Robotics Jaguar Speed Controller as a PWM device.
* @see CANJaguar CANJaguar for CAN control
*/
public class Jaguar extends SafePWM implements SpeedController {

View File

@@ -12,7 +12,7 @@ import edu.wpi.first.wpilibj.communication.UsageReporting;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
/**
* CTRE Talon Speed Controller
* Cross the Road Electronics (CTRE) Talon and Talon SR Speed Controller
*/
public class Talon extends SafePWM implements SpeedController {

View File

@@ -0,0 +1,23 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008-2014. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package edu.wpi.first.wpilibj;
/**
* Cross the Road Electronics (CTRE) Talon SRX Speed Controller with PWM control
* @see CANTalon CANTalon for CAN control of Talon SRX
*/
public class TalonSRX extends Talon {
/**
* Constructor.
*
* @param channel The PWM channel that the Talon SRX is attached to.
*/
public TalonSRX(final int channel) {
super(channel);
}
}

View File

@@ -12,7 +12,10 @@ import edu.wpi.first.wpilibj.communication.UsageReporting;
import edu.wpi.first.wpilibj.livewindow.LiveWindow;
/**
* VEX Robotics Victor Speed Controller
* VEX Robotics Victor 888 Speed Controller
*
* The Vex Robotics Victor 884 Speed Controller can also be used with this
* class but may need to be calibrated per the Victor 884 user manual.
*/
public class Victor extends SafePWM implements SpeedController {

View File

@@ -0,0 +1,24 @@
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008-2014. All Rights Reserved. */
/* Open Source Software - may be modified and shared by FRC teams. The code */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project. */
/*----------------------------------------------------------------------------*/
package edu.wpi.first.wpilibj;
/**
* Vex Robotics Victor SP Speed Controller
*/
public class VictorSP extends Talon {
/**
* Constructor.
*
* @param channel The PWM channel that the VictorSP is attached to.
*/
public VictorSP(final int channel) {
super(channel);
}
}