Skip to content

Commit

Permalink
Add Live Fixtures for giant panels up to 16348 leds
Browse files Browse the repository at this point in the history
add STARLIGHT_MAXLEDS in pio.ini (default is 8196)

rover and s3 have max 16348 leds
  • Loading branch information
ewowi committed Oct 28, 2024
1 parent 0ec9d4e commit e2c6faf
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 19 deletions.
20 changes: 20 additions & 0 deletions misc/LiveScripts/F_panel128-128.sc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//F_panel128-64.sc

void main()
{
addPixelsPre(128,128,1,16384, 1, 3, 0);

for (int panely = 0; panely < 8; panely++) {
for (int panelx = 7; panelx >=0; panelx--) {
for (int x=0; x<16;x++) {
for (int y=0; y<16; y++) {
int y2; y2 = y; if (x%2 == 0) {y2=15-y;} //serpentine
int panelx2; panelx2 = panelx + 1; if (panelx2==8) {panelx2 = 0;} //ewowi panel correction
addPixel(panelx2*16+x,panely*16+y2,0);
}
}
}
}

addPixelsPost();
}
20 changes: 20 additions & 0 deletions misc/LiveScripts/F_panel128-96.sc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//F_panel128-64.sc

void main()
{
addPixelsPre(128,96,1,12288, 1, 3, 0);

for (int panely = 0; panely < 6; panely++) {
for (int panelx = 7; panelx >=0; panelx--) {
for (int x=0; x<16;x++) {
for (int y=0; y<16; y++) {
int y2; y2 = y; if (x%2 == 0) {y2=15-y;} //serpentine
int panelx2; panelx2 = panelx + 1; if (panelx2==8) {panelx2 = 0;} //ewowi panel correction
addPixel(panelx2*16+x,panely*16+y2,0);
}
}
}
}

addPixelsPost();
}
20 changes: 20 additions & 0 deletions misc/LiveScripts/F_panel80-48.sc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
//F_panel128-64.sc

void main()
{
addPixelsPre(80, 48, 1, 3840, 1, 3, 0);

for (int panely = 0; panely < 3; panely++) {
for (int panelx = 4; panelx >=0; panelx--) {
for (int x=0; x<16;x++) {
for (int y=0; y<16; y++) {
int y2; y2 = y; if (x%2 == 0) {y2=15-y;} //serpentine
//int panelx2; panelx2 = panelx + 1; if (panelx2==8) {panelx2 = 0;} //ewowi panel correction
addPixel(panelx*16+x,panely*16+y2,0);
}
}
}
}

addPixelsPost();
}
20 changes: 9 additions & 11 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -184,18 +184,15 @@ build_flags =
${env.build_flags}
-D CONFIG_IDF_TARGET_ESP32=1
-D ARDUINO_USB_CDC_ON_BOOT=0 ; Make sure that the right HardwareSerial driver is picked in arduino-esp32 (needed on "classic ESP32")
; ${STARLIGHT_CLOCKLESS_LED_DRIVER.build_flags} ; temporary here, until there is one driver for s3 and non s3
; ${STARLIGHT_CLOCKLESS_VIRTUAL_LED_DRIVER.build_flags} ; temporary here, until there is one driver for s3 and non s3
lib_deps =
${env.lib_deps}
; ${STARLIGHT_CLOCKLESS_LED_DRIVER.lib_deps} ; temporary here, until there is one driver for s3 and non s3
; ${STARLIGHT_CLOCKLESS_VIRTUAL_LED_DRIVER.lib_deps} ; temporary here, until there is one driver for s3 and non s3

[env:esp32_wrover]
board = upesy_wrover ; esp-wrover-kit ;https://github.com/platformio/platform-espressif32/blob/develop/boards/upesy_wrover.json

[env:esp32devICVLD]
board = esp32dev ;https://github.com/platformio/platform-espressif32/blob/develop/boards/esp32dev.json
; recommended to pin to a platform version, see https://github.com/platformio/platform-espressif32/releases
platform = [email protected] ;using platformio/framework-arduinoespressif32 @ ~3.20014.0 / framework-arduinoespressif32 @ 3.20014.231204 (2.0.14)
; upload_speed = 1500000
upload_speed = 1500000
build_flags =
${env.build_flags}
-D CONFIG_IDF_TARGET_ESP32=1
Expand All @@ -208,17 +205,17 @@ lib_deps =
${STARLIGHT_CLOCKLESS_VIRTUAL_LED_DRIVER.lib_deps} ; temporary here, until there is one driver for s3 and non s3



[env:esp32devICVLD]
board = esp32dev ;https://github.com/platformio/platform-espressif32/blob/develop/boards/esp32dev.json
[env:esp32_wrover]
board = upesy_wrover ; esp-wrover-kit ;https://github.com/platformio/platform-espressif32/blob/develop/boards/upesy_wrover.json
; recommended to pin to a platform version, see https://github.com/platformio/platform-espressif32/releases
platform = [email protected] ;using platformio/framework-arduinoespressif32 @ ~3.20014.0 / framework-arduinoespressif32 @ 3.20014.231204 (2.0.14)
upload_speed = 1500000
; upload_speed = 1500000
build_flags =
${env.build_flags}
-D CONFIG_IDF_TARGET_ESP32=1
-D ARDUINO_USB_CDC_ON_BOOT=0 ; Make sure that the right HardwareSerial driver is picked in arduino-esp32 (needed on "classic ESP32")
; ${STARLIGHT_CLOCKLESS_LED_DRIVER.build_flags} ; temporary here, until there is one driver for s3 and non s3
-D STARLIGHT_MAXLEDS=16384
${STARLIGHT_CLOCKLESS_VIRTUAL_LED_DRIVER.build_flags} ; temporary here, until there is one driver for s3 and non s3
lib_deps =
${env.lib_deps}
Expand Down Expand Up @@ -343,6 +340,7 @@ build_flags =
${env.build_flags}
-D CONFIG_IDF_TARGET_ESP32S3=1
-D STARBASE_LOLIN_WIFI_FIX ; shouldn't be necessary, but otherwise WiFi issues on my board
-D STARLIGHT_MAXLEDS=12288
lib_deps =
${env.lib_deps}

Expand Down
12 changes: 6 additions & 6 deletions src/App/LedLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,14 +83,14 @@ void PhysMap::addIndexP(LedsLayer &leds, uint16_t indexP) {
break;
case m_onePixel: {
uint16_t oldIndexP = this->indexP;
std::vector<uint16_t> newVector;
newVector.push_back(oldIndexP);
newVector.push_back(indexP);
// std::vector<uint16_t> newVector;
// newVector.push_back(oldIndexP);
// newVector.push_back(indexP);
leds.mappingTableIndexesSizeUsed++;
if (leds.mappingTableIndexes.size() < leds.mappingTableIndexesSizeUsed)
leds.mappingTableIndexes.push_back(newVector);
leds.mappingTableIndexes.push_back({oldIndexP, indexP});
else
leds.mappingTableIndexes[leds.mappingTableIndexesSizeUsed-1] = newVector;
leds.mappingTableIndexes[leds.mappingTableIndexesSizeUsed-1] = {oldIndexP, indexP};

indexes = leds.mappingTableIndexesSizeUsed - 1; //array position
mapType = m_morePixels;
Expand Down Expand Up @@ -266,7 +266,7 @@ void LedsLayer::fill_rainbow(uint8_t initialhue, uint8_t deltahue) {
for (std::vector<uint16_t> mappingTableIndex: mappingTableIndexes) {
mappingTableIndex.clear();
}
mappingTableIndexesSizeUsed = 0;
mappingTableIndexesSizeUsed = 0; //do not clear mappingTableIndexes, reuse it

for (size_t i = 0; i < mappingTable.size(); i++) {
mappingTable[i] = PhysMap();
Expand Down
6 changes: 5 additions & 1 deletion src/App/LedLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@

#include "../Sys/SysModModel.h" //for Coord3D

#define NUM_VLEDS_Max 8192
#ifndef STARLIGHT_MAXLEDS
#define STARLIGHT_MAXLEDS 8192
#endif

#define NUM_VLEDS_Max STARLIGHT_MAXLEDS

class LedsLayer; //forward

Expand Down
2 changes: 1 addition & 1 deletion src/App/LedModFixture.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
#endif
#endif

#define NUM_LEDS_Max 8192
#define NUM_LEDS_Max STARLIGHT_MAXLEDS

class LedModFixture: public SysModule {

Expand Down

0 comments on commit e2c6faf

Please sign in to comment.