【道岔、区段绑定公里标判断】
This commit is contained in:
parent
cec59a573e
commit
4861c8c248
@ -121,7 +121,7 @@ func (s *PhysicalSection) bindDevicePort(port proto.Port, devicePort DevicePort)
|
||||
|
||||
// 绑定区段边界公里标。(仅限非道岔物理区段调用)
|
||||
func (s *PhysicalSection) bindBoundaryKm(km *proto.Kilometer, port proto.Port) error {
|
||||
if km == nil {
|
||||
if km == nil || (km.CoordinateSystem == "" && km.Value == 0) {
|
||||
return nil
|
||||
}
|
||||
switch port {
|
||||
|
@ -136,7 +136,7 @@ func (t *Turnout) bindLinkPort(port proto.Port, linkPort *LinkPort) {
|
||||
}
|
||||
|
||||
func (t *Turnout) bindBoundaryKm(km *proto.Kilometer, port proto.Port) error {
|
||||
if km == nil {
|
||||
if km == nil || (km.CoordinateSystem == "" && km.Value == 0) {
|
||||
return nil
|
||||
}
|
||||
switch port {
|
||||
|
Loading…
Reference in New Issue
Block a user