simulator: fix to set system and component IDs as defined in params

The simulator had hardcoded component ID and system ID (sysID was 0), ignoring what was set up in the params MAV_SYS_ID and MAV_COMP_ID. This caused an issue with multi-vehicle simulations that that rely on sysID to identify the vehicles.

Signed-off-by: Gabriel Moreno <gabrielm@cs.cmu.edu>
This commit is contained in:
Gabriel Moreno
2019-03-03 10:41:47 +01:00
committed by Lorenz Meier
parent 951f33145f
commit fc7c7ac206
2 changed files with 6 additions and 4 deletions
+3 -1
View File
@@ -378,7 +378,9 @@ private:
DEFINE_PARAMETERS(
(ParamFloat<px4::params::SIM_BAT_DRAIN>) _battery_drain_interval_s, ///< battery drain interval
(ParamInt<px4::params::MAV_TYPE>) _param_system_type
(ParamInt<px4::params::MAV_TYPE>) _param_system_type,
(ParamInt<px4::params::MAV_SYS_ID>) _param_system_id,
(ParamInt<px4::params::MAV_COMP_ID>) _param_component_id
)
#endif