mirror of
https://github.com/Team4388/2022NoWayHome.git
synced 2026-06-09 00:38:05 -06:00
added isAuto back to TT
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user