mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-07 15:10:34 +08:00
commander remove continuous param_get in arm_auth_update
This commit is contained in:
committed by
Lorenz Meier
parent
641129ad4e
commit
49180de27c
@@ -1704,9 +1704,10 @@ Commander::run()
|
||||
arming_ret = TRANSITION_NOT_CHANGED;
|
||||
|
||||
/* update parameters */
|
||||
orb_check(param_changed_sub, &updated);
|
||||
bool params_updated = false;
|
||||
orb_check(param_changed_sub, ¶ms_updated);
|
||||
|
||||
if (updated || param_init_forced) {
|
||||
if (params_updated || param_init_forced) {
|
||||
|
||||
/* parameters changed */
|
||||
struct parameter_update_s param_changed;
|
||||
@@ -3189,7 +3190,7 @@ Commander::run()
|
||||
have_taken_off_since_arming = false;
|
||||
}
|
||||
|
||||
arm_auth_update(now);
|
||||
arm_auth_update(now, params_updated || param_init_forced);
|
||||
|
||||
usleep(COMMANDER_MONITORING_INTERVAL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user