mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
added setPosition to java. Great for zero-ing your relative sensors, also exists in cpp and LV.
Change-Id: Idfd8c0d2c568306cb6853803315a99b92992b388
This commit is contained in:
committed by
James Kuszmaul
parent
4d142cdafa
commit
568b842c73
@@ -305,6 +305,10 @@ public class CANTalon implements MotorSafety, PIDOutput, SpeedController {
|
||||
return CanTalonJNI.intp_value(positionp);
|
||||
}
|
||||
|
||||
public void setPosition(double pos) {
|
||||
m_impl.SetSensorPosition((int)pos);
|
||||
}
|
||||
|
||||
public double getSpeed() {
|
||||
long speedp = CanTalonJNI.new_intp();
|
||||
m_impl.GetSensorVelocity(new SWIGTYPE_p_int(speedp, true));
|
||||
|
||||
Reference in New Issue
Block a user