run trunk fmt -a (#9400)

* run trunk fmt -a

* fix bracket bug

This was introduced by @tedwardd and @thebentern in 021106dfe5.

See this diff:
         else
+            checkConfigPort = false;
             printf("Using config file %d\n", TCPPort);
This commit is contained in:
Jorropo
2026-01-22 22:46:37 +01:00
committed by GitHub
parent d8d02cd6ec
commit 4744010295
3 changed files with 9 additions and 11 deletions

View File

@@ -43,13 +43,11 @@ class Esp32C3ExceptionDecoder(DeviceMonitorFilterBase):
self.enabled = self.setup_paths()
if self.config.get("env:" + self.environment, "build_type") != "debug":
print(
"""
print("""
Please build project in debug configuration to get more details about an exception.
See https://docs.platformio.org/page/projectconf/build_configurations.html
"""
)
""")
return self

View File

@@ -61,11 +61,12 @@ static error_t parse_opt(int key, char *arg, struct argp_state *state)
{
switch (key) {
case 'p':
if (sscanf(arg, "%d", &TCPPort) < 1)
if (sscanf(arg, "%d", &TCPPort) < 1) {
return ARGP_ERR_UNKNOWN;
else
} else {
checkConfigPort = false;
printf("Using config file %d\n", TCPPort);
}
break;
case 'c':
configPath = arg;
@@ -887,10 +888,8 @@ bool loadConfig(const char *configPath)
}
if (checkConfigPort) {
portduino_config.api_port = (yamlConfig["General"]["APIPort"]).as<int>(-1);
if (portduino_config.api_port != -1 &&
portduino_config.api_port > 1023 &&
portduino_config.api_port < 65536) {
TCPPort = (portduino_config.api_port);
if (portduino_config.api_port != -1 && portduino_config.api_port > 1023 && portduino_config.api_port < 65536) {
TCPPort = (portduino_config.api_port);
}
}
portduino_config.mac_address = (yamlConfig["General"]["MACAddress"]).as<std::string>("");

View File

@@ -8,7 +8,8 @@
// DIO6 -> RFSW1_V2
// DIO7 -> not connected on E80 module - note that GNSS and Wifi scanning are not possible.
static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_LR11X0_DIO7, RADIOLIB_NC, RADIOLIB_NC};
static const uint32_t rfswitch_dio_pins[] = {RADIOLIB_LR11X0_DIO5, RADIOLIB_LR11X0_DIO6, RADIOLIB_LR11X0_DIO7, RADIOLIB_NC,
RADIOLIB_NC};
static const Module::RfSwitchMode_t rfswitch_table[] = {
// mode DIO5 DIO6 DIO7