mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
Explicitly states the gyro direction contract for the Gyro interface (#1151)
This commit is contained in:
committed by
Peter Johnson
parent
b20158015c
commit
5af85dd1bb
@@ -34,6 +34,10 @@ public interface Gyro extends AutoCloseable {
|
||||
* from 360 to 361 degrees. This allows algorithms that wouldn't want to see a discontinuity in
|
||||
* the gyro output as it sweeps past from 360 to 0 on the second time around.
|
||||
*
|
||||
* <p>The angle is expected to increase as the gyro turns clockwise when looked
|
||||
* at from the top. It needs to follow NED axis conventions in order to work
|
||||
* properly with dependent control loops.
|
||||
*
|
||||
* <p>This heading is based on integration of the returned rate from the gyro.
|
||||
*
|
||||
* @return the current heading of the robot in degrees.
|
||||
@@ -45,6 +49,10 @@ public interface Gyro extends AutoCloseable {
|
||||
*
|
||||
* <p>The rate is based on the most recent reading of the gyro analog value
|
||||
*
|
||||
* <p>The rate is expected to be positive as the gyro turns clockwise when looked
|
||||
* at from the top. It needs to follow NED axis conventions in order to work
|
||||
* properly with dependent control loops.
|
||||
*
|
||||
* @return the current rate in degrees per second
|
||||
*/
|
||||
double getRate();
|
||||
|
||||
Reference in New Issue
Block a user