From b786e10610f913c6ffa4bdae1d6ff38bfce42a3a Mon Sep 17 00:00:00 2001 From: Pushkar9236 <104144@psdschools.org> Date: Thu, 27 Jan 2022 18:48:27 -0700 Subject: [PATCH] unnecessary stuff commented out --- .../java/frc4388/robot/subsystems/Vision.java | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/src/main/java/frc4388/robot/subsystems/Vision.java b/src/main/java/frc4388/robot/subsystems/Vision.java index 4a1e119..310d70f 100644 --- a/src/main/java/frc4388/robot/subsystems/Vision.java +++ b/src/main/java/frc4388/robot/subsystems/Vision.java @@ -57,35 +57,35 @@ public void track(){ distance = (VisionConstants.TARGET_HEIGHT) / Math.tan((VisionConstants.LIME_ANGLE + yAngle) * (Math.PI / 180)); realDistance = (1.09 * distance) - 12.8; - if (target == 1.0) { //checks if target is in view - //aims left and right - turnAmount = ((xAngle / VisionConstants.FOV) * VisionConstants.TURN_P_VALUE); - if (Math.abs(xAngle) < VisionConstants.X_ANGLE_ERROR) { - turnAmount = 0; - } - else if (turnAmount > 0 && turnAmount < 0.1){ - turnAmount = 0.1; - } - else if (turnAmount < 0 && turnAmount > -0.1){ - turnAmount = -0.1; - } - } + // if (target == 1.0) { //checks if target is in view + // //aims left and right + // turnAmount = ((xAngle / VisionConstants.FOV) * VisionConstants.TURN_P_VALUE); + // if (Math.abs(xAngle) < VisionConstants.X_ANGLE_ERROR) { + // turnAmount = 0; + // } + // else if (turnAmount > 0 && turnAmount < 0.1){ + // turnAmount = 0.1; + // } + // else if (turnAmount < 0 && turnAmount > -0.1){ + // turnAmount = -0.1; + // } + // } SmartDashboard.putNumber("Distance to Target", realDistance); - //start CSV + // //start CSV - fireVel = m_boomBoom.m_shooterTable.getVelocity(realDistance); - fireAngle = m_boomBoom.m_shooterTable.getHood(realDistance); - //fire angle unknown so far - //end of CSV + // fireVel = m_boomBoom.m_shooterTable.getVelocity(realDistance); + // fireAngle = m_boomBoom.m_shooterTable.getHood(realDistance); + // //fire angle unknown so far + // //end of CSV - m_boomBoom.m_fireVel = fireVel; - m_hood.m_fireAngle = fireAngle; - m_turret.m_targetDistance = distance; + // m_boomBoom.m_fireVel = fireVel; + // m_hood.m_fireAngle = fireAngle; + // m_turret.m_targetDistance = distance; - checkFinished(); + // checkFinished(); } public void checkFinished(){