From 63f1cc477fc04019a470da92888885ff7ec0bcca Mon Sep 17 00:00:00 2001 From: Jeremy Date: Wed, 15 Nov 2017 19:29:59 -0500 Subject: [PATCH] add floorColSens, add telemtry in uniAudi --- .../main/java/org/firstinspires/ftc/teamcode/NewRobot.java | 1 + .../java/org/firstinspires/ftc/teamcode/UniversalAudi.java | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/NewRobot.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/NewRobot.java index d0780de76a2..fbbd723e92a 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/NewRobot.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/NewRobot.java @@ -44,6 +44,7 @@ public NewRobot(HardwareMap hardwareMap) //Comment out if you don't want camera view on robo phone //VuforiaLocalizer.Parameters parameters = new VuforiaLocalizer.Parameters(); + floorColorSens = hardwareMap.colorSensor.get("floorColorSens"); parameters.vuforiaLicenseKey = VUFORIA_KEY; parameters.cameraDirection = VuforiaLocalizer.CameraDirection.FRONT; diff --git a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/UniversalAudi.java b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/UniversalAudi.java index 3a11da9cbce..611d3654888 100644 --- a/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/UniversalAudi.java +++ b/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/UniversalAudi.java @@ -18,6 +18,9 @@ public void runOpMode() waitForStart(); sleep(300); char colorOfPlatform = newRobot.getColor(newRobot.getFloorColorSens()); + telemetry.addData("color = ", colorOfPlatform); + telemetry.addData("Hue value", newRobot.getHueValue(newRobot.getFloorColorSens())); + sleep(1000); switch (colorOfPlatform) { case 'b': @@ -85,6 +88,7 @@ public void runOpMode() robot.stopAllMotors(); break; default: + break; } } }