FlightTask: fix CI: static field requiring definition in cpp file, errors with clang linker (CI) but not with GCC

This commit is contained in:
Matthias Grob
2018-04-05 07:30:12 +02:00
committed by Beat Küng
parent 23fe822955
commit e193240e98
2 changed files with 4 additions and 2 deletions
+3 -1
View File
@@ -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();
+1 -1
View File
@@ -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 */