【半实物log信息】

This commit is contained in:
weizhihong 2023-09-07 16:04:55 +08:00
parent 7cdc1cebcc
commit 9f7b8c0d5a
1 changed files with 5 additions and 2 deletions

View File

@ -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