Read settings and store into non volatile memory
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
|
||||
#include <Homie.h>
|
||||
|
||||
#define DEACTIVATED_PLANT 5000
|
||||
|
||||
typedef struct PlantSettings_t {
|
||||
HomieSetting<long>* pSensorDry;
|
||||
HomieSetting<long>* pSensorWet;
|
||||
|
@@ -24,9 +24,9 @@ private:
|
||||
|
||||
int mAnalogValue=0; /**< moist sensor values, used for a calculation */
|
||||
HomieNode* mPlant = NULL;
|
||||
PlantSettings_t* mSetting;
|
||||
|
||||
public:
|
||||
PlantSettings_t* mSetting;
|
||||
|
||||
/**
|
||||
* @brief Construct a new Plant object
|
||||
@@ -85,6 +85,10 @@ public:
|
||||
}
|
||||
|
||||
void init(void);
|
||||
|
||||
long getSettingSensorDry() {
|
||||
return this->mSetting->pSensorDry->get();
|
||||
}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user