mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
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:
@@ -20,7 +20,7 @@
|
||||
#include <utility>
|
||||
|
||||
/**
|
||||
* Luminary Micro Jaguar Speed Control
|
||||
* Luminary Micro / Vex Robotics Jaguar Speed Control
|
||||
*/
|
||||
class CANJaguar : public MotorSafety,
|
||||
public CANSpeedController,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
{
|
||||
|
||||
18
wpilibc/wpilibC++Devices/include/TalonSRX.h
Normal file
18
wpilibc/wpilibC++Devices/include/TalonSRX.h
Normal 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();
|
||||
};
|
||||
@@ -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
|
||||
{
|
||||
|
||||
17
wpilibc/wpilibC++Devices/include/VictorSP.h
Normal file
17
wpilibc/wpilibC++Devices/include/VictorSP.h
Normal 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();
|
||||
};
|
||||
@@ -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"
|
||||
|
||||
15
wpilibc/wpilibC++Devices/src/TalonSRX.cpp
Normal file
15
wpilibc/wpilibC++Devices/src/TalonSRX.cpp
Normal 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() {
|
||||
}
|
||||
|
||||
15
wpilibc/wpilibC++Devices/src/VictorSP.cpp
Normal file
15
wpilibc/wpilibC++Devices/src/VictorSP.cpp
Normal 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() {
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -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 {
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user