Hi,
I have some simple code for filling a vector with ascending numbers and then shuffle them (full VS2019 example):
#include <iostream>
#include <algorithm>
#include <stdint.h>
#include <vector>
#include <random>
#include <numeric>
using std::vector;
int main()
{
std::default_random_engine defaultRandomEngine{ std::random_device{}() };
vector<uint16_t> allPixels(285);
std::iota(begin(allPixels), end(allPixels), 0);
std::shuffle(begin(allPixels), end(allPixels), defaultRandomEngine);
std::cout << allPixels.at(4);
}
On VS2019, the vector is always randomized, the 4th element of the vector is different on almost every run.
When using the same logic on my ESP32, the 4th element is the same on every run.
Also have been playing around with .seed() and some other stuff (took me a while to realize its ESP-related^^).
If someone has an idea what I am doing wrong Im glad for a hint. Otherwise, maybe it helps someone having the same problem.