From ca2fb95f72dd77d40b7eab1ea8ddf5b7054b51de 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 10:54:30 +0200
Subject: [PATCH] changed clientCallback to newData

---
 examples/sPSN_PingTest/sPSN_PingTest.ino     | 4 ++--
 examples/sPSN_PongTester/sPSN_PongTester.ino | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/examples/sPSN_PingTest/sPSN_PingTest.ino b/examples/sPSN_PingTest/sPSN_PingTest.ino
index 121d475..fb9f90c 100644
--- a/examples/sPSN_PingTest/sPSN_PingTest.ino
+++ b/examples/sPSN_PingTest/sPSN_PingTest.ino
@@ -50,7 +50,7 @@ char payloadSend[] = "Ping";
 
 bool ledState = true;
 
-void myCallback(char* mTopic, int mToLength, char* mData, int mDaLength) {
+void newData(char* mTopic, int mToLength, char* mData, int mDaLength) {
   Serial.println(mData);
   digitalWrite(LED_BUILTIN, HIGH);
 }
@@ -79,7 +79,7 @@ void setup() {
   digitalWrite(LED_PIN, ledState);
   digitalWrite(LED2_PIN, ledState);
 
-  psnClient.begin(sSerial, myCallback);
+  psnClient.begin(sSerial, newData);
 
   psnClient.publish(topicPub, payloadSend);
   while (!psnClient.handleNetwork());
diff --git a/examples/sPSN_PongTester/sPSN_PongTester.ino b/examples/sPSN_PongTester/sPSN_PongTester.ino
index fec1479..2ed1ca1 100644
--- a/examples/sPSN_PongTester/sPSN_PongTester.ino
+++ b/examples/sPSN_PongTester/sPSN_PongTester.ino
@@ -44,7 +44,7 @@ char payloadSend[] = "Pong";
 
 bool ledState = true;
 
-void myCallback(char* mTopic, int mToLength, char* mData, int mDaLength) {
+void newData(char* mTopic, int mToLength, char* mData, int mDaLength) {
   Serial.println(mTopic);
   //reply pong
   strcpy(topicPub, mTopic);
@@ -70,7 +70,7 @@ void setup() {
   pinMode(LED_BUILTIN, OUTPUT);
   digitalWrite(LED_BUILTIN, LOW);
 
-  psnClient.begin(sSerial, myCallback);
+  psnClient.begin(sSerial, newData);
 
   //subscribe auf alle möglichen Topics
   psnClient.subscribe("*");
-- 
GitLab