diff --git a/src/didacticNet.cpp b/src/didacticNet.cpp index 1596147e02361336adcdb927e9bd048d1bf8b8a8..fb92ef0bbff0c7dd8ad53a1674c3c6c1296bd2c7 100644 --- a/src/didacticNet.cpp +++ b/src/didacticNet.cpp @@ -299,7 +299,8 @@ bool DidacticPSNetClient::handleData(){ payloadLength = extractData(topicLength+3, MAX_LEN_PAYLOAD, _bufferPayload, MSG_DELIMITER); if( currentTopicNr >= 0){ savePayload( _bufferPayload, currentTopicNr); - callback(_topic[currentTopicNr], topicLength, _payload[currentTopicNr], payloadLength); + //callback(_topic[currentTopicNr], topicLength, _payload[currentTopicNr], payloadLength); + callback(_bufferTopic, topicLength, _bufferPayload, payloadLength); } } return true; diff --git a/src/didacticNet.h b/src/didacticNet.h index 6da192282afb0d053a9f5372a80793af8c0729e0..41aac4c9419efd6e05adb4e4020877690ff3e36c 100644 --- a/src/didacticNet.h +++ b/src/didacticNet.h @@ -18,10 +18,10 @@ //@ publish → on publish check topic, then send topic-update //? subscribe → subscribe starts update, topic filter @client //# update → update to specific topic Broker to client -#define MSG_PUBLISH '@' -#define MSG_SUBSCRIBE '?' -#define MSG_UPDATE '#' -#define MSG_TOPIC_MULTI '*' +#define MSG_PUBLISH '@' +#define MSG_SUBSCRIBE '?' +#define MSG_UPDATE '#' +#define MSG_TOPIC_MULTI '*' //<@topic|payload> #define LEN_OVERHEAD 4 @@ -34,7 +34,7 @@ #define INTERVAL_CLIENT 500L #define INTERVAL_BROKER 0L -#define MAX_NR_TOPICS_CLIENT 20 +#define MAX_NR_TOPICS_CLIENT 10 #define MAX_NR_TOPICS_BROKER 20 #define MAX_LEN_TOPICS 10 #define MAX_LEN_PAYLOAD 20