Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
0388086
New LED pin config, breaks older prototypes
LivingSynthesis Sep 12, 2024
6f57dcc
Merge branch 'spark' of https://github.com/Unreal-Dan/VortexEngine in…
LivingSynthesis Oct 2, 2024
053164d
Latest Pin and Button assignment
LivingSynthesis Oct 7, 2024
02f08be
LED select for spark, Pattern select for core
LivingSynthesis Nov 22, 2024
64bc716
Pattern Fixes for spark, some are core
LivingSynthesis Nov 23, 2024
2a69175
Merge branch 'spark' into shane/spark/spark_menu_updates
Unreal-Dan Nov 26, 2024
4dbe129
Merge branch 'spark' into shane/spark/spark_menu_updates
Unreal-Dan Nov 27, 2024
3f6d50c
Merge branch 'spark' into shane/spark/spark_menu_updates
Unreal-Dan Nov 27, 2024
7ec7e89
restore this file
Unreal-Dan Nov 27, 2024
47a9d4a
some fixes
Unreal-Dan Nov 27, 2024
4c0c6f2
all the chromadeck files ported over
Unreal-Dan Dec 5, 2024
4d8deeb
fixes for spark
Unreal-Dan Dec 5, 2024
4d0ed00
recorded tests
Unreal-Dan Dec 6, 2024
df536ef
Merge branch 'shane/spark/spark_menu_updates' into daniel/spark/wirel…
LivingSynthesis Dec 6, 2024
a34108c
added serial changes
Unreal-Dan Dec 6, 2024
be97a4d
Merge remote-tracking branch 'origin/shane/spark/spark_menu_updates' …
LivingSynthesis Dec 6, 2024
3952f33
fixes
Unreal-Dan Dec 6, 2024
dbea0d4
Fixes for editor connection and serial
Unreal-Dan Dec 6, 2024
e69481c
added serial check and fixed leds macro
Unreal-Dan Dec 6, 2024
e5c7624
fixed build for spark
Unreal-Dan Dec 10, 2024
f619d8f
Fixed serial com issue
LivingSynthesis Dec 10, 2024
3fcf98e
Merge branch 'daniel/spark/wireless-port-from-chromadeck' of https://…
LivingSynthesis Dec 10, 2024
158ac75
recorded tests
Unreal-Dan Dec 10, 2024
4b8fcff
Merge branch 'daniel/spark/wireless-port-from-chromadeck' of https://…
Unreal-Dan Dec 10, 2024
0a28e2c
fixed ino file
Unreal-Dan Dec 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 15 additions & 15 deletions .github/workflows/spark_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,18 @@ jobs:
export VORTEX_BUILD_NUMBER=${{ needs.setup.outputs.vortex_build_number }}
export VORTEX_VERSION_NUMBER=${{ needs.setup.outputs.vortex_version_number }}
make build
- name: Archive production artifacts
uses: actions/upload-artifact@v4
with:
name: embedded firmware
path: |
- name: Zip firmware files
run: |
zip SparkFirmware.zip \
build/VortexEngine.ino.bootloader.bin \
build/VortexEngine.ino.partitions.bin \
~/.arduino15/packages/esp32/hardware/esp32/3.0.4/tools/partitions/boot_app0.bin \
build/VortexEngine.ino.bin
build/VortexEngine.ino.elf
build/VortexEngine.ino.map
- name: Archive production artifacts for deployment
- name: Archive firmware zip
uses: actions/upload-artifact@v4
with:
name: firmware-artifact
path: build/VortexEngine.ino.bin
name: spark-firmware-zip
path: SparkFirmware.zip

wasm:
needs: [setup, test, embedded]
Expand Down Expand Up @@ -130,7 +129,8 @@ jobs:
working-directory: VortexEngine/VortexLib

docs:
needs: [setup, test, embedded, wasm]
#todo: fix the depends to be setup, test, embedded, wasm
needs: [setup, test]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/spark'
steps:
Expand Down Expand Up @@ -162,15 +162,15 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: firmware-artifact
name: spark-firmware-zip
path: build
- name: Rename and Deploy Firmware
run: |
DEVICE_TYPE="spark"
VERSIONED_FILENAME="VortexEngine-${DEVICE_TYPE}-${{ needs.setup.outputs.vortex_version_number }}.bin"
mv build/VortexEngine.ino.bin build/$VERSIONED_FILENAME
VERSIONED_FILENAME="VortexEngine-${DEVICE_TYPE}-${{ needs.setup.outputs.vortex_version_number }}.zip"
mv build/SparkFirmware.zip build/$VERSIONED_FILENAME
echo "Version is ${{ needs.setup.outputs.vortex_version_number }}"
echo "Filename is is $VERSIONED_FILENAME"
echo "Filename is $VERSIONED_FILENAME"
curl -X POST \
-F "file=@build/$VERSIONED_FILENAME" \
-F "device=$DEVICE_TYPE" \
Expand Down
1 change: 0 additions & 1 deletion VortexEngine/VortexEngine.ino
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <Arduino.h>

#include "src/VortexEngine.h"

void setup()
Expand Down
2 changes: 1 addition & 1 deletion VortexEngine/src/Buttons/Buttons.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#define BUTTON_PIN 47
#else
// orbit is on 7
#define BUTTON_PIN 7
#define BUTTON_PIN 5
#endif

// Since there is only one button I am just going to expose a global pointer to
Expand Down
5 changes: 5 additions & 0 deletions VortexEngine/src/Leds/LedTypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,11 @@ inline LedPos ledmapGetNextLed(LedMap map, LedPos pos)
#define MAP_PAIR_EVEN_EVENS (MAP_PAIR_EVEN(PAIR_3) | MAP_PAIR_EVEN(PAIR_1))
#define MAP_PAIR_EVEN_ODDS (MAP_PAIR_ODD(PAIR_3) | MAP_PAIR_ODD(PAIR_1))

// bitmaps specific to Sparks
#define MAP_OPPOSITES_1 (MAP_LED(LED_0) | MAP_LED(LED_3))
#define MAP_OPPOSITES_2 (MAP_LED(LED_1) | MAP_LED(LED_4))
#define MAP_OPPOSITES_3 (MAP_LED(LED_2) | MAP_LED(LED_5))

// set a single led
inline void ledmapSetLed(LedMap &map, LedPos pos)
{
Expand Down
35 changes: 18 additions & 17 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 All @@ -31,10 +26,8 @@ RGBColor Leds::m_ledColors[LED_COUNT] = { RGB_OFF };
bool Leds::init()
{
#ifdef VORTEX_EMBEDDED
FastLED.addLeds<WS2812B, LED_PIN, GRB>((CRGB *)m_ledColors, LED_COUNT);
FastLED.addLeds<WS2812B, LED_PIN, RGB>((CRGB *)m_ledColors, LED_COUNT);
FastLED.setMaxRefreshRate(0);
pinMode(MOSFET_PIN, OUTPUT);
digitalWrite(MOSFET_PIN, HIGH);
#endif
#ifdef VORTEX_LIB
Vortex::vcallbacks()->ledsInit(m_ledColors, LED_COUNT);
Expand Down Expand Up @@ -91,8 +84,10 @@ void Leds::setRangeEvens(Pair first, Pair last, RGBColor col)

void Leds::setAllEvens(RGBColor col)
{
for (Pair pos = PAIR_FIRST; pos <= PAIR_LAST; pos++) {
setIndex(pairEven(pos), col);
for (LedPos pos = LED_FIRST; pos <= LED_LAST; pos++) {
if (isEven(pos)) {
setIndex(pos, col);
}
}
}

Expand All @@ -105,8 +100,10 @@ void Leds::setRangeOdds(Pair first, Pair last, RGBColor col)

void Leds::setAllOdds(RGBColor col)
{
for (Pair pos = PAIR_FIRST; pos <= PAIR_LAST; pos++) {
setIndex(pairOdd(pos), col);
for (LedPos pos = LED_FIRST; pos <= LED_LAST; pos++) {
if (isOdd(pos)) {
setIndex(pos, col);
}
}
}

Expand All @@ -119,8 +116,10 @@ void Leds::clearRangeEvens(Pair first, Pair last)

void Leds::clearAllEvens()
{
for (Pair pos = PAIR_FIRST; pos <= PAIR_LAST; pos++) {
clearIndex(pairEven(pos));
for (LedPos pos = LED_FIRST; pos <= LED_LAST; pos++) {
if (isEven(pos)) {
clearIndex(pos);
}
}
}

Expand All @@ -133,8 +132,10 @@ void Leds::clearRangeOdds(Pair first, Pair last)

void Leds::clearAllOdds()
{
for (Pair pos = PAIR_FIRST; pos <= PAIR_LAST; pos++) {
clearIndex(pairOdd(pos));
for (LedPos pos = LED_FIRST; pos <= LED_LAST; pos++) {
if (isOdd(pos)) {
clearIndex(pos);
}
}
}

Expand Down
17 changes: 13 additions & 4 deletions VortexEngine/src/Menus/Menu.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,27 @@ void Menu::nextBulbSelection()
// do not allow multi led to select anything else
//break;
}
m_targetLeds = MAP_LED(LED_FIRST);
m_targetLeds = MAP_LED(LED_MULTI);
break;
case MAP_LED(LED_LAST):
case MAP_LED(LED_MULTI):
m_targetLeds = MAP_PAIR_EVENS;
break;
case MAP_PAIR_EVENS:
m_targetLeds = MAP_PAIR_ODDS;
break;
case MAP_PAIR_ODDS:
m_targetLeds = MAP_LED(LED_MULTI);
m_targetLeds = MAP_OPPOSITES_1;
break;
case MAP_LED(LED_MULTI):
case MAP_OPPOSITES_1:
m_targetLeds = MAP_OPPOSITES_2;
break;
case MAP_OPPOSITES_2:
m_targetLeds = MAP_OPPOSITES_3;
break;
case MAP_OPPOSITES_3:
m_targetLeds = MAP_LED(LED_FIRST);
break;
case MAP_LED(LED_LAST):
m_targetLeds = MAP_LED_ALL;
break;
default: // LED_FIRST through LED_LAST
Expand Down
Loading
Loading