Octopus and Crazy Bees Super Sync compatible
This commit is contained in:
@@ -5771,7 +5771,7 @@ uint16_t mode_2Dcrazybees(void) {
|
|||||||
uint8_t posX, posY, aimX, aimY, hue;
|
uint8_t posX, posY, aimX, aimY, hue;
|
||||||
int8_t deltaX, deltaY, signX, signY, error;
|
int8_t deltaX, deltaY, signX, signY, error;
|
||||||
void aimed(uint16_t w, uint16_t h) {
|
void aimed(uint16_t w, uint16_t h) {
|
||||||
random16_set_seed(strip.now);
|
//WLEDMM seed NOT here for SuperSync
|
||||||
aimX = random8(0, w);
|
aimX = random8(0, w);
|
||||||
aimY = random8(0, h);
|
aimY = random8(0, h);
|
||||||
hue = random8();
|
hue = random8();
|
||||||
@@ -5787,6 +5787,7 @@ uint16_t mode_2Dcrazybees(void) {
|
|||||||
bee_t *bee = reinterpret_cast<bee_t*>(SEGENV.data);
|
bee_t *bee = reinterpret_cast<bee_t*>(SEGENV.data);
|
||||||
|
|
||||||
if (SEGENV.call == 0) {
|
if (SEGENV.call == 0) {
|
||||||
|
random16_set_seed(strip.now); //WLEDMM seed here for SuperSync
|
||||||
SEGMENT.setUpLeds();
|
SEGMENT.setUpLeds();
|
||||||
SEGMENT.fill(BLACK);
|
SEGMENT.fill(BLACK);
|
||||||
for (size_t i = 0; i < n; i++) {
|
for (size_t i = 0; i < n; i++) {
|
||||||
@@ -7847,7 +7848,7 @@ uint16_t mode_2Dsoap() {
|
|||||||
const uint32_t mov = MIN(cols,rows)*(SEGMENT.speed+2)/2;
|
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
|
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
|
// init
|
||||||
if (SEGENV.call == 0) {
|
if (SEGENV.call == 0) {
|
||||||
random16_set_seed(535);
|
random16_set_seed(535);
|
||||||
@@ -7964,7 +7965,7 @@ uint16_t mode_2Doctopus() {
|
|||||||
|
|
||||||
// re-init if SEGMENT dimensions or offset changed
|
// re-init if SEGMENT dimensions or offset changed
|
||||||
if (SEGENV.call == 0 || SEGENV.aux0 != cols || SEGENV.aux1 != rows || SEGMENT.custom1 != *offsX || SEGMENT.custom2 != *offsY) {
|
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.aux0 = cols;
|
||||||
SEGENV.aux1 = rows;
|
SEGENV.aux1 = rows;
|
||||||
*offsX = SEGMENT.custom1;
|
*offsX = SEGMENT.custom1;
|
||||||
@@ -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 x = 0; x < cols; x++) {
|
||||||
for (int y = 0; y < rows; y++) {
|
for (int y = 0; y < rows; y++) {
|
||||||
byte angle = rMap[XY(x,y)].angle;
|
byte angle = rMap[XY(x,y)].angle;
|
||||||
|
|||||||
@@ -3,6 +3,8 @@
|
|||||||
#include "wled_ethernet.h"
|
#include "wled_ethernet.h"
|
||||||
#include <Arduino.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)
|
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_DISABLE_BROWNOUT_DET)
|
||||||
#include "soc/soc.h"
|
#include "soc/soc.h"
|
||||||
#include "soc/rtc_cntl_reg.h"
|
#include "soc/rtc_cntl_reg.h"
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// 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
|
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||||
//#define WLED_USE_MY_CONFIG
|
//#define WLED_USE_MY_CONFIG
|
||||||
@@ -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
|
//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
|
//#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
|
#define WLEDMM_PROTECT_SERVICE // prevents crashes when effects are drawing while asyncWebServer tries to modify segments at the same time
|
||||||
|
|
||||||
// Library inclusions.
|
// Library inclusions.
|
||||||
|
|||||||
Reference in New Issue
Block a user