Skip to content

Commit

Permalink
Octopus and Crazy Bees Super Sync compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
ewowi committed Oct 2, 2023
1 parent 37e1624 commit 76aa307
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
9 changes: 5 additions & 4 deletions wled00/FX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5771,7 +5771,7 @@ uint16_t mode_2Dcrazybees(void) {
uint8_t posX, posY, aimX, aimY, hue;
int8_t deltaX, deltaY, signX, signY, error;
void aimed(uint16_t w, uint16_t h) {
random16_set_seed(strip.now);
//WLEDMM seed NOT here for SuperSync
aimX = random8(0, w);
aimY = random8(0, h);
hue = random8();
Expand All @@ -5787,6 +5787,7 @@ uint16_t mode_2Dcrazybees(void) {
bee_t *bee = reinterpret_cast<bee_t*>(SEGENV.data);

if (SEGENV.call == 0) {
random16_set_seed(strip.now); //WLEDMM seed here for SuperSync
SEGMENT.setUpLeds();
SEGMENT.fill(BLACK);
for (size_t i = 0; i < n; i++) {
Expand Down Expand Up @@ -7847,7 +7848,7 @@ uint16_t mode_2Dsoap() {
const uint32_t mov = MIN(cols,rows)*(SEGMENT.speed+2)/2;
const uint8_t smoothness = MIN(250,SEGMENT.intensity); // limit as >250 produces very little changes

//WLEDMM: changing noise calculation for super sync to make it deterministic using strip.now
//WLEDMM: changing noise calculation for SuperSync to make it deterministic using strip.now
// init
if (SEGENV.call == 0) {
random16_set_seed(535);
Expand Down Expand Up @@ -7964,7 +7965,7 @@ uint16_t mode_2Doctopus() {

// re-init if SEGMENT dimensions or offset changed
if (SEGENV.call == 0 || SEGENV.aux0 != cols || SEGENV.aux1 != rows || SEGMENT.custom1 != *offsX || SEGMENT.custom2 != *offsY) {
SEGENV.step = 0; // t
// SEGENV.step = 0; // t
SEGENV.aux0 = cols;
SEGENV.aux1 = rows;
*offsX = SEGMENT.custom1;
Expand All @@ -7979,7 +7980,7 @@ uint16_t mode_2Doctopus() {
}
}

SEGENV.step += SEGMENT.speed / 32 + 1; // 1-4 range
SEGENV.step = (strip.now / 40) * (SEGMENT.speed / 32 + 1); // 1-4 range WLEDMM no += because of SuperSync (40fps effect)
for (int x = 0; x < cols; x++) {
for (int y = 0; y < rows; y++) {
byte angle = rMap[XY(x,y)].angle;
Expand Down
2 changes: 2 additions & 0 deletions wled00/wled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include "wled_ethernet.h"
#include <Arduino.h>

#warning WLED-MM GPL-v3. By installing WLED MM you implicitly accept the terms!

#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_DISABLE_BROWNOUT_DET)
#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"
Expand Down
4 changes: 2 additions & 2 deletions wled00/wled.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

// version code in format yymmddb (b = daily build)
#define VERSION 2310010
#define VERSION 2310020

//uncomment this if you have a "my_config.h" file you'd like to use
//#define WLED_USE_MY_CONFIG
Expand Down Expand Up @@ -65,7 +65,7 @@
//This is generally a terrible idea, but improves boot success on boards with a 3.3v regulator + cap setup that can't provide 400mA peaks
//#define WLED_DISABLE_BROWNOUT_DET

// WLED-MM MANDATORY flags
// WLEDMM MANDATORY flags
#define WLEDMM_PROTECT_SERVICE // prevents crashes when effects are drawing while asyncWebServer tries to modify segments at the same time

// Library inclusions.
Expand Down

0 comments on commit 76aa307

Please sign in to comment.