re-implemented basic autopilot
This commit is contained in:
@@ -28,6 +28,9 @@ public class BrakeProcessor extends BaseClass implements Runnable {
|
||||
|
||||
public BrakeProcessor(Train train) {
|
||||
this.train = train;
|
||||
Thread thread = new Thread(this);
|
||||
thread.setName(getClass().getSimpleName());
|
||||
thread.start();
|
||||
}
|
||||
|
||||
public void end() {
|
||||
@@ -88,12 +91,4 @@ public class BrakeProcessor extends BaseClass implements Runnable {
|
||||
}
|
||||
LOG.debug("{} reached final speed.", train);
|
||||
}
|
||||
|
||||
public BrakeProcessor start() {
|
||||
Thread thread = new Thread(this);
|
||||
thread.setName(getClass().getSimpleName());
|
||||
thread.start();
|
||||
return this;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -30,6 +30,10 @@ public abstract class PathFinder extends BaseClass implements Runnable{
|
||||
this.train = train;
|
||||
this.startBlock = start;
|
||||
this.direction = direction;
|
||||
|
||||
Thread thread = new Thread(this);
|
||||
thread.setName("Pathfinder("+train+")");
|
||||
thread.start();
|
||||
}
|
||||
|
||||
public void abort() {
|
||||
@@ -178,11 +182,4 @@ public abstract class PathFinder extends BaseClass implements Runnable{
|
||||
public abstract void locked(Route r);
|
||||
public abstract void found(Route r);
|
||||
public abstract void prepared(Route r);
|
||||
|
||||
public PathFinder start() {
|
||||
Thread thread = new Thread(this);
|
||||
thread.setName("Pathfinder("+train+")");
|
||||
thread.start();
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user