【半实物log信息】
This commit is contained in:
parent
7cdc1cebcc
commit
9f7b8c0d5a
|
@ -2,6 +2,7 @@ package simulation
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/binary"
|
"encoding/binary"
|
||||||
|
"encoding/hex"
|
||||||
"math"
|
"math"
|
||||||
|
|
||||||
"fmt"
|
"fmt"
|
||||||
|
@ -35,9 +36,11 @@ func init() {
|
||||||
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
panic(dto.ErrorDto{Code: dto.ArgumentParseError, Message: err.Error()})
|
||||||
}
|
}
|
||||||
trainInfo := decoderVobcTrainState(info)
|
trainInfo := decoderVobcTrainState(info)
|
||||||
zap.S().Info("接收到vobc发送的列车消息", trainInfo)
|
zap.S().Info("接收到vobc发送的列车消息", trainInfo, hex.EncodeToString(info))
|
||||||
|
d := append(info, uint8(trainId))
|
||||||
// 发送给动力学
|
// 发送给动力学
|
||||||
dynamics.SendDynamicsTrainMsg(append(info, uint8(trainId)))
|
dynamics.SendDynamicsTrainMsg(d)
|
||||||
|
zap.S().Info("发送后:", hex.EncodeToString(d))
|
||||||
// 存放至列车中
|
// 存放至列车中
|
||||||
train.VobcState = trainInfo
|
train.VobcState = trainInfo
|
||||||
return true
|
return true
|
||||||
|
|
Loading…
Reference in New Issue