应急系统添加速度及调整

This commit is contained in:
tiger_zhou 2022-10-19 15:53:41 +08:00
parent c2dbbbb715
commit 4201b1165d

View File

@ -43,7 +43,11 @@ public class YJDDZHTrainStatus extends TrainStatus {
status.setLocationKM(this.locationKM);
change = true;
}
status.setSpeed(train.getSpeed());
if (!Objects.equals(this.getSpeed(), train.getSpeed())) {
this.setSpeed(train.getSpeed());
status.setSpeed(this.getSpeed());
change = true;
}
return change;
}
}