mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-21 04:33:10 +08:00
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:
@@ -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()
|
||||
{
|
||||
|
||||
@@ -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()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user