diff options
Diffstat (limited to 'arduino/Counter.h')
-rwxr-xr-x | arduino/Counter.h | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/arduino/Counter.h b/arduino/Counter.h deleted file mode 100755 index f832023..0000000 --- a/arduino/Counter.h +++ /dev/null | |||
@@ -1,45 +0,0 @@ | |||
1 | #pragma once | ||
2 | |||
3 | class Counter | ||
4 | { | ||
5 | public: | ||
6 | |||
7 | enum State | ||
8 | { | ||
9 | READY, | ||
10 | WAITING_FOR_TIMEOUT, | ||
11 | COUNTING, | ||
12 | SIGNALING | ||
13 | }; | ||
14 | |||
15 | public: | ||
16 | |||
17 | void init (unsigned long startDelay, unsigned long rpmCount, unsigned long signalsPerRPM); | ||
18 | |||
19 | void setStartDelay (unsigned long); | ||
20 | |||
21 | void setRPMCount (unsigned long); | ||
22 | |||
23 | void setSignalsPerRPM (unsigned long); | ||
24 | |||
25 | void start (unsigned long startTime); | ||
26 | |||
27 | void reset (); | ||
28 | |||
29 | void update (unsigned long time, int rpmSignal); | ||
30 | |||
31 | State getState () const; | ||
32 | |||
33 | private: | ||
34 | |||
35 | State state; | ||
36 | |||
37 | unsigned long startDelay; | ||
38 | unsigned long rpmCount; | ||
39 | unsigned long signalsPerRPM; | ||
40 | unsigned long startTime; | ||
41 | |||
42 | unsigned long signals; | ||
43 | |||
44 | bool lastRpmSignal; | ||
45 | }; | ||