Sfoglia il codice sorgente

Made sure devices are powered off on sleep and obtained 112 bytes(???)

tags/v1.2.0
Bertrand Lemasle 6 anni fa
parent
commit
f96b40c6c4
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  1. +5
    -1
      MainUnit.cpp

+ 5
- 1
MainUnit.cpp Vedi File

@@ -10,8 +10,12 @@ namespace mainunit {
namespace details {

void prepareSleep() {
//forcing the power off of ALL devices for safety
hardware::sim808::powerOff();
hardware::i2c::powerOff(true);

hardware::sim808::simSerial.end(); //avoid woke up by SoftwareSerial interrupt
delay(5); //ensure message have been printed out
delay(5); //ensure log messages have been printed out
}

void wokeUp() {


Caricamento…
Annulla
Salva