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() :
ModuleParams(nullptr),
ScheduledWorkItem(MODULE_NAME, px4::wq_configurations::hp_default)
{
srand(1234); // initialize the random seed once before calling generate_wgn()
}
ScheduledWorkItem(MODULE_NAME, px4::wq_configurations::hp_default) {}
SensorBaroSim::~SensorBaroSim()
{
+1 -4
View File
@@ -56,10 +56,7 @@ using namespace time_literals;
ModuleBase::Descriptor Sih::desc{task_spawn, custom_command, print_usage};
Sih::Sih() :
ModuleParams(nullptr)
{
srand(1234); // initialize the random seed once before calling generate_wgn()
}
ModuleParams(nullptr) {}
Sih::~Sih()
{