列车控制调整

This commit is contained in:
tiger_zhou 2024-05-10 08:23:50 +08:00
parent 6fa4c6e6a9
commit a6119b890f
2 changed files with 4 additions and 1 deletions

@ -1 +1 @@
Subproject commit 121134778a38df672562fd8d1acb1482a327702f Subproject commit e4c55ea4b6f9f5f875d59fc5bba51fc21bc8ef97

View File

@ -59,6 +59,9 @@ func ControlTrainUpdate(s *VerifySimulation, ct *request_proto.TrainControl) {
vobc.TractionStatus = false vobc.TractionStatus = false
vobc.TractionForce = 0 vobc.TractionForce = 0
} }
if vobc.EmergencyBrakingStatus {
vobc.TractionForce = 0
}
if sta.ConnState.Conn && sta.ConnState.ConnType == state_proto.TrainConnState_PC_SIM && tce != nil { if sta.ConnState.Conn && sta.ConnState.ConnType == state_proto.TrainConnState_PC_SIM && tce != nil {
train_pc_sim.Default().PublishTrainControlEvent(tce) train_pc_sim.Default().PublishTrainControlEvent(tce)
} }