Skip to content

Commit 78ef9c3

Browse files
committed
fix String::begin() errors; tweak misc
1 parent da84b3f commit 78ef9c3

File tree

7 files changed

+1395
-816
lines changed

7 files changed

+1395
-816
lines changed

ELClient/ELClientMqtt.cpp

+61-61
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@brief Constructor for ELClientMqtt
1515
@par Example
1616
@code
17-
ELClientMqtt(ELClient* elc);
17+
ELClientMqtt(ELClient* elc);
1818
@endcode
1919
*/
2020
ELClientMqtt::ELClientMqtt(ELClient* elc) :_elc(elc) {}
@@ -24,11 +24,11 @@ ELClientMqtt::ELClientMqtt(ELClient* elc) :_elc(elc) {}
2424
@details Send callback functions for MQTT events to the ESP
2525
@par Example
2626
@code
27-
mqtt.connectedCb.attach(mqttConnected);
28-
mqtt.disconnectedCb.attach(mqttDisconnected);
29-
mqtt.publishedCb.attach(mqttPublished);
30-
mqtt.dataCb.attach(mqttData);
31-
mqtt.setup();
27+
mqtt.connectedCb.attach(mqttConnected);
28+
mqtt.disconnectedCb.attach(mqttDisconnected);
29+
mqtt.publishedCb.attach(mqttPublished);
30+
mqtt.dataCb.attach(mqttData);
31+
mqtt.setup();
3232
@endcode
3333
*/
3434
void ELClientMqtt::setup(void) {
@@ -51,18 +51,18 @@ void ELClientMqtt::setup(void) {
5151
@brief Set MQTT last will.
5252
@details Sends the "last will" to the ESP.
5353
@param topic
54-
Last will topic name
54+
Last will topic name
5555
@param message
56-
Last will message
56+
Last will message
5757
@param qos
58-
(optional) Requested qos level, default 0
58+
(optional) Requested qos level, default 0
5959
@param retain
60-
(optional) Requested retain level, default 0
60+
(optional) Requested retain level, default 0
6161
@warning At the moment only qos level 0 is implemented and supported!
6262
@par Example
6363
@code
64-
Serial.println("ARDUINO: setup mqtt lwt");
65-
mqtt.lwt("/lwt", "offline", 0, 0); //or mqtt.lwt("/lwt", "offline");
64+
Serial.println("ARDUINO: setup mqtt lwt");
65+
mqtt.lwt("/lwt", "offline", 0, 0); //or mqtt.lwt("/lwt", "offline");
6666
@endcode
6767
*/
6868
void ELClientMqtt::lwt(const char* topic, const char* message, uint8_t qos, uint8_t retain) {
@@ -78,17 +78,17 @@ void ELClientMqtt::lwt(const char* topic, const char* message, uint8_t qos, uint
7878
@brief Set MQTT last will.
7979
@details Sends the "last will" to the ESP with the topic and message stored in program memory
8080
@param topic
81-
Last will topic name
81+
Last will topic name
8282
@param message
83-
Last will message
83+
Last will message
8484
@param qos
85-
(optional) Requested qos level, default 0
85+
(optional) Requested qos level, default 0
8686
@param retain
87-
(optional) Requested retain level, default 0
87+
(optional) Requested retain level, default 0
8888
@warning At the moment only qos level 0 is implemented and supported!
8989
@par Example
9090
@code
91-
no example code yet
91+
no example code yet
9292
@endcode
9393
*/
9494
void ELClientMqtt::lwt(const __FlashStringHelper* topic, const __FlashStringHelper* message,
@@ -108,14 +108,14 @@ void ELClientMqtt::lwt(const __FlashStringHelper* topic, const __FlashStringHelp
108108
@brief Subscribe to MQTT topic
109109
@details Sends the MQTT subscription request to the ESP
110110
@param topic
111-
Topic name
111+
Topic name
112112
@param qos
113-
(optional) Requested qos level, default 0
113+
(optional) Requested qos level, default 0
114114
@warning At the moment only qos level 0 is implemented and supported!
115115
@par Example
116116
@code
117-
mqtt.subscribe("/esp-link/1");
118-
mqtt.subscribe("/hello/world/#");
117+
mqtt.subscribe("/esp-link/1");
118+
mqtt.subscribe("/hello/world/#");
119119
@endcode
120120
*/
121121
void ELClientMqtt::subscribe(const char* topic, uint8_t qos) {
@@ -129,13 +129,13 @@ void ELClientMqtt::subscribe(const char* topic, uint8_t qos) {
129129
@brief Subscribe to MQTT topic
130130
@details Sends the MQTT subscription request to the ESP with the topic and message stored in program memory
131131
@param topic
132-
Topic name
132+
Topic name
133133
@param qos
134-
(optional) Requested qos level, default 0
134+
(optional) Requested qos level, default 0
135135
@warning At the moment only qos level 0 is implemented and supported!
136136
@par Example
137137
@code
138-
no example code yet
138+
no example code yet
139139
@endcode
140140
*/
141141
void ELClientMqtt::subscribe(const __FlashStringHelper* topic, uint8_t qos) {
@@ -151,23 +151,23 @@ void ELClientMqtt::subscribe(const __FlashStringHelper* topic, uint8_t qos) {
151151
@brief Subscribe to MQTT topic
152152
@details Sends the MQTT subscription request to the ESP
153153
@param topic
154-
Topic name
154+
Topic name
155155
@param data
156-
Pointer to data buffer
156+
Pointer to data buffer
157157
@param len
158-
Size of data buffer
158+
Size of data buffer
159159
@param qos
160-
(optional) Requested qos level, default 0
160+
(optional) Requested qos level, default 0
161161
@param retain
162-
(optional) Requested retain level, default 0
162+
(optional) Requested retain level, default 0
163163
@warning At the moment only qos level 0 is implemented and supported!
164164
@par Example
165165
@code
166-
char buf[12];
167-
itoa(count++, buf, 10);
168-
mqtt.publish("/esp-link/1", buf);
169-
itoa(count+99, buf, 10);
170-
mqtt.publish("/hello/world/arduino", buf, 12);
166+
char buf[12];
167+
itoa(count++, buf, 10);
168+
mqtt.publish("/esp-link/1", buf);
169+
itoa(count+99, buf, 10);
170+
mqtt.publish("/hello/world/arduino", buf, 12);
171171
@endcode
172172
*/
173173
void ELClientMqtt::publish(const char* topic, const uint8_t* data, const uint16_t len,
@@ -186,21 +186,21 @@ void ELClientMqtt::publish(const char* topic, const uint8_t* data, const uint16_
186186
@brief Subscribe to MQTT topic
187187
@details Sends the MQTT subscription request to the ESP. Data must be null-terminated
188188
@param topic
189-
Topic name
189+
Topic name
190190
@param data
191-
Pointer to data buffer
191+
Pointer to data buffer
192192
@param qos
193-
(optional) Requested qos level, default 0
193+
(optional) Requested qos level, default 0
194194
@param retain
195-
(optional) Requested retain level, default 0
195+
(optional) Requested retain level, default 0
196196
@warning At the moment only qos level 0 is implemented and supported!
197197
@par Example
198198
@code
199-
char buf[12];
200-
itoa(count++, buf, 10);
201-
mqtt.publish("/esp-link/1", buf);
202-
itoa(count+99, buf, 10);
203-
mqtt.publish("/hello/world/arduino", buf);
199+
char buf[12];
200+
itoa(count++, buf, 10);
201+
mqtt.publish("/esp-link/1", buf);
202+
itoa(count+99, buf, 10);
203+
mqtt.publish("/hello/world/arduino", buf);
204204
@endcode
205205
*/
206206
void ELClientMqtt::publish(const char* topic, const char* data, uint8_t qos, uint8_t retain)
@@ -212,19 +212,19 @@ void ELClientMqtt::publish(const char* topic, const char* data, uint8_t qos, uin
212212
@brief Subscribe to MQTT topic
213213
@details Sends the MQTT subscription request to the ESP with the topic and data stored in program memory
214214
@param topic
215-
Topic name
215+
Topic name
216216
@param data
217-
Pointer to data buffer
217+
Pointer to data buffer
218218
@param len
219-
Size of data buffer
219+
Size of data buffer
220220
@param qos
221-
(optional) Requested qos level, default 0
221+
(optional) Requested qos level, default 0
222222
@param retain
223-
(optional) Requested retain level, default 0
223+
(optional) Requested retain level, default 0
224224
@warning At the moment only qos level 0 is implemented and supported!
225225
@par Example
226226
@code
227-
no example code yet
227+
no example code yet
228228
@endcode
229229
*/
230230
void ELClientMqtt::publish(const __FlashStringHelper* topic, const __FlashStringHelper* data,
@@ -243,19 +243,19 @@ void ELClientMqtt::publish(const __FlashStringHelper* topic, const __FlashString
243243
@brief Subscribe to MQTT topic
244244
@details Sends the MQTT subscription request to the ESP with the data stored in program memory
245245
@param topic
246-
Topic name
246+
Topic name
247247
@param data
248-
Pointer to data buffer
248+
Pointer to data buffer
249249
@param len
250-
Size of data buffer
250+
Size of data buffer
251251
@param qos
252-
(optional) Requested qos level, default 0
252+
(optional) Requested qos level, default 0
253253
@param retain
254-
(optional) Requested retain level, default 0
254+
(optional) Requested retain level, default 0
255255
@warning At the moment only qos level 0 is implemented and supported!
256256
@par Example
257257
@code
258-
no example code yet
258+
no example code yet
259259
@endcode
260260
*/
261261
void ELClientMqtt::publish(const char* topic, const __FlashStringHelper* data,
@@ -274,19 +274,19 @@ void ELClientMqtt::publish(const char* topic, const __FlashStringHelper* data,
274274
@brief Subscribe to MQTT topic
275275
@details Sends the MQTT subscription request to the ESP with the topic stored in program memory
276276
@param topic
277-
Topic name
277+
Topic name
278278
@param data
279-
Pointer to data buffer
279+
Pointer to data buffer
280280
@param len
281-
Size of data buffer
281+
Size of data buffer
282282
@param qos
283-
(optional) Requested qos level, default 0
283+
(optional) Requested qos level, default 0
284284
@param retain
285-
(optional) Requested retain level, default 0
285+
(optional) Requested retain level, default 0
286286
@warning At the moment only qos level 0 is implemented and supported!
287287
@par Example
288288
@code
289-
no example code yet
289+
no example code yet
290290
@endcode
291291
*/
292292
void ELClientMqtt::publish(const __FlashStringHelper* topic, const uint8_t* data,

0 commit comments

Comments
 (0)