Skip to content

Commit 8b27fdb

Browse files
committed
Fix formatting
1 parent e6ab3a9 commit 8b27fdb

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

Adafruit_MQTT.cpp

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -366,17 +366,17 @@ bool Adafruit_MQTT::disconnect() {
366366
}
367367

368368
bool Adafruit_MQTT::publish(const char *topic, const char *data, uint8_t qos) {
369-
return publish(topic, (uint8_t*)(data), strlen(data), false, qos);
369+
return publish(topic, (uint8_t*)(data), strlen(data), false, qos);
370370
}
371371

372372
bool Adafruit_MQTT::publish(const char *topic, const char *data,
373373
bool retain, uint8_t qos) {
374-
return publish(topic, (uint8_t*)(data), strlen(data), retain, qos);
374+
return publish(topic, (uint8_t*)(data), strlen(data), retain, qos);
375375
}
376376

377377
bool Adafruit_MQTT::publish(const char *topic, uint8_t *data, uint16_t bLen,
378378
uint8_t qos) {
379-
return publish(topic, data, bLen, false, qos);
379+
return publish(topic, data, bLen, false, qos);
380380
}
381381

382382
bool Adafruit_MQTT::publish(const char *topic, uint8_t *data, uint16_t bLen,
@@ -925,19 +925,15 @@ Adafruit_MQTT_Publish::Adafruit_MQTT_Publish(Adafruit_MQTT *mqttserver,
925925
qos = q;
926926
}
927927

928-
bool Adafruit_MQTT_Publish::publish(int32_t i) {
929-
return publish(i, false);
930-
}
928+
bool Adafruit_MQTT_Publish::publish(int32_t i) { return publish(i, false); }
931929

932930
bool Adafruit_MQTT_Publish::publish(int32_t i, bool retain) {
933931
char payload[12];
934932
ltoa(i, payload, 10);
935933
return mqtt->publish(topic, payload, retain, qos);
936934
}
937935

938-
bool Adafruit_MQTT_Publish::publish(uint32_t i) {
939-
return publish(i, false);
940-
}
936+
bool Adafruit_MQTT_Publish::publish(uint32_t i) { return publish(i, false); }
941937

942938
bool Adafruit_MQTT_Publish::publish(uint32_t i, bool retain) {
943939
char payload[11];
@@ -950,8 +946,8 @@ bool Adafruit_MQTT_Publish::publish(double f, uint8_t precision) {
950946
}
951947

952948
bool Adafruit_MQTT_Publish::publish(double f, bool retain, uint8_t precision) {
953-
char payload[41]; // Need to technically hold float max, 39 digits and minus
954-
// sign.
949+
char payload[41]; // Need to technically hold float max, 39 digits and minus
950+
// sign.
955951
dtostrf(f, 0, precision, payload);
956952
return mqtt->publish(topic, payload, retain, qos);
957953
}
@@ -969,7 +965,8 @@ bool Adafruit_MQTT_Publish::publish(uint8_t *payload, uint16_t bLen) {
969965
return publish(payload, bLen, false);
970966
}
971967

972-
bool Adafruit_MQTT_Publish::publish(uint8_t *payload, uint16_t bLen, bool retain) {
968+
bool Adafruit_MQTT_Publish::publish(uint8_t *payload, uint16_t bLen,
969+
bool retain) {
973970

974971
return mqtt->publish(topic, payload, bLen, retain, qos);
975972
}

Adafruit_MQTT.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,11 +190,12 @@ class Adafruit_MQTT {
190190
// Publish a message to a topic using the specified QoS level. Returns true
191191
// if the message was published, false otherwise.
192192
bool publish(const char *topic, const char *payload, uint8_t qos = 0);
193-
bool publish(const char *topic, const char *payload, bool retain, uint8_t qos = 0);
194-
bool publish(const char *topic, uint8_t *payload, uint16_t bLen,
193+
bool publish(const char *topic, const char *payload, bool retain,
195194
uint8_t qos = 0);
196195
bool publish(const char *topic, uint8_t *payload, uint16_t bLen,
197-
bool retain, uint8_t qos = 0);
196+
uint8_t qos = 0);
197+
bool publish(const char *topic, uint8_t *payload, uint16_t bLen, bool retain,
198+
uint8_t qos = 0);
198199

199200
// Add a subscription to receive messages for a topic. Returns true if the
200201
// subscription could be added or was already present, false otherwise.
@@ -273,7 +274,8 @@ class Adafruit_MQTT {
273274
uint16_t publishPacket(uint8_t *packet, const char *topic, uint8_t *payload,
274275
uint16_t bLen, uint8_t qos, uint16_t maxPacketLen = 0);
275276
uint16_t publishPacket(uint8_t *packet, const char *topic, uint8_t *payload,
276-
uint16_t bLen, bool retain, uint8_t qos, uint16_t maxPacketLen = 0);
277+
uint16_t bLen, bool retain, uint8_t qos,
278+
uint16_t maxPacketLen = 0);
277279

278280
uint8_t subscribePacket(uint8_t *packet, const char *topic, uint8_t qos);
279281
uint8_t unsubscribePacket(uint8_t *packet, const char *topic);

0 commit comments

Comments
 (0)