diff --git a/PlaneGcsSdk_Shared/Communication/UdpServerConnection_NET.cs b/PlaneGcsSdk_Shared/Communication/UdpServerConnection_NET.cs index b142799..f0158f7 100644 --- a/PlaneGcsSdk_Shared/Communication/UdpServerConnection_NET.cs +++ b/PlaneGcsSdk_Shared/Communication/UdpServerConnection_NET.cs @@ -9,6 +9,7 @@ namespace Plane.Communication internal class UdpServerConnection : UdpConnectionBase { private IPEndPoint _remoteEP; + private IPEndPoint _boardaddEP; private Func> _sendFunc; @@ -17,6 +18,7 @@ namespace Plane.Communication /// public UdpServerConnection(IPEndPoint remoteEP, Func> sendFunc) { + _boardaddEP = new IPEndPoint(IPAddress.Parse("192.168.62.255"), remoteEP.Port); _remoteEP = remoteEP; _sendFunc = sendFunc; } @@ -37,6 +39,13 @@ namespace Plane.Communication try { await _sendFunc(datagram, bytes, _remoteEP).ConfigureAwait(false); + /* + //如果是广播包,用于广播消息,比如RTK等 + if (false) + await _sendFunc(datagram, bytes, _boardaddEP).ConfigureAwait(false); + else + await _sendFunc(datagram, bytes, _remoteEP).ConfigureAwait(false); + */ } catch (Exception ex) {