From fc173aca445a7a62c5c2ac1028737230815781f0 Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Sun, 24 May 2015 18:32:27 +0300 Subject: [PATCH] uavcan_dynamic_node_id_server fixed coloring --- .../linux/apps/uavcan_dynamic_node_id_server.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libuavcan_drivers/linux/apps/uavcan_dynamic_node_id_server.cpp b/libuavcan_drivers/linux/apps/uavcan_dynamic_node_id_server.cpp index 6545ed2d30..b1be286fc4 100644 --- a/libuavcan_drivers/linux/apps/uavcan_dynamic_node_id_server.cpp +++ b/libuavcan_drivers/linux/apps/uavcan_dynamic_node_id_server.cpp @@ -432,7 +432,11 @@ void redraw(const uavcan_linux::NodePtr& node, { if (report.state != RaftCore::ServerStateLeader) { return CLIColor::Default; } if (!report.followers[i].node_id.isValid()) { return CLIColor::Red; } - if (report.followers[i].match_index != report.last_log_index) { return CLIColor::Magenta; } + if (report.followers[i].match_index != report.last_log_index || + report.followers[i].next_index <= report.last_log_index) + { + return CLIColor::Magenta; + } return CLIColor::Default; };