Ignore voltages above 100V
This commit is contained in:
parent
e820301490
commit
195d3d3c1b
@ -110,6 +110,7 @@
|
||||
#define MAX_PLANTS 7
|
||||
#define SOLAR_CHARGE_MIN_VOLTAGE 7 /**< Sun is rising (morning detected) */
|
||||
#define SOLAR_CHARGE_MAX_VOLTAGE 9 /**< Sun is shining (noon) */
|
||||
#define SOLAR_MAX_VOLTAGE_POSSIBLE 100 /**< higher values are treated as not connected sensor */
|
||||
#define VOLT_MAX_BATT 4.2f
|
||||
|
||||
#define MAX_CONFIG_SETTING_ITEMS 100 /**< Parameter, that can be configured in Homie */
|
||||
|
@ -37,4 +37,5 @@
|
||||
#define LOG_SLEEP_DAY 101
|
||||
#define LOG_SLEEP_CYCLE 102
|
||||
#define LOG_MISSING_PUMP -4
|
||||
#define LOG_BOOT_ERROR_DETECTION 10000
|
||||
#define LOG_BOOT_ERROR_DETECTION 10000
|
||||
#define LOG_SOLAR_CHARGER_MISSING 300
|
@ -1063,7 +1063,11 @@ void plantcontrol()
|
||||
sensorLipo.setProperty("ICA").send(String(battery.getICA()));
|
||||
sensorLipo.setProperty("DCA").send(String(battery.getDCA()));
|
||||
sensorLipo.setProperty("CCA").send(String(battery.getCCA()));
|
||||
sensorSolar.setProperty("volt").send(String(mSolarVoltage));
|
||||
if (mSolarVoltage < SOLAR_MAX_VOLTAGE_POSSIBLE) {
|
||||
sensorSolar.setProperty("volt").send(String(mSolarVoltage));
|
||||
} else {
|
||||
log(LOG_LEVEL_INFO, String("Ignore unrealistc sun voltage" + String(mSolarVoltage) +"V"), LOG_SOLAR_CHARGER_MISSING);
|
||||
}
|
||||
sensorTemp.setProperty(TEMPERATUR_SENSOR_CHIP).send(String(chipTemp));
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user