diff --git a/src/BluetoothLEDCallback.cpp b/src/BluetoothLEDCallback.cpp index 025f484..0d7e983 100644 --- a/src/BluetoothLEDCallback.cpp +++ b/src/BluetoothLEDCallback.cpp @@ -1,3 +1,6 @@ +#ifndef BluetoothLEDCallback_cpp +#define BluetoothLEDCallback_cpp + #include "BluetoothLightControl.cpp" #include @@ -18,3 +21,5 @@ class BluetoothLEDCallback : public BLECharacteristicCallbacks { _lightControl = lightControl; } }; + +#endif diff --git a/src/BluetoothLightControl.cpp b/src/BluetoothLightControl.cpp index 53c8e7a..d8d4f21 100644 --- a/src/BluetoothLightControl.cpp +++ b/src/BluetoothLightControl.cpp @@ -1,4 +1,6 @@ -#include "LED.cpp" +#ifndef BluetoothLightControl_cpp +#define BluetoothLightControl_cpp + #include "LedManager.cpp" #include @@ -29,3 +31,5 @@ class BluetoothLightControl{ } } }; + +#endif diff --git a/src/BluetoothService.cpp b/src/BluetoothService.cpp index fa452ac..3222cb1 100644 --- a/src/BluetoothService.cpp +++ b/src/BluetoothService.cpp @@ -1,3 +1,6 @@ +#ifndef BluetoothService_cpp +#define BluetoothService_cpp + #include #include #include @@ -46,3 +49,5 @@ public: BLEDevice::startAdvertising(); } }; + +#endif diff --git a/src/LedManager.cpp b/src/LedManager.cpp index 9a6b863..80e0da3 100644 --- a/src/LedManager.cpp +++ b/src/LedManager.cpp @@ -1,3 +1,6 @@ +#ifndef LedManager_cpp +#define LedManager_cpp + #include "LED.cpp" #include "TimerManager.cpp" #include @@ -33,4 +36,6 @@ public: if (timer > 0) _timers->reset(id, timer); } -}; \ No newline at end of file +}; + +#endif diff --git a/src/Timer.cpp b/src/Timer.cpp index 7a8933c..0bbcbf3 100644 --- a/src/Timer.cpp +++ b/src/Timer.cpp @@ -1,3 +1,6 @@ +#ifndef Timer_cpp +#define Timer_cpp + #include #include @@ -31,3 +34,5 @@ public: } } }; + +#endif diff --git a/src/TimerManager.cpp b/src/TimerManager.cpp index 3bc2a5e..49dee96 100644 --- a/src/TimerManager.cpp +++ b/src/TimerManager.cpp @@ -1,3 +1,6 @@ +#ifndef TimerManager_cpp +#define TimerManager_cpp + #include #include #include "Timer.cpp" @@ -25,3 +28,5 @@ class TimerManager{ } } }; + +#endif diff --git a/src/main.cpp b/src/main.cpp index 8ba03db..c9d18a8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,6 +1,9 @@ #include "LED.cpp" #include "BluetoothLEDCallback.cpp" +#include "BluetoothLightControl.cpp" #include "BluetoothService.cpp" +#include "LedManager.cpp" +#include "TimerManager.cpp" #include #define FADE_IN_DURATION 500