hydro mode config and ignore low voltage light condition
This commit is contained in:
parent
d7b854da75
commit
f131d9f39a
@ -85,7 +85,7 @@
|
|||||||
#define FIRMWARE_VERSION "sw 2.0 hw 0.10b"
|
#define FIRMWARE_VERSION "sw 2.0 hw 0.10b"
|
||||||
|
|
||||||
#define TIMED_LIGHT_PIN CUSTOM1_PIN5
|
#define TIMED_LIGHT_PIN CUSTOM1_PIN5
|
||||||
#define FLOWMETER_PIN CUSTOM1_PIN1
|
//#define FLOWMETER_PIN CUSTOM1_PIN1
|
||||||
#ifdef FLOWMETER_PIN
|
#ifdef FLOWMETER_PIN
|
||||||
#define FLOWMETER_FLOWFACTOR 23 /** F = 22 * Q;Q = L/min */
|
#define FLOWMETER_FLOWFACTOR 23 /** F = 22 * Q;Q = L/min */
|
||||||
#endif
|
#endif
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
platform = espressif32
|
platform = espressif32
|
||||||
board = esp32doit-devkit-v1
|
board = esp32doit-devkit-v1
|
||||||
framework = arduino
|
framework = arduino
|
||||||
build_flags = -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY -fexceptions -lstdc++-exc
|
build_flags = -DPIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY
|
||||||
board_build.partitions = defaultWithSmallerSpiffs.csv
|
board_build.partitions = defaultWithSmallerSpiffs.csv
|
||||||
|
|
||||||
|
|
||||||
|
@ -641,7 +641,6 @@ void pumpActiveLoop()
|
|||||||
|
|
||||||
void safeSetup()
|
void safeSetup()
|
||||||
{
|
{
|
||||||
throw std::runtime_error("Shit happened");
|
|
||||||
/* reduce power consumption */
|
/* reduce power consumption */
|
||||||
setCpuFrequencyMhz(80);
|
setCpuFrequencyMhz(80);
|
||||||
|
|
||||||
@ -1039,7 +1038,8 @@ bool determineTimedLightState(bool lowLight)
|
|||||||
((hoursStart < hoursEnd) &&
|
((hoursStart < hoursEnd) &&
|
||||||
(getCurrentHour() >= hoursStart && getCurrentHour() <= hoursEnd)))
|
(getCurrentHour() >= hoursStart && getCurrentHour() <= hoursEnd)))
|
||||||
{
|
{
|
||||||
if (!timedLightLowVoltageTriggered && battery.getVoltage(BATTSENSOR_INDEX_BATTERY) >= timedLightVoltageCutoff.get())
|
bool voltageOk = !timedLightLowVoltageTriggered && battery.getVoltage(BATTSENSOR_INDEX_BATTERY) >= timedLightVoltageCutoff.get();
|
||||||
|
if (voltageOk || equalish(timedLightVoltageCutoff.get(), -1))
|
||||||
{
|
{
|
||||||
timedLightNode.setProperty("state").send(String("On"));
|
timedLightNode.setProperty("state").send(String("On"));
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user