mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 23:23:33 +08:00
libuavcan passive mode support
This commit is contained in:
@@ -26,6 +26,7 @@ const int16_t ErrInvalidTransferListener = 7;
|
||||
const int16_t ErrNotInited = 8;
|
||||
const int16_t ErrRecursiveCall = 9;
|
||||
const int16_t ErrLogic = 10;
|
||||
const int16_t ErrPassiveMode = 11;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@ public:
|
||||
return getScheduler().getDispatcher().setNodeID(nid);
|
||||
}
|
||||
|
||||
bool isPassiveMode() const { return getScheduler().getDispatcher().isPassiveMode(); }
|
||||
|
||||
int spin(MonotonicTime deadline)
|
||||
{
|
||||
return getScheduler().spin(deadline);
|
||||
|
||||
@@ -141,6 +141,8 @@ public:
|
||||
NodeID getNodeID() const { return self_node_id_; }
|
||||
bool setNodeID(NodeID nid);
|
||||
|
||||
bool isPassiveMode() const { return !getNodeID().isUnicast(); }
|
||||
|
||||
const ISystemClock& getSystemClock() const { return sysclock_; }
|
||||
ISystemClock& getSystemClock() { return sysclock_; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user