@@ -169,11 +169,11 @@ void WiFiProvClass ::beginProvision(
169
169
}
170
170
}
171
171
172
- void WiFiProvClass::endProvision (){
172
+ void WiFiProvClass::endProvision () {
173
173
network_prov_mgr_stop_provisioning ();
174
174
}
175
175
176
- bool WiFiProvClass::disableAutoStop (uint32_t cleanup_delay){
176
+ bool WiFiProvClass::disableAutoStop (uint32_t cleanup_delay) {
177
177
esp_err_t err = network_prov_mgr_disable_auto_stop (cleanup_delay);
178
178
if (err != ESP_OK) {
179
179
log_e (" disable_auto_stop failed!" );
@@ -185,59 +185,59 @@ bool WiFiProvClass::disableAutoStop(uint32_t cleanup_delay){
185
185
186
186
#if __has_include("qrcode.h")
187
187
static const char *lt[] = {
188
- /* 0 */ " " ,
189
- /* 1 */ " \u2580 " ,
190
- /* 2 */ " \u2580 " ,
191
- /* 3 */ " \u2580\u2580 " ,
192
- /* 4 */ " \u2584 " ,
193
- /* 5 */ " \u2588 " ,
194
- /* 6 */ " \u2584\u2580 " ,
195
- /* 7 */ " \u2588\u2580 " ,
196
- /* 8 */ " \u2584 " ,
197
- /* 9 */ " \u2580\u2584 " ,
198
- /* 10 */ " \u2588 " ,
199
- /* 11 */ " \u2580\u2588 " ,
200
- /* 12 */ " \u2584\u2584 " ,
201
- /* 13 */ " \u2588\u2584 " ,
202
- /* 14 */ " \u2584\u2588 " ,
203
- /* 15 */ " \u2588\u2588 " ,
188
+ /* 0 */ " " ,
189
+ /* 1 */ " \u2580 " ,
190
+ /* 2 */ " \u2580 " ,
191
+ /* 3 */ " \u2580\u2580 " ,
192
+ /* 4 */ " \u2584 " ,
193
+ /* 5 */ " \u2588 " ,
194
+ /* 6 */ " \u2584\u2580 " ,
195
+ /* 7 */ " \u2588\u2580 " ,
196
+ /* 8 */ " \u2584 " ,
197
+ /* 9 */ " \u2580\u2584 " ,
198
+ /* 10 */ " \u2588 " ,
199
+ /* 11 */ " \u2580\u2588 " ,
200
+ /* 12 */ " \u2584\u2584 " ,
201
+ /* 13 */ " \u2588\u2584 " ,
202
+ /* 14 */ " \u2584\u2588 " ,
203
+ /* 15 */ " \u2588\u2588 " ,
204
204
};
205
205
206
- static Print * qr_out = NULL ;
206
+ static Print *qr_out = NULL ;
207
207
208
208
static void _qrcode_print_console (esp_qrcode_handle_t qrcode) {
209
- int size = qrcodegen_getSize (qrcode);
210
- int border = 2 ;
211
- unsigned char num = 0 ;
209
+ int size = qrcodegen_getSize (qrcode);
210
+ int border = 2 ;
211
+ unsigned char num = 0 ;
212
212
213
- if (qr_out == NULL ) {
214
- return ;
215
- }
213
+ if (qr_out == NULL ) {
214
+ return ;
215
+ }
216
216
217
- for (int y = -border; y < size + border; y += 2 ) {
218
- for (int x = -border; x < size + border; x += 2 ) {
219
- num = 0 ;
220
- if (qrcodegen_getModule (qrcode, x, y)) {
221
- num |= 1 << 0 ;
222
- }
223
- if ((x < size + border) && qrcodegen_getModule (qrcode, x + 1 , y)) {
224
- num |= 1 << 1 ;
225
- }
226
- if ((y < size + border) && qrcodegen_getModule (qrcode, x, y + 1 )) {
227
- num |= 1 << 2 ;
228
- }
229
- if ((x < size + border) && (y < size + border) && qrcodegen_getModule (qrcode, x + 1 , y + 1 )) {
230
- num |= 1 << 3 ;
231
- }
232
- qr_out->print (lt[num]);
233
- }
234
- qr_out->print (" \n " );
217
+ for (int y = -border; y < size + border; y += 2 ) {
218
+ for (int x = -border; x < size + border; x += 2 ) {
219
+ num = 0 ;
220
+ if (qrcodegen_getModule (qrcode, x, y)) {
221
+ num |= 1 << 0 ;
222
+ }
223
+ if ((x < size + border) && qrcodegen_getModule (qrcode, x + 1 , y)) {
224
+ num |= 1 << 1 ;
225
+ }
226
+ if ((y < size + border) && qrcodegen_getModule (qrcode, x, y + 1 )) {
227
+ num |= 1 << 2 ;
228
+ }
229
+ if ((x < size + border) && (y < size + border) && qrcodegen_getModule (qrcode, x + 1 , y + 1 )) {
230
+ num |= 1 << 3 ;
231
+ }
232
+ qr_out->print (lt[num]);
235
233
}
236
234
qr_out->print (" \n " );
235
+ }
236
+ qr_out->print (" \n " );
237
237
}
238
238
#endif
239
239
240
- void WiFiProvClass::printQR (const char *name, const char *pop, const char *transport, Print & out) {
240
+ void WiFiProvClass::printQR (const char *name, const char *pop, const char *transport, Print &out) {
241
241
if (!name || !transport) {
242
242
log_w (" Cannot generate QR code payload. Data missing." );
243
243
return ;
0 commit comments