diff --git a/BresserWeatherSensorLWCfg.h b/BresserWeatherSensorLWCfg.h index 243571e..14ba67f 100644 --- a/BresserWeatherSensorLWCfg.h +++ b/BresserWeatherSensorLWCfg.h @@ -93,10 +93,10 @@ //--- Select Board --- #if defined(ARDUINO_DFROBOT_FIREBEETLE_ESP32) // Use pinning for LoRaWAN Node -//#define LORAWAN_NODE +#define LORAWAN_NODE // Use pinning for Firebeetle Cover LoRa -#define DFROBOT_COVER_LORA +//#define DFROBOT_COVER_LORA #endif // PowerFeather specific configuration diff --git a/BresserWeatherSensorLWCmd.cpp b/BresserWeatherSensorLWCmd.cpp index b8ff4d5..69a814d 100644 --- a/BresserWeatherSensorLWCmd.cpp +++ b/BresserWeatherSensorLWCmd.cpp @@ -37,6 +37,7 @@ // 20240723 Extracted from BresserWeatherSensorLW.ino // 20240729 Added PowerFeather specific status information // 20240818 Replaced delay() with light sleep for ESP32 +// 20240829 Added missing implementation of CMD_SET_LW_STATUS_INTERVAL // // ToDo: // - @@ -134,6 +135,16 @@ uint8_t decodeDownlink(uint8_t port, uint8_t *payload, size_t size) return 0; } + if ((port == CMD_SET_LW_STATUS_INTERVAL) && (size == 1)) + { + prefs.lw_stat_interval = payload[0]; + log_d("Set lw_stat_interval: %u", prefs.lw_stat_interval); + preferences.begin("BWS-LW", false); + preferences.putUChar("lw_stat_int", prefs.lw_stat_interval); + preferences.end(); + return 0; + } + if ((port == CMD_GET_LW_CONFIG) && (payload[0] == 0x00) && (size == 1)) { log_d("Get config");