Skip to content

Commit

Permalink
Update AppLayer.h
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-bs authored Apr 28, 2024
1 parent ca5733d commit e0c058d
Showing 1 changed file with 24 additions and 2 deletions.
26 changes: 24 additions & 2 deletions src/AppLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,11 @@
#include <DistanceSensor_A02YYUW.h>
#endif

/*!
* LoRaWAN node application layer
*
* Contails all device specific methods and attributes
*/
class AppLayer
{
private:
Expand All @@ -89,15 +94,18 @@ class AppLayer
WeatherSensor weatherSensor;

#if defined(MITHERMOMETER_EN) || defined(THEENGSDECODER_EN)
/// Default BLE MAC addresses
std::vector<std::string> knownBLEAddressesDef;
/// Actual BLE MAC addresses; either from Preferences or from defaults
std::vector<std::string> knownBLEAddresses;
#endif

#ifdef MITHERMOMETER_EN
// Setup BLE Temperature/Humidity Sensors
/// BLE Temperature/Humidity Sensors
ATC_MiThermometer bleSensors; //!< Mijia Bluetooth Low Energy Thermo-/Hygrometer
#endif
#ifdef THEENGSDECODER_EN
/// Bluetooth Low Energy sensors
BleSensors bleSensors;
#endif

Expand All @@ -121,16 +129,30 @@ class AppLayer

#ifdef DISTANCESENSOR_EN
#if defined(ESP32)
/// Ultrasonic distance sensor
DistanceSensor_A02YYUW distanceSensor(&Serial2);
#else
/// Ultrasonic distance sensor
DistanceSensor_A02YYUW distanceSensor(&Serial1);
#endif
#endif

public:
#if defined(MITHERMOMETER_EN) || defined(THEENGSDECODER_EN)
/*!
* \brief Constructor with BLE sensors
*
* \param rtc Real time clock object
* \param clocksync Timestamp of last clock synchronization
*/
AppLayer(ESP32Time *rtc, time_t *clocksync) : bleSensors()
#else
/*!
* \brief Constructor without BLE sensors
*
* \param rtc Real time clock object
* \param clocksync Timestamp of last clock synchronization
*/
AppLayer(ESP32Time *rtc, time_t *clocksync)
#endif
{
Expand Down Expand Up @@ -265,4 +287,4 @@ class AppLayer
std::vector<std::string> getBleAddr(void);
#endif
};
#endif // _APPLAYER_H
#endif // _APPLAYER_H

0 comments on commit e0c058d

Please sign in to comment.