Override is now really disabled for multirotors, also I don't think the parameter got ever read by the commander but I might be wrong

This commit is contained in:
Julian Oes
2012-12-23 17:20:53 -08:00
parent 8053b4b9f7
commit d4edf2e85c
2 changed files with 36 additions and 22 deletions
+4 -3
View File
@@ -1293,6 +1293,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) {
@@ -1323,10 +1325,10 @@ int commander_thread_main(int argc, char *argv[])
/* handle it */
handle_command(stat_pub, &current_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, &param_changed);
@@ -1335,7 +1337,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 ||