Merge remote-tracking branch 'origin/master' into 2.2-working-changes

This commit is contained in:
Ben Meadors
2023-08-07 13:24:10 -05:00
36 changed files with 497 additions and 60 deletions

View File

@@ -106,7 +106,6 @@ bool NodeDB::resetRadioConfig(bool factory_reset)
config.lora.region = meshtastic_Config_LoRaConfig_RegionCode_TW;
// Enter super deep sleep soon and stay there not very long
// radioConfig.preferences.mesh_sds_timeout_secs = 10;
// radioConfig.preferences.sds_secs = 60;
}
@@ -208,7 +207,6 @@ void NodeDB::initConfigIntervals()
config.position.position_broadcast_secs = default_broadcast_interval_secs;
config.power.ls_secs = default_ls_secs;
config.power.mesh_sds_timeout_secs = default_mesh_sds_timeout_secs;
config.power.min_wake_secs = default_min_wake_secs;
config.power.sds_secs = default_sds_secs;
config.power.wait_bluetooth_secs = default_wait_bluetooth_secs;

View File

@@ -159,7 +159,6 @@ extern NodeDB nodeDB;
# prefs.position_broadcast_secs = FIXME possibly broadcast only once an hr
prefs.wait_bluetooth_secs = 1 # Don't stay in bluetooth mode
prefs.mesh_sds_timeout_secs = never
# try to stay in light sleep one full day, then briefly wake and sleep again
prefs.ls_secs = oneday
@@ -187,7 +186,6 @@ extern NodeDB nodeDB;
#define default_gps_update_interval IF_ROUTER(ONE_DAY, 2 * 60)
#define default_broadcast_interval_secs IF_ROUTER(ONE_DAY / 2, 15 * 60)
#define default_wait_bluetooth_secs IF_ROUTER(1, 60)
#define default_mesh_sds_timeout_secs IF_ROUTER(NODE_DELAY_FOREVER, 2 * 60 * 60)
#define default_sds_secs IF_ROUTER(ONE_DAY, UINT32_MAX) // Default to forever super deep sleep
#define default_ls_secs IF_ROUTER(ONE_DAY, 5 * 60)
#define default_min_wake_secs 10

View File

@@ -153,7 +153,12 @@ void Router::setReceivedMessage()
meshtastic_QueueStatus Router::getQueueStatus()
{
return iface->getQueueStatus();
if (!iface) {
meshtastic_QueueStatus qs;
qs.res = qs.mesh_packet_id = qs.free = qs.maxlen = 0;
return qs;
} else
return iface->getQueueStatus();
}
ErrorCode Router::sendLocal(meshtastic_MeshPacket *p, RxSource src)