解决代码冲突

This commit is contained in:
joylink_zhangsai 2024-01-10 14:17:15 +08:00
parent 41839e2210
commit d4f8d3416f

View File

@ -94,7 +94,7 @@ func BalisePositionModify(simulation *VerifySimulation, req *dto.BaliseMoveReqDt
}
component.KmType.Set(entry, km)
offset := number.Abs(km.Value - akm.Value)
component.LinkPositionType.Set(entry, &component_proto.LinkPosition{
component.LinkPositionType.Set(entry, &component_data.LinkPosition{
LinkId: link.Id(),
Offset: offset,
})
@ -110,7 +110,7 @@ func BalisePositionReset(simulation *VerifySimulation, req *dto.BaliseReqDto) er
}
entry, _ := entity.GetEntityByUid(simulation.World, uid)
component.KmType.Set(entry, transponder.Km())
component.LinkPositionType.SetValue(entry, component_proto.LinkPosition{
component.LinkPositionType.SetValue(entry, component_data.LinkPosition{
LinkId: transponder.LinkPosition().Link().Id(),
Offset: transponder.LinkPosition().Offset(),
})
@ -124,10 +124,7 @@ func BaliseTelegramModify(simulation *VerifySimulation, req *dto.BaliseModifyTel
if !ok {
return sys_error.New(fmt.Sprintf("没有[mapId:%d id:%d]的应答器", req.MapId, req.BaliseId))
}
component.LinkPositionType.SetValue(te, component_data.LinkPosition{
LinkId: req.LinkId,
Offset: req.Offset,
})
component.BaliseStateType.SetValue(entry, component.BaliseState{ValidTelegram: req.Telegram})
return nil
}