mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-06 03:31:43 +00:00
Removed analog and digital module numbers
AnalogModule and DigitalModule classes still exist, at least until they are refactored into the classes that use them. Change-Id: I5544d5418822f19d54ba0a5d651e64fad8b7b10d
This commit is contained in:
@@ -18,24 +18,14 @@ void SafePWM::InitSafePWM()
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for a SafePWM object taking a channel number
|
||||
* @param channel The channel number to be used for the underlying PWM object
|
||||
* Constructor for a SafePWM object taking a channel number.
|
||||
* @param channel The PWM channel number (0..19).
|
||||
*/
|
||||
SafePWM::SafePWM(uint32_t channel): PWM(channel)
|
||||
{
|
||||
InitSafePWM();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for a SafePWM object taking channel and slot numbers.
|
||||
* @param moduleNumber The digital module (1 or 2).
|
||||
* @param channel The PWM channel number on the module (1..10).
|
||||
*/
|
||||
SafePWM::SafePWM(uint8_t moduleNumber, uint32_t channel): PWM(moduleNumber, channel)
|
||||
{
|
||||
InitSafePWM();
|
||||
}
|
||||
|
||||
SafePWM::~SafePWM()
|
||||
{
|
||||
delete m_safetyHelper;
|
||||
@@ -100,7 +90,7 @@ bool SafePWM::IsSafetyEnabled()
|
||||
|
||||
void SafePWM::GetDescription(char *desc)
|
||||
{
|
||||
sprintf(desc, "PWM %d on module %d", GetChannel(), GetModuleNumber());
|
||||
sprintf(desc, "PWM %d", GetChannel());
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -114,4 +104,3 @@ void SafePWM::SetSpeed(float speed)
|
||||
PWM::SetSpeed(speed);
|
||||
m_safetyHelper->Feed();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user