Skip to content

Commit 9afad9a

Browse files
authored
Merge branch 'meshtastic:master' into master
2 parents 7b8fd4e + ea651c2 commit 9afad9a

File tree

4 files changed

+4
-10
lines changed

4 files changed

+4
-10
lines changed

src/gps/GPS.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -596,11 +596,12 @@ void GPS::setAwake(bool on)
596596
*/
597597
uint32_t GPS::getWakeTime() const
598598
{
599-
uint32_t t = config.position.gps_attempt_time;
599+
uint32_t t = config.position.position_broadcast_secs;
600600

601601
if (t == UINT32_MAX)
602602
return t; // already maxint
603-
return t * 1000;
603+
604+
return getConfiguredOrDefaultMs(t, default_broadcast_interval_secs);
604605
}
605606

606607
/** Get how long we should sleep between aqusition attempts in msecs

src/gps/GPS.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ class GPS : private concurrency::OSThread
7070

7171
/**
7272
* hasValidLocation - indicates that the position variables contain a complete
73-
* GPS location, valid and fresh (< gps_update_interval + gps_attempt_time)
73+
* GPS location, valid and fresh (< gps_update_interval + position_broadcast_secs)
7474
*/
7575
bool hasValidLocation = false; // default to false, until we complete our first read
7676

src/mesh/NodeDB.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@ void NodeDB::installDefaultConfig()
223223
void NodeDB::initConfigIntervals()
224224
{
225225
config.position.gps_update_interval = default_gps_update_interval;
226-
config.position.gps_attempt_time = default_gps_attempt_time;
227226
config.position.position_broadcast_secs = default_broadcast_interval_secs;
228227

229228
config.power.ls_secs = default_ls_secs;
@@ -301,8 +300,6 @@ void NodeDB::installRoleDefaults(meshtastic_Config_DeviceConfig_Role role)
301300
initModuleConfigIntervals();
302301
} else if (role == meshtastic_Config_DeviceConfig_Role_REPEATER) {
303302
config.display.screen_on_secs = 1;
304-
} else if (role == meshtastic_Config_DeviceConfig_Role_TRACKER) {
305-
config.position.gps_update_interval = 30;
306303
} else if (role == meshtastic_Config_DeviceConfig_Role_SENSOR) {
307304
moduleConfig.telemetry.environment_measurement_enabled = true;
308305
moduleConfig.telemetry.environment_update_interval = 300;

src/mesh/NodeDB.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,6 @@ extern NodeDB nodeDB;
179179
prefs.gps_update_interval = oneday
180180
181181
prefs.is_power_saving = True
182-
183-
# allow up to five minutes for each new GPS lock attempt
184-
prefs.gps_attempt_time = 300
185182
*/
186183

187184
// Our delay functions check for this for times that should never expire
@@ -192,7 +189,6 @@ extern NodeDB nodeDB;
192189

193190
#define ONE_DAY 24 * 60 * 60
194191

195-
#define default_gps_attempt_time IF_ROUTER(5 * 60, 15 * 60)
196192
#define default_gps_update_interval IF_ROUTER(ONE_DAY, 2 * 60)
197193
#define default_broadcast_interval_secs IF_ROUTER(ONE_DAY / 2, 15 * 60)
198194
#define default_wait_bluetooth_secs IF_ROUTER(1, 60)

0 commit comments

Comments
 (0)