mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 22:13:34 +08:00
drivers/modules: changes after mavlink_log change
The mavlink_log API changes lead to changes in all drivers/modules using it.
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
#include "RunwayTakeoff.h"
|
||||
#include <controllib/blocks.hpp>
|
||||
#include <controllib/block/BlockParam.hpp>
|
||||
#include <mavlink/mavlink_log.h>
|
||||
#include <systemlib/mavlink_log.h>
|
||||
#include <mathlib/mathlib.h>
|
||||
|
||||
namespace runwaytakeoff
|
||||
@@ -92,7 +92,7 @@ void RunwayTakeoff::init(float yaw, double current_lat, double current_lon)
|
||||
}
|
||||
|
||||
void RunwayTakeoff::update(float airspeed, float alt_agl,
|
||||
double current_lat, double current_lon, int mavlink_fd)
|
||||
double current_lat, double current_lon, orb_advert_t *mavlink_log_pub)
|
||||
{
|
||||
|
||||
switch (_state) {
|
||||
@@ -106,7 +106,7 @@ void RunwayTakeoff::update(float airspeed, float alt_agl,
|
||||
case RunwayTakeoffState::CLAMPED_TO_RUNWAY:
|
||||
if (airspeed > _airspeed_min.get() * _min_airspeed_scaling.get()) {
|
||||
_state = RunwayTakeoffState::TAKEOFF;
|
||||
mavlink_log_info(mavlink_fd, "#Takeoff airspeed reached");
|
||||
mavlink_log_info(mavlink_log_pub, "#Takeoff airspeed reached");
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -124,7 +124,7 @@ void RunwayTakeoff::update(float airspeed, float alt_agl,
|
||||
_start_wp(1) = (float)current_lon;
|
||||
}
|
||||
|
||||
mavlink_log_info(mavlink_fd, "#Climbout");
|
||||
mavlink_log_info(mavlink_log_pub, "#Climbout");
|
||||
}
|
||||
|
||||
break;
|
||||
@@ -133,7 +133,7 @@ void RunwayTakeoff::update(float airspeed, float alt_agl,
|
||||
if (alt_agl > _climbout_diff.get()) {
|
||||
_climbout = false;
|
||||
_state = RunwayTakeoffState::FLY;
|
||||
mavlink_log_info(mavlink_fd, "#Navigating to waypoint");
|
||||
mavlink_log_info(mavlink_log_pub, "#Navigating to waypoint");
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
#include <drivers/drv_hrt.h>
|
||||
#include <controllib/blocks.hpp>
|
||||
#include <controllib/block/BlockParam.hpp>
|
||||
#include <mavlink/mavlink_log.h>
|
||||
#include <systemlib/mavlink_log.h>
|
||||
#include <mathlib/mathlib.h>
|
||||
|
||||
namespace runwaytakeoff
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
~RunwayTakeoff();
|
||||
|
||||
void init(float yaw, double current_lat, double current_lon);
|
||||
void update(float airspeed, float alt_agl, double current_lat, double current_lon, int mavlink_fd);
|
||||
void update(float airspeed, float alt_agl, double current_lat, double current_lon, orb_advert_t *mavlink_log_pub);
|
||||
|
||||
RunwayTakeoffState getState() { return _state; };
|
||||
bool isInitialized() { return _initialized; };
|
||||
|
||||
Reference in New Issue
Block a user