use esp_random in WMath.cpp
This commit is contained in:
parent
6db0ee1304
commit
49f35ff070
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue