mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-01 05:01:35 +08:00
uavcan_dynamic_node_id_server fixed coloring
This commit is contained in:
@@ -432,7 +432,11 @@ void redraw(const uavcan_linux::NodePtr& node,
|
|||||||
{
|
{
|
||||||
if (report.state != RaftCore::ServerStateLeader) { return CLIColor::Default; }
|
if (report.state != RaftCore::ServerStateLeader) { return CLIColor::Default; }
|
||||||
if (!report.followers[i].node_id.isValid()) { return CLIColor::Red; }
|
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;
|
return CLIColor::Default;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user