From 4201b1165d4029dee376b1f6b38f56370370797f Mon Sep 17 00:00:00 2001 From: tiger_zhou <123456> Date: Wed, 19 Oct 2022 15:53:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BA=94=E6=80=A5=E7=B3=BB=E7=BB=9F=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E9=80=9F=E5=BA=A6=E5=8F=8A=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../rtss/simulation/cbtc/data/status/YJDDZHTrainStatus.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/YJDDZHTrainStatus.java b/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/YJDDZHTrainStatus.java index 99764ed89..cdf92832e 100644 --- a/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/YJDDZHTrainStatus.java +++ b/src/main/java/club/joylink/rtss/simulation/cbtc/data/status/YJDDZHTrainStatus.java @@ -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; } }