From 5824f290d16358fcfe876bc92614708da7fe30f2 Mon Sep 17 00:00:00 2001 From: SRGDamia1 Date: Thu, 10 May 2018 16:21:31 -0400 Subject: [PATCH] Removed conflicting date/time functions --- examples/AllFunctions/AllFunctions.ino | 11 ++++----- src/TinyGsmClientSIM800.h | 32 -------------------------- 2 files changed, 5 insertions(+), 38 deletions(-) diff --git a/examples/AllFunctions/AllFunctions.ino b/examples/AllFunctions/AllFunctions.ino index d175ec2..5df902a 100644 --- a/examples/AllFunctions/AllFunctions.ino +++ b/examples/AllFunctions/AllFunctions.ino @@ -107,7 +107,7 @@ void loop() { String cop = modem.getOperator(); DBG("Operator:", cop); - + IPAddress local = modem.localIP(); DBG("Local IP:", local); @@ -127,10 +127,10 @@ void loop() { DBG("GSM location:", gsmLoc); // This is only supported on SIMxxx series - String gsmTime = modem.getGSMDateTime(DATE_TIME); - DBG("GSM Time:", gsmTime); - String gsmDate = modem.getGSMDateTime(DATE_DATE); - DBG("GSM Date:", gsmDate); + // String gsmTime = modem.getGSMDateTime(DATE_TIME); + // DBG("GSM Time:", gsmTime); + // String gsmDate = modem.getGSMDateTime(DATE_DATE); + // DBG("GSM Date:", gsmDate); String ussd_balance = modem.sendUSSD("*111#"); DBG("Balance (USSD):", ussd_balance); @@ -196,4 +196,3 @@ void loop() { modem.maintain(); } } - diff --git a/src/TinyGsmClientSIM800.h b/src/TinyGsmClientSIM800.h index 3f91c10..5ba81ed 100644 --- a/src/TinyGsmClientSIM800.h +++ b/src/TinyGsmClientSIM800.h @@ -39,12 +39,6 @@ enum RegStatus { REG_UNKNOWN = 4, }; -enum DateTime { - DATE_FULL = 0, - DATE_TIME = 1, - DATE_DATE = 2 -}; - //============================================================================// //============================================================================// // Declaration of the TinyGsmSim800 Class @@ -720,32 +714,6 @@ public: return res; } - /* - * Time functions - */ - String getGSMDateTime(DateTime format) { - sendAT(GF("+CCLK?")); - if (waitResponse(2000L, GF(GSM_NL "+CCLK: \"")) != 1) { - return ""; - } - - String res; - - switch(format) { - case DATE_FULL: - res = stream.readStringUntil('"'); - break; - case DATE_TIME: - streamSkipUntil(','); - res = stream.readStringUntil('"'); - break; - case DATE_DATE: - res = stream.readStringUntil(','); - break; - } - return res; - } - /* * Battery functions */