Skip to content

Commit

Permalink
Merge branch 'mdev' into audio_fastpath
Browse files Browse the repository at this point in the history
  • Loading branch information
softhack007 committed Jul 8, 2023
2 parents 601499b + 72b7960 commit 5fe12ee
Show file tree
Hide file tree
Showing 12 changed files with 4,608 additions and 4,224 deletions.
22 changes: 12 additions & 10 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -912,12 +912,6 @@ build_flags_M =
-D USE_ALT_DISPLAY ; new versions of USERMOD_FOUR_LINE_DISPLAY and USERMOD_ROTARY_ENCODER_UI
-D USERMOD_FOUR_LINE_DISPLAY
-D USERMOD_ROTARY_ENCODER_UI
-D USERMOD_AUTO_SAVE
-D USERMOD_WEATHER ; WLEDMM usermod
-D USERMOD_MPU6050_IMU ; gyro/accelero for USERMOD_GAMES (ONLY WORKS IF USERMOD_FOUR_LINE_DISPLAY NOT INCLUDED - I2C SHARING BUG)
-D USERMOD_GAMES ; WLEDMM usermod
-D USERMOD_BATTERY ;; enable Battery usermod
-D USERMOD_BATTERY_USE_LIPO ;; use new "decharging curve" for LiPo cells
-D USERMOD_ANIMARTRIX ; WLEDMM usermod: CC BY-NC 3.0 licensed effects by Stefan Petrick
;WLEDMM: only setting WLED_DEBUG_HOST is enough, ip and port can be defined in sync settings as well
-D WLED_DEBUG_HOST='"192.168.x.x"' ;; to send debug messages over network to host 192.168.x.y - FQDN is also possible
Expand All @@ -927,17 +921,21 @@ lib_deps_M =
;https://github.com/blazoncek/OneWire.git ; includes bugfixes for inconsistent readings
OneWire@~2.3.5 ; used for USERMOD_FOUR_LINE_DISPLAY and USERMOD_DALLASTEMPERATURE
olikraus/U8g2 @ ^2.28.8 ; used for USERMOD_FOUR_LINE_DISPLAY
ElectronicCats/MPU6050 @ 0.6.0 ; used for USERMOD_MPU6050_IMU
https://github.com/netmindz/animartrix.git#d7c1896166f13fec2917c305222a77e3b504d060
https://github.com/netmindz/animartrix.git#f070fefc42febe2de3a2ab5d6d39e78bbc539702

lib_deps_V4_M =
;https://github.com/blazoncek/OneWire.git ; includes bugfixes for inconsistent readings
paulstoffregen/OneWire@ ^2.3.7 ; used for USERMOD_DALLASTEMPERATURE -> need newer release with bugfixes for -S3; still requires TEMPERATURE_PIN < 46
olikraus/U8g2@ ^2.34.5 ; used for USERMOD_FOUR_LINE_DISPLAY -> need newer version with bugfixes for arduino-esp32 v2.0.4 (Wire inititialization)
ElectronicCats/MPU6050 @ 0.6.0 ; used for USERMOD_MPU6050_IMU
https://github.com/netmindz/animartrix.git#d7c1896166f13fec2917c305222a77e3b504d060
https://github.com/netmindz/animartrix.git#f070fefc42febe2de3a2ab5d6d39e78bbc539702

build_flags_XL =
-D USERMOD_AUTO_SAVE
-D USERMOD_WEATHER ; WLEDMM usermod
-D USERMOD_MPU6050_IMU ; gyro/accelero for USERMOD_GAMES (ONLY WORKS IF USERMOD_FOUR_LINE_DISPLAY NOT INCLUDED - I2C SHARING BUG)
-D USERMOD_GAMES ; WLEDMM usermod
-D USERMOD_BATTERY ;; enable Battery usermod
-D USERMOD_BATTERY_USE_LIPO ;; use new "decharging curve" for LiPo cells
-D USERMOD_BH1750
-D USERMOD_ANIMATED_STAIRCASE
-D USERMOD_RTC ;; experimental
Expand All @@ -957,6 +955,7 @@ build_flags_XL =
-D USERMOD_ANIMARTRIX ; WLEDMM usermod: CC BY-NC 3.0 licensed effects by Stefan Petrick

lib_deps_XL =
ElectronicCats/MPU6050 @ 0.6.0 ; used for USERMOD_MPU6050_IMU
claws/BH1750 @^1.2.0 ; used for USERMOD_BH1750
; adafruit/Adafruit BMP280 Library @ 2.1.0 ;; experimental for usermod USERMOD_SENSORSTOMQTT
; adafruit/Adafruit CCS811 Library @ 1.0.4 ;; experimental for usermod USERMOD_SENSORSTOMQTT
Expand Down Expand Up @@ -1090,6 +1089,9 @@ build_unflags =
-D USERMOD_ANIMARTRIX ;; Tips our memory usage over the limit
; RAM: [== ] 24.4% (used 80060 bytes from 327680 bytes)
; Flash: [==========] 95.3% (used 1499037 bytes from 1572864 bytes)
; HELP !!!!! :
; RAM: [== ] 24.5% (used 80356 bytes from 327680 bytes)
; Flash: [==========] 99.9% (used 1571053 bytes from 1572864 bytes)

[env:esp32_16MB_M]
extends = esp32_4MB_M_base
Expand Down
116 changes: 64 additions & 52 deletions usermods/usermod_v2_animartrix/usermod_v2_animartrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,58 +7,58 @@
//========================================================================================================================


static const char _data_FX_mode_Module_Experiment10[] PROGMEM = "Z💡Module_Experiment10 ☾@;;1;2";
static const char _data_FX_mode_Module_Experiment9[] PROGMEM = "Z💡Module_Experiment9 ☾@;;1;2";
static const char _data_FX_mode_Module_Experiment8[] PROGMEM = "Z💡Module_Experiment8 ☾@;;1;2";
static const char _data_FX_mode_Module_Experiment7[] PROGMEM = "Z💡Module_Experiment7 ☾@;;1;2";
static const char _data_FX_mode_Module_Experiment6[] PROGMEM = "Z💡Module_Experiment6 ☾@;;1;2";
static const char _data_FX_mode_Module_Experiment5[] PROGMEM = "Z💡Module_Experiment5 ☾@;;1;2";
static const char _data_FX_mode_Module_Experiment4[] PROGMEM = "Z💡Module_Experiment4 ☾@;;1;2";
static const char _data_FX_mode_Zoom2[] PROGMEM = "Z💡Zoom2 ☾@;;1;2";
static const char _data_FX_mode_Module_Experiment3[] PROGMEM = "Z💡Module_Experiment3 ☾@;;1;2";
static const char _data_FX_mode_Module_Experiment2[] PROGMEM = "Z💡Module_Experiment2 ☾@;;1;2";
static const char _data_FX_mode_Module_Experiment1[] PROGMEM = "Z💡Module_Experiment1 ☾@;;1;2";
static const char _data_FX_mode_Parametric_Water[] PROGMEM = "Z💡Parametric_Water ☾@;;1;2";
static const char _data_FX_mode_Water[] PROGMEM = "Z💡Water ☾@;;1;2";
static const char _data_FX_mode_Complex_Kaleido_6[] PROGMEM = "Z💡Complex_Kaleido_6 ☾@;;1;2";
static const char _data_FX_mode_Complex_Kaleido_5[] PROGMEM = "Z💡Complex_Kaleido_5 ☾@;;1;2";
static const char _data_FX_mode_Complex_Kaleido_4[] PROGMEM = "Z💡Complex_Kaleido_4 ☾@;;1;2";
static const char _data_FX_mode_Complex_Kaleido_3[] PROGMEM = "Z💡Complex_Kaleido_3 ☾@;;1;2";
static const char _data_FX_mode_Complex_Kaleido_2[] PROGMEM = "Z💡Complex_Kaleido_2 ☾@;;1;2";
static const char _data_FX_mode_Complex_Kaleido[] PROGMEM = "Z💡Complex_Kaleido ☾@;;1;2";
static const char _data_FX_mode_SM10[] PROGMEM = "Z💡SM10 ☾@;;1;2";
static const char _data_FX_mode_SM9[] PROGMEM = "Z💡SM9 ☾@;;1;2";
static const char _data_FX_mode_SM8[] PROGMEM = "Z💡SM8 ☾@;;1;2";
static const char _data_FX_mode_SM7[] PROGMEM = "Z💡SM7 ☾@;;1;2";
static const char _data_FX_mode_SM6[] PROGMEM = "Z💡SM6 ☾@;;1;2";
static const char _data_FX_mode_SM5[] PROGMEM = "Z💡SM5 ☾@;;1;2";
static const char _data_FX_mode_SM4[] PROGMEM = "Z💡SM4 ☾@;;1;2";
static const char _data_FX_mode_SM3[] PROGMEM = "Z💡SM3 ☾@;;1;2";
static const char _data_FX_mode_SM2[] PROGMEM = "Z💡SM2 ☾@;;1;2";
static const char _data_FX_mode_SM1[] PROGMEM = "Z💡SM1 ☾@;;1;2";
static const char _data_FX_mode_Big_Caleido[] PROGMEM = "Z💡Big_Caleido ☾@;;1;2";
static const char _data_FX_mode_RGB_Blobs5[] PROGMEM = "Z💡RGB_Blobs5 ☾@;;1;2";
static const char _data_FX_mode_RGB_Blobs4[] PROGMEM = "Z💡RGB_Blobs4 ☾@;;1;2";
static const char _data_FX_mode_RGB_Blobs3[] PROGMEM = "Z💡RGB_Blobs3 ☾@;;1;2";
static const char _data_FX_mode_RGB_Blobs2[] PROGMEM = "Z💡RGB_Blobs2 ☾@;;1;2";
static const char _data_FX_mode_RGB_Blobs[] PROGMEM = "Z💡RGB_Blobs ☾@;;1;2";
static const char _data_FX_mode_Polar_Waves[] PROGMEM = "Z💡Polar_Waves ☾@;;1;2";
static const char _data_FX_mode_Slow_Fade[] PROGMEM = "Z💡Slow_Fade ☾@;;1;2";
static const char _data_FX_mode_Zoom[] PROGMEM = "Z💡Zoom ☾@;;1;2";
static const char _data_FX_mode_Hot_Blob[] PROGMEM = "Z💡Hot_Blob ☾@;;1;2";
static const char _data_FX_mode_Spiralus2[] PROGMEM = "Z💡Spiralus2 ☾@;;1;2";
static const char _data_FX_mode_Spiralus[] PROGMEM = "Z💡Spiralus ☾@;;1;2";
static const char _data_FX_mode_Yves[] PROGMEM = "Z💡Yves ☾@;;1;2";
static const char _data_FX_mode_Scaledemo1[] PROGMEM = "Z💡Scaledemo1 ☾@;;1;2";
static const char _data_FX_mode_Lava1[] PROGMEM = "Z💡Lava1 ☾@;;1;2";
static const char _data_FX_mode_Caleido3[] PROGMEM = "Z💡Caleido3 ☾@;;1;2";
static const char _data_FX_mode_Caleido2[] PROGMEM = "Z💡Caleido2 ☾@;;1;2";
static const char _data_FX_mode_Caleido1[] PROGMEM = "Z💡Caleido1 ☾@;;1;2";
static const char _data_FX_mode_Distance_Experiment[] PROGMEM = "Z💡Distance_Experiment ☾@;;1;2";
static const char _data_FX_mode_Center_Field[] PROGMEM = "Z💡Center_Field ☾@;;1;2";
static const char _data_FX_mode_Waves[] PROGMEM = "Z💡Waves ☾@;;1;2";
static const char _data_FX_mode_Chasing_Spirals[] PROGMEM = "Z💡Chasing_Spirals ☾@;;1;2";
static const char _data_FX_mode_Rotating_Blob[] PROGMEM = "Z💡Rotating_Blob ☾@;;1;2";
static const char _data_FX_mode_Module_Experiment10[] PROGMEM = "Y💡Module_Experiment10 ☾@Speed;;1;2";
static const char _data_FX_mode_Module_Experiment9[] PROGMEM = "Y💡Module_Experiment9 ☾@Speed;;1;2";
static const char _data_FX_mode_Module_Experiment8[] PROGMEM = "Y💡Module_Experiment8 ☾@Speed;;1;2";
static const char _data_FX_mode_Module_Experiment7[] PROGMEM = "Y💡Module_Experiment7 ☾@Speed;;1;2";
static const char _data_FX_mode_Module_Experiment6[] PROGMEM = "Y💡Module_Experiment6 ☾@Speed;;1;2";
static const char _data_FX_mode_Module_Experiment5[] PROGMEM = "Y💡Module_Experiment5 ☾@Speed;;1;2";
static const char _data_FX_mode_Module_Experiment4[] PROGMEM = "Y💡Module_Experiment4 ☾@Speed;;1;2";
static const char _data_FX_mode_Zoom2[] PROGMEM = "Y💡Zoom2 ☾@Speed;;1;2";
static const char _data_FX_mode_Module_Experiment3[] PROGMEM = "Y💡Module_Experiment3 ☾@Speed;;1;2";
static const char _data_FX_mode_Module_Experiment2[] PROGMEM = "Y💡Module_Experiment2 ☾@Speed;;1;2";
static const char _data_FX_mode_Module_Experiment1[] PROGMEM = "Y💡Module_Experiment1 ☾@Speed;;1;2";
static const char _data_FX_mode_Parametric_Water[] PROGMEM = "Y💡Parametric_Water ☾@Speed;;1;2";
static const char _data_FX_mode_Water[] PROGMEM = "Y💡Water ☾@Speed;;1;2";
static const char _data_FX_mode_Complex_Kaleido_6[] PROGMEM = "Y💡Complex_Kaleido_6 ☾@Speed;;1;2";
static const char _data_FX_mode_Complex_Kaleido_5[] PROGMEM = "Y💡Complex_Kaleido_5 ☾@Speed;;1;2";
static const char _data_FX_mode_Complex_Kaleido_4[] PROGMEM = "Y💡Complex_Kaleido_4 ☾@Speed;;1;2";
static const char _data_FX_mode_Complex_Kaleido_3[] PROGMEM = "Y💡Complex_Kaleido_3 ☾@Speed;;1;2";
static const char _data_FX_mode_Complex_Kaleido_2[] PROGMEM = "Y💡Complex_Kaleido_2 ☾@Speed;;1;2";
static const char _data_FX_mode_Complex_Kaleido[] PROGMEM = "Y💡Complex_Kaleido ☾@Speed;;1;2";
static const char _data_FX_mode_SM10[] PROGMEM = "Y💡SM10 ☾@Speed;;1;2";
static const char _data_FX_mode_SM9[] PROGMEM = "Y💡SM9 ☾@Speed;;1;2";
static const char _data_FX_mode_SM8[] PROGMEM = "Y💡SM8 ☾@Speed;;1;2";
static const char _data_FX_mode_SM7[] PROGMEM = "Y💡SM7 ☾@Speed;;1;2";
static const char _data_FX_mode_SM6[] PROGMEM = "Y💡SM6 ☾@Speed;;1;2";
static const char _data_FX_mode_SM5[] PROGMEM = "Y💡SM5 ☾@Speed;;1;2";
static const char _data_FX_mode_SM4[] PROGMEM = "Y💡SM4 ☾@Speed;;1;2";
static const char _data_FX_mode_SM3[] PROGMEM = "Y💡SM3 ☾@Speed;;1;2";
static const char _data_FX_mode_SM2[] PROGMEM = "Y💡SM2 ☾@Speed;;1;2";
static const char _data_FX_mode_SM1[] PROGMEM = "Y💡SM1 ☾@Speed;;1;2";
static const char _data_FX_mode_Big_Caleido[] PROGMEM = "Y💡Big_Caleido ☾@Speed;;1;2";
static const char _data_FX_mode_RGB_Blobs5[] PROGMEM = "Y💡RGB_Blobs5 ☾@Speed;;1;2";
static const char _data_FX_mode_RGB_Blobs4[] PROGMEM = "Y💡RGB_Blobs4 ☾@Speed;;1;2";
static const char _data_FX_mode_RGB_Blobs3[] PROGMEM = "Y💡RGB_Blobs3 ☾@Speed;;1;2";
static const char _data_FX_mode_RGB_Blobs2[] PROGMEM = "Y💡RGB_Blobs2 ☾@Speed;;1;2";
static const char _data_FX_mode_RGB_Blobs[] PROGMEM = "Y💡RGB_Blobs ☾@Speed;;1;2";
static const char _data_FX_mode_Polar_Waves[] PROGMEM = "Y💡Polar_Waves ☾@Speed;;1;2";
static const char _data_FX_mode_Slow_Fade[] PROGMEM = "Y💡Slow_Fade ☾@Speed;;1;2";
static const char _data_FX_mode_Zoom[] PROGMEM = "Y💡Zoom ☾@Speed;;1;2";
static const char _data_FX_mode_Hot_Blob[] PROGMEM = "Y💡Hot_Blob ☾@Speed;;1;2";
static const char _data_FX_mode_Spiralus2[] PROGMEM = "Y💡Spiralus2 ☾@Speed;;1;2";
static const char _data_FX_mode_Spiralus[] PROGMEM = "Y💡Spiralus ☾@Speed;;1;2";
static const char _data_FX_mode_Yves[] PROGMEM = "Y💡Yves ☾@Speed;;1;2";
static const char _data_FX_mode_Scaledemo1[] PROGMEM = "Y💡Scaledemo1 ☾@Speed;;1;2";
static const char _data_FX_mode_Lava1[] PROGMEM = "Y💡Lava1 ☾@Speed;;1;2";
static const char _data_FX_mode_Caleido3[] PROGMEM = "Y💡Caleido3 ☾@Speed;;1;2";
static const char _data_FX_mode_Caleido2[] PROGMEM = "Y💡Caleido2 ☾@Speed;;1;2";
static const char _data_FX_mode_Caleido1[] PROGMEM = "Y💡Caleido1 ☾@Speed;;1;2";
static const char _data_FX_mode_Distance_Experiment[] PROGMEM = "Y💡Distance_Experiment ☾@Speed;;1;2";
static const char _data_FX_mode_Center_Field[] PROGMEM = "Y💡Center_Field ☾@Speed;;1;2";
static const char _data_FX_mode_Waves[] PROGMEM = "Y💡Waves ☾@Speed;;1;2";
static const char _data_FX_mode_Chasing_Spirals[] PROGMEM = "Y💡Chasing_Spirals ☾@Speed;;1;2";
static const char _data_FX_mode_Rotating_Blob[] PROGMEM = "Y💡Rotating_Blob ☾@Speed;;1;2";


class ANIMartRIXMod:public ANIMartRIX {
Expand All @@ -67,6 +67,14 @@ class ANIMartRIXMod:public ANIMartRIX {
if (SEGENV.call == 0) {
init(SEGMENT.virtualWidth(), SEGMENT.virtualHeight(), false);
}
float speedFactor = 1.0;
if (SEGMENT.speed < 128) {
speedFactor = (float) map(SEGMENT.speed, 0, 127, 1, 10) / 10.0f;
}
else{
speedFactor = map(SEGMENT.speed, 128, 255, 10, 100) / 10;
}
setSpeedFactor(speedFactor);
}
void setPixelColor(int x, int y, rgb pixel) {
SEGMENT.setPixelColorXY(x, y, CRGB(pixel.red, pixel.green, pixel.blue));
Expand Down Expand Up @@ -231,6 +239,7 @@ uint16_t mode_Big_Caleido() {
return FRAMETIME;
}
uint16_t mode_RGB_Blobs5() {
anim.initEffect();
anim.RGB_Blobs5();
return FRAMETIME;
}
Expand Down Expand Up @@ -349,6 +358,8 @@ class AnimartrixUsermod : public Usermod {


void setup() {

if(!enabled) return;

strip.addEffect(255, &mode_Module_Experiment10, _data_FX_mode_Module_Experiment10);
strip.addEffect(255, &mode_Module_Experiment9, _data_FX_mode_Module_Experiment9);
Expand Down Expand Up @@ -418,6 +429,7 @@ class AnimartrixUsermod : public Usermod {

void addToJsonInfo(JsonObject& root)
{
if(!enabled) return;
char myStringBuffer[16]; // buffer for snprintf()
JsonObject user = root["u"];
if (user.isNull()) user = root.createNestedObject("u");
Expand Down
Loading

0 comments on commit 5fe12ee

Please sign in to comment.