mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 13:23:33 +08:00
flight_mode_manager: merge with flight_tasks
This commit is contained in:
committed by
Lorenz Meier
parent
b1e442b830
commit
4d7b875ee2
@@ -37,16 +37,12 @@ px4_add_module(
|
||||
MODULE modules__mc_pos_control
|
||||
MAIN mc_pos_control
|
||||
COMPILE_FLAGS
|
||||
-Wno-implicit-fallthrough # TODO: fix and remove
|
||||
SRCS
|
||||
MulticopterPositionControl.cpp
|
||||
MulticopterPositionControl.hpp
|
||||
DEPENDS
|
||||
PositionControl
|
||||
controllib
|
||||
FlightTasks
|
||||
git_ecl
|
||||
ecl_geo
|
||||
WeatherVane
|
||||
CollisionPrevention
|
||||
)
|
||||
|
||||
@@ -37,7 +37,6 @@
|
||||
#include <lib/mathlib/mathlib.h>
|
||||
#include <lib/matrix/matrix/math.hpp>
|
||||
|
||||
using namespace time_literals;
|
||||
using namespace matrix;
|
||||
|
||||
MulticopterPositionControl::MulticopterPositionControl(bool vtol) :
|
||||
@@ -271,7 +270,7 @@ void MulticopterPositionControl::Run()
|
||||
|
||||
failsafe(time_stamp_now, setpoint, _states, !was_in_failsafe);
|
||||
_control.setInputSetpoint(setpoint);
|
||||
constraints = FlightTask::empty_constraints;
|
||||
constraints = {0, NAN, NAN, NAN, NAN, NAN, NAN, NAN, false, {}};
|
||||
_control.update(dt);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@
|
||||
#include <commander/px4_custom_mode.h>
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <lib/controllib/blocks.hpp>
|
||||
#include <lib/flight_tasks/FlightTasks.hpp>
|
||||
#include <lib/hysteresis/hysteresis.h>
|
||||
#include <lib/perf/perf_counter.h>
|
||||
#include <lib/systemlib/mavlink_log.h>
|
||||
@@ -64,6 +63,8 @@
|
||||
|
||||
#include "PositionControl/PositionControl.hpp"
|
||||
|
||||
using namespace time_literals;
|
||||
|
||||
class MulticopterPositionControl : public ModuleBase<MulticopterPositionControl>, public control::SuperBlock,
|
||||
public ModuleParams, public px4::WorkItem
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user