mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 17:42:48 +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 <Utility.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <time.h>
|
||||||
|
|
||||||
#include "PortduinoGlue.h"
|
#include "PortduinoGlue.h"
|
||||||
#include "linux/gpio/LinuxGPIOPin.h"
|
#include "linux/gpio/LinuxGPIOPin.h"
|
||||||
@ -134,6 +135,9 @@ void portduinoSetup()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Rather important to set this, if not running simulated.
|
||||||
|
randomSeed(time(NULL));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (yamlConfig["Logging"]) {
|
if (yamlConfig["Logging"]) {
|
||||||
if (yamlConfig["Logging"]["LogLevel"].as<std::string>("info") == "trace") {
|
if (yamlConfig["Logging"]["LogLevel"].as<std::string>("info") == "trace") {
|
||||||
@ -382,4 +386,4 @@ int initGPIOPin(int pinNum, const std::string gpioChipName)
|
|||||||
#else
|
#else
|
||||||
return ERRNO_OK;
|
return ERRNO_OK;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user