mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-21 03:03:34 +08:00
Added slave time sync suppression, which allows to use slave and master on the same node. Shall be documented later.
This commit is contained in:
@@ -30,6 +30,7 @@ class GlobalTimeSyncSlave : Noncopyable
|
||||
NodeID master_nid_;
|
||||
TransferID prev_tid_;
|
||||
uint8_t prev_iface_index_;
|
||||
bool suppressed_;
|
||||
|
||||
ISystemClock& getSystemClock() const { return sub_.getNode().getSystemClock(); }
|
||||
|
||||
@@ -46,10 +47,14 @@ public:
|
||||
: sub_(node)
|
||||
, state_(Update)
|
||||
, prev_iface_index_(0xFF)
|
||||
, suppressed_(false)
|
||||
{ }
|
||||
|
||||
int start();
|
||||
|
||||
void suppress(bool suppressed) { suppressed_ = suppressed; }
|
||||
bool isSuppressed() const { return suppressed_; }
|
||||
|
||||
bool isActive() const;
|
||||
|
||||
NodeID getMasterNodeID() const;
|
||||
|
||||
Reference in New Issue
Block a user