From 04935321a729f383f52bc5549b779b04a426003e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anian=20B=C3=BChler?= <anian.buehler@reutlingen-university.de> Date: Mon, 4 Jul 2022 13:43:57 +0200 Subject: [PATCH] minor changes --- examples/sPSN_PongTester/sPSN_PongTester.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/sPSN_PongTester/sPSN_PongTester.ino b/examples/sPSN_PongTester/sPSN_PongTester.ino index dd9166a..c991eec 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"); -- GitLab