mirror of
https://github.com/TimeCrafters/FTC_2022
synced 2025-12-15 14:22:34 +00:00
set downDistance sensor, added telemetry for cone distance
This commit is contained in:
@@ -63,6 +63,7 @@ public class PhoenixBot1 {
|
||||
|
||||
private void setupRobot () {
|
||||
collectorDistance = engine.hardwareMap.get(Rev2mDistanceSensor.class, "collectorDistance");
|
||||
downSensor = engine.hardwareMap.get(Rev2mDistanceSensor.class, "downDistance");
|
||||
leftPoleDistance = engine.hardwareMap.get(Rev2mDistanceSensor.class, "Left Pole Distance");
|
||||
rightPoleDistance = engine.hardwareMap.get(Rev2mDistanceSensor.class, "Right Pole Distance");
|
||||
|
||||
|
||||
@@ -47,6 +47,7 @@ public class PhoenixTeleOPState extends CyberarmState {
|
||||
engine.telemetry.addData("IMU", robot.imu.getAngularOrientation().firstAngle);
|
||||
engine.telemetry.addData("Drive Power", drivePower);
|
||||
engine.telemetry.addData("Delta Rotation", DeltaRotation);
|
||||
engine.telemetry.addData("Cone Distance", robot.collectorDistance.getDistance(DistanceUnit.MM));
|
||||
engine.telemetry.addData("Collector Height", robot.downSensor.getDistance(DistanceUnit.MM));
|
||||
engine.telemetry.addData("Left Pole Distance", robot.leftPoleDistance.getDistance(DistanceUnit.MM));
|
||||
engine.telemetry.addData("Right Pole Distance", robot.rightPoleDistance.getDistance(DistanceUnit.MM));
|
||||
|
||||
Reference in New Issue
Block a user