8000 Merge pull request #695 from toxuin/pubsub-args · exocode/esp32-snippets@def0952 · GitHub
[go: up one dir, main page]

Skip to content

Commit def0952

Browse files
authored
Merge pull request nkolban#695 from toxuin/pubsub-args
PubSub: pass pdTRUE instead of true
2 parents 6836550 + e048557 commit def0952

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

cpp_utils/PubSubClient.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@ void PubSubClient::setup(void) {
190190

191191

192192
keepAliveTimer = new FreeRTOSTimer((char*) "keepAliveTimer",
193-
(MQTT_KEEPALIVE * 1000) / portTICK_PERIOD_MS, true, this,
193+
(MQTT_KEEPALIVE * 1000) / portTICK_PERIOD_MS, pdTRUE, this,
194194
keepAliveTimerMapper);
195195
timeoutTimer = new FreeRTOSTimer((char*) "timeoutTimer",
196-
(MQTT_KEEPALIVE * 1000) / portTICK_PERIOD_MS, true, this,
196+
(MQTT_KEEPALIVE * 1000) / portTICK_PERIOD_MS, pdTRUE, this,
197197
timeoutTimerMapper);
198198
m_task = new PubSubClientTask("PubSubClientTask");
199199
} // setup
@@ -404,8 +404,7 @@ bool PubSubClient::connect(){
404404
* @param N/A.
405405
* @return Number of received bytes.
406406
*/
407-
uint16_t PubSubClient::readPacket() {
408-
407+
size_t PubSubClient::readPacket() {
409408
size_t res = _client->receive(buffer, MQTT_MAX_PACKET_SIZE);
410409

411410
if (res > MQTT_MAX_PACKET_SIZE) {

cpp_utils/PubSubClient.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ class PubSubClient {
160160

161161
MQTT_CALLBACK_SIGNATURE;
162162
void setup (void);
163-
uint16_t readPacket();
163+
size_t readPacket();
164164
bool write (uint8_t header, uint8_t* buf, uint16_t length);
165165
uint16_t writeString(const char* string, uint8_t* buf, uint16_t pos);
166166
void parseData (mqtt_message* msg, uint16_t len);

0 commit comments

Comments
 (0)
0