src/main/java/frc/robot/commands/LauncherCommands/LauncherLimelightLaunch.java
@Override
    public void execute() {
        y =limelight.getState().yOffset;
        //close range
        if(y>thresholdForHood){
            launcher.retractPiston();
            valueLead = y*690+3040;
            valueFollow = y*-863+16150;
        }
        //long range
        else if(y<(thresholdForHood)){
            launcher.extendPiston();
            valueLead = y*-96+15868;// y = slope*distance+ baseline//18331
            valueFollow = y*-193.9-562;
        }
        

        launcher.launcherVelocitySet(valueLead);
        launcher.launcherFollowVelocitySet(-valueFollow);
    }
// Called every time the scheduler runs while the command is scheduled.
Called every time the scheduler runs while the command is scheduled.
Called every time the scheduler runs while the command is scheduled .
@Override
    public void execute() {
        y =limelight.getState().yOffset;
        if(y>thresholdForHood){
            launcher.retractPiston();
            valueLead = y*690+3040;
            valueFollow = y*-863+16150;
        }
        else if(y<(thresholdForHood)){
            launcher.extendPiston();
            valueLead = y*-96+15868;
            valueFollow = y*-193.9-562;
        }
        launcher.launcherVelocitySet(valueLead);
        launcher.launcherFollowVelocitySet(-valueFollow);
    }
@ Override public void execute ( ) { y = limelight . getState ( ) . yOffset ; if ( y > thresholdForHood ) { launcher . retractPiston ( ) ; valueLead = y * 690 + 3040 ; valueFollow = y * - 863 + 16150 ; } else if ( y < ( thresholdForHood ) ) { launcher . extendPiston ( ) ; valueLead = y * - 96 + 15868 ; valueFollow = y * - 193.9 - 562 ; } launcher . launcherVelocitySet ( valueLead ) ; launcher . launcherFollowVelocitySet ( - valueFollow ) ; }
Called every time the scheduler runs while the command is scheduled.
Called every time the scheduler runs while the command is scheduled .
//close range //long range // y = slope*distance+ baseline//18331