Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs committed Apr 9, 2024
2 parents 96bd585 + 7e4ff43 commit 3ee969f
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 2 deletions.
6 changes: 6 additions & 0 deletions examples/BresserWeatherSensorMQTTCustom/src/WeatherSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
// & https://github.com/merbanan/rtl_433/pull/2817
// 20240213 Added PM1.0 to air quality (PM) sensor decoder
// 20240322 Added pin definitions for M5Stack Core2 with M5Stack Module LoRa868
// 20240409 Added radioReset()
//
// ToDo:
// -
Expand Down Expand Up @@ -220,6 +221,11 @@ int16_t WeatherSensor::begin(void)
return state;
}

void WeatherSensor::radioReset(void)
{
radio.reset();
}

void WeatherSensor::sleep(void)
{
radio.sleep();
Expand Down
6 changes: 6 additions & 0 deletions examples/BresserWeatherSensorMQTTCustom/src/WeatherSensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
// 20240213 Added PM1.0 to air quality (PM) sensor decoder
// 20240222 Added clearing of flags in clearSlots() to prevent mixing of old and new data
// 20240322 Added pin definitions for M5Stack Core2 with M5Stack Module LoRa868
// 20240409 Added radioReset()
//
// ToDo:
// -
Expand Down Expand Up @@ -168,6 +169,11 @@ class WeatherSensor {
*/
int16_t begin(void);

/*!
\brief Reset radio transceiver
*/
void radioReset(void);

/*!
\brief Set transceiver into sleep mode
*/
Expand Down
6 changes: 6 additions & 0 deletions src/WeatherSensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@
// & https://github.com/merbanan/rtl_433/pull/2817
// 20240213 Added PM1.0 to air quality (PM) sensor decoder
// 20240322 Added pin definitions for M5Stack Core2 with M5Stack Module LoRa868
// 20240409 Added radioReset()
//
// ToDo:
// -
Expand Down Expand Up @@ -220,6 +221,11 @@ int16_t WeatherSensor::begin(void)
return state;
}

void WeatherSensor::radioReset(void)
{
radio.reset();
}

void WeatherSensor::sleep(void)
{
radio.sleep();
Expand Down
6 changes: 6 additions & 0 deletions src/WeatherSensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
// 20240213 Added PM1.0 to air quality (PM) sensor decoder
// 20240222 Added clearing of flags in clearSlots() to prevent mixing of old and new data
// 20240322 Added pin definitions for M5Stack Core2 with M5Stack Module LoRa868
// 20240409 Added radioReset()
//
// ToDo:
// -
Expand Down Expand Up @@ -168,6 +169,11 @@ class WeatherSensor {
*/
int16_t begin(void);

/*!
\brief Reset radio transceiver
*/
void radioReset(void);

/*!
\brief Set transceiver into sleep mode
*/
Expand Down
4 changes: 2 additions & 2 deletions src/WeatherSensorCfg.h
Original file line number Diff line number Diff line change
Expand Up @@ -245,8 +245,8 @@
#pragma message("Required wiring: A to RST, B to DIO1, D to DIO0, E to CS")

#elif defined(ARDUINO_ESP32_DEV) || defined(ARDUINO_DFROBOT_FIREBEETLE_ESP32)
#define LORAWAN_NODE
//#define FIREBEETLE_ESP32_COVER_LORA
//#define LORAWAN_NODE
#define FIREBEETLE_ESP32_COVER_LORA

#if defined(FIREBEETLE_ESP32_COVER_LORA)
#pragma message("FIREBEETLE_ESP32_COVER_LORA defined; assuming this is a FireBeetle ESP32 with FireBeetle Cover LoRa")
Expand Down

0 comments on commit 3ee969f

Please sign in to comment.