signal
This commit is contained in:
parent
476bd9f9d3
commit
8f754984b6
@ -12,6 +12,7 @@ import (
|
||||
"joylink.club/rtsssimulation/fi"
|
||||
"joylink.club/rtsssimulation/repository"
|
||||
"joylink.club/rtsssimulation/repository/model/proto"
|
||||
"log/slog"
|
||||
)
|
||||
|
||||
func ChangeSignalState(simulation *VerifySimulation, mapId int32, signalDeviceId string, toAspect state.Signal_Aspect) {
|
||||
@ -21,6 +22,7 @@ func ChangeSignalState(simulation *VerifySimulation, mapId int32, signalDeviceId
|
||||
panic(fmt.Sprintf("信号机[%s]模型不存在", signalUid))
|
||||
}
|
||||
signalGroupCode := signalModel.(*repository.Signal).Code()
|
||||
slog.Info("信号机操作", "uid", signalUid, "组合类型码", signalGroupCode)
|
||||
switch signalGroupCode {
|
||||
case consts.SIGNAL_2XH1:
|
||||
changeSignal2XH1State(simulation.World, signalUid, toAspect)
|
||||
|
@ -393,7 +393,6 @@ func fillProtoRepository(repo *proto.Repository, storage *graphicData.RtssGraphi
|
||||
Km: convertKm(data.KilometerSystem),
|
||||
SectionId: sectionId,
|
||||
TurnoutPort: turnoutPort,
|
||||
//Code: data.,
|
||||
}
|
||||
repo.Signals = append(repo.Signals, converSignalUid(signal, uidsMap))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user