diff options
Diffstat (limited to 'Mussel/Mussel.h')
-rw-r--r-- | Mussel/Mussel.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Mussel/Mussel.h b/Mussel/Mussel.h index 79f5017..1e94897 100644 --- a/Mussel/Mussel.h +++ b/Mussel/Mussel.h @@ -22,6 +22,9 @@ // milliseconds #define MUSSEL_DEBOUNCE_DELAY 50U +// Limited size NOW!! can be transformed into infinite array +#define STACK_SIZE 1000 + class Mussel { public: @@ -41,6 +44,9 @@ class Mussel { String desc(); byte read(); String debug(); + bool push(String id, unsigned long timestamp, int measure); + void printStack(); + private: int _attitude; int _pin; @@ -50,6 +56,14 @@ class Mussel { #ifdef DHT_H DHT mussel_dht; #endif + + // Array to store ID strings + String idStack[STACK_SIZE]; + unsigned long timeStack[STACK_SIZE]; + int measureStack[STACK_SIZE]; + + // Index of the top element in the stack, -1 means stack is empty + int top = -1; }; #endif |