adafruit / Adafruit_MQTT_Library

Arduino library for MQTT support
MIT License
566 stars 292 forks source link

Support publishing and receiving large messages. #193

Closed xdylanm closed 3 years ago

xdylanm commented 3 years ago

Send multiple 250 byte packets for a large message (this was proposed in PR113, but the change here should work for existing implementations that only support 250 byte packets by breaking the message into chunks).

Correctly identify topic start position for >127byte messages (may also be addressed in PR166 -- happy to merge that fix in if preferred).

Resolves issue 102.

Tested on Wemos D1 mini (ESP8266) with messages up to 1023 bytes (set MAXBUFFERSIZE and SUBSCRIPTIONDATALEN to 1024).

brentru commented 3 years ago

@xdylanm Could you please format this library using clang-format and then push a commit with your formatted code?

We have instructions on how to do this here: https://learn.adafruit.com/the-well-automated-arduino-library/formatting-with-clang-format

Thank you for your PR, I'll be reviewing it after it's passing CI.

brentru commented 3 years ago

After formatting, please bump the library to version 2.3.0 by changing this line to 2.3.0

xdylanm commented 3 years ago

@brentru - merged from master after #166, addressed clang-format comment, and ticked version @flavio-fernandes - thanks for your input and changes.

brentru commented 3 years ago

Tested on hardware. I'll merge and release once the CI gives me the ✅