Ver a proveniência

Fixed network and gps powered counts

tags/v1.4.0^2
Bertrand Lemasle há 6 anos
ascendente
cometimento
e61ab1c11c
1 ficheiros alterados com 7 adições e 0 eliminações
  1. +7
    -0
      src/Hardware.cpp

+ 7
- 0
src/Hardware.cpp Ver ficheiro

@@ -66,7 +66,9 @@ namespace hardware {
//SIM808 turns phone on by default but we don't need it for gps only //SIM808 turns phone on by default but we don't need it for gps only
device.setPhoneFunctionality(SIM808_PHONE_FUNCTIONALITY::MINIMUM); device.setPhoneFunctionality(SIM808_PHONE_FUNCTIONALITY::MINIMUM);
} }
device.powerOnOffGps(true); device.powerOnOffGps(true);
gpsPoweredCount = 1;
} }
void gpsPowerOff() { void gpsPowerOff() {
@@ -84,6 +86,8 @@ namespace hardware {
VERBOSE; VERBOSE;
device.powerOnOffGps(false); device.powerOnOffGps(false);
gpsPoweredCount = 0;
powerOffIfUnused(); powerOffIfUnused();
} }
@@ -98,6 +102,7 @@ namespace hardware {
VERBOSE; VERBOSE;
powerOn(); powerOn();
device.setPhoneFunctionality(SIM808_PHONE_FUNCTIONALITY::FULL); device.setPhoneFunctionality(SIM808_PHONE_FUNCTIONALITY::FULL);
networkPoweredCount = 1;
} }
void networkPowerOff() { void networkPowerOff() {
@@ -116,6 +121,8 @@ namespace hardware {
VERBOSE; VERBOSE;
device.disableGprs(); device.disableGprs();
device.setPhoneFunctionality(SIM808_PHONE_FUNCTIONALITY::MINIMUM); device.setPhoneFunctionality(SIM808_PHONE_FUNCTIONALITY::MINIMUM);
networkPoweredCount = 0;
powerOffIfUnused(); powerOffIfUnused();
} }
} }


Carregando…
Cancelar
Guardar