mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-26 01:51:41 +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:
@@ -9,20 +9,15 @@
|
||||
|
||||
#include "MotorSafetyHelper.h"
|
||||
|
||||
/**
|
||||
* Initialize a SafePWM object by setting defaults
|
||||
*/
|
||||
void SafePWM::InitSafePWM() {
|
||||
m_safetyHelper = new MotorSafetyHelper(this);
|
||||
m_safetyHelper->SetSafetyEnabled(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for a SafePWM object taking a channel number.
|
||||
* @param channel The PWM channel number 0-9 are on-board, 10-19 are on the MXP
|
||||
* port
|
||||
*/
|
||||
SafePWM::SafePWM(uint32_t channel) : PWM(channel) { InitSafePWM(); }
|
||||
SafePWM::SafePWM(uint32_t channel) : PWM(channel) {
|
||||
m_safetyHelper = new MotorSafetyHelper(this);
|
||||
m_safetyHelper->SetSafetyEnabled(false);
|
||||
}
|
||||
|
||||
SafePWM::~SafePWM() { delete m_safetyHelper; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user