From 00936e93615fc1f471729b00442c75e4ddbed711 Mon Sep 17 00:00:00 2001 From: Sara Damiano Date: Wed, 17 Jul 2019 10:50:11 -0400 Subject: [PATCH] Fix file download linter warnings --- examples/FileDownload/FileDownload.ino | 8 ++++---- src/TinyGsmClientSIM800.h | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/examples/FileDownload/FileDownload.ino b/examples/FileDownload/FileDownload.ino index 3efd716..a4f11b1 100644 --- a/examples/FileDownload/FileDownload.ino +++ b/examples/FileDownload/FileDownload.ino @@ -78,13 +78,13 @@ const char wifiPass[] = "YourWiFiPass"; const char server[] = "vsh.pp.ua"; const int port = 80; +#include +#include + const char resource[] = "/TinyGSM/test_1k.bin"; uint32_t knownCRC32 = 0x6f50d767; uint32_t knownFileSize = 1024; // In case server does not send it -#include -#include - #ifdef DUMP_AT_COMMANDS #include StreamDebugger debugger(SerialAT, SerialMon); @@ -123,7 +123,7 @@ void setup() { void printPercent(uint32_t readLength, uint32_t contentLength) { // If we know the total length - if (contentLength != -1) { + if (contentLength != (uint32_t)-1) { SerialMon.print("\r "); SerialMon.print((100.0 * readLength) / contentLength); SerialMon.print('%'); diff --git a/src/TinyGsmClientSIM800.h b/src/TinyGsmClientSIM800.h index 96016e1..b5f2b6f 100644 --- a/src/TinyGsmClientSIM800.h +++ b/src/TinyGsmClientSIM800.h @@ -711,9 +711,12 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK() return true; } + float getTemperature() TINY_GSM_ATTR_NOT_AVAILABLE; + /* * NTP server functions */ + boolean isValidNumber(String str) { if(!(str.charAt(0) == '+' || str.charAt(0) == '-' || isDigit(str.charAt(0)))) return false; @@ -743,7 +746,6 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK() } byte NTPServerSync(String server = "pool.ntp.org", byte TimeZone = 3) { - //Serial.println("Sync time with NTP server."); sendAT(GF("+CNTPCID=1")); if (waitResponse(10000L) != 1) { return -1; @@ -769,8 +771,6 @@ TINY_GSM_MODEM_WAIT_FOR_NETWORK() return -1; } - float getTemperature() TINY_GSM_ATTR_NOT_AVAILABLE; - /* * Client related functions */