use esp_random in WMath.cpp

This commit is contained in:
me-no-dev 2016-12-02 13:42:31 +02:00
parent 6db0ee1304
commit 49f35ff070

View File

@ -25,6 +25,7 @@
extern "C" {
#include <stdlib.h>
#include "esp_system.h"
}
void randomSeed(unsigned long seed)
@ -39,7 +40,7 @@ long random(long howbig)
if(howbig == 0) {
return 0;
}
return rand() % howbig;
return esp_random() % howbig;
}
long random(long howsmall, long howbig)