You've already forked Adafruit_MQTT_Library
mirror of
https://github.com/adafruit/Adafruit_MQTT_Library.git
synced 2025-08-01 00:24:22 +03:00
Add Adafruit_MQTT_Subscribe::datalen
This stores the number of valid bytes in lastread. Having access to this information allows transmitting binary data as well, containing embedded nul bytes.
This commit is contained in:
@ -203,6 +203,9 @@ class Adafruit_MQTT_Subscribe {
|
||||
uint8_t qos;
|
||||
|
||||
uint8_t lastread[SUBSCRIPTIONDATALEN];
|
||||
// Number valid bytes in lastread. Limited to SUBSCRIPTIONDATALEN-1 to
|
||||
// ensure nul terminating lastread.
|
||||
uint8_t datalen;
|
||||
private:
|
||||
Adafruit_MQTT *mqtt;
|
||||
};
|
||||
|
Reference in New Issue
Block a user