mirror of
https://github.com/meshtastic/firmware.git
synced 2025-10-27 15:02:41 +00:00
Merge 0b4915001e into 35fa418739
This commit is contained in:
commit
8af19b8ccd
@ -1060,12 +1060,14 @@ void NodeDB::installDefaultDeviceState()
|
|||||||
// Set default owner name
|
// Set default owner name
|
||||||
pickNewNodeNum(); // based on macaddr now
|
pickNewNodeNum(); // based on macaddr now
|
||||||
#ifdef USERPREFS_CONFIG_OWNER_LONG_NAME
|
#ifdef USERPREFS_CONFIG_OWNER_LONG_NAME
|
||||||
snprintf(owner.long_name, sizeof(owner.long_name), (const char *)USERPREFS_CONFIG_OWNER_LONG_NAME);
|
#define STR(x) #x
|
||||||
|
snprintf(owner.long_name, sizeof(owner.long_name), "%s", STR(USERPREFS_CONFIG_OWNER_LONG_NAME));
|
||||||
#else
|
#else
|
||||||
snprintf(owner.long_name, sizeof(owner.long_name), "Meshtastic %04x", getNodeNum() & 0x0ffff);
|
snprintf(owner.long_name, sizeof(owner.long_name), "Meshtastic %04x", getNodeNum() & 0x0ffff);
|
||||||
#endif
|
#endif
|
||||||
#ifdef USERPREFS_CONFIG_OWNER_SHORT_NAME
|
#ifdef USERPREFS_CONFIG_OWNER_SHORT_NAME
|
||||||
snprintf(owner.short_name, sizeof(owner.short_name), (const char *)USERPREFS_CONFIG_OWNER_SHORT_NAME);
|
#define STR(x) #x
|
||||||
|
snprintf(owner.short_name, sizeof(owner.short_name), "%s", STR(USERPREFS_CONFIG_OWNER_SHORT_NAME));
|
||||||
#else
|
#else
|
||||||
snprintf(owner.short_name, sizeof(owner.short_name), "%04x", getNodeNum() & 0x0ffff);
|
snprintf(owner.short_name, sizeof(owner.short_name), "%04x", getNodeNum() & 0x0ffff);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user