mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
Added and implemented GetInverted method.
Change-Id: I53bd51e41311e3ffcd3fa3ffbc4e72cfab530109
This commit is contained in:
@@ -35,7 +35,7 @@ void VictorSP::InitVictorSP() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor for a VictorSP
|
||||
* 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)
|
||||
@@ -70,13 +70,25 @@ float VictorSP::Get() const
|
||||
{
|
||||
return GetSpeed();
|
||||
}
|
||||
|
||||
/**
|
||||
* common interface for inverting direction of a speed controller
|
||||
* @param isInverted The state of inversion true is inverted
|
||||
*/
|
||||
* Common interface for inverting direction of a speed controller.
|
||||
* @param isInverted The state of inversion, true is inverted.
|
||||
*/
|
||||
void VictorSP::SetInverted(bool isInverted){
|
||||
m_isInverted = isInverted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Common interface for the inverting direction of a speed controller.
|
||||
*
|
||||
* @return isInverted The state of inversion, true is inverted.
|
||||
*
|
||||
*/
|
||||
bool VictorSP::GetInverted() const {
|
||||
return m_isInverted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Common interface for disabling a motor.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user