Skip to content

Commit cab4490

Browse files
committed
Change pump alerts to use msec instead of minutes
1 parent 6fccec8 commit cab4490

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

arduino/node_sewagepump.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#define DISTANCE_DATA_PIN 13
1212
#define BUTTON_PIN 4
1313
#define RELAY_PIN 5
14+
#define ON_TIME 15 // minutes
15+
#define OFF_TIME 30 // minutes
1416

1517
static bool str2int(const char *data, int& value)
1618
{
@@ -38,8 +40,8 @@ void NodeSewagePump::setup(void)
3840

3941
m_adc.begin();
4042

41-
m_pump_on_trigger_time = 30; // 30 minutes
42-
m_pump_off_time = 30; // 30 minutes
43+
m_pump_on_trigger_time = ON_TIME * 60 * 1000; // minutes => millis
44+
m_pump_off_time = OFF_TIME * 60 * 1000; // minutes => millis
4345
m_pump_on_min_current = 500; // 500mA
4446

4547
m_pump_on = false;

0 commit comments

Comments
 (0)