Skip to content

Commit

Permalink
added serial check and fixed leds macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Unreal-Dan committed Dec 6, 2024
1 parent dbea0d4 commit e69481c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
7 changes: 1 addition & 6 deletions VortexEngine/src/Leds/Leds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@
#ifdef VORTEX_EMBEDDED
#pragma GCC diagnostic ignored "-Wclass-memaccess"
#include <FastLED.h>
#define LED_PIN 0
#if SPARK_HANDLE == 1
#define MOSFET_PIN 48
#else
#define MOSFET_PIN 18
#endif
#define LED_PIN 0
#endif

// global brightness
Expand Down
15 changes: 11 additions & 4 deletions VortexEngine/src/VortexEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ bool VortexEngine::m_autoCycle = false;
bool VortexEngine::init()
{
// all of the global controllers
if (!SerialComs::init()) {
DEBUG_LOG("Serial failed to initialize");
return false;
}
if (!Time::init()) {
DEBUG_LOG("Time failed to initialize");
return false;
}
if (!SerialComs::init()) {
DEBUG_LOG("Serial failed to initialize");
return false;
}
if (!Storage::init()) {
DEBUG_LOG("Storage failed to initialize");
return false;
Expand Down Expand Up @@ -178,6 +178,13 @@ void VortexEngine::runMainLogic()
return;
}

// check for serial first before anything runs, but as a result if we open
// editor we have to call modes load inside here
if (SerialComs::checkSerial()) {
// directly open the editor connection menu because we are connected to USB serial
Menus::openMenu(MENU_EDITOR_CONNECTION);
}

// if the menus are open and running then just return
if (Menus::run()) {
return;
Expand Down

0 comments on commit e69481c

Please sign in to comment.