Fix GCC 10.1 compile errors

This commit is contained in:
Theo Arends 2020-10-22 15:23:22 +02:00
parent c794f7c617
commit f2d1785701
3 changed files with 6 additions and 6 deletions

View File

@ -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) {

View File

@ -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();

View File

@ -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) {