【增加默认的车头方向处理】

This commit is contained in:
weizhihong 2023-08-28 14:25:00 +08:00
parent 767132b168
commit 88ee3e38db

View File

@ -166,6 +166,8 @@ func convert(info *dynamics.TrainInfo, sta *state.TrainState, simulation *memory
} else if sta.VobcState.DirectionBackward { } else if sta.VobcState.DirectionBackward {
sta.HeadDirection = !info.Up sta.HeadDirection = !info.Up
} }
} else {
sta.HeadDirection = runDirection
} }
// 赋值动力学信息 // 赋值动力学信息
sta.DynamicState.Heartbeat = int32(info.LifeSignal) sta.DynamicState.Heartbeat = int32(info.LifeSignal)