Skip to content

Commit 9b4d93d

Browse files
committed
Add bridge type command to CLI for reporting bridge configuration
1 parent e48f3a5 commit 9b4d93d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/helpers/CommonCLI.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,16 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch
274274
mesh::Utils::toHex(&reply[2], _callbacks->getSelfId().pub_key, PUB_KEY_SIZE);
275275
} else if (memcmp(config, "role", 4) == 0) {
276276
sprintf(reply, "> %s", _callbacks->getRole());
277+
} else if (memcmp(config, "bridge.type", 11) == 0) {
278+
sprintf(reply, "> %s",
279+
#ifdef WITH_RS232_BRIDGE
280+
"rs232"
281+
#elif WITH_ESPNOW_BRIDGE
282+
"espnow"
283+
#else
284+
"none"
285+
#endif
286+
);
277287
#ifdef WITH_BRIDGE
278288
} else if (memcmp(config, "bridge.enabled", 14) == 0) {
279289
sprintf(reply, "> %s", _prefs->bridge_enabled ? "on" : "off");

0 commit comments

Comments
 (0)