Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/cli_commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -901,6 +901,8 @@ region save
- `logRx`: bridges received packets
- `logTx`: bridges transmitted packets

**Compatibility:** `rx` and `tx` are also accepted as legacy aliases for `logRx` and `logTx`

**Default:** `logTx`

---
Expand Down
15 changes: 12 additions & 3 deletions src/helpers/CommonCLI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -652,9 +652,18 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
strcpy(reply, "Error: delay must be between 0-10000 ms");
}
} else if (memcmp(config, "bridge.source ", 14) == 0) {
_prefs->bridge_pkt_src = memcmp(&config[14], "rx", 2) == 0;
savePrefs();
strcpy(reply, "OK");
const char* source = &config[14];
if (strcmp(source, "logRx") == 0 || strcmp(source, "rx") == 0) {
_prefs->bridge_pkt_src = true;
savePrefs();
strcpy(reply, "OK");
} else if (strcmp(source, "logTx") == 0 || strcmp(source, "tx") == 0) {
_prefs->bridge_pkt_src = false;
savePrefs();
strcpy(reply, "OK");
} else {
strcpy(reply, "Error: source must be logRx or logTx");
}
#endif
#ifdef WITH_RS232_BRIDGE
} else if (memcmp(config, "bridge.baud ", 12) == 0) {
Expand Down
Loading