sleep utils less code
This commit is contained in:
parent
7e26e97a12
commit
9bf929822a
|
|
@ -1,9 +1,7 @@
|
|||
#include "configuration.h"
|
||||
#include "sleep_utils.h"
|
||||
#include "power_utils.h"
|
||||
|
||||
|
||||
extern Beacon *currentBeacon;
|
||||
extern uint32_t lastGPSTime;
|
||||
extern bool gpsIsActive;
|
||||
|
||||
|
|
@ -12,7 +10,7 @@ namespace SLEEP_Utils {
|
|||
|
||||
void gpsSleep() {
|
||||
#ifdef HAS_GPS_CTRL
|
||||
if (currentBeacon->gpsEcoMode && gpsIsActive) {
|
||||
if (gpsIsActive) {
|
||||
POWER_Utils::deactivateGPS();
|
||||
lastGPSTime = millis();
|
||||
//
|
||||
|
|
@ -24,7 +22,7 @@ namespace SLEEP_Utils {
|
|||
|
||||
void gpsWakeUp() {
|
||||
#ifdef HAS_GPS_CTRL
|
||||
if (currentBeacon->gpsEcoMode && !gpsIsActive) {
|
||||
if (!gpsIsActive) {
|
||||
POWER_Utils::activateGPS();
|
||||
//
|
||||
Serial.println("GPS WAKEUP");
|
||||
|
|
|
|||
Loading…
Reference in New Issue