Skip to content

Commit d51d667

Browse files
ci(pre-commit): Apply automatic fixes
1 parent 79f8016 commit d51d667

File tree

2 files changed

+45
-45
lines changed

2 files changed

+45
-45
lines changed

libraries/WiFiProv/src/WiFiProv.cpp

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,11 @@ void WiFiProvClass ::beginProvision(
169169
}
170170
}
171171

172-
void WiFiProvClass::endProvision(){
172+
void WiFiProvClass::endProvision() {
173173
network_prov_mgr_stop_provisioning();
174174
}
175175

176-
bool WiFiProvClass::disableAutoStop(uint32_t cleanup_delay){
176+
bool WiFiProvClass::disableAutoStop(uint32_t cleanup_delay) {
177177
esp_err_t err = network_prov_mgr_disable_auto_stop(cleanup_delay);
178178
if (err != ESP_OK) {
179179
log_e("disable_auto_stop failed!");
@@ -185,59 +185,59 @@ bool WiFiProvClass::disableAutoStop(uint32_t cleanup_delay){
185185

186186
#if __has_include("qrcode.h")
187187
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",
204204
};
205205

206-
static Print * qr_out = NULL;
206+
static Print *qr_out = NULL;
207207

208208
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;
212212

213-
if (qr_out == NULL) {
214-
return;
215-
}
213+
if (qr_out == NULL) {
214+
return;
215+
}
216216

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]);
235233
}
236234
qr_out->print("\n");
235+
}
236+
qr_out->print("\n");
237237
}
238238
#endif
239239

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) {
241241
if (!name || !transport) {
242242
log_w("Cannot generate QR code payload. Data missing.");
243243
return;

libraries/WiFiProv/src/WiFiProv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class WiFiProvClass {
5454
);
5555
void endProvision();
5656
bool disableAutoStop(uint32_t cleanup_delay);
57-
void printQR(const char *name, const char *pop, const char *transport, Print & out=Serial);
57+
void printQR(const char *name, const char *pop, const char *transport, Print &out = Serial);
5858
};
5959

6060
extern WiFiProvClass WiFiProv;

0 commit comments

Comments
 (0)