-
-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WiP -Audio fastpath #40
Changes from 17 commits
fb03a37
40c96c1
f69142d
ac5aed8
0c58c12
e1cadbc
56b6290
91d36fa
7d0e627
4341d36
ca5a54b
f57c39c
63ffc6e
d4fb542
9a4c020
50b3c9d
04b55a5
d8bd451
237286f
4810a85
f050e60
c4664e5
f147d79
d5c33df
6317dcb
9f6278a
6d23eb6
2e6d58f
72f7f9c
175375e
40d1201
ef12aaa
894fdce
fc19340
63e63ad
d872629
e6fb6c4
4197f98
5edd5e6
71153ee
df26430
e2eb3e8
9cb6189
6d78e46
49f2e26
5081cfb
859adb3
d8bc5e2
1daeecc
c13a5d7
36c34b5
52fe8e2
1b8ebfd
63b03a4
c052da9
f877837
dc77c17
0f45b4f
55b0463
53c8f9f
be2da7b
62990cd
cfc1116
35f3f28
4d64efa
aded74d
143f842
b6f1a59
e6334d8
f0dd66e
4dc6a38
06344ae
7e1d15c
309e66b
af6091b
d8a6889
7465be7
82f9be5
337b117
5c79375
b473a40
d1b2759
7dcc8f1
d4a37ec
a9cdd21
6883996
47de28e
2410c22
3127c60
d51a41f
a7d627b
553f234
8aef434
708cd8e
310daa6
582b96f
1c53f14
3cc1d30
a84c361
ecf3317
29644cc
601499b
5fe12ee
a2e2ead
a45306b
c64f74a
9a832ed
9ed5dc7
c22c92e
0fb5edc
3295579
9a3a97e
99def64
9243b90
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -199,7 +199,8 @@ upload_speed = 115200 | |
# ------------------------------------------------------------------------------ | ||
lib_compat_mode = strict | ||
lib_deps = | ||
fastled/FastLED @ 3.5.0 | ||
;fastled/FastLED @ 3.5.0 | ||
https://github.com/FastLED/FastLED.git#master ;; up to 50% faster | ||
IRremoteESP8266 @ 2.8.2 | ||
;;https://github.com/Aircoookie/ESPAsyncWebServer.git @ ~2.0.7 | ||
https://github.com/lost-hope/ESPAsyncWebServer.git#master ;; WLEDMM to display .log and .wled files in /edit | ||
|
@@ -244,8 +245,8 @@ lib_deps = | |
#https://github.com/lorol/LITTLEFS.git | ||
ESPAsyncTCP @ 1.2.2 | ||
ESPAsyncUDP | ||
${env.lib_deps} | ||
makuna/NeoPixelBus @ 2.6.9 | ||
${env.lib_deps} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ordering significant or just accidental change? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. actually ordering is significant. It seems that the first library reference "wins". |
||
|
||
[esp32] | ||
#platform = https://github.com/tasmota/platform-espressif32/releases/download/v2.0.2.3/platform-espressif32-2.0.2.3.zip | ||
|
@@ -269,8 +270,9 @@ lib_deps = | |
; https://github.com/lorol/LITTLEFS.git | ||
; WLEDMM specific: use patched version of lorol LittleFS | ||
https://github.com/softhack007/LITTLEFS-threadsafe.git#master | ||
;;makuna/NeoPixelBus @ 2.6.9 ;; WLEDMM default | ||
makuna/NeoPixelBus @ 2.7.1 | ||
${env.lib_deps} | ||
makuna/NeoPixelBus @ 2.6.9 | ||
|
||
;; ** For compiling with latest Frameworks (IDF4.4.x and arduino-esp32 v2.0.x) ** | ||
;;; standard V4 platform | ||
|
@@ -296,9 +298,8 @@ build_flagsV4 = -g | |
;;; V4.4.x libraries (without LOROL_LITTLEFS; with newer NeoPixelBus) | ||
lib_depsV4 = | ||
https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 ;; WLEDMM this must be first in the list, otherwise Aircoookie/ESPAsyncWebServer pulls in an older version of AsyncTCP !! | ||
makuna/NeoPixelBus @ 2.7.3 | ||
${env.lib_deps} | ||
;https://github.com/Makuna/NeoPixelBus.git#master ;; NPB 2.6.9 tends to crash whith IDF V4.4.3 -> use latest NeoPixelBus dev instead | ||
makuna/NeoPixelBus @ 2.7.1 | ||
|
||
[esp32s2] | ||
build_flags = -g | ||
|
@@ -314,8 +315,8 @@ build_flags = -g | |
|
||
lib_deps = | ||
https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 ;; WLEDMM this must be first in the list, otherwise Aircoookie/ESPAsyncWebServer pulls in an older version of AsyncTCP !! | ||
makuna/NeoPixelBus @ 2.7.3 ;; WLEDMM - new version is more stable on -S2 | ||
${env.lib_deps} | ||
makuna/NeoPixelBus @ 2.7.1 ;; WLEDMM - new version is more stable on -S2 | ||
|
||
[esp32c3] | ||
build_flags = -g | ||
|
@@ -352,8 +353,8 @@ build_flags = -g | |
|
||
lib_deps = | ||
https://github.com/pbolduc/AsyncTCP.git @ 1.2.0 | ||
${env.lib_deps} | ||
makuna/NeoPixelBus @ 2.7.3 | ||
${env.lib_deps} | ||
|
||
|
||
# ------------------------------------------------------------------------------ | ||
|
@@ -812,6 +813,7 @@ build_flags_S = | |
-D USERMOD_AUDIOREACTIVE | ||
-D UM_AUDIOREACTIVE_USE_NEW_FFT ; use latest (upstream) FFTLib, instead of older library modified by blazoncek. Slightly faster, more accurate, needs 2KB RAM extra | ||
-D USERMOD_ARTIFX ; WLEDMM usermod | ||
-D WLEDMM_FASTPATH ; WLEDMM experimental option. Reduces audio lag (latency), and allows for faster LED framerates | ||
; -D WLED_DISABLE_LOXONE | ||
; -D WLED_DISABLE_ALEXA | ||
; -D WLED_DISABLE_HUESYNC | ||
|
@@ -914,7 +916,9 @@ lib_deps = ${esp32_4MB_M_base.lib_deps} ${common_mm.lib_deps_XL} | |
board = esp32dev | ||
upload_speed = 460800 ; or 921600 | ||
platform = ${esp32.platformV4} | ||
platform_packages = ${esp32.platformV4_packages} | ||
platform_packages = | ||
${esp32.platformV4_packages} | ||
toolchain-xtensa-esp32 @ 8.4.0+2021r2-patch5 ; align main tools with riscV tools | ||
build_unflags = ${common.build_unflags} | ||
build_flags = ${common.build_flags} ${esp32.build_flagsV4} ${common_mm.build_flags_S} | ||
-Wno-misleading-indentation -Wno-format-truncation | ||
|
@@ -1239,16 +1243,14 @@ build_flags = ${esp32_4MB_V4_M_base.build_flags} | |
-D WLED_RELEASE_NAME=esp32_4MB_V4_M | ||
-D WLED_WATCHDOG_TIMEOUT=0 #-D WLED_DISABLE_BROWNOUT_DET | ||
-D ARDUINO_USB_CDC_ON_BOOT=0 ; needed for arduino-esp32 >=2.0.4; avoids errors on startup | ||
; RAM: [== ] 24.8% (used 81316 bytes from 327680 bytes) | ||
; Flash: [==========] 97.2% (used 1528253 bytes from 1572864 bytes) | ||
-D WLED_DISABLE_LOXONE ; FLASH 1272 bytes | ||
-D WLED_DISABLE_ALEXA ; RAM 116 bytes; FLASH 13524 bytes | ||
-D WLED_DISABLE_HUESYNC ;RAM 122 bytes; FLASH 6308 bytes | ||
; RAM: [== ] 24.7% (used 81076 bytes from 327680 bytes) | ||
; Flash: [==========] 95.8% (used 1506893 bytes from 1572864 bytes) | ||
;-D WLED_DISABLE_MQTT ; RAM 216 bytes; FLASH 16496 bytes | ||
-D WLED_DISABLE_INFRARED ;RAM 136 bytes; FLASH 24492 bytes ;; softhack007 disabled to stay below 100% flash size | ||
lib_ignore = IRremoteESP8266 ; use with WLED_DISABLE_INFRARED for faster compilation | ||
;; RAM: [== ] 24.7% (used 80884 bytes from 327680 bytes) | ||
;; Flash: [==========] 99.0% (used 1556429 bytes from 1572864 bytes) | ||
|
||
; compiled with ESP-IDF 4.4.1 | ||
[env:esp32_16MB_V4_M] | ||
|
@@ -1303,6 +1305,43 @@ lib_ignore = IRremoteESP8266 ; use with WLED_DISABLE_INFRARED for faster compila | |
;; RAM: [== ] 24.3% (used 79524 bytes from 327680 bytes) | ||
;; Flash: [========= ] 93.2% (used 1466389 bytes from 1572864 bytes) | ||
|
||
;; similar to 4MB_PSRAM_S, but optimized for WROVER-E (chip revision >= 3) that doesn't need any workarounds for PSRAM any more | ||
;; tl;dr: its faster on PSRAM. But it will not work on all boards. | ||
[env:esp32_4MB_PSRAM_REV3_S] | ||
extends = esp32_4MB_V4_S_base | ||
;board = esp32cam | ||
board = lolin_d32_pro | ||
;board_build.partitions = tools/WLED_ESP32_4MB_256KB_FS.csv ;; Alternative for 4MB flash: 1.8MB firmware, 256KB filesystem (esptool erase_flash needed before changing) | ||
build_unflags = ${esp32_4MB_V4_S_base.build_unflags} | ||
-DARDUINO_EVENT_RUNNING_CORE=1 ;; we want to run wifi on core0, so remove the standard flag | ||
-mfix-esp32-psram-cache-issue ;; this fix is not needed any more for revision 3 | ||
-mfix-esp32-psram-cache-strategy=memw ;; same as above | ||
;;-Os ;; if you want to be even faster - use together with "-O2" in build_flags. Enable alternative default_partitions (above) to have more program space. | ||
|
||
build_flags = ${esp32_4MB_V4_S_base.build_flags} | ||
-DARDUINO_EVENT_RUNNING_CORE=0 ;; assign Wifi to core0, to have more CPU on core#1 (arduino loop) | ||
-DARDUINO_RUNNING_CORE=1 ;; should be default, but does not hurt | ||
;-DCONFIG_MBEDTLS_DYNAMIC_BUFFER=1 ;; optional - seems to move more buffers into PSRAM | ||
;; enable the next line together with "-Os" in build_unflags (unfortunately --> 104.0%% Flash) | ||
;;-O2 -fno-jump-tables -fno-tree-switch-conversion -Wwrite-strings -fstrict-volatile-bitfields | ||
-DBOARD_HAS_PSRAM -D WLED_USE_PSRAM_JSON ;; -D WLED_USE_PSRAM ;; WLED_USE_PSRAM causes major slow-down (slow LEDs) on some ESP32 boards | ||
-D WLED_RELEASE_NAME=esp32_4MB_PSRAM_REV3_S | ||
-D WLED_WATCHDOG_TIMEOUT=0 #-D WLED_DISABLE_BROWNOUT_DET | ||
-D ARDUINO_USB_CDC_ON_BOOT=0 ; needed for arduino-esp32 >=2.0.4; avoids errors on startup | ||
-D WLED_DISABLE_LOXONE ; FLASH 1272 bytes | ||
-D WLED_DISABLE_HUESYNC ; RAM 122 bytes; FLASH 6308 bytes | ||
-D WLED_DISABLE_ALEXA ; RAM 116 bytes; FLASH 13524 bytes | ||
-D WLED_DISABLE_MQTT ; RAM 216 bytes; FLASH 16496 bytes | ||
-D WLED_DISABLE_INFRARED ;RAM 136 bytes; FLASH 24492 bytes ewowi: disabled to stay below 100% | ||
;-D WLED_DISABLE_ADALIGHT ;; To disable serial protocols (see upstream #3128) | ||
; -D WLED_ENABLE_DMX | ||
; -D WLED_DEBUG | ||
; -D SR_DEBUG | ||
; -D MIC_LOGGER | ||
lib_ignore = IRremoteESP8266 ; use with WLED_DISABLE_INFRARED for faster compilation | ||
;; RAM: [== ] 16.8% (used 55124 bytes from 327680 bytes) | ||
;; Flash: [========= ] 92.7% (used 1458729 bytes from 1572864 bytes) | ||
|
||
;; PSRAM build env that only leaves 300Kb for filesystem (instead of 1MB), but adds 300kB for program space | ||
[env:esp32_4MB_PSRAM_M] | ||
extends = esp32_4MB_V4_M_base | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -254,7 +254,11 @@ constexpr SRate_t SAMPLE_RATE = 22050; // Base sample rate in Hz - 22Khz | |
//constexpr SRate_t SAMPLE_RATE = 16000; // 16kHz - use if FFTtask takes more than 20ms. Physical sample time -> 32ms | ||
//constexpr SRate_t SAMPLE_RATE = 20480; // Base sample rate in Hz - 20Khz is experimental. Physical sample time -> 25ms | ||
//constexpr SRate_t SAMPLE_RATE = 10240; // Base sample rate in Hz - previous default. Physical sample time -> 50ms | ||
#ifndef WLEDMM_FASTPATH | ||
#define FFT_MIN_CYCLE 21 // minimum time before FFT task is repeated. Use with 22Khz sampling | ||
#else | ||
#define FFT_MIN_CYCLE 15 // reduce min time, to allow faster catch-up when I2S is lagging | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any downside to this change? "Compromise" for speed or just masking changes behind flag until we have done enough testing to know if this should just be right value for all uses? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, the downside is that the FFT task will block the core for longer (2ms in "standard", vs 7ms in "fastpath"). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we are using the second core, is that an issue? What else (if anything) is using that core? |
||
#endif | ||
//#define FFT_MIN_CYCLE 30 // Use with 16Khz sampling | ||
//#define FFT_MIN_CYCLE 23 // minimum time before FFT task is repeated. Use with 20Khz sampling | ||
//#define FFT_MIN_CYCLE 46 // minimum time before FFT task is repeated. Use with 10Khz sampling | ||
|
@@ -1129,8 +1133,13 @@ class AudioReactive : public Usermod { | |
{ | ||
float sampleAdj; // Gain adjusted sample value | ||
float tmpSample; // An interim sample variable used for calculatioins. | ||
#ifdef WLEDMM_FASTPATH | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any downside to this change? "Compromise" for speed or just masking changes behind flag until we have done enough testing to know if this should just be right value for all uses? |
||
constexpr float weighting = 0.35f; // slightly reduced filter strength, to reduce audio latency | ||
constexpr float weighting2 = 0.25f; | ||
#else | ||
const float weighting = 0.2f; // Exponential filter weighting. Will be adjustable in a future release. | ||
const float weighting2 = 0.073f; // Exponential filter weighting, for rising signal (a bit more robust against spikes) | ||
#endif | ||
const int AGC_preset = (soundAgc > 0)? (soundAgc-1): 0; // make sure the _compiler_ knows this value will not change while we are inside the function | ||
static bool isFrozen = false; | ||
static bool haveSilence = true; | ||
|
@@ -1732,7 +1741,11 @@ class AudioReactive : public Usermod { | |
|
||
// get AGC sensitivity and sound pressure | ||
static unsigned long lastEstimate = 0; | ||
#ifdef WLEDMM_FASTPATH | ||
if (millis() - lastEstimate > 7) { | ||
#else | ||
if (millis() - lastEstimate > 12) { | ||
#endif | ||
lastEstimate = millis(); | ||
agcSensitivity = getSensitivity(); | ||
if (limiterOn) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2243,7 +2243,7 @@ uint16_t mode_colortwinkle() { | |
} | ||
} | ||
} | ||
return FRAMETIME_FIXED; | ||
return FRAMETIME_FIXED_SLOW; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have all effects that use this constant been updated or just been changing one by one as you test? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just as I tested it. Some effects seem to be meant to be slow, like Halloween eyes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should they not be time-based rather than FPS based? |
||
} | ||
static const char _data_FX_MODE_COLORTWINKLE[] PROGMEM = "Colortwinkles@Fade speed,Spawn speed;;!;;m12=0"; //pixels | ||
|
||
|
@@ -3096,7 +3096,7 @@ uint16_t candle(bool multi) | |
} | ||
} | ||
|
||
return FRAMETIME_FIXED; | ||
return FRAMETIME_FIXED_SLOW; | ||
} | ||
|
||
|
||
|
@@ -6042,6 +6042,7 @@ uint16_t mode_ripplepeak(void) { // * Ripple peak. By Andrew Tuli | |
// printUmData(); | ||
|
||
if (SEGENV.call == 0) { | ||
SEGMENT.setUpLeds(); | ||
SEGENV.aux0 = 255; | ||
SEGMENT.custom1 = *binNum; | ||
SEGMENT.custom2 = *maxVol * 2; | ||
|
@@ -6052,8 +6053,9 @@ uint16_t mode_ripplepeak(void) { // * Ripple peak. By Andrew Tuli | |
*binNum = SEGMENT.custom1; // Select a bin. | ||
*maxVol = SEGMENT.custom2 / 2; // Our volume comparator. | ||
|
||
SEGMENT.fade_out(240); // Lower frame rate means less effective fading than FastLED | ||
SEGMENT.fade_out(240); | ||
//SEGMENT.fade_out(240); // Lower frame rate means less effective fading than FastLED | ||
//SEGMENT.fade_out(240); | ||
SEGMENT.fade_out(224); // should be the same as 240 applied twice | ||
|
||
for (int i = 0; i < SEGMENT.intensity/16; i++) { // Limit the number of ripples. | ||
if (samplePeak) ripples[i].state = 255; | ||
|
@@ -6066,7 +6068,8 @@ uint16_t mode_ripplepeak(void) { // * Ripple peak. By Andrew Tuli | |
ripples[i].pos = random16(SEGLEN); | ||
#ifdef ESP32 | ||
if (FFT_MajorPeak > 1) // log10(0) is "forbidden" (throws exception) | ||
ripples[i].color = (int)(log10f(FFT_MajorPeak)*128); | ||
//ripples[i].color = (int)(log10f(FFT_MajorPeak)*128); // not to self: buggy !! | ||
ripples[i].color = (int)(logf(FFT_MajorPeak)*32.0f); // works up to 10025 hz | ||
else ripples[i].color = 0; | ||
#else | ||
ripples[i].color = random8(); | ||
|
@@ -6476,8 +6479,12 @@ uint16_t mode_midnoise(void) { // Midnoise. By Andrew Tuline. | |
} | ||
float volumeSmth = *(float*) um_data->u_data[0]; | ||
|
||
SEGMENT.fade_out(SEGMENT.speed); | ||
SEGMENT.fade_out(SEGMENT.speed); | ||
if (SEGENV.call == 0) { | ||
SEGMENT.setUpLeds(); | ||
SEGMENT.fill(BLACK); | ||
} | ||
SEGMENT.fadeToBlackBy(SEGMENT.speed/2); | ||
//SEGMENT.fade_out(SEGMENT.speed); | ||
|
||
float tmpSound2 = volumeSmth * (float)SEGMENT.intensity / 256.0; // Too sensitive. | ||
tmpSound2 *= (float)SEGMENT.intensity / 128.0; // Reduce sensitity/length. | ||
|
@@ -6622,8 +6629,13 @@ uint16_t mode_plasmoid(void) { // Plasmoid. By Andrew Tuline. | |
} | ||
float volumeSmth = *(float*) um_data->u_data[0]; | ||
|
||
SEGMENT.fadeToBlackBy(32); | ||
|
||
if (SEGENV.call == 0) { | ||
SEGMENT.setUpLeds(); | ||
SEGMENT.fill(BLACK); | ||
} | ||
//SEGMENT.fadeToBlackBy(32); | ||
SEGMENT.fadeToBlackBy(48); | ||
|
||
plasmoip->thisphase += beatsin8(6,-4,4); // You can change direction and speed individually. | ||
plasmoip->thatphase += beatsin8(7,-4,4); // Two phase values to make a complex pattern. By Andrew Tuline. | ||
|
||
|
@@ -6832,7 +6844,7 @@ uint16_t mode_blurz(void) { // Blurz. By Andrew Tuline. | |
SEGMENT.setPixelColor(segLoc, color_blend(SEGCOLOR(1), SEGMENT.color_from_palette((uint16_t)pixColor, false, PALETTE_SOLID_WRAP, 0),(uint8_t)pixIntensity)); // repaint center pixel after blur | ||
} else SEGMENT.blur(max(SEGMENT.intensity, (uint8_t)1)); // silence - just blur it again | ||
|
||
return FRAMETIME; | ||
return FRAMETIME_FIXED; | ||
} // mode_blurz() | ||
static const char _data_FX_MODE_BLURZ[] PROGMEM = "Blurz ☾@Fade rate,Blur;!,Color mix;!;1f;sx=48,ix=127,m12=0,si=0"; // Pixels, Beatsin | ||
#endif | ||
|
@@ -6921,7 +6933,10 @@ uint16_t mode_freqmap(void) { // Map FFT_MajorPeak to SEGLEN. | |
float my_magnitude = *(float*)um_data->u_data[5] / 4.0f; | ||
if (FFT_MajorPeak < 1) FFT_MajorPeak = 1; // log10(0) is "forbidden" (throws exception) | ||
|
||
if (SEGENV.call == 0) SEGMENT.fill(BLACK); | ||
if (SEGENV.call == 0) { | ||
SEGMENT.setUpLeds(); | ||
SEGMENT.fill(BLACK); | ||
} | ||
int fadeoutDelay = (256 - SEGMENT.speed) / 32; | ||
if ((fadeoutDelay <= 1 ) || ((SEGENV.call % fadeoutDelay) == 0)) SEGMENT.fade_out(SEGMENT.speed); | ||
|
||
|
@@ -6944,7 +6959,7 @@ uint16_t mode_freqmap(void) { // Map FFT_MajorPeak to SEGLEN. | |
SEGMENT.setPixelColor(locn, color_blend(SEGCOLOR(1), SEGMENT.color_from_palette(SEGMENT.intensity+pixCol, false, PALETTE_SOLID_WRAP, 0), bright)); | ||
} | ||
|
||
return FRAMETIME; | ||
return FRAMETIME_FIXED; | ||
} // mode_freqmap() | ||
static const char _data_FX_MODE_FREQMAP[] PROGMEM = "Freqmap@Fade rate,Starting color;!,!;!;1f;m12=0,si=0"; // Pixels, Beatsin | ||
|
||
|
@@ -7067,8 +7082,8 @@ uint16_t mode_freqwave(void) { // Freqwave. By Andreas Pleschun | |
SEGMENT.fill(BLACK); | ||
} | ||
|
||
uint8_t secondHand = micros()/(256-SEGMENT.speed)/500 % 16; | ||
if((SEGMENT.speed > 254) || (SEGENV.aux0 != secondHand)) { // WLEDMM allow run run at full speed | ||
uint8_t secondHand = (SEGMENT.speed < 255) ? (micros()/(256-SEGMENT.speed)/500 % 16) : 0; | ||
if((SEGMENT.speed > 254) || (SEGENV.aux0 != secondHand)) { // WLEDMM allow to run at full speed | ||
SEGENV.aux0 = secondHand; | ||
|
||
float sensitivity = 0.5f * mapf(SEGMENT.custom3, 1, 31, 0.5, 10); // reduced resolution slider | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it perhaps an idea to refer to a "known good" hash, so we get predictable builds?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. Makes sense 👍