【道岔、区段绑定公里标判断】

This commit is contained in:
weizhihong 2023-12-05 16:31:18 +08:00
parent cec59a573e
commit 4861c8c248
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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 {