diff --git a/Participant.cpp b/Participant.cpp index 3699e9f..1beed96 100644 --- a/Participant.cpp +++ b/Participant.cpp @@ -30,8 +30,8 @@ Participant::Participant(int port) { this->participants.push_back(this); - int randomPort = (rand() % (65535 - 49152 + 1)) + 49152; - this->localPort = randomPort; + // int randomPort = (rand() % (65535 - 49152 + 1)) + 49152; + this->localPort = port; // SetupUDP(randomPort, ipAddress, port); } @@ -41,8 +41,8 @@ Participant::Participant(const char *ipAddress, int port) { this->participants.push_back(this); - int randomPort = (rand() % (65535 - 49152 + 1)) + 49152; - this->localPort = randomPort; + // int randomPort = (rand() % (65535 - 49152 + 1)) + 49152; + this->localPort = port; // randomPort; // SetupUDP(randomPort, ipAddress, port); } diff --git a/UdpArduino.cpp b/UdpArduino.cpp index 40184af..31d81ff 100644 --- a/UdpArduino.cpp +++ b/UdpArduino.cpp @@ -17,7 +17,7 @@ void UdpArduino::Setup(int localPort, const char *remoteIpAddress, std::cout << "No network available!\n"; return; } - udp.begin(this->remotePort); + udp.begin(this->localPort); std::cout << "Wifi sync started to port " << this->remotePort << "\n"; #endif