init adjustments to ensure used topics are advertised early (primarily for logging)

- multi-EKF create each instance as soon as IMU & mag are advertised (before device id populated)
This commit is contained in:
Daniel Agar
2022-03-23 16:51:16 -04:00
parent e6ed595651
commit f4c3084c26
22 changed files with 171 additions and 127 deletions
@@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2020 PX4 Development Team. All rights reserved.
* Copyright (c) 2020-2022 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -43,6 +43,7 @@ VehicleGPSPosition::VehicleGPSPosition() :
ModuleParams(nullptr),
ScheduledWorkItem(MODULE_NAME, px4::wq_configurations::nav_and_controllers)
{
_vehicle_gps_position_pub.advertise();
}
VehicleGPSPosition::~VehicleGPSPosition()
@@ -103,9 +104,6 @@ void VehicleGPSPosition::Run()
perf_begin(_cycle_perf);
ParametersUpdate();
// GPS blending
ScheduleDelayed(500_ms); // backup schedule
// Check all GPS instance
bool any_gps_updated = false;
bool gps_updated = false;
@@ -135,6 +133,8 @@ void VehicleGPSPosition::Run()
}
}
ScheduleDelayed(300_ms); // backup schedule
perf_end(_cycle_perf);
}