[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 { if err != nil {
return err return err
} }
buttonStates, err := collectStationButtonStates(vs.World, mapId) //buttonStates, err := collectStationButtonStates(vs.World, mapId)
if err != nil { //if err != nil {
return err // return err
} //}
psdStates, err := collectPsdStates(vs.World, mapId) psdStates, err := collectPsdStates(vs.World, mapId)
if err != nil { if err != nil {
return err return err
@ -74,10 +74,10 @@ func NewSfpMs(vs *memory.VerifySimulation, mapId int32) ms_api.MsgTask {
ststes := &state_proto.PushedDevicesStatus{ ststes := &state_proto.PushedDevicesStatus{
All: true, All: true,
AllStatus: &state_proto.AllDevicesStatus{ AllStatus: &state_proto.AllDevicesStatus{
TrainState: trainState, TrainState: trainState,
SwitchState: turnoutStates, SwitchState: turnoutStates,
SignalState: signalStates, SignalState: signalStates,
ButtonState: buttonStates, //ButtonState: buttonStates,
PsdState: psdStates, PsdState: psdStates,
SectionState: sectionStates, SectionState: sectionStates,
PlatformState: platformStates, PlatformState: platformStates,

View File

@ -1318,6 +1318,14 @@ func fillProtoRepository(repo *proto.Repository, storage *data_proto.RtssGraphic
Id: uidsMap.PlatformIds[platformId].Uid, Id: uidsMap.PlatformIds[platformId].Uid,
Code: data.Code, 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) repo.Platforms = append(repo.Platforms, platform)
platform.StationId = uidsMap.StationIds[data.RefStationId].Uid platform.StationId = uidsMap.StationIds[data.RefStationId].Uid
platform.PhysicalSectionId = uidsMap.PhysicalSectionIds[data.RefSectionId].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{ repo.Spkss = append(repo.Spkss, &proto.Spks{
Id: uidsMap.SpksIds[data.Common.Id].Uid, Id: uidsMap.SpksIds[data.Common.Id].Uid,
Code: data.Code, Code: data.Code,
PlatformId: uidsMap.StationIds[data.RefStand].Uid, PlatformId: uidsMap.PlatformIds[data.RefStand].Uid,
}) })
} }
} }