Skip to content

Commit

Permalink
random seed bugfix (compile errors on older platforms)
Browse files Browse the repository at this point in the history
  • Loading branch information
softhack007 committed Dec 12, 2023
1 parent 88f67cb commit 0a70f97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wled00/wled.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -738,7 +738,7 @@ void WLED::setup()
// Seed FastLED random functions with an esp random value, which already works properly at this point.
#if defined(ARDUINO_ARCH_ESP32)
uint32_t seed32 = esp_random();
seed32 ^= random(); // WLEDMM some extra entropy (for older frameworks where esp_ramdom alone might be too predictable after startup)
seed32 ^= random(0, INT32_MAX); // WLEDMM some extra entropy (for older frameworks where esp_ramdom alone might be too predictable after startup)
#elif defined(ARDUINO_ARCH_ESP8266)
const uint32_t seed32 = RANDOM_REG32;
#else
Expand Down

0 comments on commit 0a70f97

Please sign in to comment.