link中增加与link上设备的关联(以此修复了应答器移位可以越过相邻应答器的问题)

This commit is contained in:
joylink_zhangsai 2024-01-11 10:59:02 +08:00
parent 0316b398d5
commit 655a0712af

View File

@ -681,6 +681,7 @@ func findEndTurnoutPortOrEndKm(repo *Repository, link *Link, startTp *TurnoutPor
break break
} }
} }
link.bindDevices(devices...)
return endTp, endKm, err return endTp, endKm, err
} }
@ -751,6 +752,7 @@ func relateDevicesAndLink(repo *Repository, link *Link, startKm *proto.Kilometer
case proto.DeviceType_DeviceType_Transponder: case proto.DeviceType_DeviceType_Transponder:
device.(*Transponder).bindLinkPosition(linkPosition) device.(*Transponder).bindLinkPosition(linkPosition)
} }
link.bindDevices(device)
} }
return nil return nil
} }