uavcan_dynamic_node_id_server fixed coloring

This commit is contained in:
Pavel Kirienko 2015-05-24 18:32:27 +03:00
parent 2952608ffa
commit fc173aca44

View File

@ -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;
};