mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Added and implemented GetInverted method.
Change-Id: I53bd51e41311e3ffcd3fa3ffbc4e72cfab530109
This commit is contained in:
@@ -432,6 +432,17 @@ public class CANJaguar implements MotorSafety, PIDOutput, PIDInterface, CANSpeed
|
||||
this.isInverted = isInverted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Common interface for the inverting direction of a speed controller.
|
||||
*
|
||||
* @return isInverted The state of inversion, true is inverted.
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public boolean getInverted() {
|
||||
return this.isInverted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check all unverified params and make sure they're equal to their local
|
||||
* cached versions. If a value isn't available, it gets requested. If a value
|
||||
|
||||
@@ -169,15 +169,26 @@ public class CANTalon implements MotorSafety, PIDOutput, PIDSource, PIDInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* Inverts the direction of the motor's rotation
|
||||
* Only works in PercentVbus mode
|
||||
* Inverts the direction of the motor's rotation.
|
||||
* Only works in PercentVbus mode.
|
||||
*
|
||||
* @param isInverted The state of inversion true is inverted
|
||||
* @param isInverted The state of inversion, true is inverted.
|
||||
*/
|
||||
@Override
|
||||
public void setInverted(boolean isInverted) {
|
||||
this.isInverted = isInverted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Common interface for the inverting direction of a speed controller.
|
||||
*
|
||||
* @return isInverted The state of inversion, true is inverted.
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public boolean getInverted() {
|
||||
return this.isInverted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the output of the Talon.
|
||||
|
||||
@@ -82,15 +82,26 @@ private boolean isInverted = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Common interface for inverting direction of a speed controller
|
||||
* Common interface for inverting direction of a speed controller.
|
||||
*
|
||||
* @param isInverted The state of inversion true is inverted
|
||||
* @param isInverted The state of inversion, true is inverted.
|
||||
*/
|
||||
@Override
|
||||
public void setInverted(boolean isInverted) {
|
||||
this.isInverted = isInverted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Common interface for the inverting direction of a speed controller.
|
||||
*
|
||||
* @return isInverted The state of inversion, true is inverted.
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public boolean getInverted() {
|
||||
return this.isInverted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the recently set value of the PWM.
|
||||
*
|
||||
|
||||
@@ -35,11 +35,23 @@ public interface SpeedController extends PIDOutput {
|
||||
void set(double speed);
|
||||
|
||||
/**
|
||||
* Common interface for inverting direction of a speed controller
|
||||
* Common interface for inverting direction of a speed controller.
|
||||
*
|
||||
* @param isInverted The state of inversion true is inverted
|
||||
* @param isInverted The state of inversion true is inverted.
|
||||
*/
|
||||
void setInverted(boolean isInverted);
|
||||
|
||||
/**
|
||||
* Common interface for returning if a speed controller
|
||||
* is in the inverted state or not.
|
||||
*
|
||||
* @return isInverted The state of the inversion true is inverted.
|
||||
*
|
||||
*/
|
||||
boolean getInverted();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Disable the speed controller
|
||||
*/
|
||||
|
||||
@@ -89,6 +89,17 @@ private boolean isInverted = false;
|
||||
this.isInverted = isInverted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Common interface for the inverting direction of a speed controller.
|
||||
*
|
||||
* @return isInverted The state of inversion, true is inverted.
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public boolean getInverted() {
|
||||
return this.isInverted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the recently set value of the PWM.
|
||||
*
|
||||
|
||||
@@ -81,15 +81,26 @@ public class TalonSRX extends SafePWM implements SpeedController {
|
||||
}
|
||||
|
||||
/**
|
||||
* Common interface for inverting direction of a speed controller
|
||||
* Common interface for inverting direction of a speed controller.
|
||||
*
|
||||
* @param isInverted The state of inversion true is inverted
|
||||
* @param isInverted The state of inversion, true is inverted.
|
||||
*/
|
||||
@Override
|
||||
public void setInverted(boolean isInverted) {
|
||||
this.isInverted = isInverted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Common interface for the inverting direction of a speed controller.
|
||||
*
|
||||
* @return isInverted The state of inversion, true is inverted.
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public boolean getInverted() {
|
||||
return this.isInverted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the recently set value of the PWM.
|
||||
*
|
||||
|
||||
@@ -94,6 +94,17 @@ private boolean isInverted = false;
|
||||
this.isInverted = isInverted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Common interface for the inverting direction of a speed controller.
|
||||
*
|
||||
* @return isInverted The state of inversion, true is inverted.
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public boolean getInverted() {
|
||||
return this.isInverted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the recently set value of the PWM.
|
||||
*
|
||||
|
||||
@@ -89,6 +89,17 @@ private boolean isInverted = false;
|
||||
this.isInverted = isInverted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Common interface for the inverting direction of a speed controller.
|
||||
*
|
||||
* @return isInverted The state of inversion, true is inverted.
|
||||
*
|
||||
*/
|
||||
@Override
|
||||
public boolean getInverted() {
|
||||
return this.isInverted;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the recently set value of the PWM.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user