mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-17 16:22:48 +00:00
Actually set the rand() seed for Portduino (#4380)
This commit is contained in:
@@ -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") {
|
||||||
|
|||||||
Reference in New Issue
Block a user