diff --git a/src/blecsan.cpp b/src/blecsan.cpp index 33d303dc..8b8a8207 100644 --- a/src/blecsan.cpp +++ b/src/blecsan.cpp @@ -253,8 +253,8 @@ esp_err_t register_ble_callback(bool unregister = false) { .scan_interval = (uint16_t)(cfg.blescantime * 10 / 0.625), // Time = N * 0.625 msec .scan_window = - (uint16_t)(BLESCANWINDOW / 0.625) // Time = N * 0.625 msec - }; + (uint16_t)(BLESCANWINDOW / 0.625), // Time = N * 0.625 msec + .scan_duplicate = BLE_SCAN_DUPLICATE_ENABLE}; ESP_LOGI(TAG, "Set GAP scan parameters"); diff --git a/src/bmesensor.cpp b/src/bmesensor.cpp index 56924d4a..9ba31fcf 100644 --- a/src/bmesensor.cpp +++ b/src/bmesensor.cpp @@ -5,7 +5,7 @@ // Local logging tag static const char TAG[] = __FILE__; -bmeStatus_t bme_status = {0}; +bmeStatus_t bme_status = {0, 0, 0, 0, 0, 0, 0, 0}; Ticker bmecycler; diff --git a/src/rcommand.cpp b/src/rcommand.cpp index afea9eb4..d69bb0cc 100644 --- a/src/rcommand.cpp +++ b/src/rcommand.cpp @@ -267,7 +267,7 @@ void set_macfilter(uint8_t val[]) { void set_rgblum(uint8_t val[]) { // Avoid wrong parameters - cfg.rgblum = (val[0] >= 0 && val[0] <= 100) ? (uint8_t)val[0] : RGBLUMINOSITY; + cfg.rgblum = (val[0] <= 100) ? (uint8_t)val[0] : RGBLUMINOSITY; ESP_LOGI(TAG, "Remote command: set RGB Led luminosity %d", cfg.rgblum); }; diff --git a/src/timesync.cpp b/src/timesync.cpp index c97da655..55a0d82f 100644 --- a/src/timesync.cpp +++ b/src/timesync.cpp @@ -82,7 +82,7 @@ void IRAM_ATTR timesync_processReq(void *taskparameter) { } // collect timestamp samples in timestamp array - for (uint8_t i = 0; i < TIME_SYNC_SAMPLES; i++) { + for (int8_t i = 0; i < TIME_SYNC_SAMPLES; i++) { // send timesync request #if (TIME_SYNC_LORASERVER) // ask user's timeserver (for LoRAWAN < 1.0.3)