【增加日志打印】
This commit is contained in:
parent
c3d48fc03c
commit
945ae4a43b
|
@ -50,10 +50,12 @@ func init() {
|
|||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
trainInfo := decoderVobcTrainState(info)
|
||||
zap.S().Info("接收到vobc发送的列车消息", trainInfo)
|
||||
// 发送给动力学
|
||||
dynamics.SendDynamicsTrainMsg(append(info, uint8(trainId)))
|
||||
// 存放至仿真中
|
||||
simulation.Memory.Status.VobcTrainStateMap.Store(train.Id, decoderVobcTrainState(info))
|
||||
simulation.Memory.Status.VobcTrainStateMap.Store(train.Id, trainInfo)
|
||||
}
|
||||
return false
|
||||
})
|
||||
|
@ -66,6 +68,7 @@ func init() {
|
|||
if ok {
|
||||
trainState := sta.(*state.TrainState)
|
||||
// 给半实物仿真发送速度
|
||||
zap.S().Info("发送到vobc发送的速度", info.Speed*36)
|
||||
vobc.SendTrainSpeedTask(info.Speed * 36)
|
||||
// 处理列车车头方向
|
||||
handlerTrainHeadDirection(simulation, info, trainState)
|
||||
|
|
Loading…
Reference in New Issue