mirror of
https://github.com/alexhopeoconnor/firmware.git
synced 2026-10-17 09:01:30 +10:00
Only request all NodeInfo/Position on fresh install (#6184)
Co-authored-by: Ben Meadors <benmmeadors@gmail.com>
This commit is contained in:
+5
-3
@@ -400,11 +400,13 @@ bool isBroadcast(uint32_t dest)
|
||||
return dest == NODENUM_BROADCAST || dest == NODENUM_BROADCAST_NO_LORA;
|
||||
}
|
||||
|
||||
bool NodeDB::resetRadioConfig(bool factory_reset)
|
||||
bool NodeDB::resetRadioConfig(bool factory_reset, bool is_fresh_install)
|
||||
{
|
||||
bool didFactoryReset = false;
|
||||
|
||||
radioGeneration++;
|
||||
if (is_fresh_install) {
|
||||
radioGeneration++;
|
||||
}
|
||||
|
||||
if (factory_reset) {
|
||||
didFactoryReset = factoryReset();
|
||||
@@ -589,7 +591,7 @@ void NodeDB::installDefaultConfig(bool preserveKey = false)
|
||||
config.device.node_info_broadcast_secs = default_node_info_broadcast_secs;
|
||||
config.security.serial_enabled = true;
|
||||
config.security.admin_channel_enabled = false;
|
||||
resetRadioConfig();
|
||||
resetRadioConfig(false, true); // This also triggers NodeInfo/Position requests since we're fresh
|
||||
strncpy(config.network.ntp_server, "meshtastic.pool.ntp.org", 32);
|
||||
|
||||
#if (defined(T_DECK) || defined(T_WATCH_S3) || defined(UNPHONE) || defined(PICOMPUTER_S3) || defined(SENSECAP_INDICATOR)) && \
|
||||
|
||||
Reference in New Issue
Block a user