sforkowany z mirror/meshtastic-firmware
bug #376 - wip time only mode now works
rodzic
f6861a8fe2
commit
ef146fc0b5
|
@ -3,14 +3,8 @@ gps todo - bug 376
|
|||
for taiwan region:
|
||||
bin/run.sh --set region 8
|
||||
|
||||
fix poll interval for sending commands to ublox
|
||||
|
||||
change defaults to 2 min
|
||||
|
||||
properly handle time only modes
|
||||
|
||||
force gps sleep when in LightSleep and force wake only once <- confirm
|
||||
|
||||
fix has_gps based on new logic
|
||||
|
||||
have loop methods return allowable sleep time (from their perspective)
|
||||
|
|
2
proto
2
proto
|
@ -1 +1 @@
|
|||
Subproject commit 0d4ad90e4aca509e942e1dacdb947076dc01e2ab
|
||||
Subproject commit aa018c38de076a7d9e732f2e128c1800b56b1971
|
|
@ -147,10 +147,6 @@ uint32_t GPS::getWakeTime() const
|
|||
{
|
||||
uint32_t t = radioConfig.preferences.gps_attempt_time;
|
||||
|
||||
auto op = getGpsOp();
|
||||
if ((timeSetFromGPS && op == GpsOperation_GpsOpTimeOnly) || (op == GpsOperation_GpsOpDisabled))
|
||||
t = UINT32_MAX; // Sleep forever now
|
||||
|
||||
if (t == UINT32_MAX)
|
||||
return t; // already maxint
|
||||
|
||||
|
@ -168,12 +164,15 @@ uint32_t GPS::getSleepTime() const
|
|||
{
|
||||
uint32_t t = radioConfig.preferences.gps_update_interval;
|
||||
|
||||
auto op = getGpsOp();
|
||||
if ((timeSetFromGPS && op == GpsOperation_GpsOpTimeOnly) || (op == GpsOperation_GpsOpDisabled))
|
||||
t = UINT32_MAX; // Sleep forever now
|
||||
|
||||
if (t == UINT32_MAX)
|
||||
return t; // already maxint
|
||||
|
||||
// fixme check modes
|
||||
if (t == 0)
|
||||
t = 30; // 2 mins
|
||||
t = 2 * 60; // 2 mins
|
||||
|
||||
t *= 1000;
|
||||
|
||||
|
@ -242,7 +241,7 @@ void GPS::loop()
|
|||
void GPS::forceWake(bool on)
|
||||
{
|
||||
if (on) {
|
||||
DEBUG_MSG("llowing GPS lock\n");
|
||||
DEBUG_MSG("Allowing GPS lock\n");
|
||||
// lastSleepStartMsec = 0; // Force an update ASAP
|
||||
wakeAllowed = true;
|
||||
} else {
|
||||
|
|
Ładowanie…
Reference in New Issue