Skip to content

Commit 5d2e8c0

Browse files
committed
Closes #4
1 parent 96309a9 commit 5d2e8c0

3 files changed

+4
-7
lines changed

Diff for: ArduinoProtoThread.hpp

+4-1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@
2727

2828
#include "ArduinoProtoThreadStateMachine.hpp"
2929

30+
#include "ArduinoProtoThreadDelegate.hpp"
31+
3032

3133
//
3234
// Class: ArduinoProtoThread
@@ -40,18 +42,19 @@ class ArduinoProtoThread : public ArduinoProtoThreadStateMachine
4042
~ArduinoProtoThread() { }
4143

4244
void setExecutionIntervalTo(unsigned long newIntervalInMs);
45+
virtual void delegateCallbacksTo(ArduinoProtoThreadDelegate *object);
4346
void timeSlice();
4447

4548
// BEGIN from ArduinoProtoThreadStateMachine //////////
4649
void changeStateTo(ArduinoProtoThreadState newState);
4750
ArduinoProtoThreadState currentState();
48-
void delegateCallbacksTo(ArduinoProtoThreadDelegate *object);
4951
// END from ArduinoProtoThreadStateMachine //////////
5052

5153
protected:
5254
unsigned long timeDifference;
5355
unsigned long executionInterval;
5456
unsigned long previousExecutionTime;
57+
ArduinoProtoThreadDelegate *delegate;
5558
};
5659

5760

Diff for: ArduinoProtoThreadDelegate.hpp

-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626

2727
#pragma once
2828

29-
#include "ArduinoProtoThreadStateMachine.hpp"
30-
3129
// Used for pure virtual functions. I think this looks cleaner and is more self-documenting.
3230
#define PURE_VIRTUAL 0
3331

Diff for: ArduinoProtoThreadStateMachine.hpp

-4
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626

2727
#pragma once
2828

29-
#include "ArduinoProtoThreadDelegate.hpp"
30-
3129
// Used for pure virtual functions. I think this looks cleaner and is more self-documenting.
3230
#define PURE_VIRTUAL 0
3331

@@ -47,11 +45,9 @@ class ArduinoProtoThreadStateMachine
4745

4846
virtual void changeStateTo(ArduinoProtoThreadState newState) = PURE_VIRTUAL;
4947
virtual ArduinoProtoThreadState currentState();
50-
virtual void delegateCallbacksTo(ArduinoProtoThreadDelegate *object);
5148

5249
protected:
5350
ArduinoProtoThreadState state;
54-
ArduinoProtoThreadDelegate *delegate;
5551
};
5652
ArduinoProtoThreadStateMachine::~ArduinoProtoThreadStateMachine() { }
5753

0 commit comments

Comments
 (0)