Skip to content

Commit

Permalink
Merge pull request #80 from RoboticsTeam4904/log-ir-values
Browse files Browse the repository at this point in the history
log CANInfraredDistanceSensor as they're read
  • Loading branch information
c0d3rman committed Mar 26, 2016
2 parents a3ffb0e + cbd6c6b commit 1592e6a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion custom/sensors/CANInfraredDistanceSensor.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package org.usfirst.frc4904.standard.custom.sensors;


import org.usfirst.frc4904.standard.LogKitten;

/**
* Infrared Distance Sensor connected via CAN
* assumes mode containing distance values is 0
Expand All @@ -22,6 +24,8 @@ public CANInfraredDistanceSensor(String name, int id) {

@Override
public double getDistance() {
return this.read(CANInfraredDistanceSensor.CAN_SENSOR_MODE);
int value = read(CANInfraredDistanceSensor.CAN_SENSOR_MODE);
LogKitten.d(name + " read value " + value);
return value;
}
}

0 comments on commit 1592e6a

Please sign in to comment.