mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 19:43:37 +08:00
NodeInfoRetriever updated
This commit is contained in:
@@ -256,11 +256,10 @@ private:
|
|||||||
|
|
||||||
virtual void handleNodeStatusChange(const NodeStatusChangeEvent& event)
|
virtual void handleNodeStatusChange(const NodeStatusChangeEvent& event)
|
||||||
{
|
{
|
||||||
const bool was_offline = !event.old_status.known ||
|
const bool was_offline = !event.was_known ||
|
||||||
(event.old_status.status_code == protocol::NodeStatus::STATUS_OFFLINE);
|
(event.old_status.mode == protocol::NodeStatus::MODE_OFFLINE);
|
||||||
|
|
||||||
const bool offline_now = !event.status.known ||
|
const bool offline_now = event.status.mode == protocol::NodeStatus::MODE_OFFLINE;
|
||||||
(event.status.status_code == protocol::NodeStatus::STATUS_OFFLINE);
|
|
||||||
|
|
||||||
if (was_offline || offline_now)
|
if (was_offline || offline_now)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user