NavXGyro

class NavXGyro(port: SPI.Port, val pitchOffset: Double, val rollOffset: Double) : GenericGyro

A wrapper class for the NavX Gyroscope.

Constructors

Link copied to clipboard
constructor(port: SPI.Port, pitchOffset: Double, rollOffset: Double)

Creates a gyro with the specified port.

Functions

Link copied to clipboard
open override fun getPitch(): Double
Link copied to clipboard
open override fun getRoll(): Double
Link copied to clipboard
open override fun getYaw(): Double

Gets the angle the gyro is currently facing.

Link copied to clipboard
open override fun getYawRotation2d(): Rotation2d
Link copied to clipboard
open override fun mergePitchRoll(): Vector2
Link copied to clipboard
open override fun setYawOffset(currentPos: Double)

Sets the angle offset of the gyro to the current direction.

Properties

Link copied to clipboard
val gyro: AHRS
Link copied to clipboard

The offset of the pitch axis.

Link copied to clipboard

The offset of the roll axis.