diff options
Diffstat (limited to 'src/examples')
6 files changed, 20 insertions, 9 deletions
diff --git a/src/examples/fixedwing_control/main.c b/src/examples/fixedwing_control/main.c index 89fbef020..d13ffe414 100644 --- a/src/examples/fixedwing_control/main.c +++ b/src/examples/fixedwing_control/main.c @@ -512,7 +512,7 @@ usage(const char *reason) * Makefile does only apply to this management task. * * The actual stack size should be set in the call - * to task_create(). + * to task_spawn_cmd(). */ int ex_fixedwing_control_main(int argc, char *argv[]) { @@ -528,7 +528,7 @@ int ex_fixedwing_control_main(int argc, char *argv[]) } thread_should_exit = false; - deamon_task = task_spawn("ex_fixedwing_control", + deamon_task = task_spawn_cmd("ex_fixedwing_control", SCHED_DEFAULT, SCHED_PRIORITY_MAX - 20, 2048, diff --git a/src/examples/flow_position_control/flow_position_control_main.c b/src/examples/flow_position_control/flow_position_control_main.c index c177c8fd2..c96f73155 100644 --- a/src/examples/flow_position_control/flow_position_control_main.c +++ b/src/examples/flow_position_control/flow_position_control_main.c @@ -101,7 +101,7 @@ usage(const char *reason) * Makefile does only apply to this management task. * * The actual stack size should be set in the call - * to task_spawn(). + * to task_spawn_cmd(). */ int flow_position_control_main(int argc, char *argv[]) { @@ -118,7 +118,7 @@ int flow_position_control_main(int argc, char *argv[]) } thread_should_exit = false; - deamon_task = task_spawn("flow_position_control", + deamon_task = task_spawn_cmd("flow_position_control", SCHED_DEFAULT, SCHED_PRIORITY_MAX - 6, 4096, diff --git a/src/examples/flow_position_control/flow_position_control_params.c b/src/examples/flow_position_control/flow_position_control_params.c index 4f3598a57..eb1473647 100644 --- a/src/examples/flow_position_control/flow_position_control_params.c +++ b/src/examples/flow_position_control/flow_position_control_params.c @@ -40,14 +40,25 @@ #include "flow_position_control_params.h" /* controller parameters */ + +// Position control P gain PARAM_DEFINE_FLOAT(FPC_POS_P, 3.0f); +// Position control D / damping gain PARAM_DEFINE_FLOAT(FPC_POS_D, 0.0f); +// Altitude control P gain PARAM_DEFINE_FLOAT(FPC_H_P, 0.15f); +// Altitude control I (integrator) gain PARAM_DEFINE_FLOAT(FPC_H_I, 0.00001f); +// Altitude control D gain PARAM_DEFINE_FLOAT(FPC_H_D, 0.8f); +// Altitude control rate limiter PARAM_DEFINE_FLOAT(FPC_H_RATE, 0.1f); +// Altitude control minimum altitude PARAM_DEFINE_FLOAT(FPC_H_MIN, 0.5f); +// Altitude control maximum altitude (higher than 1.5m is untested) PARAM_DEFINE_FLOAT(FPC_H_MAX, 1.5f); +// Altitude control feed forward throttle - adjust to the +// throttle position (0..1) where the copter hovers in manual flight PARAM_DEFINE_FLOAT(FPC_T_FFWD, 0.7f); // adjust this before flight PARAM_DEFINE_FLOAT(FPC_L_S_X, 1.2f); PARAM_DEFINE_FLOAT(FPC_L_S_Y, 1.2f); diff --git a/src/examples/flow_position_estimator/flow_position_estimator_main.c b/src/examples/flow_position_estimator/flow_position_estimator_main.c index c0b16d2e7..e40c9081d 100644 --- a/src/examples/flow_position_estimator/flow_position_estimator_main.c +++ b/src/examples/flow_position_estimator/flow_position_estimator_main.c @@ -90,7 +90,7 @@ static void usage(const char *reason) * Makefile does only apply to this management task. * * The actual stack size should be set in the call - * to task_create(). + * to task_spawn_cmd(). */ int flow_position_estimator_main(int argc, char *argv[]) { @@ -107,7 +107,7 @@ int flow_position_estimator_main(int argc, char *argv[]) } thread_should_exit = false; - daemon_task = task_spawn("flow_position_estimator", + daemon_task = task_spawn_cmd("flow_position_estimator", SCHED_RR, SCHED_PRIORITY_MAX - 5, 4096, diff --git a/src/examples/flow_speed_control/flow_speed_control_main.c b/src/examples/flow_speed_control/flow_speed_control_main.c index 9648728c8..8b3881c43 100644 --- a/src/examples/flow_speed_control/flow_speed_control_main.c +++ b/src/examples/flow_speed_control/flow_speed_control_main.c @@ -99,7 +99,7 @@ usage(const char *reason) * Makefile does only apply to this management task. * * The actual stack size should be set in the call - * to task_spawn(). + * to task_spawn_cmd(). */ int flow_speed_control_main(int argc, char *argv[]) { @@ -116,7 +116,7 @@ int flow_speed_control_main(int argc, char *argv[]) } thread_should_exit = false; - deamon_task = task_spawn("flow_speed_control", + deamon_task = task_spawn_cmd("flow_speed_control", SCHED_DEFAULT, SCHED_PRIORITY_MAX - 6, 4096, diff --git a/src/examples/px4_daemon_app/px4_daemon_app.c b/src/examples/px4_daemon_app/px4_daemon_app.c index c568aaadc..53f1b4a9a 100644 --- a/src/examples/px4_daemon_app/px4_daemon_app.c +++ b/src/examples/px4_daemon_app/px4_daemon_app.c @@ -95,7 +95,7 @@ int px4_daemon_app_main(int argc, char *argv[]) } thread_should_exit = false; - daemon_task = task_spawn("daemon", + daemon_task = task_spawn_cmd("daemon", SCHED_DEFAULT, SCHED_PRIORITY_DEFAULT, 4096, |