Add code for testing hall effect Shaina/testHallEffect
authorshainachen <shaina.sierra@gmail.com>
Wed, 8 Feb 2017 04:13:53 +0000 (20:13 -0800)
committerCindy Zhang <cindyzyx9@gmail.com>
Fri, 10 Feb 2017 04:07:14 +0000 (20:07 -0800)
src/org/usfirst/frc/team3501/robot/Robot.java
src/org/usfirst/frc/team3501/robot/utils/HallEffectSensor.java

index 072b5bd64444f756fcb21027ebbaff6bd803c313..5a3155b806b36695f94a6381a0ff79e3686de9be 100644 (file)
@@ -58,5 +58,7 @@ public class Robot extends IterativeRobot {
   @Override
   public void teleopPeriodic() {
     Scheduler.getInstance().run();
+
+    System.out.println(shooter.getHallEffectSensor().getCounterPeriod());
   }
 }
index 384dc025e936f22dceab27ee00b70388dabb7799..cb11449810e5d3e2e6c9504fc5451e00551943bb 100644 (file)
@@ -12,7 +12,7 @@ public class HallEffectSensor {
 
   /**
    * Returns rotations per second(buffered) of hall effect sensor counter
-   * 
+   *
    * @return rotations per second of hall effect counter
    */
   public double getRPS() {
@@ -21,16 +21,17 @@ public class HallEffectSensor {
 
   /**
    * Get the period of the most recent count.
-   * 
+   *
    * @return period of latest count in seconds
    */
   public double getCounterPeriod() {
+    System.out.println("Counter count: " + counter.get());
     return counter.getPeriod();
   }
 
   /**
    * Returns rotations per minute(buffered) of hall effect sensor counter
-   * 
+   *
    * @return rotations per minute of hall effect sensor
    */
   public double getRPM() {