forked from Archive/PX4-Autopilot
Commander: move first preflight check run to constructor
This commit is contained in:
parent
0f41a5e385
commit
aa575d6af0
|
@ -853,6 +853,10 @@ Commander::Commander() :
|
|||
_param_rc_map_fltmode = param_find("RC_MAP_FLTMODE");
|
||||
|
||||
updateParameters();
|
||||
|
||||
// run preflight immediately to find all relevant parameters, but don't report
|
||||
PreFlightCheck::preflightCheck(&_mavlink_log_pub, _vehicle_status, _vehicle_status_flags, _vehicle_control_mode,
|
||||
false, true, hrt_elapsed_time(&_boot_timestamp));
|
||||
}
|
||||
|
||||
Commander::~Commander()
|
||||
|
@ -2189,10 +2193,6 @@ Commander::run()
|
|||
|
||||
arm_auth_init(&_mavlink_log_pub, &_vehicle_status.system_id);
|
||||
|
||||
// run preflight immediately to find all relevant parameters, but don't report
|
||||
PreFlightCheck::preflightCheck(&_mavlink_log_pub, _vehicle_status, _vehicle_status_flags, _vehicle_control_mode,
|
||||
false, true, hrt_elapsed_time(&_boot_timestamp));
|
||||
|
||||
while (!should_exit()) {
|
||||
|
||||
perf_begin(_loop_perf);
|
||||
|
|
Loading…
Reference in New Issue