diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2012-12-27 17:13:52 +0100 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2012-12-27 17:13:52 +0100 |
commit | a6f2c6022ec039fa6ccee03bc139794faa290265 (patch) | |
tree | 874f2eb7bfdc58d7ca23ac82cc73e462ab685fd9 /apps/commander | |
parent | b2068b4e0e43b8ab5088bba3e84cff18178dfafa (diff) | |
parent | d4edf2e85c4238387872eb5ee6bc1187117a280d (diff) | |
download | px4-firmware-a6f2c6022ec039fa6ccee03bc139794faa290265.tar.gz px4-firmware-a6f2c6022ec039fa6ccee03bc139794faa290265.tar.bz2 px4-firmware-a6f2c6022ec039fa6ccee03bc139794faa290265.zip |
Merge branch 'fixedwing_outdoor' of https://github.com/julianoes/Firmware into fixedwing_outdoor
Diffstat (limited to 'apps/commander')
-rw-r--r-- | apps/commander/commander.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/commander/commander.c b/apps/commander/commander.c index 80b392f99..a088ba1ba 100644 --- a/apps/commander/commander.c +++ b/apps/commander/commander.c @@ -1356,6 +1356,8 @@ int commander_thread_main(int argc, char *argv[]) uint64_t failsave_ll_start_time = 0; bool state_changed = true; + bool param_init_forced = true; + while (!thread_should_exit) { @@ -1386,10 +1388,10 @@ int commander_thread_main(int argc, char *argv[]) /* handle it */ handle_command(stat_pub, ¤t_status, &cmd); } - /* update parameters */ orb_check(param_changed_sub, &new_data); - if (new_data) { + if (new_data || param_init_forced) { + param_init_forced = false; /* parameters changed */ orb_copy(ORB_ID(parameter_update), param_changed_sub, ¶m_changed); @@ -1398,7 +1400,6 @@ int commander_thread_main(int argc, char *argv[]) if (param_get(_param_sys_type, &(current_status.system_type)) != OK) { warnx("failed setting new system type"); } - /* disable manual override for all systems that rely on electronic stabilization */ if (current_status.system_type == MAV_TYPE_QUADROTOR || current_status.system_type == MAV_TYPE_HEXAROTOR || |