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:
Tyler Veness
2015-06-29 02:43:44 -07:00
parent e4a8aacc51
commit 1ab3ea670d
62 changed files with 258 additions and 525 deletions

View File

@@ -11,23 +11,23 @@
#include "LiveWindow/LiveWindow.h"
/**
* Common initialization code called by all constructors.
*
* Note that the TalonSRX uses the following bounds for PWM values. These values
* should work reasonably well for
* most controllers, but if users experience issues such as asymmetric behaviour
* around
* the deadband or inability to saturate the controller in either direction,
* calibration is recommended.
* The calibration procedure can be found in the TalonSRX User Manual available
* from Cross The Road Electronics.
* 2.004ms = full "forward"
* 1.52ms = the "high end" of the deadband range
* 1.50ms = center of the deadband range (off)
* 1.48ms = the "low end" of the deadband range
* 0.997ms = full "reverse"
* Construct a TalonSRX connected via PWM
* @param channel The PWM channel that the TalonSRX is attached to. 0-9 are
* on-board, 10-19 are on the MXP port
*/
void TalonSRX::InitTalonSRX() {
TalonSRX::TalonSRX(uint32_t channel) : SafePWM(channel) {
/* Note that the TalonSRX 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 TalonSRX User
* Manual available from Cross The Road Electronics.
* 2.004ms = full "forward"
* 1.52ms = the "high end" of the deadband range
* 1.50ms = center of the deadband range (off)
* 1.48ms = the "low end" of the deadband range
* 0.997ms = full "reverse"
*/
SetBounds(2.004, 1.52, 1.50, 1.48, .997);
SetPeriodMultiplier(kPeriodMultiplier_1X);
SetRaw(m_centerPwm);
@@ -37,13 +37,6 @@ void TalonSRX::InitTalonSRX() {
LiveWindow::GetInstance()->AddActuator("TalonSRX", GetChannel(), this);
}
/**
* Construct a TalonSRX connected via PWM
* @param channel The PWM channel that the TalonSRX is attached to. 0-9 are
* on-board, 10-19 are on the MXP port
*/
TalonSRX::TalonSRX(uint32_t channel) : SafePWM(channel) { InitTalonSRX(); }
/**
* Set the PWM value.
*