mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 01:42:15 +00:00
Actually set the rand() seed for Portduino (#4380)
This commit is contained in:
parent
d1ff160256
commit
5453c495e2
@ -7,6 +7,7 @@
|
||||
|
||||
#include <Utility.h>
|
||||
#include <assert.h>
|
||||
#include <time.h>
|
||||
|
||||
#include "PortduinoGlue.h"
|
||||
#include "linux/gpio/LinuxGPIOPin.h"
|
||||
@ -134,6 +135,9 @@ void portduinoSetup()
|
||||
return;
|
||||
}
|
||||
|
||||
// Rather important to set this, if not running simulated.
|
||||
randomSeed(time(NULL));
|
||||
|
||||
try {
|
||||
if (yamlConfig["Logging"]) {
|
||||
if (yamlConfig["Logging"]["LogLevel"].as<std::string>("info") == "trace") {
|
||||
@ -382,4 +386,4 @@ int initGPIOPin(int pinNum, const std::string gpioChipName)
|
||||
#else
|
||||
return ERRNO_OK;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user