aboutsummaryrefslogtreecommitdiff
path: root/apps/multirotor_att_control/multirotor_att_control_main.c
diff options
context:
space:
mode:
authorJulian Oes <joes@student.ethz.ch>2012-09-26 10:11:57 +0200
committerJulian Oes <joes@student.ethz.ch>2012-09-26 10:11:57 +0200
commit201fdbc42c46bc9146a8cbf2434a98792d6d9f50 (patch)
treeab63df77eff1e20b508c3c4aad40c6911d082a49 /apps/multirotor_att_control/multirotor_att_control_main.c
parentabbe998506e4ba49bbf6a9a9ae731b1eec521db6 (diff)
downloadpx4-firmware-201fdbc42c46bc9146a8cbf2434a98792d6d9f50.tar.gz
px4-firmware-201fdbc42c46bc9146a8cbf2434a98792d6d9f50.tar.bz2
px4-firmware-201fdbc42c46bc9146a8cbf2434a98792d6d9f50.zip
ardrone flying now (still workaround of disabled rates controller)
Diffstat (limited to 'apps/multirotor_att_control/multirotor_att_control_main.c')
-rw-r--r--apps/multirotor_att_control/multirotor_att_control_main.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/apps/multirotor_att_control/multirotor_att_control_main.c b/apps/multirotor_att_control/multirotor_att_control_main.c
index 70b9d8e28..904872dde 100644
--- a/apps/multirotor_att_control/multirotor_att_control_main.c
+++ b/apps/multirotor_att_control/multirotor_att_control_main.c
@@ -127,8 +127,8 @@ static void *rate_control_thread_main(void *arg)
gyro_lp[1] = gyro_report.y;
gyro_lp[2] = gyro_report.z;
-// multirotor_control_rates(&rates_sp, gyro_lp, &actuators);
-// orb_publish(ORB_ID_VEHICLE_ATTITUDE_CONTROLS, actuator_pub, &actuators);
+ multirotor_control_rates(&rates_sp, gyro_lp, &actuators);
+ orb_publish(ORB_ID_VEHICLE_ATTITUDE_CONTROLS, actuator_pub, &actuators);
// }
}
}
@@ -192,10 +192,10 @@ mc_thread_main(int argc, char *argv[])
/* ready, spawn pthread */
pthread_attr_t rate_control_attr;
- pthread_attr_init(&rate_control_attr);
- pthread_attr_setstacksize(&rate_control_attr, 2048);
- pthread_t rate_control_thread;
- pthread_create(&rate_control_thread, &rate_control_attr, rate_control_thread_main, NULL);
+// pthread_attr_init(&rate_control_attr);
+// pthread_attr_setstacksize(&rate_control_attr, 2048);
+// pthread_t rate_control_thread;
+// pthread_create(&rate_control_thread, &rate_control_attr, rate_control_thread_main, NULL);
while (!thread_should_exit) {
@@ -306,7 +306,7 @@ mc_thread_main(int argc, char *argv[])
perf_print_counter(mc_loop_perf);
perf_free(mc_loop_perf);
- pthread_join(rate_control_thread, NULL);
+ //pthread_join(rate_control_thread, NULL);
fflush(stdout);
exit(0);
@@ -340,6 +340,7 @@ int multirotor_att_control_main(int argc, char *argv[])
default:
fprintf(stderr, "option: -%c\n", ch);
usage("unrecognized option");
+ break;
}
}
argc -= optioncount;