Merge branch 'main' of git.kleiax.de:kleiax/Bewaesserung-Arduino

This commit is contained in:
2023-07-03 17:48:22 +02:00
2 changed files with 17 additions and 34 deletions
+8 -8
View File
@@ -4,12 +4,13 @@
class Pump {
public:
enum State {
Off,
On,
Timer,
Standby,
Error
enum State : uint8_t {
Off = 0,
On = 1,
Timer = 2,
Standby = 3,
Error = 100,
OnStupid = 200
};
Pump(uint8_t pumpPin, uint8_t pressurePin, uint8_t flowPin, uint8_t ledPin);
@@ -23,7 +24,7 @@ class Pump {
uint16_t getPressure();
uint32_t getRunningTime();
uint16_t getFlow();
uint16_t getStatus();
uint8_t getStatus();
State getState() { return this->state; }
@@ -32,7 +33,6 @@ class Pump {
static const uint16_t blinkTime = 1000;
static const uint16_t maxPressure = 1000;
static const uint16_t maxMaxPressureTime = 30000;
static const uint16_t delayTimer = 1000;
bool checkSensors();
void handlePins(bool state);