added isAuto back to TT

This commit is contained in:
aarav18
2022-03-22 22:10:46 -06:00
parent 3c8d581685
commit 16a908ed03
3 changed files with 37 additions and 14 deletions
@@ -194,18 +194,18 @@ public class TrackTarget extends CommandBase {
// Returns true when the command should end.
@Override
public boolean isFinished() {
//// if (this.isAuto) {
//// if (targetLocked& !timerStarted) {
//// timerStarted = true;
//// startTime = System.currentTimeMillis();
//// }
//// return (targetLocked && timerStarted && ((System.currentTimeMillis() - startTime) > timeTolerance));
//// } else {
//// return false;
//// }
// // return isExecuted && Math.abs(output) < .1;
//// }
if (this.isAuto) {
if (targetLocked& !timerStarted) {
timerStarted = true;
startTime = System.currentTimeMillis();
}
return (targetLocked && timerStarted && ((System.currentTimeMillis() - startTime) > timeTolerance));
} else {
return false;
}
// return isExecuted && Math.abs(output) < .1;
// }
return false;
// return false;
}
}