cmake fmu-v3 fix and enable more examples

- sync posix_sitl_default and px4fmu-v4pro/v5 with fmu-v3
 - fixes #6667
This commit is contained in:
Daniel Agar
2017-02-25 12:56:58 -05:00
committed by Lorenz Meier
parent 4811ab6b13
commit 89ff9f1fe3
7 changed files with 260 additions and 168 deletions
+1 -1
View File
@@ -44,7 +44,7 @@
#include <unistd.h>
#include <px4_config.h>
#include <nuttx/sched.h>
#include <px4_tasks.h>
#include <systemlib/systemlib.h>
#include <systemlib/err.h>
+1 -1
View File
@@ -427,7 +427,7 @@ int rover_steering_control_main(int argc, char *argv[])
SCHED_PRIORITY_MAX - 20,
2048,
rover_steering_control_thread_main,
(argv) ? (char *const *)&argv[2] : (char *const *)NULL);
(argv) ? (char *const *)&argv[2] : (char *const *)nullptr);
thread_running = true;
exit(0);
}
+4 -4
View File
@@ -206,7 +206,7 @@ BottleDrop::~BottleDrop()
/* if we have given up, kill it */
if (++i > 50) {
task_delete(_main_task);
px4_task_delete(_main_task);
break;
}
} while (_main_task != -1);
@@ -225,7 +225,7 @@ BottleDrop::start()
SCHED_DEFAULT,
SCHED_PRIORITY_DEFAULT + 15,
1500,
(main_t)&BottleDrop::task_main_trampoline,
(px4_main_t)&BottleDrop::task_main_trampoline,
nullptr);
if (_main_task < 0) {
@@ -653,7 +653,7 @@ BottleDrop::task_main()
// We're close enough - open the bay
distance_open_door = math::max(10.0f, 3.0f * fabsf(t_door * groundspeed_body));
if (isfinite(distance_real) && distance_real < distance_open_door &&
if (PX4_ISFINITE(distance_real) && distance_real < distance_open_door &&
fabsf(approach_error) < math::radians(20.0f)) {
open_bay();
_drop_state = DROP_STATE_BAY_OPEN;
@@ -671,7 +671,7 @@ BottleDrop::task_main()
map_projection_reproject(&ref, x_f, y_f, &x_f_NED, &y_f_NED);
future_distance = get_distance_to_next_waypoint(x_f_NED, y_f_NED, _drop_position.lat, _drop_position.lon);
if (isfinite(distance_real) &&
if (PX4_ISFINITE(distance_real) &&
(distance_real < precision) && ((distance_real < future_distance))) {
drop();
_drop_state = DROP_STATE_DROPPED;