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