File tree Expand file tree Collapse file tree 4 files changed +4
-10
lines changed Expand file tree Collapse file tree 4 files changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -596,11 +596,12 @@ void GPS::setAwake(bool on)
596
596
*/
597
597
uint32_t GPS::getWakeTime () const
598
598
{
599
- uint32_t t = config.position .gps_attempt_time ;
599
+ uint32_t t = config.position .position_broadcast_secs ;
600
600
601
601
if (t == UINT32_MAX)
602
602
return t; // already maxint
603
- return t * 1000 ;
603
+
604
+ return getConfiguredOrDefaultMs (t, default_broadcast_interval_secs);
604
605
}
605
606
606
607
/* * Get how long we should sleep between aqusition attempts in msecs
Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ class GPS : private concurrency::OSThread
70
70
71
71
/* *
72
72
* 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 )
74
74
*/
75
75
bool hasValidLocation = false ; // default to false, until we complete our first read
76
76
Original file line number Diff line number Diff line change @@ -223,7 +223,6 @@ void NodeDB::installDefaultConfig()
223
223
void NodeDB::initConfigIntervals ()
224
224
{
225
225
config.position .gps_update_interval = default_gps_update_interval;
226
- config.position .gps_attempt_time = default_gps_attempt_time;
227
226
config.position .position_broadcast_secs = default_broadcast_interval_secs;
228
227
229
228
config.power .ls_secs = default_ls_secs;
@@ -301,8 +300,6 @@ void NodeDB::installRoleDefaults(meshtastic_Config_DeviceConfig_Role role)
301
300
initModuleConfigIntervals ();
302
301
} else if (role == meshtastic_Config_DeviceConfig_Role_REPEATER) {
303
302
config.display .screen_on_secs = 1 ;
304
- } else if (role == meshtastic_Config_DeviceConfig_Role_TRACKER) {
305
- config.position .gps_update_interval = 30 ;
306
303
} else if (role == meshtastic_Config_DeviceConfig_Role_SENSOR) {
307
304
moduleConfig.telemetry .environment_measurement_enabled = true ;
308
305
moduleConfig.telemetry .environment_update_interval = 300 ;
Original file line number Diff line number Diff line change @@ -179,9 +179,6 @@ extern NodeDB nodeDB;
179
179
prefs.gps_update_interval = oneday
180
180
181
181
prefs.is_power_saving = True
182
-
183
- # allow up to five minutes for each new GPS lock attempt
184
- prefs.gps_attempt_time = 300
185
182
*/
186
183
187
184
// Our delay functions check for this for times that should never expire
@@ -192,7 +189,6 @@ extern NodeDB nodeDB;
192
189
193
190
#define ONE_DAY 24 * 60 * 60
194
191
195
- #define default_gps_attempt_time IF_ROUTER (5 * 60 , 15 * 60 )
196
192
#define default_gps_update_interval IF_ROUTER (ONE_DAY, 2 * 60 )
197
193
#define default_broadcast_interval_secs IF_ROUTER (ONE_DAY / 2 , 15 * 60 )
198
194
#define default_wait_bluetooth_secs IF_ROUTER (1 , 60 )
You can’t perform that action at this time.
0 commit comments