mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 00:13:34 +08:00
FlightTask: fix CI: static field requiring definition in cpp file, errors with clang linker (CI) but not with GCC
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
#include "FlightTask.hpp"
|
||||
#include <mathlib/mathlib.h>
|
||||
|
||||
constexpr uint64_t FlightTask::_timeout;
|
||||
|
||||
int FlightTask::update()
|
||||
{
|
||||
_time = hrt_elapsed_time(&_starting_time_stamp) / 1e6f;
|
||||
_deltatime = math::min((int)hrt_elapsed_time(&_last_time_stamp), _timeout) / 1e6f;
|
||||
_deltatime = math::min(hrt_elapsed_time(&_last_time_stamp), _timeout) / 1e6f;
|
||||
_last_time_stamp = hrt_absolute_time();
|
||||
updateSubscriptions();
|
||||
_evaluate_vehicle_position();
|
||||
|
||||
@@ -89,7 +89,7 @@ public:
|
||||
};
|
||||
|
||||
protected:
|
||||
static constexpr int _timeout = 500000; /*< maximal time in us before a loop or data times out */
|
||||
static constexpr uint64_t _timeout = 500000; /*< maximal time in us before a loop or data times out */
|
||||
|
||||
float _time = 0; /**< passed time in seconds since the task was activated */
|
||||
float _deltatime = 0; /**< passed time in seconds since the task was last updated */
|
||||
|
||||
Reference in New Issue
Block a user