Skip to content

Commit 81f9e54

Browse files
ci(pre-commit): Apply automatic fixes
1 parent c41b4d8 commit 81f9e54

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

Diff for: libraries/PPP/src/PPP.cpp

+10-8
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,14 @@
88
#include "driver/uart.h"
99
#include "hal/uart_ll.h"
1010

11-
#define PPP_CMD_MODE_CHECK(x) if (_dce == NULL) {return x;} \
11+
#define PPP_CMD_MODE_CHECK(x) \
12+
if (_dce == NULL) { \
13+
return x; \
14+
} \
1215
if (_mode == ESP_MODEM_MODE_DATA) { \
1316
log_e("Wrong modem mode. Should be ESP_MODEM_MODE_COMMAND"); \
1417
return x; \
15-
} \
16-
18+
}
1719

1820
typedef struct {
1921
void *arg;
@@ -424,7 +426,7 @@ void PPPClass::end(void) {
424426

425427
bool PPPClass::sync() const {
426428
PPP_CMD_MODE_CHECK(false);
427-
429+
428430
return esp_modem_sync(_dce) == ESP_OK;
429431
}
430432

@@ -495,7 +497,7 @@ bool PPPClass::setPin(const char *pin) {
495497

496498
int PPPClass::RSSI() const {
497499
PPP_CMD_MODE_CHECK(-1);
498-
500+
499501
int rssi, ber;
500502
esp_err_t err = esp_modem_get_signal_quality(_dce, rssi, ber);
501503
if (err != ESP_OK) {
@@ -532,7 +534,7 @@ String PPPClass::IMSI() const {
532534

533535
String PPPClass::IMEI() const {
534536
PPP_CMD_MODE_CHECK(String());
535-
537+
536538
char imei[32];
537539
esp_err_t err = esp_modem_get_imei(_dce, (std::string &)imei);
538540
if (err != ESP_OK) {
@@ -545,7 +547,7 @@ String PPPClass::IMEI() const {
545547

546548
String PPPClass::moduleName() const {
547549
PPP_CMD_MODE_CHECK(String());
548-
550+
549551
char name[32];
550552
esp_err_t err = esp_modem_get_module_name(_dce, (std::string &)name);
551553
if (err != ESP_OK) {
@@ -715,7 +717,7 @@ bool PPPClass::sms(const char *num, const char *message) {
715717

716718
String PPPClass::cmd(const char *at_command, int timeout) {
717719
PPP_CMD_MODE_CHECK(String());
718-
720+
719721
char out[128] = {0};
720722
esp_err_t err = _esp_modem_at(_dce, at_command, out, timeout);
721723
if (err != ESP_OK) {

Diff for: libraries/PPP/src/PPP.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class PPPClass : public NetworkInterface {
5252
int batteryVoltage() const;
5353
int batteryLevel() const;
5454
int batteryStatus() const;
55-
55+
5656
// Switch the communication mode
5757
bool mode(esp_modem_dce_mode_t m);
5858
esp_modem_dce_mode_t mode() const {

0 commit comments

Comments
 (0)