Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Allowing for larger MQTT messages
  • Loading branch information
Tobias Looker committed Nov 18, 2017
commit fa109473d00a43490d0e6533711cb94e1aca0448
3 changes: 1 addition & 2 deletions Adafruit_MQTT_Client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ uint16_t Adafruit_MQTT_Client::readPacket(uint8_t *buffer, uint16_t maxlen,
bool Adafruit_MQTT_Client::sendPacket(uint8_t *buffer, uint16_t len) {
uint16_t ret = 0;
uint16_t bufferOffset = 0;
//Serial.print("Buffer recieved : "); DebugPrinter::println(len);
//Serial.print("Buffer recieved : ");
while (len > 0) {
if (client->connected()) {
// send 250 bytes at most at a time, can adjust this later based on Client
Expand All @@ -86,7 +86,6 @@ bool Adafruit_MQTT_Client::sendPacket(uint8_t *buffer, uint16_t len) {

ret = client->write(buffer + bufferOffset, sendlen);
client->flush();
//DebugPrinter::println("Sent");
DEBUG_PRINT(F("Client sendPacket returned: ")); DEBUG_PRINTLN(ret);
len -= ret;
bufferOffset += ret;
Expand Down