From ac96bbb3f82a1385363098ccb6d7cdf2b6d81304 Mon Sep 17 00:00:00 2001 From: Matthias Prinke Date: Sat, 24 Jun 2023 09:52:23 +0200 Subject: [PATCH] Fixed conditionally unused variable --- src/WeatherSensor.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/WeatherSensor.cpp b/src/WeatherSensor.cpp index df39b91f..f38dcf70 100644 --- a/src/WeatherSensor.cpp +++ b/src/WeatherSensor.cpp @@ -969,9 +969,11 @@ First two bytes are an LFSR-16 digest, generator 0x8810 key 0xabf9 with a final #ifdef BRESSER_LIGHTNING DecodeStatus WeatherSensor::decodeBresserLightningPayload(uint8_t *msg, uint8_t msgSize) { - // see AS3935 Datasheet, Table 17 - Distance Estimation - uint8_t const distance_map[] = { 1, 5, 6, 8, 10, 12, 14, 17, 20, 24, 27, 31, 34, 37, 40, 63 }; - + #if CORE_DEBUG_LEVEL == ARDUHAL_LOG_LEVEL_VERBOSE + // see AS3935 Datasheet, Table 17 - Distance Estimation + uint8_t const distance_map[] = { 1, 5, 6, 8, 10, 12, 14, 17, 20, 24, 27, 31, 34, 37, 40, 63 }; + #endif + // data whitening uint8_t msgw[MSG_BUF_SIZE]; for (unsigned i = 0; i < msgSize; ++i) {