1
0
mirror of https://github.com/adafruit/Adafruit_MQTT_Library.git synced 2025-07-27 15:01:49 +03:00

max receivable MQTT packet is 16 bits (tested with 300 byte packet receive)

also fixd buffer printer to have 16 bit length
This commit is contained in:
ladyada
2016-07-06 17:20:02 -04:00
parent 121aa3865c
commit b26b4eb32c
6 changed files with 22 additions and 17 deletions

View File

@ -100,7 +100,7 @@ class Adafruit_MQTT_CC3000 : public Adafruit_MQTT {
return mqttclient.connected();
}
uint16_t readPacket(uint8_t *buffer, uint8_t maxlen, int16_t timeout) {
uint16_t readPacket(uint8_t *buffer, uint16_t maxlen, int16_t timeout) {
/* Read data until either the connection is closed, or the idle timeout is reached. */
uint16_t len = 0;
int16_t t = timeout;