Browse Source

no need for prefs check before prefs are loaded

pull/246/head
liamcottle 1 year ago
parent
commit
8f32ee61ce
  1. 8
      examples/companion_radio/main.cpp

8
examples/companion_radio/main.cpp

@ -848,11 +848,9 @@ public:
loadMainIdentity(); loadMainIdentity();
// use hex of first 4 bytes of identity public key as default node name // 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];
char pub_key_hex[10]; 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);
}
// load persisted prefs // load persisted prefs
if (_fs->exists("/new_prefs")) { if (_fs->exists("/new_prefs")) {

Loading…
Cancel
Save