Explicitly states the gyro direction contract for the Gyro interface (#1151)

This commit is contained in:
Thad House
2018-06-10 20:13:36 -07:00
committed by Peter Johnson
parent b20158015c
commit 5af85dd1bb
2 changed files with 16 additions and 0 deletions

View File

@@ -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();