mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +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,8 +11,6 @@
|
||||
#include "LiveWindow/LiveWindow.h"
|
||||
|
||||
/**
|
||||
* Common initialization code called by all constructors.
|
||||
*
|
||||
* Note that the VictorSP 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
|
||||
@@ -28,7 +26,13 @@
|
||||
* 1.48ms = the "low end" of the deadband range
|
||||
* 0.997ms = full "reverse"
|
||||
*/
|
||||
void VictorSP::InitVictorSP() {
|
||||
|
||||
/**
|
||||
* Constructor for a VictorSP
|
||||
* @param channel The PWM channel that the VictorSP is attached to. 0-9 are
|
||||
* on-board, 10-19 are on the MXP port
|
||||
*/
|
||||
VictorSP::VictorSP(uint32_t channel) : SafePWM(channel) {
|
||||
SetBounds(2.004, 1.52, 1.50, 1.48, .997);
|
||||
SetPeriodMultiplier(kPeriodMultiplier_1X);
|
||||
SetRaw(m_centerPwm);
|
||||
@@ -38,13 +42,6 @@ void VictorSP::InitVictorSP() {
|
||||
LiveWindow::GetInstance()->AddActuator("VictorSP", GetChannel(), this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for a VictorSP
|
||||
* @param channel The PWM channel that the VictorSP is attached to. 0-9 are
|
||||
* on-board, 10-19 are on the MXP port
|
||||
*/
|
||||
VictorSP::VictorSP(uint32_t channel) : SafePWM(channel) { InitVictorSP(); }
|
||||
|
||||
/**
|
||||
* Set the PWM value.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user