Readd lost stop

Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
This commit is contained in:
Sara Damiano
2024-05-20 12:49:59 -04:00
parent 97ae0a6874
commit f77a67167e
4 changed files with 8 additions and 6 deletions

View File

@@ -23,6 +23,7 @@
// #define TINY_GSM_MODEM_SARAR4
// #define TINY_GSM_MODEM_SARAR5
// #define TINY_GSM_MODEM_M95
// #define TINY_GSM_MODEM_BG95
// #define TINY_GSM_MODEM_BG96
// #define TINY_GSM_MODEM_A6
// #define TINY_GSM_MODEM_A7
@@ -226,8 +227,7 @@ void loop() {
DBG("Phone number (USSD):", ussd_phone_num);
#endif
#if TINY_GSM_TEST_TCP && defined TINY_GSM_MODEM_HAS_TCP && \
not defined(TINY_GSM_MODEM_BG95SSL)
#if TINY_GSM_TEST_TCP && defined TINY_GSM_MODEM_HAS_TCP
TinyGsmClient client(modem, 0);
const int port = 80;
DBG("Connecting to", server);
@@ -376,9 +376,9 @@ void loop() {
#if TINY_GSM_TEST_GPS && defined TINY_GSM_MODEM_HAS_GPS
DBG("Enabling GPS/GNSS/GLONASS and waiting 15s for warm-up");
#if !defined(TINY_GSM_MODEM_SARAR5)
#if !defined(TINY_GSM_MODEM_SARAR5)
modem.enableGPS();
#endif
#endif
delay(15000L);
float lat2 = 0;
float lon2 = 0;

View File

@@ -148,6 +148,9 @@ class TinyGsmBG96 : public TinyGsmModem<TinyGsmBG96>,
sock_connected = false;
at->waitResponse((maxWaitMs - (millis() - startMillis)));
}
void stop() override {
stop(15000L);
}
};
/*

View File

@@ -22,6 +22,7 @@
// #define TINY_GSM_MODEM_UBLOX
// #define TINY_GSM_MODEM_SARAR4
// #define TINY_GSM_MODEM_M95
// #define TINY_GSM_MODEM_BG95
// #define TINY_GSM_MODEM_BG96
// #define TINY_GSM_MODEM_A6
// #define TINY_GSM_MODEM_A7

View File

@@ -66,7 +66,6 @@ void loop() {
char server[] = "somewhere";
char resource[] = "something";
#if not defined(TINY_GSM_MODEM_BG95SSL) // no insecure client
// Test TCP functions
modem.maintain();
TinyGsmClient client;
@@ -91,7 +90,6 @@ void loop() {
}
client.stop();
#endif
#if defined(TINY_GSM_MODEM_HAS_SSL)
// modem.addCertificate(); // not yet impemented