refactor(simulation): remove srand(1234) calls

to be determined if this breaks anything substantial as hinted at in the
comment in BlockRandGauss.hpp (comment from 2013, only moved once since):

// XXX currently in nuttx if you seed to 0, rand breaks
This commit is contained in:
Balduin
2026-04-15 12:01:15 +02:00
parent d516b3cf9c
commit 2be4dd2744
2 changed files with 2 additions and 8 deletions
@@ -41,10 +41,7 @@ ModuleBase::Descriptor SensorBaroSim::desc{task_spawn, custom_command, print_usa
SensorBaroSim::SensorBaroSim() : SensorBaroSim::SensorBaroSim() :
ModuleParams(nullptr), ModuleParams(nullptr),
ScheduledWorkItem(MODULE_NAME, px4::wq_configurations::hp_default) ScheduledWorkItem(MODULE_NAME, px4::wq_configurations::hp_default) {}
{
srand(1234); // initialize the random seed once before calling generate_wgn()
}
SensorBaroSim::~SensorBaroSim() SensorBaroSim::~SensorBaroSim()
{ {
+1 -4
View File
@@ -56,10 +56,7 @@ using namespace time_literals;
ModuleBase::Descriptor Sih::desc{task_spawn, custom_command, print_usage}; ModuleBase::Descriptor Sih::desc{task_spawn, custom_command, print_usage};
Sih::Sih() : Sih::Sih() :
ModuleParams(nullptr) ModuleParams(nullptr) {}
{
srand(1234); // initialize the random seed once before calling generate_wgn()
}
Sih::~Sih() Sih::~Sih()
{ {