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