mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 19:07:45 +08:00
Commander: move first preflight check run to constructor
This commit is contained in:
committed by
Daniel Agar
parent
0f41a5e385
commit
aa575d6af0
@@ -853,6 +853,10 @@ Commander::Commander() :
|
|||||||
_param_rc_map_fltmode = param_find("RC_MAP_FLTMODE");
|
_param_rc_map_fltmode = param_find("RC_MAP_FLTMODE");
|
||||||
|
|
||||||
updateParameters();
|
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()
|
Commander::~Commander()
|
||||||
@@ -2189,10 +2193,6 @@ Commander::run()
|
|||||||
|
|
||||||
arm_auth_init(&_mavlink_log_pub, &_vehicle_status.system_id);
|
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()) {
|
while (!should_exit()) {
|
||||||
|
|
||||||
perf_begin(_loop_perf);
|
perf_begin(_loop_perf);
|
||||||
|
|||||||
Reference in New Issue
Block a user