Browse Source
Merge pull request #315 from liamcottle/feature/companion-advert-name
Set default companion node name via build flags
pull/318/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
|
|
|
@ -863,6 +863,11 @@ public: |
|
|
|
mesh::Utils::toHex(pub_key_hex, self_id.pub_key, 4); |
|
|
|
strcpy(_prefs.node_name, pub_key_hex); |
|
|
|
|
|
|
|
// if name is provided as a build flag, use that as default node name instead
|
|
|
|
#ifdef ADVERT_NAME |
|
|
|
strcpy(_prefs.node_name, ADVERT_NAME); |
|
|
|
#endif |
|
|
|
|
|
|
|
// load persisted prefs
|
|
|
|
if (_fs->exists("/new_prefs")) { |
|
|
|
loadPrefsInt("/new_prefs"); // new filename
|
|
|
|
|