Skip to content
Snippets Groups Projects
Verified Commit 04935321 authored by Anian Bühler's avatar Anian Bühler
Browse files

minor changes

parent f13d0a3e
Branches dev_preferences
No related tags found
1 merge request!9update master from dev2
......@@ -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");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment