mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-03-30 14:55:46 +00:00
use hex of first 4 bytes of identity public key as default node name
This commit is contained in:
@@ -847,6 +847,13 @@ public:
|
||||
|
||||
loadMainIdentity();
|
||||
|
||||
// use hex of first 4 bytes of identity public key as default node name
|
||||
if(strcmp(_prefs.node_name, "NONAME") == 0){
|
||||
char pub_key_hex[10];
|
||||
mesh::Utils::toHex(pub_key_hex, self_id.pub_key, 4);
|
||||
strcpy(_prefs.node_name, pub_key_hex);
|
||||
}
|
||||
|
||||
// load persisted prefs
|
||||
if (_fs->exists("/new_prefs")) {
|
||||
loadPrefsInt("/new_prefs"); // new filename
|
||||
|
||||
Reference in New Issue
Block a user