8000 PubSub: pass pdTRUE instead of true by toxuin · Pull Request #695 · nkolban/esp32-snippets · GitHub
[go: up one dir, main page]

Skip to content

PubSub: pass pdTRUE instead of true #695

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions cpp_utils/PubSubClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,10 +190,10 @@ void PubSubClient::setup(void) {


keepAliveTimer = new FreeRTOSTimer((char*) "keepAliveTimer",
(MQTT_KEEPALIVE * 1000) / portTICK_PERIOD_MS, true, this,
(MQTT_KEEPALIVE * 1000) / portTICK_PERIOD_MS, pdTRUE, this,
keepAliveTimerMapper);
timeoutTimer = new FreeRTOSTimer((char*) "timeoutTimer",
(MQTT_KEEPALIVE * 1000) / portTICK_PERIOD_MS, true, this,
(MQTT_KEEPALIVE * 1000) / portTICK_PERIOD_MS, pdTRUE, this,
timeoutTimerMapper);
m_task = new PubSubClientTask("PubSubClientTask");
} // setup
Expand Down Expand Up @@ -404,8 +404,7 @@ bool PubSubClient::connect(){
* @param N/A.
* @return Number of received bytes.
*/
uint16_t PubSubClient::readPacket() {

size_t PubSubClient::readPacket() {
size_t res = _client->receive(buffer, MQTT_MAX_PACKET_SIZE);

if (res > MQTT_MAX_PACKET_SIZE) {
Expand Down
2 changes: 1 addition & 1 deletion cpp_utils/PubSubClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ class PubSubClient {

MQTT_CALLBACK_SIGNATURE;
void setup (void);
uint16_t readPacket();
size_t readPacket();
bool write (uint8_t header, uint8_t* buf, uint16_t length);
uint16_t writeString(const char* string, uint8_t* buf, uint16_t pos);
void parseData (mqtt_message* msg, uint16_t len);
Expand Down
0