修改机器人驾驶的判定条件

This commit is contained in:
joylink_zhangsai 2023-05-04 11:01:07 +08:00
parent f51abb1865
commit aa5cc0b333

View File

@ -155,11 +155,11 @@ public class SimulationRobotService {
private void robotDriverLogicLoop(Simulation simulation) {
List<SimulationMember> drivers = simulation.querySimulationMembersOfRole(SimulationMember.Type.DRIVER);
for (SimulationMember driver : drivers) {
if (!driver.isRobot())
continue;
// if (!driver.isRobot())
// continue;
SimulationDataRepository repository = simulation.getRepository();
VirtualRealityTrain train = (VirtualRealityTrain) driver.getDevice();
if (!repository.isVrTrainOnline(train.getGroupNumber())) { //如果列车不在线
if (train.isTakeOver() || !repository.isVrTrainOnline(train.getGroupNumber())) { //如果列车被接管或不在线
continue;
}
//准备发车