Optional features can be controlled via platformio.ini and are mentioned in firmware name on MQTT

This commit is contained in:
Ollo
2023-06-20 17:53:19 +02:00
parent 2636e2defa
commit f65132652c
4 changed files with 18 additions and 5 deletions

View File

@@ -80,14 +80,24 @@
/** \addtogroup Configuration
* @{
*/
#define FIRMWARE_VERSION "2.71 HW0.10b"
#define TIMED_LIGHT_PIN CUSTOM1_PIN5
#define FLOWMETER_PIN CUSTOM1_PIN1
#ifdef FLOWMETER_PIN
#define FLOWMETER_PULSES_PER_ML 2.2
#define FIRMWARE_FEATURE1 "Flow"
#else
#define FIRMWARE_FEATURE1 ""
#endif
#ifdef TIMED_LIGHT_PIN
#define FIRMWARE_FEATURE2 "Light"
#else
#define FIRMWARE_FEATURE2 ""
#endif
#define FIRMWARE_BASENAME "PlantControl"
#define FIRMWARE_NAME FIRMWARE_BASENAME FIRMWARE_FEATURE1 FIRMWARE_FEATURE2
#define FIRMWARE_VERSION "2.71 HW0.10b"
#define MOIST_SENSOR_MAX_FRQ 5200 // 60kHz (500Hz margin)
#define MOIST_SENSOR_MIN_FRQ 500 // 0.5kHz (500Hz margin)

View File

@@ -103,7 +103,7 @@ HomieSetting<const char *> ntpServer("ntpServer", "NTP server (pool.ntp.org as d
**/
#define GENERATE_PLANT(plant, strplant) \
HomieSetting<double> mSensorDry##plant = HomieSetting<double>("dry" strplant, "Plant " strplant "- Moist sensor dry %"); \
HomieSetting<double> mSensorDry##plant = HomieSetting<double>("dry" strplant, "Plant" strplant " - Moist sensor dry %"); \
HomieSetting<long> mPumpAllowedHourRangeStart##plant = HomieSetting<long>("hourstart" strplant, "Plant" strplant " - Range pump allowed hour start (0-23)"); \
HomieSetting<long> mPumpAllowedHourRangeEnd##plant = HomieSetting<long>("hourend" strplant, "Plant" strplant " - Range pump allowed hour end (0-23)"); \
HomieSetting<bool> mPumpOnlyWhenLowLight##plant = HomieSetting<bool>("lowLight" strplant, "Plant" strplant " - Enable the Pump only, when there is no sunlight"); \