uavcan_dynamic_node_id_server - Fixed output coloring

This commit is contained in:
Pavel Kirienko 2015-05-23 23:21:03 +03:00
parent ce4ae983a3
commit ed96e9f0fd

View File

@ -428,6 +428,7 @@ void redraw(const uavcan_linux::NodePtr& node,
const auto follower_color_getter = [&](std::uint8_t i)
{
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; }
return CLIColor::Default;