Skip to content

Commit

Permalink
Fix maximum number of 868 MHz sensors' default (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs committed Jun 8, 2024
1 parent 360f4bc commit b77b320
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
#declare -a required_libs=("https://github.com/matthias-bs/BresserWeatherSensorReceiver.git"
declare -a required_libs=(
"RadioLib@6.6.0"
"BresserWeatherSensorReceiver@0.28.5"
"BresserWeatherSensorReceiver@0.28.6"
"LoRa Serialization@3.2.1"
"ESP32Time@2.0.6"
"OneWireNg@0.13.3"
Expand Down
4 changes: 4 additions & 0 deletions BresserWeatherSensorLWCfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@
// 20240607 Added ARDUINO_DFROBOT_FIREBEETLE_ESP32 variant selection
// Updated HELTEC_WIFI_LORA_32_V3 definition
// Modified STATUS_INTERVAL
// 20240608 Added MAX_NUM_868MHZ_SENSORS
//
// Note:
// Depending on board package file date, either
Expand Down Expand Up @@ -313,6 +314,9 @@ const uint8_t UBATT_SAMPLES = 10;
}
#endif

/// Maximum number of 868 MHz sensors - should match the default configuration below
#define MAX_NUM_868MHZ_SENSORS 5

/// AppLayer payload configuration size in bytes
#define APP_PAYLOAD_CFG_SIZE 24

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"homepage": "https://github.com/matthias-bs/BresserWeatherSensorLW#README",
"dependencies": {
"BresserWeatherSensorReceiver": "matthias-bs/BresserWeatherSensorReceiver#semver:^0.28.5",
"BresserWeatherSensorReceiver": "matthias-bs/BresserWeatherSensorReceiver#semver:^0.28.6",
"RadioLib": "jgromes/RadioLib#semver:^6.6.0",
"lora-serialization": "thesolarnomad/lora-serialization#semver:^3.2.1",
"ESP32Time": "fbiego/ESP32Time#semver:^2.0.6",
Expand Down
3 changes: 2 additions & 1 deletion src/PayloadBresser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
// 20240530 Weather sensor: Fixed encoding of invalid temperature
// 20240601 Added mapping of invalid RainGauge values to INV_FLOAT
// 20240603 Added encoding of sensor battery status
// 20240608 Modified default number of sensors
//
// ToDo:
// - Add handling of Professional Rain Gauge
Expand All @@ -52,7 +53,7 @@

void PayloadBresser::begin(void)
{
weatherSensor.begin();
weatherSensor.begin(MAX_NUM_868MHZ_SENSORS);
weatherSensor.clearSlots();
appPrefs.begin("BWS-LW-APP", false);
uint8_t ws_timeout = appPrefs.getUChar("ws_timeout", WEATHERSENSOR_TIMEOUT);
Expand Down

0 comments on commit b77b320

Please sign in to comment.