处理应答器报文数据类型问题

This commit is contained in:
joylink_zhangsai 2024-01-17 17:15:35 +08:00
parent ec691ab12c
commit 9595fe9f6f
2 changed files with 7 additions and 2 deletions

@ -1 +1 @@
Subproject commit 79484bea97a47b76e8f0f0deb42d64286ddf0af7
Subproject commit 0203bbcefa0797f2efae50bbaa5e9c6d0f30a84e

View File

@ -1,6 +1,7 @@
package memory
import (
"encoding/hex"
"encoding/json"
"fmt"
"log/slog"
@ -1031,10 +1032,14 @@ func fillProtoRepository(repo *proto.Repository, storage *data_proto.RtssGraphic
}
stm := make(map[string][]string)
for _, data := range storage.Transponders {
fixedTelegram, err := hex.DecodeString(data.FixedTelegram)
if err != nil {
slog.Error(fmt.Sprintf("解析应答器[%s]的报文出错:", err.Error()))
}
responder := &proto.Transponder{
Id: uidsMap.TransponderIds[GetMapElementId(data.Common)].Uid,
Km: convertKm(data.KilometerSystem),
FixedTelegram: data.FixedTelegram,
FixedTelegram: fixedTelegram,
Type: convertToProtoBaliseType(data.Type),
}
switch data.TransponderRef.DeviceType {