Browse Source
Merge pull request #246 from liamcottle/dev
Use identity key as default node name
pull/256/head
ripplebiz
1 year ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
0 deletions
-
examples/companion_radio/main.cpp
|
|
|
@ -869,6 +869,11 @@ public: |
|
|
|
|
|
|
|
loadMainIdentity(); |
|
|
|
|
|
|
|
// use hex of first 4 bytes of identity public key as default node name
|
|
|
|
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
|
|
|
|
|