From 8b634aafaf6a87d53131f7abe08d4ef24b495235 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kolac=C3=AD?= Date: Tue, 8 Dec 2020 16:15:09 +0100 Subject: [PATCH] Shutdown SIM800L with board (if defined) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Martin KolacĂ­ --- BoardInterface.cpp | 7 +++++++ evDash.ino | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/BoardInterface.cpp b/BoardInterface.cpp index f763438..0e10bbf 100644 --- a/BoardInterface.cpp +++ b/BoardInterface.cpp @@ -36,6 +36,13 @@ void BoardInterface::shutdownDevice() { displayMessage("Shutdown in 3 sec.", ""); delay(3000); +#ifdef SIM800L_ENABLED + if(sim800l->isConnectedGPRS()) { + sim800l->disconnectGPRS(); + } + sim800l->setPowerMode(MINIMUM); +#endif //SIM800L_ENABLED + setCpuFrequencyMhz(80); setBrightness(0); //WiFi.disconnect(true); diff --git a/evDash.ino b/evDash.ino index c46301c..caf01a9 100644 --- a/evDash.ino +++ b/evDash.ino @@ -23,7 +23,7 @@ - TinyGPSPlus (m5stack GPS) SIM800L m5stack (https://github.com/kolaCZek) - - SIM800L.h, SoftwareSerial.h + - SIM800L.h */ ////////////////////////////////////////////////////////////