diff --git a/examples/sPSN_PongTester/sPSN_PongTester.ino b/examples/sPSN_PongTester/sPSN_PongTester.ino index dd9166a8ad59347bedf01b93de7bcd70a1501042..c991eecb479214aba1853df276560481ecda007b 100644 --- a/examples/sPSN_PongTester/sPSN_PongTester.ino +++ b/examples/sPSN_PongTester/sPSN_PongTester.ino @@ -36,11 +36,11 @@ SoftwareSerial sSerial(10, 11); //Erzeuge Client-Instanz DidacticPSNetClient psnClient; -bool recievedPings[MAX_NR_CLIENTS+1] = {false}; +bool recievedPings[MAX_NR_CLIENTS+1] = {false}; //+1 ermöglicht Start bei Client0 oder Client1 bool newPing = false; void newData(char* topic, char* payload) { - if (!strcmp(payload, "Ping") && (atoi(topic) <= MAX_NR_CLIENTS)) { //Empfangene Nachricht == Ping + if (!strcmp(payload, "Ping") && (atoi(topic) < MAX_NR_CLIENTS+1)) { //Empfangene Nachricht == Ping recievedPings[atoi(topic)] = true; newPing = true; psnClient.publish(topic, "Pong");