[bug]现在ESB已经不是按钮了,去掉状态采集;构建repo时没有对站台方向赋值

This commit is contained in:
thesai 2024-08-09 11:38:53 +08:00
parent 3da710891e
commit 85d5781122
2 changed files with 17 additions and 9 deletions

View File

@ -35,10 +35,10 @@ func NewSfpMs(vs *memory.VerifySimulation, mapId int32) ms_api.MsgTask {
if err != nil {
return err
}
buttonStates, err := collectStationButtonStates(vs.World, mapId)
if err != nil {
return err
}
//buttonStates, err := collectStationButtonStates(vs.World, mapId)
//if err != nil {
// return err
//}
psdStates, err := collectPsdStates(vs.World, mapId)
if err != nil {
return err
@ -77,7 +77,7 @@ func NewSfpMs(vs *memory.VerifySimulation, mapId int32) ms_api.MsgTask {
TrainState: trainState,
SwitchState: turnoutStates,
SignalState: signalStates,
ButtonState: buttonStates,
//ButtonState: buttonStates,
PsdState: psdStates,
SectionState: sectionStates,
PlatformState: platformStates,

View File

@ -1318,6 +1318,14 @@ func fillProtoRepository(repo *proto.Repository, storage *data_proto.RtssGraphic
Id: uidsMap.PlatformIds[platformId].Uid,
Code: data.Code,
}
switch data.Type {
case data_proto.Platform_up:
platform.Direction = proto.Platform_Up
case data_proto.Platform_down:
platform.Direction = proto.Platform_Down
case data_proto.Platform_Unknown:
platform.Direction = proto.Platform_Unknown
}
repo.Platforms = append(repo.Platforms, platform)
platform.StationId = uidsMap.StationIds[data.RefStationId].Uid
platform.PhysicalSectionId = uidsMap.PhysicalSectionIds[data.RefSectionId].Uid
@ -1417,7 +1425,7 @@ func fillProtoRepository(repo *proto.Repository, storage *data_proto.RtssGraphic
repo.Spkss = append(repo.Spkss, &proto.Spks{
Id: uidsMap.SpksIds[data.Common.Id].Uid,
Code: data.Code,
PlatformId: uidsMap.StationIds[data.RefStand].Uid,
PlatformId: uidsMap.PlatformIds[data.RefStand].Uid,
})
}
}