sleep utils less code

This commit is contained in:
richonguzman 2024-07-25 13:47:02 -04:00
parent 7e26e97a12
commit 9bf929822a
1 changed files with 2 additions and 4 deletions

View File

@ -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");