We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 649974a commit 243e173Copy full SHA for 243e173
src/main/java/frc/robot/subsystems/rangefinder/RangefinderIOHardware.java
@@ -1,13 +1,22 @@
1
package frc.robot.subsystems.rangefinder;
2
3
+import au.grapplerobotics.ConfigurationFailedException;
4
import au.grapplerobotics.LaserCan;
5
+import au.grapplerobotics.interfaces.LaserCanInterface.RangingMode;
6
+
7
import java.util.Optional;
8
9
public class RangefinderIOHardware implements RangefinderIO {
- LaserCan sensor;
10
+ private final LaserCan sensor;
11
12
public RangefinderIOHardware(int id) {
13
sensor = new LaserCan(id);
14
15
+ try {
16
+ sensor.setRangingMode(RangingMode.SHORT);
17
+ } catch (ConfigurationFailedException e) {
18
+ e.printStackTrace();
19
+ }
20
}
21
22
@Override
0 commit comments