mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
allow setting default node name for companion via build flag
This commit is contained in:
parent
ecfeb2ff63
commit
d9c1cffac2
1 changed files with 5 additions and 0 deletions
|
|
@ -863,6 +863,11 @@ public:
|
||||||
mesh::Utils::toHex(pub_key_hex, self_id.pub_key, 4);
|
mesh::Utils::toHex(pub_key_hex, self_id.pub_key, 4);
|
||||||
strcpy(_prefs.node_name, pub_key_hex);
|
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
|
// load persisted prefs
|
||||||
if (_fs->exists("/new_prefs")) {
|
if (_fs->exists("/new_prefs")) {
|
||||||
loadPrefsInt("/new_prefs"); // new filename
|
loadPrefsInt("/new_prefs"); // new filename
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue