diff --git a/Sming/Components/Network/src/Network/SmtpClient.h b/Sming/Components/Network/src/Network/SmtpClient.h index 91839a7b5c..90a1b695f2 100644 --- a/Sming/Components/Network/src/Network/SmtpClient.h +++ b/Sming/Components/Network/src/Network/SmtpClient.h @@ -182,6 +182,8 @@ class SmtpClient : protected TcpClient void sendMailHeaders(MailMessage* mail); bool sendMailBody(MailMessage* mail); + using TcpClient::connect; + private: Url url; Vector authMethods; diff --git a/Sming/Components/Storage/src/include/Storage/Partition.h b/Sming/Components/Storage/src/include/Storage/Partition.h index 1a2e4c0d0e..7ab5cdc168 100644 --- a/Sming/Components/Storage/src/include/Storage/Partition.h +++ b/Sming/Components/Storage/src/include/Storage/Partition.h @@ -76,7 +76,7 @@ struct esp_partition_info_t; namespace Disk { -class DiskPart; +struct DiskPart; } /** diff --git a/Sming/Core/Data/Stream/LimitedWriteStream.h b/Sming/Core/Data/Stream/LimitedWriteStream.h index a2d0bae843..890b99e58f 100644 --- a/Sming/Core/Data/Stream/LimitedWriteStream.h +++ b/Sming/Core/Data/Stream/LimitedWriteStream.h @@ -26,7 +26,7 @@ class LimitedWriteStream : public StreamWrapper { } - bool isValid() + bool isValid() const override { return writePos <= maxBytes; } diff --git a/Sming/Libraries/MHZ19 b/Sming/Libraries/MHZ19 index a2ecfec4c1..b177ff0b81 160000 --- a/Sming/Libraries/MHZ19 +++ b/Sming/Libraries/MHZ19 @@ -1 +1 @@ -Subproject commit a2ecfec4c1fa07e7be68dab0d1a2fcc2cc6190de +Subproject commit b177ff0b819d3c3bacc1b36e8d7f9bbd19698355 diff --git a/Sming/Libraries/SignalGenerator b/Sming/Libraries/SignalGenerator index b43d09e8d3..8ef328870f 160000 --- a/Sming/Libraries/SignalGenerator +++ b/Sming/Libraries/SignalGenerator @@ -1 +1 @@ -Subproject commit b43d09e8d31e980ce562e48a0d190eb89f7fe5f7 +Subproject commit 8ef328870fead0a9a47e6d1610e58327913e3b00 diff --git a/Sming/Libraries/TFT_S1D13781 b/Sming/Libraries/TFT_S1D13781 index 0903c3e305..3d5ddab2f7 160000 --- a/Sming/Libraries/TFT_S1D13781 +++ b/Sming/Libraries/TFT_S1D13781 @@ -1 +1 @@ -Subproject commit 0903c3e30545e1a023e6200bca2d9d9ebc73ea9b +Subproject commit 3d5ddab2f7dec460ce649ca69bc5ab625c2c7215 diff --git a/Sming/Libraries/UPnP b/Sming/Libraries/UPnP index 9bfc241efa..2700835f8e 160000 --- a/Sming/Libraries/UPnP +++ b/Sming/Libraries/UPnP @@ -1 +1 @@ -Subproject commit 9bfc241efa147b8aba46e5ba25f4bbdfaa18efeb +Subproject commit 2700835f8ef23efd415751db0a7843b1626cb8da diff --git a/Sming/Libraries/UPnP-Schema b/Sming/Libraries/UPnP-Schema index 0bb97e2287..9cb308fc65 160000 --- a/Sming/Libraries/UPnP-Schema +++ b/Sming/Libraries/UPnP-Schema @@ -1 +1 @@ -Subproject commit 0bb97e228763fb7253dc20a221fb34771e7b6ff3 +Subproject commit 9cb308fc652a1d14b5f9df8351da7794d6248602 diff --git a/Sming/Libraries/WebCam/src/Camera/FakeCamera.h b/Sming/Libraries/WebCam/src/Camera/FakeCamera.h index eff18f6873..8edf082d73 100644 --- a/Sming/Libraries/WebCam/src/Camera/FakeCamera.h +++ b/Sming/Libraries/WebCam/src/Camera/FakeCamera.h @@ -88,7 +88,7 @@ class FakeCamera: public CameraInterface * * @retval bytes successfully read and stored in the buffer */ - size_t read(char* buffer, size_t size, size_t offset = 0) + size_t read(char* buffer, size_t size, size_t offset = 0) override { // get the current picture and read the desired data from it. file.seekFrom(offset, SeekOrigin::Start); diff --git a/samples/Basic_ProgMem/app/TestProgmem.cpp b/samples/Basic_ProgMem/app/TestProgmem.cpp index 1815dc374d..fe86770329 100644 --- a/samples/Basic_ProgMem/app/TestProgmem.cpp +++ b/samples/Basic_ProgMem/app/TestProgmem.cpp @@ -167,50 +167,54 @@ void testSpeed(Print& out) out.printf("Speed tests, %u iterations, times in microseconds\n", iterations); ElapseTimer timer; - unsigned tmp = 0; uint32_t baseline, elapsed; _FPUTS("Baseline test, read string in RAM..."); + unsigned sum = 0; timer.start(); for(unsigned i = 0; i < iterations; ++i) { - tmp += sumBuffer(demoText, sizeof(demoText)); + sum += sumBuffer(demoText, sizeof(demoText)); } baseline = timer.elapsedTime(); - out << "Elapsed: " << baseline << endl; + out << "Elapsed: " << baseline << ", sum " << sum << endl; #define END() \ elapsed = timer.elapsedTime(); \ - out << "Elapsed: " << elapsed << " (baseline + " << elapsed - baseline << ')' << endl; + out << "Elapsed: " << elapsed << " (baseline + " << elapsed - baseline << "), sum " << sum << endl; _FPUTS("Load PSTR into stack buffer..."); + sum = 0; timer.start(); for(unsigned i = 0; i < iterations; ++i) { LOAD_PSTR(buf, demoPSTR1); - tmp += sumBuffer(buf, sizeof(buf)); + sum += sumBuffer(buf, sizeof(buf)); } END() _FPUTS("Load PSTR into String..."); + sum = 0; timer.start(); for(unsigned i = 0; i < iterations; ++i) { String s(demoFSTR1.data()); - tmp += sumBuffer(s.c_str(), s.length() + 1); + sum += sumBuffer(s.c_str(), s.length() + 1); } END() _FPUTS("Load FlashString into stack buffer..."); + sum = 0; timer.start(); for(unsigned i = 0; i < iterations; ++i) { LOAD_FSTR(buf, demoFSTR1); - tmp += sumBuffer(buf, sizeof(buf)); + sum += sumBuffer(buf, sizeof(buf)); } END() _FPUTS("Load FlashString into String..."); + sum = 0; timer.start(); for(unsigned i = 0; i < iterations; ++i) { String s(demoFSTR1); - tmp += sumBuffer(s.c_str(), s.length() + 1); + sum += sumBuffer(s.c_str(), s.length() + 1); } END() } diff --git a/samples/Basic_ProgMem/app/application.cpp b/samples/Basic_ProgMem/app/application.cpp index 498cdf68ef..abdc5d24f4 100644 --- a/samples/Basic_ProgMem/app/application.cpp +++ b/samples/Basic_ProgMem/app/application.cpp @@ -16,7 +16,6 @@ const uint8_t demoRam[] = {1, 2, 3, 4, 5}; const PROGMEM uint8_t demoPgm[] = {1, 2, 3, 4, 5}; const PROGMEM char demoString[] = "Demo"; -const PROGMEM char demoString2[] = "Demo"; const PROGMEM char demoFormat[] = "Demo %d"; const PROGMEM uint8_t bytes[] = {1, 2, 3, 4, 5, 6, 7, 8}; diff --git a/samples/Basic_Ssl/include/CounterStream.h b/samples/Basic_Ssl/include/CounterStream.h index 07b0c66cf1..b33f9676d3 100644 --- a/samples/Basic_Ssl/include/CounterStream.h +++ b/samples/Basic_Ssl/include/CounterStream.h @@ -9,7 +9,7 @@ class CounterStream : public ReadWriteStream { public: - size_t write(const uint8_t* buffer, size_t size) + size_t write(const uint8_t* buffer, size_t size) override { streamSize += size; return size; diff --git a/samples/Basic_Utility/app/utility.cpp b/samples/Basic_Utility/app/utility.cpp index 3ef86868de..cfd203822d 100644 --- a/samples/Basic_Utility/app/utility.cpp +++ b/samples/Basic_Utility/app/utility.cpp @@ -6,10 +6,6 @@ auto& output = Host::standardOutput; namespace { -#define XX(name, ext, mime) ext "\0" -DEFINE_FSTR_LOCAL(fstr_ext, "htm\0" MIME_TYPE_MAP(XX)) -#undef XX - namespace Command { DEFINE_FSTR(testWebConstants, "testWebConstants") diff --git a/samples/HttpServer_ConfigNetwork/app/application.cpp b/samples/HttpServer_ConfigNetwork/app/application.cpp index 2301a5257e..2c1e3d882a 100644 --- a/samples/HttpServer_ConfigNetwork/app/application.cpp +++ b/samples/HttpServer_ConfigNetwork/app/application.cpp @@ -27,8 +27,10 @@ DEFINE_FSTR(DEFAULT_GATEWAY, "192.168.1.1") // Instead of using a SPIFFS file, here we demonstrate usage of imported Flash Strings IMPORT_FSTR_LOCAL(flashSettings, PROJECT_DIR "/web/build/settings.html") +#ifdef ENABLE_SSL IMPORT_FSTR_LOCAL(serverKey, PROJECT_DIR "/cert/key_1024"); IMPORT_FSTR_LOCAL(serverCert, PROJECT_DIR "/cert/x509_1024.cer"); +#endif void onIndex(HttpRequest& request, HttpResponse& response) { diff --git a/samples/Humidity_AM2321/app/application.cpp b/samples/Humidity_AM2321/app/application.cpp index 5b01a7f96b..19fb17275c 100644 --- a/samples/Humidity_AM2321/app/application.cpp +++ b/samples/Humidity_AM2321/app/application.cpp @@ -6,7 +6,6 @@ namespace AM2321 am2321; SimpleTimer procTimer; -bool state = true; // You can change I2C pins here: const int SCL = 5; diff --git a/samples/LiveDebug/app/application.cpp b/samples/LiveDebug/app/application.cpp index 6606f63742..146ec9affc 100644 --- a/samples/LiveDebug/app/application.cpp +++ b/samples/LiveDebug/app/application.cpp @@ -398,7 +398,7 @@ COMMAND_HANDLER(read0) "At GDB prompt, enter `set $pc = $pc + 3` to skip offending instruction,\r\n" "then enter `c` to continue")); Serial.flush(); - uint8_t value = *(uint8_t*)0; + uint8_t value = *(volatile uint8_t*)0; Serial << _F("Value at address 0 = 0x") << String(value, HEX, 2) << endl; return true; } @@ -409,7 +409,7 @@ COMMAND_HANDLER(write0) "At GDB prompt, enter `set $pc = $pc + 3` to skip offending instruction,\r\n" "then enter `c` to continue")); Serial.flush(); - *(uint8_t*)0 = 0; + *(volatile uint8_t*)0 = 0; Serial.println(_F("...still running!")); return true; } diff --git a/samples/MeteoControl/app/webserver.cpp b/samples/MeteoControl/app/webserver.cpp index 530dda51da..fff647f7bc 100644 --- a/samples/MeteoControl/app/webserver.cpp +++ b/samples/MeteoControl/app/webserver.cpp @@ -8,8 +8,7 @@ namespace { HttpServer server; HttpClient downloadClient; -bool serverStarted = false; -int dowfid = 0; +bool serverStarted; void onIndex(HttpRequest& request, HttpResponse& response) { diff --git a/samples/MqttClient_Hello/app/application.cpp b/samples/MqttClient_Hello/app/application.cpp index dc51bb8980..b27b3a7302 100644 --- a/samples/MqttClient_Hello/app/application.cpp +++ b/samples/MqttClient_Hello/app/application.cpp @@ -9,17 +9,13 @@ namespace { -// For testing purposes, try a few different URL formats -DEFINE_FSTR(MQTT_URL1, "mqtt://test.mosquitto.org:1883") -DEFINE_FSTR(MQTT_URL2, "mqtts://test.mosquitto.org:8883") // (Need ENABLE_SSL) -DEFINE_FSTR(MQTT_URL3, "mqtt://frank:fiddle@192.168.100.107:1883") - #ifdef ENABLE_SSL #include #include -#define MQTT_URL MQTT_URL2 +DEFINE_FSTR(MQTT_URL, "mqtts://test.mosquitto.org:8883") #else -#define MQTT_URL MQTT_URL1 +DEFINE_FSTR(MQTT_URL, "mqtt://test.mosquitto.org:1883") +// DEFINE_FSTR(MQTT_URL, "mqtt://frank:fiddle@192.168.100.107:1883") #endif // Forward declarations