Create a gist now

Instantly share code, notes, and snippets.

package org.usfirst.frc.team263.robot;
import com.kauailabs.navx.frc.AHRS;
import edu.wpi.first.wpilibj.SPI.Port;
public class AHRSRollReset extends AHRS {
private float lastReset = 0;
public Test(Port spi_port_id) {
super(spi_port_id);
}
public float getRoll() {
return super.getRoll() - lastReset;
}
public void resetRoll() {
lastReset = super.getRoll();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment