Browse Source
Add bridge type command to CLI for reporting bridge configuration
pull/831/head
João Brázio
8 months ago
No known key found for this signature in database
GPG Key ID: 56A1490716A324DD
1 changed files with
10 additions and
0 deletions
-
src/helpers/CommonCLI.cpp
|
|
@ -274,6 +274,16 @@ void CommonCLI::handleCommand(uint32_t sender_timestamp, const char* command, ch |
|
|
mesh::Utils::toHex(&reply[2], _callbacks->getSelfId().pub_key, PUB_KEY_SIZE); |
|
|
mesh::Utils::toHex(&reply[2], _callbacks->getSelfId().pub_key, PUB_KEY_SIZE); |
|
|
} else if (memcmp(config, "role", 4) == 0) { |
|
|
} else if (memcmp(config, "role", 4) == 0) { |
|
|
sprintf(reply, "> %s", _callbacks->getRole()); |
|
|
sprintf(reply, "> %s", _callbacks->getRole()); |
|
|
|
|
|
} else if (memcmp(config, "bridge.type", 11) == 0) { |
|
|
|
|
|
sprintf(reply, "> %s", |
|
|
|
|
|
#ifdef WITH_RS232_BRIDGE |
|
|
|
|
|
"rs232" |
|
|
|
|
|
#elif WITH_ESPNOW_BRIDGE |
|
|
|
|
|
"espnow" |
|
|
|
|
|
#else |
|
|
|
|
|
"none" |
|
|
|
|
|
#endif |
|
|
|
|
|
); |
|
|
#ifdef WITH_BRIDGE |
|
|
#ifdef WITH_BRIDGE |
|
|
} else if (memcmp(config, "bridge.enabled", 14) == 0) { |
|
|
} else if (memcmp(config, "bridge.enabled", 14) == 0) { |
|
|
sprintf(reply, "> %s", _prefs->bridge_enabled ? "on" : "off"); |
|
|
sprintf(reply, "> %s", _prefs->bridge_enabled ? "on" : "off"); |
|
|
|