From bdcba4c0f2aa6282183f97fffa119226081e0d3b Mon Sep 17 00:00:00 2001 From: Sara Damiano Date: Wed, 17 Jul 2019 13:30:46 -0400 Subject: [PATCH] Fix ussd test in all functions --- examples/AllFunctions/AllFunctions.ino | 4 +++- src/TinyGsmClientSIM5360.h | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/examples/AllFunctions/AllFunctions.ino b/examples/AllFunctions/AllFunctions.ino index 3994f43..45b18a0 100644 --- a/examples/AllFunctions/AllFunctions.ino +++ b/examples/AllFunctions/AllFunctions.ino @@ -194,7 +194,9 @@ void loop() { // DBG("GSM Time:", gsmTime); // String gsmDate = modem.getGSMDateTime(DATE_DATE); // DBG("GSM Date:", gsmDate); +#endif +#if TINY_GSM_TEST_USSD String ussd_balance = modem.sendUSSD("*111#"); DBG("Balance (USSD):", ussd_balance); @@ -247,7 +249,7 @@ void loop() { uint8_t chargeState = -99; int8_t percent = -99; uint16_t milliVolts = -9999; - modem.getBattStats(chargeState, percent, milliVolts) + modem.getBattStats(chargeState, percent, milliVolts); DBG("Battery charge state:", chargeState); DBG("Battery charge 'percent':", percent); DBG("Battery voltage:", milliVolts / 1000.0F); diff --git a/src/TinyGsmClientSIM5360.h b/src/TinyGsmClientSIM5360.h index 14d1e61..2cc408b 100644 --- a/src/TinyGsmClientSIM5360.h +++ b/src/TinyGsmClientSIM5360.h @@ -207,7 +207,7 @@ TINY_GSM_MODEM_GET_INFO_ATI() if (waitResponse(10000L) != 1) { return false; } - delay(3000); //TODO: Test this delay + waitResponse(10000L, GF(GSM_NL "PB DONE")); return init(); }