Skip to content

Commit

Permalink
Merge branch 'master' into orbit
Browse files Browse the repository at this point in the history
  • Loading branch information
Unreal-Dan committed Jan 1, 2024
2 parents 100578a + 92cb60f commit 9fc75b2
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 12 deletions.
23 changes: 23 additions & 0 deletions VortexEngine/src/VortexEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include "Wireless/IRReceiver.h"
#include "Wireless/IRSender.h"
#include "Wireless/VLSender.h"
#include "Wireless/IRConfig.h"
#include "Wireless/VLConfig.h"
#include "Storage/Storage.h"
#include "Buttons/Buttons.h"
#include "Time/TimeControl.h"
Expand Down Expand Up @@ -39,18 +41,30 @@ bool VortexEngine::init()
DEBUG_LOG("Storage failed to initialize");
return false;
}
#if IR_ENABLE_RECEIVER == 1
if (!IRReceiver::init()) {
DEBUG_LOG("IRReceiver failed to initialize");
return false;
}
#endif
#if IR_ENABLE_SENDER == 1
if (!IRSender::init()) {
DEBUG_LOG("IRSender failed to initialize");
return false;
}
#endif
#if VL_ENABLE_RECEIVER == 1
if (!VLReceiver::init()) {
DEBUG_LOG("VLReceiver failed to initialize");
return false;
}
#endif
#if VL_ENABLE_SENDER == 1
if (!VLSender::init()) {
DEBUG_LOG("VLSender failed to initialize");
return false;
}
#endif
if (!Leds::init()) {
DEBUG_LOG("Leds failed to initialize");
return false;
Expand Down Expand Up @@ -93,9 +107,18 @@ void VortexEngine::cleanup()
Menus::cleanup();
Buttons::cleanup();
Leds::cleanup();
#if VL_ENABLE_SENDER == 1
VLSender::cleanup();
#endif
#if VL_ENABLE_RECEIVER == 1
VLReceiver::cleanup();
#endif
#if IR_ENABLE_SENDER == 1
IRSender::cleanup();
#endif
#if IR_ENABLE_RECEIVER == 1
IRReceiver::cleanup();
#endif
Storage::cleanup();
Time::cleanup();
SerialComs::cleanup();
Expand Down
7 changes: 3 additions & 4 deletions VortexEngine/src/Wireless/IRReceiver.cpp
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
#include "IRReceiver.h"
#include "IRConfig.h"

#if IR_ENABLE_RECEIVER == 1

#include "../Serial/ByteStream.h"
#include "../Serial/BitStream.h"
#include "../Time/TimeControl.h"
#include "../Modes/Mode.h"
#include "../Log/Log.h"

#include "IRConfig.h"

#ifdef VORTEX_EMBEDDED
#include <Arduino.h>
#endif

#if IR_ENABLE_RECEIVER == 1

BitStream IRReceiver::m_irData;
IRReceiver::RecvState IRReceiver::m_recvState = WAITING_HEADER_MARK;
uint32_t IRReceiver::m_prevTime = 0;
Expand Down
7 changes: 3 additions & 4 deletions VortexEngine/src/Wireless/IRSender.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#include "IRSender.h"
#include "IRConfig.h"

#if IR_ENABLE_SENDER == 1

#include "../Time/TimeControl.h"
#include "../Modes/Mode.h"
#include "../Log/Log.h"

#include "IRConfig.h"

#ifdef VORTEX_LIB
#include "VortexLib.h"
#endif
Expand All @@ -14,8 +15,6 @@
#include <Arduino.h>
#endif

#if IR_ENABLE_SENDER == 1

// the serial buffer for the data
ByteStream IRSender::m_serialBuf;
// a bit walker for the serial data
Expand Down
5 changes: 3 additions & 2 deletions VortexEngine/src/Wireless/VLReceiver.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#include "VLReceiver.h"
#include "IRConfig.h"

#if VL_ENABLE_RECEIVER == 1

#include "../Serial/ByteStream.h"
#include "../Serial/BitStream.h"
Expand All @@ -12,8 +15,6 @@
#include <avr/io.h>
#endif

#if VL_ENABLE_RECEIVER == 1

BitStream VLReceiver::m_vlData;
VLReceiver::RecvState VLReceiver::m_recvState = WAITING_HEADER_MARK;
uint32_t VLReceiver::m_prevTime = 0;
Expand Down
5 changes: 3 additions & 2 deletions VortexEngine/src/Wireless/VLSender.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#include "VLSender.h"
#include "IRConfig.h"

#if VL_ENABLE_SENDER == 1

#include "../Time/TimeControl.h"
#include "../Modes/Mode.h"
Expand All @@ -9,8 +12,6 @@
#include "VortexLib.h"
#endif

#if VL_ENABLE_SENDER == 1

// the serial buffer for the data
ByteStream VLSender::m_serialBuf;
// a bit walker for the serial data
Expand Down

0 comments on commit 9fc75b2

Please sign in to comment.