mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +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,28 +11,26 @@
|
||||
#include "LiveWindow/LiveWindow.h"
|
||||
|
||||
/**
|
||||
* Common initialization code called by all constructors.
|
||||
*
|
||||
* Note that the Victor uses the following bounds for PWM values. These values
|
||||
* were determined
|
||||
* empirically and optimized for the Victor 888. These values should work
|
||||
* reasonably well for
|
||||
* Victor 884 controllers as well 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 Victor 884 User Manual
|
||||
* available from IFI.
|
||||
*
|
||||
* 2.027ms = full "forward"
|
||||
* 1.525ms = the "high end" of the deadband range
|
||||
* 1.507ms = center of the deadband range (off)
|
||||
* 1.49ms = the "low end" of the deadband range
|
||||
* 1.026ms = full "reverse"
|
||||
* Constructor for a Victor
|
||||
* @param channel The PWM channel number that the Victor is attached to. 0-9 are
|
||||
* on-board, 10-19 are on the MXP port
|
||||
*/
|
||||
void Victor::InitVictor() {
|
||||
Victor::Victor(uint32_t channel) : SafePWM(channel) {
|
||||
/* Note that the Victor uses the following bounds for PWM values. These
|
||||
* values were determined empirically and optimized for the Victor 888. These
|
||||
* values should work reasonably well for Victor 884 controllers as well 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 Victor 884 User
|
||||
* Manual available from IFI.
|
||||
*
|
||||
* 2.027ms = full "forward"
|
||||
* 1.525ms = the "high end" of the deadband range
|
||||
* 1.507ms = center of the deadband range (off)
|
||||
* 1.49ms = the "low end" of the deadband range
|
||||
* 1.026ms = full "reverse"
|
||||
*/
|
||||
SetBounds(2.027, 1.525, 1.507, 1.49, 1.026);
|
||||
|
||||
SetPeriodMultiplier(kPeriodMultiplier_2X);
|
||||
SetRaw(m_centerPwm);
|
||||
SetZeroLatch();
|
||||
@@ -41,13 +39,6 @@ void Victor::InitVictor() {
|
||||
HALReport(HALUsageReporting::kResourceType_Victor, GetChannel());
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for a Victor
|
||||
* @param channel The PWM channel number that the Victor is attached to. 0-9 are
|
||||
* on-board, 10-19 are on the MXP port
|
||||
*/
|
||||
Victor::Victor(uint32_t channel) : SafePWM(channel) { InitVictor(); }
|
||||
|
||||
/**
|
||||
* Set the PWM value.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user