From 67970551f5ad8052d5ca2efa2238347659e467bb Mon Sep 17 00:00:00 2001 From: weizhihong Date: Tue, 5 Sep 2023 17:11:48 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=8D=8A=E5=AE=9E=E7=89=A9=E5=88=B6?= =?UTF-8?q?=E5=8A=A8=E5=8A=9B=E7=81=AF=E4=B8=8D=E5=81=9A=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ats/verify/simulation/simulation_manage.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ats/verify/simulation/simulation_manage.go b/ats/verify/simulation/simulation_manage.go index 184d778..81fa645 100644 --- a/ats/verify/simulation/simulation_manage.go +++ b/ats/verify/simulation/simulation_manage.go @@ -264,9 +264,9 @@ func decoderVobcTrainState(buf []byte) *state.TrainVobcState { trainVobcInfo.TractionSafetyCircuit = (b3 & (1 << 4)) != 0 trainVobcInfo.ParkingBrakeStatus = (b3 & (1 << 5)) != 0 trainVobcInfo.MaintainBrakeStatus = (b3 & (1 << 6)) != 0 - trainVobcInfo.TractionForce = int64(binary.BigEndian.Uint16(buf[4:6]) / 100) - trainVobcInfo.BrakeForce = int64(binary.BigEndian.Uint16(buf[6:8]) / 100) - trainVobcInfo.TrainLoad = int64(binary.BigEndian.Uint16(buf[8:10]) / 100) + trainVobcInfo.TractionForce = int64(binary.BigEndian.Uint16(buf[4:6])) + trainVobcInfo.BrakeForce = int64(binary.BigEndian.Uint16(buf[6:8])) + trainVobcInfo.TrainLoad = int64(binary.BigEndian.Uint16(buf[8:10])) b4 := buf[15] trainVobcInfo.LeftDoorOpenCommand = (b4 & 1) != 0 trainVobcInfo.RightDoorOpenCommand = (b4 & (1 << 1)) != 0