Skip to content

Commit

Permalink
Replace type byte by uint8_t(related to #89)
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Lapointe committed Sep 19, 2021
1 parent 78e2f37 commit 4fb4a37
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/EspMQTTClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ EspMQTTClient::EspMQTTClient(
_mqttLastWillMessage = 0;
_mqttLastWillRetain = false;
_mqttCleanSession = true;
_mqttClient.setCallback([this](char* topic, byte* payload, unsigned int length) {this->mqttMessageReceivedCallback(topic, payload, length);});
_mqttClient.setCallback([this](char* topic, uint8_t* payload, unsigned int length) {this->mqttMessageReceivedCallback(topic, payload, length);});
_failedMQTTConnectionAttemptCount = 0;

// Web updater
Expand Down Expand Up @@ -667,7 +667,7 @@ bool EspMQTTClient::mqttTopicMatch(const String &topic1, const String &topic2)
return false;
}

void EspMQTTClient::mqttMessageReceivedCallback(char* topic, byte* payload, unsigned int length)
void EspMQTTClient::mqttMessageReceivedCallback(char* topic, uint8_t* payload, unsigned int length)
{
// Convert the payload into a String
// First, We ensure that we dont bypass the maximum size of the PubSubClient library buffer that originated the payload
Expand Down
2 changes: 1 addition & 1 deletion src/EspMQTTClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class EspMQTTClient
bool connectToMqttBroker();
void processDelayedExecutionRequests();
bool mqttTopicMatch(const String &topic1, const String &topic2);
void mqttMessageReceivedCallback(char* topic, byte* payload, unsigned int length);
void mqttMessageReceivedCallback(char* topic, uint8_t* payload, unsigned int length);
};

#endif

0 comments on commit 4fb4a37

Please sign in to comment.