diff --git a/ts/simulation/wayside/memory/train_tcc_graphic.go b/ts/simulation/wayside/memory/train_tcc_graphic.go index b4b6056..d4630c3 100644 --- a/ts/simulation/wayside/memory/train_tcc_graphic.go +++ b/ts/simulation/wayside/memory/train_tcc_graphic.go @@ -52,7 +52,7 @@ func findTrainTccGraphicDataHandler(tccG *data_proto.TccGraphicStorage, id uint3 } // 初始化列车控制数据 -func initTrainTcc(vs *VerifySimulation, runDir bool) *state_proto.TrainControlState { +func initTrainTcc(vs *VerifySimulation) *state_proto.TrainControlState { var tccGI *data_proto.TccGraphicStorage for _, id := range vs.MapIds { if QueryGiType(id) == data_proto.PictureType_TrainControlCab { @@ -82,7 +82,7 @@ func initTrainTcc(vs *VerifySimulation, runDir bool) *state_proto.TrainControlSt } ds = append(ds, &state_proto.TrainControlState_DriverKeySwitch{Id: b.Common.Id, Val: val}) } else if b.GetType() == data_proto.TccKey_frontAndRearDirectionalControl { - tcc.DirKey = &state_proto.TrainControlState_DirectionKeySwitch{Id: b.Common.Id, Val: uint32(message.IsTrue(runDir))} + tcc.DirKey = &state_proto.TrainControlState_DirectionKeySwitch{Id: b.Common.Id, Val: uint32(message.IsTrue(true))} } } tcc.DriverKey = ds diff --git a/ts/simulation/wayside/memory/wayside_memory_train.go b/ts/simulation/wayside/memory/wayside_memory_train.go index 4ed43e9..26cdb36 100644 --- a/ts/simulation/wayside/memory/wayside_memory_train.go +++ b/ts/simulation/wayside/memory/wayside_memory_train.go @@ -100,7 +100,7 @@ func AddTrainStateNew(vs *VerifySimulation, status *state_proto.TrainState, conf } status.VobcState = &state_proto.TrainVobcState{Tc1Active: true, TrainLoad: int64(tl), BrakingStatus: true, BrakeForce: DEFAULT_BRAKE_FORCE, DirectionForward: true} - status.Tcc = initTrainTcc(vs, status.RunDirection) + status.Tcc = initTrainTcc(vs) slog.Debug("列车初始化", "trainIndex", trainIndex, "linkId", linkId, "loffset", loffset) linkIdInt, _ := strconv.Atoi(linkId)