mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
artf4107: Removed most "Init" functions from classes
They were either replaced with delegating constructors or merged into the only constructor in the class. Change-Id: I3d35139f6ab23c719433a9f76942b02a3b07ddac
This commit is contained in:
@@ -11,24 +11,24 @@
|
||||
#include "LiveWindow/LiveWindow.h"
|
||||
|
||||
/**
|
||||
* Common initialization code called by all constructors.
|
||||
*
|
||||
* Note that the Talon uses the following bounds for PWM values. These values
|
||||
* should work reasonably well for
|
||||
* most controllers, but if users experience issues such as asymmetric behavior
|
||||
* around
|
||||
* the deadband or inability to saturate the controller in either direction,
|
||||
* calibration is recommended.
|
||||
* The calibration procedure can be found in the Talon User Manual available
|
||||
* from CTRE.
|
||||
*
|
||||
* 2.037ms = full "forward"
|
||||
* 1.539ms = the "high end" of the deadband range
|
||||
* 1.513ms = center of the deadband range (off)
|
||||
* 1.487ms = the "low end" of the deadband range
|
||||
* 0.989ms = full "reverse"
|
||||
* Constructor for a Talon (original or Talon SR)
|
||||
* @param channel The PWM channel number that the Talon is attached to. 0-9 are
|
||||
* on-board, 10-19 are on the MXP port
|
||||
*/
|
||||
void Talon::InitTalon() {
|
||||
Talon::Talon(uint32_t channel) : SafePWM(channel) {
|
||||
/* Note that the Talon uses the following bounds for PWM values. These values
|
||||
* should work reasonably well for most controllers, but if users experience
|
||||
* issues such as asymmetric behavior around the deadband or inability to
|
||||
* saturate the controller in either direction, calibration is recommended.
|
||||
* The calibration procedure can be found in the Talon User Manual available
|
||||
* from CTRE.
|
||||
*
|
||||
* 2.037ms = full "forward"
|
||||
* 1.539ms = the "high end" of the deadband range
|
||||
* 1.513ms = center of the deadband range (off)
|
||||
* 1.487ms = the "low end" of the deadband range
|
||||
* 0.989ms = full "reverse"
|
||||
*/
|
||||
SetBounds(2.037, 1.539, 1.513, 1.487, .989);
|
||||
SetPeriodMultiplier(kPeriodMultiplier_1X);
|
||||
SetRaw(m_centerPwm);
|
||||
@@ -38,13 +38,6 @@ void Talon::InitTalon() {
|
||||
LiveWindow::GetInstance()->AddActuator("Talon", GetChannel(), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for a Talon (original or Talon SR)
|
||||
* @param channel The PWM channel number that the Talon is attached to. 0-9 are
|
||||
* on-board, 10-19 are on the MXP port
|
||||
*/
|
||||
Talon::Talon(uint32_t channel) : SafePWM(channel) { InitTalon(); }
|
||||
|
||||
/**
|
||||
* Set the PWM value.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user