Browse Source

Can't test *everything* on small processors

Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
dependabot/github_actions/actions/checkout-4
Sara Damiano 3 years ago
parent
commit
f508e78b4e
2 changed files with 16 additions and 10 deletions
  1. +5
    -5
      examples/AllFunctions/AllFunctions.ino
  2. +11
    -5
      tools/test_build/test_build.ino

+ 5
- 5
examples/AllFunctions/AllFunctions.ino View File

@ -74,10 +74,10 @@ SoftwareSerial SerialAT(2, 3); // RX, TX
#define TINY_GSM_TEST_USSD false #define TINY_GSM_TEST_USSD false
#define TINY_GSM_TEST_BATTERY true #define TINY_GSM_TEST_BATTERY true
#define TINY_GSM_TEST_TEMPERATURE true #define TINY_GSM_TEST_TEMPERATURE true
#define TINY_GSM_TEST_GSM_LOCATION true
#define TINY_GSM_TEST_NTP true
#define TINY_GSM_TEST_TIME true
#define TINY_GSM_TEST_GPS true
#define TINY_GSM_TEST_GSM_LOCATION false
#define TINY_GSM_TEST_NTP false
#define TINY_GSM_TEST_TIME false
#define TINY_GSM_TEST_GPS false
// disconnect and power down modem after tests // disconnect and power down modem after tests
#define TINY_GSM_POWERDOWN false #define TINY_GSM_POWERDOWN false
@ -99,7 +99,7 @@ const char wifiSSID[] = "YourSSID";
const char wifiPass[] = "YourWiFiPass"; const char wifiPass[] = "YourWiFiPass";
// Server details to test TCP/SSL // Server details to test TCP/SSL
const char server[] = "vsh.pp.ua";
const char server[] = "vsh.pp.ua";
const char resource[] = "/TinyGSM/logo.txt"; const char resource[] = "/TinyGSM/logo.txt";
#include <TinyGsmClient.h> #include <TinyGsmClient.h>


+ 11
- 5
tools/test_build/test_build.ino View File

@ -37,6 +37,7 @@ void loop() {
modem.isNetworkConnected(); modem.isNetworkConnected();
modem.waitForNetwork(); modem.waitForNetwork();
modem.waitForNetwork(15000L); modem.waitForNetwork(15000L);
modem.waitForNetwork(15000L, true);
modem.getSignalQuality(); modem.getSignalQuality();
modem.getLocalIP(); modem.getLocalIP();
modem.localIP(); modem.localIP();
@ -118,7 +119,7 @@ void loop() {
#endif #endif
// Test the calling functions // Test the calling functions
#if defined(TINY_GSM_MODEM_HAS_CALLING)
#if defined(TINY_GSM_MODEM_HAS_CALLING) && not defined(__AVR_ATmega32U4__)
modem.callNumber(String("+380000000000")); modem.callNumber(String("+380000000000"));
modem.callHangup(); modem.callHangup();
@ -130,7 +131,7 @@ void loop() {
#endif #endif
// Test the SMS functions // Test the SMS functions
#if defined(TINY_GSM_MODEM_HAS_SMS)
#if defined(TINY_GSM_MODEM_HAS_SMS) && not defined(__AVR_ATmega32U4__)
modem.sendSMS(String("+380000000000"), String("Hello from ")); modem.sendSMS(String("+380000000000"), String("Hello from "));
#if not defined(TINY_GSM_MODEM_XBEE) && not defined(TINY_GSM_MODEM_SARAR4) #if not defined(TINY_GSM_MODEM_XBEE) && not defined(TINY_GSM_MODEM_SARAR4)
@ -145,7 +146,7 @@ void loop() {
#endif #endif
// Test the GSM location functions // Test the GSM location functions
#if defined(TINY_GSM_MODEM_HAS_GSM_LOCATION)
#if defined(TINY_GSM_MODEM_HAS_GSM_LOCATION) && not defined(__AVR_ATmega32U4__)
modem.getGsmLocationRaw(); modem.getGsmLocationRaw();
modem.getGsmLocation(); modem.getGsmLocation();
float glatitude = -9999; float glatitude = -9999;
@ -164,7 +165,7 @@ void loop() {
#endif #endif
// Test the GPS functions // Test the GPS functions
#if defined(TINY_GSM_MODEM_HAS_GPS)
#if defined(TINY_GSM_MODEM_HAS_GPS) && not defined(__AVR_ATmega32U4__)
modem.enableGPS(); modem.enableGPS();
modem.getGPSraw(); modem.getGPSraw();
float latitude = -9999; float latitude = -9999;
@ -187,7 +188,12 @@ void loop() {
#endif #endif
// Test the Network time function // Test the Network time function
#if defined(TINY_GSM_MODEM_HAS_TIME)
#if defined(TINY_GSM_MODEM_HAS_NTP) && not defined(__AVR_ATmega32U4__)
modem.NTPServerSync("pool.ntp.org", 3);
#endif
// Test the Network time function
#if defined(TINY_GSM_MODEM_HAS_TIME) && not defined(__AVR_ATmega32U4__)
modem.getGSMDateTime(DATE_FULL); modem.getGSMDateTime(DATE_FULL);
int year3 = 0; int year3 = 0;
int month3 = 0; int month3 = 0;


Loading…
Cancel
Save