From 9653c46bdb5d4499e0f5ec2308130278971dafa8 Mon Sep 17 00:00:00 2001 From: DeltaDizzy Date: Sun, 11 Feb 2024 03:27:25 -0600 Subject: [PATCH] fix cpp and java photoncamera names (#1230) --- photonlib-cpp-examples/aimattarget/src/main/include/Robot.h | 4 ++-- .../aimattarget/src/main/java/frc/robot/Robot.java | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/photonlib-cpp-examples/aimattarget/src/main/include/Robot.h b/photonlib-cpp-examples/aimattarget/src/main/include/Robot.h index 6954a0426..840fb4699 100644 --- a/photonlib-cpp-examples/aimattarget/src/main/include/Robot.h +++ b/photonlib-cpp-examples/aimattarget/src/main/include/Robot.h @@ -39,8 +39,8 @@ class Robot : public frc::TimedRobot { void TeleopPeriodic() override; private: - // Change this to match the name of your camera - photon::PhotonCamera camera{"photonvision"}; + // Change this to match the name of your camera as shown in the web UI + photon::PhotonCamera camera{"YOUR_CAMERA_NAME_HERE"}; // PID constants should be tuned per robot frc::PIDController controller{.1, 0, 0}; diff --git a/photonlib-java-examples/aimattarget/src/main/java/frc/robot/Robot.java b/photonlib-java-examples/aimattarget/src/main/java/frc/robot/Robot.java index 5d41404fd..458196553 100644 --- a/photonlib-java-examples/aimattarget/src/main/java/frc/robot/Robot.java +++ b/photonlib-java-examples/aimattarget/src/main/java/frc/robot/Robot.java @@ -48,8 +48,8 @@ public class Robot extends TimedRobot { // How far from the target we want to be final double GOAL_RANGE_METERS = Units.feetToMeters(3); - // Change this to match the name of your camera - PhotonCamera camera = new PhotonCamera("photonvision"); + // Change this to match the name of your camera as shown in the web UI + PhotonCamera camera = new PhotonCamera("YOUR_CAMERA_NAME_HERE"); // PID constants should be tuned per robot final double LINEAR_P = 0.1;