仿真构建增加转辙机
This commit is contained in:
parent
deda54551d
commit
5b10c74bea
@ -320,12 +320,20 @@ func fillProtoRepository(repo *proto.Repository, storage *graphicData.RtssGraphi
|
||||
break
|
||||
}
|
||||
}
|
||||
var switchMachineType proto.Turnout_SwitchMachineType
|
||||
switch data.SwitchMachineType {
|
||||
case graphicData.Turnout_ZDJ9_Single:
|
||||
switchMachineType = proto.Turnout_ZDJ9_Single
|
||||
case graphicData.Turnout_ZDJ9_Double:
|
||||
switchMachineType = proto.Turnout_ZDJ9_Double
|
||||
}
|
||||
turnout := &proto.Turnout{
|
||||
Id: data.Common.Id,
|
||||
Km: km,
|
||||
ADevicePort: convertDevicePort(data.PaRef),
|
||||
BDevicePort: convertDevicePort(data.PbRef),
|
||||
CDevicePort: convertDevicePort(data.PcRef),
|
||||
Id: data.Common.Id,
|
||||
Km: km,
|
||||
ADevicePort: convertDevicePort(data.PaRef),
|
||||
BDevicePort: convertDevicePort(data.PbRef),
|
||||
CDevicePort: convertDevicePort(data.PcRef),
|
||||
SwitchMachineType: switchMachineType,
|
||||
}
|
||||
repo.Turnouts = append(repo.Turnouts, converTurnoutUid(turnout, uidsMap))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user