Advertisement
Guest User

Untitled

a guest
Feb 7th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. package org.usfirst.frc.team263.robot;
  2.  
  3. import com.kauailabs.navx.frc.AHRS;
  4.  
  5. import edu.wpi.first.wpilibj.SPI.Port;
  6.  
  7. public class AHRSRollReset extends AHRS {
  8. private float lastReset = 0;
  9.  
  10. public Test(Port spi_port_id) {
  11. super(spi_port_id);
  12. }
  13.  
  14. public float getRoll() {
  15. return super.getRoll() - lastReset;
  16. }
  17.  
  18. public void reset() {
  19. lastReset = super.getRoll();
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement