Skip to content

Commit 049a335

Browse files
committed
Inherting from ESPressio Base
1 parent 5aa3db9 commit 049a335

File tree

4 files changed

+17
-6
lines changed

4 files changed

+17
-6
lines changed

component.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ COMPONENT_ADD_INCLUDEDIRS := include
22
COMPONENT_SRCDIRS := src
33
CXXFLAGS += -fno-rtti
44
CXXFLAGS += -DESPRESSIO_THREADS
5-
CXXFLAGS += -DESPRESSO_THREADS_VERSION_MAJOR=0
6-
CXXFLAGS += -DESPRESSO_THREADS_VERSION_MINOR=0
7-
CXXFLAGS += -DESPRESSO_THREADS_VERSION_PATCH=1
8-
CXXFLAGS += -DESPRESSO_THREADS_VERSION_STRING=\"0.0.1\"
5+
CXXFLAGS += -DESPRESSIO_THREADS_VERSION_MAJOR=0
6+
CXXFLAGS += -DESPRESSIO_THREADS_VERSION_MINOR=0
7+
CXXFLAGS += -DESPRESSIO_THREADS_VERSION_PATCH=1
8+
CXXFLAGS += -DESPRESSIO_THREADS_VERSION_STRING=\"0.0.1\"

library.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,11 @@
1414
"license": "Apache-2.0",
1515
"frameworks": "arduino",
1616
"platforms": "espressif32,espressif8266",
17-
"dependencies": []
17+
"dependencies": [
18+
{
19+
"name": "Flowduino ESPressio-Base",
20+
"version": "0.0.1",
21+
"url": "https://github.com/Flowduino/ESPressio-Base.git"
22+
}
23+
]
1824
}

src/ESPressio_IThread.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,12 @@
55
#include <cstdint>
66
#include <functional>
77

8+
#include <ESPressio_Object.hpp>
9+
810
namespace ESPressio {
911

12+
using namespace Base;
13+
1014
namespace Threads {
1115

1216
enum ThreadState {
@@ -23,7 +27,7 @@ namespace ESPressio {
2327
`IThread` is a common Interface for all Thread Types provided by this library.
2428
You can use it to reference any Thread Type without knowing the actual type.
2529
*/
26-
class IThread {
30+
class IThread : public Object {
2731
public:
2832
// Methods
2933

src/ESPressio_Thread.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ namespace ESPressio {
2626

2727
/// `TOnThreadEvent` is a function type that can be used to handle Thread events.
2828
using TOnThreadEvent = std::function<void(IThread*)>;
29+
/// `TOnThreadStateChangeEvent` is a function type that can be used to handle Thread state change events.
2930
using TOnThreadStateChangeEvent = std::function<void(IThread*, ThreadState, ThreadState)>;
3031

3132
// Members

0 commit comments

Comments
 (0)