mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 18:27:05 +08:00
reenable task flag
This commit is contained in:
@@ -32,7 +32,11 @@ using namespace px4;
|
|||||||
/**
|
/**
|
||||||
* This tutorial demonstrates simple sending of messages over the PX4 middleware system.
|
* This tutorial demonstrates simple sending of messages over the PX4 middleware system.
|
||||||
*/
|
*/
|
||||||
// __EXPORT bool task_should_exit;
|
|
||||||
|
namespace px4
|
||||||
|
{
|
||||||
|
bool task_should_exit = false;
|
||||||
|
}
|
||||||
|
|
||||||
PX4_MAIN_FUNCTION(publisher)
|
PX4_MAIN_FUNCTION(publisher)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -36,8 +36,10 @@ void rc_channels_callback(const PX4_TOPIC_T(rc_channels) *msg)
|
|||||||
{
|
{
|
||||||
PX4_INFO("I heard: [%lu]", msg->timestamp_last_valid);
|
PX4_INFO("I heard: [%lu]", msg->timestamp_last_valid);
|
||||||
}
|
}
|
||||||
|
namespace px4
|
||||||
// __EXPORT bool task_should_exit;
|
{
|
||||||
|
bool task_should_exit = false;
|
||||||
|
}
|
||||||
|
|
||||||
PX4_MAIN_FUNCTION(subscriber)
|
PX4_MAIN_FUNCTION(subscriber)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -37,3 +37,8 @@
|
|||||||
* PX4 Middleware Wrapper Nodehandle
|
* PX4 Middleware Wrapper Nodehandle
|
||||||
*/
|
*/
|
||||||
#include <platforms/px4_nodehandle.h>
|
#include <platforms/px4_nodehandle.h>
|
||||||
|
|
||||||
|
namespace px4
|
||||||
|
{
|
||||||
|
bool task_should_exit = false;
|
||||||
|
}
|
||||||
|
|||||||
@@ -40,7 +40,6 @@
|
|||||||
#include <px4.h>
|
#include <px4.h>
|
||||||
#include <drivers/drv_hrt.h>
|
#include <drivers/drv_hrt.h>
|
||||||
|
|
||||||
extern bool task_should_exit;
|
|
||||||
|
|
||||||
namespace px4
|
namespace px4
|
||||||
{
|
{
|
||||||
@@ -57,9 +56,7 @@ uint64_t get_time_micros()
|
|||||||
|
|
||||||
bool ok()
|
bool ok()
|
||||||
{
|
{
|
||||||
// return !task_should_exit;
|
return !task_should_exit;
|
||||||
//XXX
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void spin_once()
|
void spin_once()
|
||||||
|
|||||||
@@ -68,6 +68,8 @@ private:
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
extern bool task_should_exit;
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * A limiter/ saturation.
|
// * A limiter/ saturation.
|
||||||
// * The output of update is the input, bounded
|
// * The output of update is the input, bounded
|
||||||
|
|||||||
Reference in New Issue
Block a user