From 265016844b73867954f287934597d1eea6d85ec7 Mon Sep 17 00:00:00 2001 From: Nicholas O'Leary Date: Fri, 24 Jul 2009 15:44:30 +0100 Subject: [PATCH] Fixed compile error when used with arduino-0016 or later --- CHANGES.txt | 4 ++++ PubSubClient.cpp | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index b8a07aa..63502b5 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,7 @@ +1.2 + * Fixed compile error when used with arduino-0016 or later + + 1.1 * Reduced size of library * Added support for Will messages diff --git a/PubSubClient.cpp b/PubSubClient.cpp index 8ffc2a5..528fd04 100644 --- a/PubSubClient.cpp +++ b/PubSubClient.cpp @@ -88,7 +88,7 @@ int PubSubClient::loop() { long t = millis(); if (t - lastActivity > KEEPALIVE) { _client.write(192); - _client.write(0); + _client.write((uint8_t)0); lastActivity = t; } if (_client.available()) { @@ -109,7 +109,7 @@ int PubSubClient::loop() { } } else if (type == 12) { // PINGREG _client.write(208); - _client.write(0); + _client.write((uint8_t)0); lastActivity = t; } } @@ -163,7 +163,7 @@ void PubSubClient::subscribe(char* topic) { void PubSubClient::disconnect() { _client.write(224); - _client.write(0); + _client.write((uint8_t)0); _client.stop(); lastActivity = millis(); }