Skip to content

Commit

Permalink
Daniel/chromadeck/updi start (#218)
Browse files Browse the repository at this point in the history
* tremendous progress on the esp32 platform

---------

Co-authored-by: Shane Aronson <[email protected]>
  • Loading branch information
Unreal-Dan and LivingSynthesis authored Sep 13, 2024
1 parent 252d78e commit 4c50930
Show file tree
Hide file tree
Showing 23 changed files with 1,245 additions and 119 deletions.
2 changes: 1 addition & 1 deletion Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.

OUTPUT_DIRECTORY = docs/core
OUTPUT_DIRECTORY = docs/chromadeck

# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
Expand Down
14 changes: 6 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: all install build upload clean

ARDUINO_CLI = ./bin/arduino-cli --verbose
BOARD = esp32:esp32:esp32s3
BOARD = esp32:esp32:XIAO_ESP32C3
PORT = COMx # Replace 'x' with the appropriate COM port number
PROJECT_NAME = VortexEngine/VortexEngine.ino
BUILD_PATH = build
Expand All @@ -27,7 +27,8 @@ DEFINES=\
-D VORTEX_VERSION_MAJOR=$(VORTEX_VERSION_MAJOR) \
-D VORTEX_VERSION_MINOR=$(VORTEX_VERSION_MINOR) \
-D VORTEX_BUILD_NUMBER=$(VORTEX_BUILD_NUMBER) \
-D VORTEX_VERSION_NUMBER=$(VORTEX_VERSION_NUMBER)
-D VORTEX_VERSION_NUMBER=$(VORTEX_VERSION_NUMBER) \
-MMD -c #due to a bug need the -MMD and -c otherwise esp won't build

# Default target
all: build
Expand All @@ -44,13 +45,10 @@ install:
curl -fsSL https://raw.githubusercontent.com/arduino/arduino-cli/master/install.sh | sudo sh ; \
fi
echo 'board_manager: \n additional_urls: \n - https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json' | sudo tee $(CONFIG_FILE)
$(ARDUINO_CLI) lib update-index
$(ARDUINO_CLI) core update-index --config-file $(CONFIG_FILE)
if ! $(ARDUINO_CLI) core list --config-file $(CONFIG_FILE) | grep -q '$(BOARD)' ; then \
$(ARDUINO_CLI) core install esp32:esp32 --config-file $(CONFIG_FILE) ; \
fi
if ! $(ARDUINO_CLI) lib list | grep -q 'FastLED' ; then \
$(ARDUINO_CLI) lib install "FastLED" ; \
fi
$(ARDUINO_CLI) core install esp32:esp32 --config-file $(CONFIG_FILE)
$(ARDUINO_CLI) lib install FastLED

build:
$(ARDUINO_CLI) compile --fqbn $(BOARD) $(PROJECT_NAME) \
Expand Down
2 changes: 2 additions & 0 deletions VortexEngine/VortexEngine.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
<ClCompile Include="src\Colors\Colorset.cpp" />
<ClCompile Include="src\Colors\ColorTypes.cpp" />
<ClCompile Include="src\Menus\MainMenu.cpp" />
<ClCompile Include="src\UPDI\updi.cpp" />
<ClCompile Include="src\Wireless\IRReceiver.cpp" />
<ClCompile Include="src\Wireless\IRSender.cpp" />
<ClCompile Include="src\Leds\Leds.cpp" />
Expand Down Expand Up @@ -220,6 +221,7 @@
<ClInclude Include="src\Colors\Colorset.h" />
<ClInclude Include="src\Colors\ColorTypes.h" />
<ClInclude Include="src\Menus\MainMenu.h" />
<ClInclude Include="src\UPDI\updi.h" />
<ClInclude Include="src\Wireless\IRConfig.h" />
<ClInclude Include="src\Wireless\IRReceiver.h" />
<ClInclude Include="src\Wireless\IRSender.h" />
Expand Down
12 changes: 12 additions & 0 deletions VortexEngine/VortexEngine.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@
<Filter Include="Source Files\Wireless">
<UniqueIdentifier>{53027bd8-836b-491d-9b40-25ea0061bce9}</UniqueIdentifier>
</Filter>
<Filter Include="Source Files\UPDI">
<UniqueIdentifier>{358f1fe9-69d8-4d92-8e1f-a7a448f525ba}</UniqueIdentifier>
</Filter>
<Filter Include="Header Files\UPDI">
<UniqueIdentifier>{37d407a1-9a53-43a6-894d-6df585846653}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\VortexEngine.cpp">
Expand Down Expand Up @@ -330,6 +336,9 @@
<ClCompile Include="src\Menus\MainMenu.cpp">
<Filter>Source Files\Menus</Filter>
</ClCompile>
<ClCompile Include="src\UPDI\updi.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\VortexConfig.h">
Expand Down Expand Up @@ -557,5 +566,8 @@
<ClInclude Include="src\Menus\MainMenu.h">
<Filter>Header Files\Menus</Filter>
</ClInclude>
<ClInclude Include="src\UPDI\updi.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion VortexEngine/src/Buttons/Buttons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Button Buttons::m_buttons[NUM_BUTTONS];

bool Buttons::init()
{
// initialize the button on pins 9/10/11
// initialize the button on pins 5/6/7
if (!m_buttons[0].init(5) ||
!m_buttons[1].init(6) ||
!m_buttons[2].init(7)) {
Expand Down
3 changes: 2 additions & 1 deletion VortexEngine/src/Leds/Leds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ void Leds::holdAll(RGBColor col)
void Leds::update()
{
#ifdef VORTEX_EMBEDDED
FastLED.show(m_brightness);
// TODO: fixme
FastLED.show(5);
#endif
#ifdef VORTEX_LIB
Vortex::vcallbacks()->ledsShow();
Expand Down
5 changes: 5 additions & 0 deletions VortexEngine/src/Menus/MainMenu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@ void MainMenu::open()
m_isOpen = true;
}

void MainMenu::close()
{
m_isOpen = false;
}

bool MainMenu::isOpen()
{
return m_isOpen;
Expand Down
3 changes: 2 additions & 1 deletion VortexEngine/src/Menus/MainMenu.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,13 @@ class MainMenu

// open the main menu
static void open();
static void close();
static bool isOpen();
private:
static void pressLeft();
static void pressRight();
static void select();

private:
static bool m_isOpen;
static uint8_t m_curSelection;
};
Expand Down
Loading

0 comments on commit 4c50930

Please sign in to comment.