File tree 3 files changed +4
-7
lines changed
3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 27
27
28
28
#include " ArduinoProtoThreadStateMachine.hpp"
29
29
30
+ #include " ArduinoProtoThreadDelegate.hpp"
31
+
30
32
31
33
//
32
34
// Class: ArduinoProtoThread
@@ -40,18 +42,19 @@ class ArduinoProtoThread : public ArduinoProtoThreadStateMachine
40
42
~ArduinoProtoThread () { }
41
43
42
44
void setExecutionIntervalTo (unsigned long newIntervalInMs);
45
+ virtual void delegateCallbacksTo (ArduinoProtoThreadDelegate *object);
43
46
void timeSlice ();
44
47
45
48
// BEGIN from ArduinoProtoThreadStateMachine //////////
46
49
void changeStateTo (ArduinoProtoThreadState newState);
47
50
ArduinoProtoThreadState currentState ();
48
- void delegateCallbacksTo (ArduinoProtoThreadDelegate *object);
49
51
// END from ArduinoProtoThreadStateMachine //////////
50
52
51
53
protected:
52
54
unsigned long timeDifference;
53
55
unsigned long executionInterval;
54
56
unsigned long previousExecutionTime;
57
+ ArduinoProtoThreadDelegate *delegate;
55
58
};
56
59
57
60
Original file line number Diff line number Diff line change 26
26
27
27
#pragma once
28
28
29
- #include " ArduinoProtoThreadStateMachine.hpp"
30
-
31
29
// Used for pure virtual functions. I think this looks cleaner and is more self-documenting.
32
30
#define PURE_VIRTUAL 0
33
31
Original file line number Diff line number Diff line change 26
26
27
27
#pragma once
28
28
29
- #include " ArduinoProtoThreadDelegate.hpp"
30
-
31
29
// Used for pure virtual functions. I think this looks cleaner and is more self-documenting.
32
30
#define PURE_VIRTUAL 0
33
31
@@ -47,11 +45,9 @@ class ArduinoProtoThreadStateMachine
47
45
48
46
virtual void changeStateTo (ArduinoProtoThreadState newState) = PURE_VIRTUAL;
49
47
virtual ArduinoProtoThreadState currentState ();
50
- virtual void delegateCallbacksTo (ArduinoProtoThreadDelegate *object);
51
48
52
49
protected:
53
50
ArduinoProtoThreadState state;
54
- ArduinoProtoThreadDelegate *delegate;
55
51
};
56
52
ArduinoProtoThreadStateMachine::~ArduinoProtoThreadStateMachine () { }
57
53
You can’t perform that action at this time.
0 commit comments