From f2d1785701f30e93c284dc1629951700682515cc Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 22 Oct 2020 15:23:22 +0200 Subject: [PATCH] Fix GCC 10.1 compile errors --- lib/ESP8266Audio/src/AudioFileSourceHTTPStream.cpp | 2 +- tasmota/support.ino | 2 +- tasmota/xdrv_26_ariluxrf.ino | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/ESP8266Audio/src/AudioFileSourceHTTPStream.cpp b/lib/ESP8266Audio/src/AudioFileSourceHTTPStream.cpp index ed659ee5e..c07eb0944 100755 --- a/lib/ESP8266Audio/src/AudioFileSourceHTTPStream.cpp +++ b/lib/ESP8266Audio/src/AudioFileSourceHTTPStream.cpp @@ -40,7 +40,7 @@ bool AudioFileSourceHTTPStream::open(const char *url) http.begin(client, url); http.setReuse(true); #ifndef ESP32 - http.setFollowRedirects(true); + http.setFollowRedirects(HTTPC_STRICT_FOLLOW_REDIRECTS); #endif int code = http.GET(); if (code != HTTP_CODE_OK) { diff --git a/tasmota/support.ino b/tasmota/support.ino index 462aec9e2..dd51c8004 100644 --- a/tasmota/support.ino +++ b/tasmota/support.ino @@ -48,7 +48,7 @@ bool knx_started = false; void OsWatchTicker(void) { uint32_t t = millis(); - uint32_t last_run = abs(t - oswatch_last_loop_time); + uint32_t last_run = t - oswatch_last_loop_time; #ifdef DEBUG_THEO int32_t rssi = WiFi.RSSI(); diff --git a/tasmota/xdrv_26_ariluxrf.ino b/tasmota/xdrv_26_ariluxrf.ino index b0f20e8a6..d4491423d 100644 --- a/tasmota/xdrv_26_ariluxrf.ino +++ b/tasmota/xdrv_26_ariluxrf.ino @@ -32,7 +32,7 @@ const uint32_t ARILUX_RF_SEPARATION_LIMIT = 4300; // Microseconds const uint32_t ARILUX_RF_RECEIVE_TOLERANCE = 60; // Percentage struct ARILUX { - unsigned int rf_timings[ARILUX_RF_MAX_CHANGES]; + int rf_timings[ARILUX_RF_MAX_CHANGES]; unsigned long rf_received_value = 0; unsigned long rf_last_received_value = 0; @@ -52,15 +52,15 @@ void AriluxRfInterrupt(void) ICACHE_RAM_ATTR; // As iram is tight and it works void AriluxRfInterrupt(void) { unsigned long time = micros(); - unsigned int duration = time - Arilux.rf_lasttime; + int duration = time - Arilux.rf_lasttime; if (duration > ARILUX_RF_SEPARATION_LIMIT) { if (abs(duration - Arilux.rf_timings[0]) < 200) { Arilux.rf_repeat_count++; if (Arilux.rf_repeat_count == 2) { unsigned long code = 0; - const unsigned int delay = Arilux.rf_timings[0] / 31; - const unsigned int delayTolerance = delay * ARILUX_RF_RECEIVE_TOLERANCE / 100; + const int delay = Arilux.rf_timings[0] / 31; + const int delayTolerance = delay * ARILUX_RF_RECEIVE_TOLERANCE / 100; for (unsigned int i = 1; i < Arilux.rf_change_count -1; i += 2) { code <<= 1; if (abs(Arilux.rf_timings[i] - (delay *3)) < delayTolerance && abs(Arilux.rf_timings[i +1] - delay) < delayTolerance) {