Skip to content

Commit

Permalink
Rename StarMod Leds to StarLeds
Browse files Browse the repository at this point in the history
  • Loading branch information
ewoudwijma committed Apr 27, 2024
1 parent 2b3136b commit 0e129a2
Show file tree
Hide file tree
Showing 15 changed files with 95 additions and 94 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# StarModLeds
# StarLeds

See [StarDocs](https://ewowi.github.io/StarDocs/)

Expand All @@ -10,7 +10,7 @@ See [StarDocs](https://ewowi.github.io/StarDocs/)
<img width="307" alt="image" src="https://github.com/ewowi/StarDocs/assets/138451817/5d4f0051-0e38-4d16-b81a-31fc8d2f7e1e">
<img width="344" alt="image" src="https://github.com/ewowi/StarDocs/assets/138451817/dff1090a-7af0-4cbb-83e1-7108021976e8">

Build using StarMod:
Build using StarBase:

* [ewowi/StarBase](https://github.com/ewowi/StarBase)

4 changes: 2 additions & 2 deletions data/index.htm
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<link rel="stylesheet" href="index.css">
<script src="app.js"></script>
<script src="index.js"></script>
<title>StarMod💫 LEDs 🎨 by MoonModules 🌔</title>
<title>Star💫LEDs🎨 by MoonModules🌔</title>

<!-- favicon in safari not working. see: -->
<!-- https://stackoverflow.com/questions/68885882/favicon-not-displaying-on-safari -->
Expand All @@ -45,7 +45,7 @@
<body onload="onLoad()">
<div class="module">
<hgroup>
<h1 style="float: left;">StarMod💫 LEDs 🎨 by MoonModules 🌔</h1>
<h1 style="float: left;">Star💫LEDs🎨 by MoonModules🌔</h1>
<a href="https://ewowi.github.io/StarDocs" style="float: right;"></a>
</hgroup>
<br>
Expand Down
19 changes: 10 additions & 9 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ lib_deps =



[STARMOD_APPMOD_LEDS]
[STARLEDS_APPMOD_LEDS]
build_flags =
-D STARMOD_APPMOD_LEDS
-D STARMOD_USERMOD_ARTNET
-D STARMOD_USERMOD_DDP
-D STARLEDS_APPMOD_LEDS
-D STARLEDS_USERMOD_ARTNET
-D STARLEDS_USERMOD_DDP
lib_deps =
https://github.com/FastLED/FastLED.git@3.6.0

Expand All @@ -63,9 +63,9 @@ lib_deps =



[STARMOD_USERMOD_WLEDAUDIO]
[STARLEDS_USERMOD_WLEDAUDIO]
build_flags =
-D STARMOD_USERMOD_WLEDAUDIO
-D STARLEDS_USERMOD_WLEDAUDIO
lib_deps =
https://github.com/netmindz/WLED-sync#48cb28f11632b217f9ccd9f72149373919c28af5 ; sourceIP

Expand Down Expand Up @@ -95,18 +95,19 @@ build_flags =
${Speed_Flags.build_flags}
-DCONFIG_ASYNC_TCP_USE_WDT=0
-DLFS_THREADSAFE ;; enables use of semaphores in LittleFS driver
${STARMOD_APPMOD_LEDS.build_flags}
${STARLEDS_APPMOD_LEDS.build_flags}
${STARBASE_USERMOD_E131.build_flags}
; ${STARBASE_USERMOD_HA.build_flags}
${STARMOD_USERMOD_WLEDAUDIO.build_flags}
${STARLEDS_USERMOD_WLEDAUDIO.build_flags}
-DAPP=StarLeds
-DVERSION=24042614 ; Date and time (GMT!)
-DPIOENV=$PIOENV
lib_deps =
${StarBase.lib_deps}
${STARBASE_USERMOD_E131.lib_deps}
; ${STARBASE_USERMOD_HA.lib_deps}
${STARMOD_USERMOD_WLEDAUDIO.lib_deps}
${STARLEDS_APPMOD_LEDS.lib_deps}
${STARLEDS_USERMOD_WLEDAUDIO.lib_deps}
extra_scripts =
post:tools/post_build.py

Expand Down
28 changes: 14 additions & 14 deletions src/App/LedEffects.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/*
@title StarMod
@title StarLeds
@file LedEffects.h
@date 20240228
@repo https://github.com/ewowi/StarMod
@Authors https://github.com/ewowi/StarMod/commits/main
@Copyright © 2024 Github StarMod Commit Authors
@repo https://github.com/MoonModules/StarLeds
@Authors https://github.com/MoonModules/StarLeds/commits/main
@Copyright © 2024 Github StarLeds Commit Authors
@license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
@license For non GPL-v3 usage, commercial licenses must be purchased. Contact moonmodules@icloud.com
*/

#ifdef STARMOD_USERMOD_WLEDAUDIO
#ifdef STARLEDS_USERMOD_WLEDAUDIO
#include "../User/UserModWLEDAudio.h"
#endif
#ifdef STARMOD_USERMOD_E131
#ifdef STARBASE_USERMOD_E131
#include "../User/UserModE131.h"
#endif

Expand Down Expand Up @@ -1243,7 +1243,7 @@ class ScrollingText: public Effect {
}

void controls(JsonObject parentVar) {
ui->initText(parentVar, "text", "StarMod");
ui->initText(parentVar, "text", "StarLeds");
ui->initSlider(parentVar, "speed", 128);
ui->initSelect(parentVar, "font", 0, false, [](JsonObject var, unsigned8 rowNr, unsigned8 funType) { switch (funType) { //varFun
case f_UIFun: {
Expand All @@ -1261,7 +1261,7 @@ class ScrollingText: public Effect {
};


#ifdef STARMOD_USERMOD_WLEDAUDIO
#ifdef STARLEDS_USERMOD_WLEDAUDIO

class Waverly: public Effect {
const char * name() {return "Waverly";}
Expand Down Expand Up @@ -1410,7 +1410,7 @@ class GEQEffect: public Effect {

// Nice an effect can register it's own DMX channel, but not a fan of repeating the range and type of the param

// #ifdef STARMOD_USERMOD_E131
// #ifdef STARBASE_USERMOD_E131

// if (e131mod->isEnabled) {
// e131mod->patchChannel(3, "fadeOut", 255); // TODO: add constant for name
Expand Down Expand Up @@ -1565,7 +1565,7 @@ class Effects {
effects.push_back(new ConfettiEffect);
effects.push_back(new BPMEffect);
effects.push_back(new JuggleEffect);
//1D StarMod
//1D StarLeds
effects.push_back(new RunningEffect);
effects.push_back(new RingRandomFlow);
// 1D WLED
Expand All @@ -1574,7 +1574,7 @@ class Effects {
effects.push_back(new DripEffect);
effects.push_back(new HeartBeatEffect);

#ifdef STARMOD_USERMOD_WLEDAUDIO
#ifdef STARLEDS_USERMOD_WLEDAUDIO
//1D Volume
effects.push_back(new FreqMatrix);
effects.push_back(new PopCorn);
Expand All @@ -1584,7 +1584,7 @@ class Effects {
effects.push_back(new DJLight);
#endif

//2D StarMod
//2D StarLeds
effects.push_back(new Lines);
//2D WLED
effects.push_back(new BlackHole);
Expand All @@ -1594,7 +1594,7 @@ class Effects {
effects.push_back(new Lissajous);
effects.push_back(new Frizzles);
effects.push_back(new ScrollingText);
#ifdef STARMOD_USERMOD_WLEDAUDIO
#ifdef STARLEDS_USERMOD_WLEDAUDIO
//2D WLED
effects.push_back(new Waverly);
effects.push_back(new GEQEffect);
Expand Down Expand Up @@ -1626,7 +1626,7 @@ class Effects {
// ppf("Size of %s is %d\n", "Lissajous", sizeof(Lissajous));
// ppf("Size of %s is %d\n", "BouncingBalls", sizeof(BouncingBalls));
// ppf("Size of %s is %d\n", "RingRandomFlow", sizeof(RingRandomFlow));
// #ifdef STARMOD_USERMOD_WLEDAUDIO
// #ifdef STARLEDS_USERMOD_WLEDAUDIO
// ppf("Size of %s is %d\n", "GEQEffect", sizeof(GEQEffect));
// ppf("Size of %s is %d\n", "AudioRings", sizeof(AudioRings));
// #endif
Expand Down
28 changes: 14 additions & 14 deletions src/App/LedFixture.cpp
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/*
@title StarMod
@title StarLeds
@file LedFixture.cpp
@date 20240228
@repo https://github.com/ewowi/StarMod
@Authors https://github.com/ewowi/StarMod/commits/main
@Copyright © 2024 Github StarMod Commit Authors
@repo https://github.com/MoonModules/StarLeds
@Authors https://github.com/MoonModules/StarLeds/commits/main
@Copyright © 2024 Github StarLeds Commit Authors
@license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
@license For non GPL-v3 usage, commercial licenses must be purchased. Contact moonmodules@icloud.com
*/

#include "LedFixture.h"

#include "../Sys/SysModFiles.h"
#include "../Sys/SysStarModJson.h"
#include "../Sys/SysStarJson.h"
#include "../Sys/SysModPins.h"


Expand All @@ -21,7 +21,7 @@ void Fixture::projectAndMap() {
char fileName[32] = "";

if (files->seqNrToName(fileName, fixtureNr)) { // get the fixture.json
StarModJson starModJson(fileName); //open fileName for deserialize
StarJson starJson(fileName); //open fileName for deserialize

// reset leds
stackUnsigned8 rowNr = 0;
Expand Down Expand Up @@ -59,14 +59,14 @@ void Fixture::projectAndMap() {
unsigned16 currPin; //lookFor needs u16

//what to deserialize
starModJson.lookFor("width", (unsigned16 *)&fixSize.x);
starModJson.lookFor("height", (unsigned16 *)&fixSize.y);
starModJson.lookFor("depth", (unsigned16 *)&fixSize.z);
starModJson.lookFor("nrOfLeds", &nrOfLeds);
starModJson.lookFor("pin", &currPin);
starJson.lookFor("width", (unsigned16 *)&fixSize.x);
starJson.lookFor("height", (unsigned16 *)&fixSize.y);
starJson.lookFor("depth", (unsigned16 *)&fixSize.z);
starJson.lookFor("nrOfLeds", &nrOfLeds);
starJson.lookFor("pin", &currPin);

//lookFor leds array and for each item in array call lambdo to make a projection
starModJson.lookFor("leds", [this, &prevIndexP, &indexP, &currPin](std::vector<unsigned16> uint16CollectList) { //this will be called for each tuple of coordinates!
starJson.lookFor("leds", [this, &prevIndexP, &indexP, &currPin](std::vector<unsigned16> uint16CollectList) { //this will be called for each tuple of coordinates!

if (uint16CollectList.size()>=1) { // process one pixel

Expand Down Expand Up @@ -372,9 +372,9 @@ void Fixture::projectAndMap() {
prevIndexP = indexP;
}
}
}); //starModJson.lookFor("leds" (create the right type, otherwise crash)
}); //starJson.lookFor("leds" (create the right type, otherwise crash)

if (starModJson.deserialize(false)) { //this will call above function parameter for each led
if (starJson.deserialize(false)) { //this will call above function parameter for each led

//after processing each led
stackUnsigned8 rowNr = 0;
Expand Down
8 changes: 4 additions & 4 deletions src/App/LedFixture.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
@title StarMod
@title StarLeds
@file LedFixture.h
@date 20240228
@repo https://github.com/ewowi/StarMod
@Authors https://github.com/ewowi/StarMod/commits/main
@Copyright © 2024 Github StarMod Commit Authors
@repo https://github.com/MoonModules/StarLeds
@Authors https://github.com/MoonModules/StarLeds/commits/main
@Copyright © 2024 Github StarLeds Commit Authors
@license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
@license For non GPL-v3 usage, commercial licenses must be purchased. Contact moonmodules@icloud.com
*/
Expand Down
8 changes: 4 additions & 4 deletions src/App/LedLeds.cpp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
@title StarMod
@title StarLeds
@file LedLeds.cpp
@date 20240226
@repo https://github.com/ewowi/StarMod
@Authors https://github.com/ewowi/StarMod/commits/main
@Copyright © 2024 Github StarMod Commit Authors
@repo https://github.com/MoonModules/StarLeds
@Authors https://github.com/MoonModules/StarLeds/commits/main
@Copyright © 2024 Github StarLeds Commit Authors
@license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
@license For non GPL-v3 usage, commercial licenses must be purchased. Contact moonmodules@icloud.com
*/
Expand Down
10 changes: 5 additions & 5 deletions src/App/LedLeds.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
@title StarMod
@title StarLeds
@file LedLeds.h
@date 20240227
@repo https://github.com/ewowi/StarMod
@Authors https://github.com/ewowi/StarMod/commits/main
@Copyright © 2024 Github StarMod Commit Authors
@repo https://github.com/MoonModules/StarLeds
@Authors https://github.com/MoonModules/StarLeds/commits/main
@Copyright © 2024 Github StarLeds Commit Authors
@license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
@license For non GPL-v3 usage, commercial licenses must be purchased. Contact moonmodules@icloud.com
*/
Expand Down Expand Up @@ -115,7 +115,7 @@ class Fixture; //forward



//StarMod implementation of segment.data
//StarLeds implementation of segment.data
class SharedData {

private:
Expand Down
12 changes: 6 additions & 6 deletions src/App/LedModEffects.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
@title StarMod
@title StarLeds
@file LedModEffects.h
@date 20240228
@repo https://github.com/ewowi/StarMod
@Authors https://github.com/ewowi/StarMod/commits/main
@Copyright © 2024 Github StarMod Commit Authors
@repo https://github.com/MoonModules/StarLeds
@Authors https://github.com/MoonModules/StarLeds/commits/main
@Copyright © 2024 Github StarLeds Commit Authors
@license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
@license For non GPL-v3 usage, commercial licenses must be purchased. Contact moonmodules@icloud.com
*/
Expand Down Expand Up @@ -315,7 +315,7 @@ class LedModEffects:public SysModule {
default: return false;
}});

#ifdef STARMOD_USERMOD_E131
#ifdef STARBASE_USERMOD_E131
// if (e131mod->isEnabled) {
e131mod->patchChannel(0, "bri", 255); //should be 256??
e131mod->patchChannel(1, "fx", effects.effects.size());
Expand Down Expand Up @@ -362,7 +362,7 @@ class LedModEffects:public SysModule {
}
}

#ifdef STARMOD_USERMOD_WLEDAUDIO
#ifdef STARLEDS_USERMOD_WLEDAUDIO

if (mdl->getValue("viewRot") == 2) {
fixture.head.x = wledAudioMod->fftResults[3];
Expand Down
10 changes: 5 additions & 5 deletions src/App/LedModFixture.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
@title StarMod
@title StarLeds
@file LedModFixture.h
@date 20240228
@repo https://github.com/ewowi/StarMod
@Authors https://github.com/ewowi/StarMod/commits/main
@Copyright © 2024 Github StarMod Commit Authors
@repo https://github.com/MoonModules/StarLeds
@Authors https://github.com/MoonModules/StarLeds/commits/main
@Copyright © 2024 Github StarLeds Commit Authors
@license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
@license For non GPL-v3 usage, commercial licenses must be purchased. Contact moonmodules@icloud.com
*/
Expand Down Expand Up @@ -113,7 +113,7 @@ class LedModFixture:public SysModule {
options.add("Pan");
options.add("Tilt");
options.add("Roll");
#ifdef STARMOD_USERMOD_WLEDAUDIO
#ifdef STARLEDS_USERMOD_WLEDAUDIO
options.add("Moving heads GEQ");
#endif
return true; }
Expand Down
8 changes: 4 additions & 4 deletions src/App/LedModFixtureGen.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
@title StarMod
@title StarLeds
@file LedModFixtureGen.h
@date 20240228
@repo https://github.com/ewowi/StarMod
@Authors https://github.com/ewowi/StarMod/commits/main
@Copyright © 2024 Github StarMod Commit Authors
@repo https://github.com/MoonModules/StarLeds
@Authors https://github.com/MoonModules/StarLeds/commits/main
@Copyright © 2024 Github StarLeds Commit Authors
@license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
@license For non GPL-v3 usage, commercial licenses must be purchased. Contact moonmodules@icloud.com
*/
Expand Down
8 changes: 4 additions & 4 deletions src/User/UserModArtNet.h
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
/*
@title StarMod
@title StarLeds
@file UserModArtNet.h
@date 20240114
@repo https://github.com/ewowi/StarMod
@Authors https://github.com/ewowi/StarMod/commits/main
@Copyright © 2024 Github StarMod Commit Authors
@repo https://github.com/MoonModules/StarLeds
@Authors https://github.com/MoonModules/StarLeds/commits/main
@Copyright © 2024 Github StarLeds Commit Authors
@license GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
@license For non GPL-v3 usage, commercial licenses must be purchased. Contact moonmodules@icloud.com
*/
Expand Down
Loading

0 comments on commit 0e129a2

Please sign in to comment.