use ble.name

This commit is contained in:
Eve committed 2026-11-13 20:35:32 -05:00
1 parent 9e70d32f79
commit de721bcb4b
2 files changed
+11 -12

No files matched your search

+8 -8
View File
@@ -2154,7 +2154,13 @@ bool MyMesh::handleCommand(const char* command, uint32_t sender_timestamp, char*
sprintf(reply, "> pin is now %06d", _prefs.ble_pin);
return true;
}
if (memcmp(command, "set ble_name ", 13) == 0) {
if (strcmp(command, "set ble.name") == 0) {
_prefs.ble_name[0] = 0;
savePrefs();
sprintf(reply, "> BLE name reset to %s (reboot to apply)", _prefs.node_name);
return true;
}
if (memcmp(command, "set ble.name ", 13) == 0) {
if (AdvertDataParser::isValidName(&command[13])) {
StrHelper::strncpy(_prefs.ble_name, &command[13], sizeof(_prefs.ble_name));
savePrefs();
@@ -2164,16 +2170,10 @@ bool MyMesh::handleCommand(const char* command, uint32_t sender_timestamp, char*
}
return true;
}
if (strcmp(command, "get ble_name") == 0) {
if (strcmp(command, "get ble.name") == 0) {
sprintf(reply, "> %s", _prefs.ble_name[0] ? _prefs.ble_name : _prefs.node_name);
return true;
}
if (strcmp(command, "set ble_name_default") == 0) {
_prefs.ble_name[0] = 0;
savePrefs();
sprintf(reply, "> BLE name reset to %s (reboot to apply)", _prefs.node_name);
return true;
}
#ifdef ENABLE_WIFI_INTERFACE
if (memcmp(command, "set wifi.ssid ", 14) == 0) {