Skip to content

Commit 4744010

Browse files
authored
run trunk fmt -a (#9400)
* run trunk fmt -a * fix bracket bug This was introduced by @tedwardd and @thebentern in 021106d. See this diff: else + checkConfigPort = false; printf("Using config file %d\n", TCPPort);
1 parent d8d02cd commit 4744010

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

monitor/filter_c3_exception_decoder.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,11 @@ def __call__(self):
4343
self.enabled = self.setup_paths()
4444

4545
if self.config.get("env:" + self.environment, "build_type") != "debug":
46-
print(
47-
"""
46+
print("""
4847
Please build project in debug configuration to get more details about an exception.
4948
See https://docs.platformio.org/page/projectconf/build_configurations.html
5049
51-
"""
52-
)
50+
""")
5351

5452
return self
5553

src/platform/portduino/PortduinoGlue.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,12 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state)
6161
{
6262
switch (key) {
6363
case 'p':
64-
if (sscanf(arg, "%d", &TCPPort) < 1)
64+
if (sscanf(arg, "%d", &TCPPort) < 1) {
6565
return ARGP_ERR_UNKNOWN;
66-
else
66+
} else {
6767
checkConfigPort = false;
6868
printf("Using config file %d\n", TCPPort);
69+
}
6970
break;
7071
case 'c':
7172
configPath = arg;
@@ -887,10 +888,8 @@ bool loadConfig(const char *configPath)
887888
}
888889
if (checkConfigPort) {
889890
portduino_config.api_port = (yamlConfig["General"]["APIPort"]).as<int>(-1);
890-
if (portduino_config.api_port != -1 &&
891-
portduino_config.api_port > 1023 &&
892-
portduino_config.api_port < 65536) {
893-
TCPPort = (portduino_config.api_port);
891+
if (portduino_config.api_port != -1 && portduino_config.api_port > 1023 && portduino_config.api_port < 65536) {
892+
TCPPort = (portduino_config.api_port);
894893
}
895894
}
896895
portduino_config.mac_address = (yamlConfig["General"]["MACAddress"]).as<std::string>("");

variants/esp32s3/CDEBYTE_EoRa-Hub/rfswitch.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
// DIO6 -> RFSW1_V2
99
// DIO7 -> not connected on E80 module - note that GNSS and Wifi scanning are not possible.
1010

11-
static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_LR11X0_DIO7, RADIOLIB_NC, RADIOLIB_NC};
11+
static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_LR11X0_DIO7, RADIOLIB_NC,
12+
RADIOLIB_NC};
1213

1314
static const Module::RfSwitchMode_t rfswitch_table[] = {
1415
// mode DIO5 DIO6 DIO7

0 commit comments

Comments
 (0)