mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-14 18:43:34 +08:00
uavcan_dynamic_node_id_server - Highliting Leader state in green
This commit is contained in:
@@ -356,7 +356,9 @@ void redraw(const uavcan_linux::NodePtr& node,
|
||||
|
||||
render_top_str("State",
|
||||
raft_state_to_string(report.state),
|
||||
colorize_if(report.state == RaftCore::ServerStateCandidate, CLIColor::Magenta));
|
||||
(report.state == RaftCore::ServerStateCandidate) ? CLIColor::Magenta :
|
||||
(report.state == RaftCore::ServerStateLeader) ? CLIColor::Green :
|
||||
CLIColor::Default);
|
||||
|
||||
render_top_str("Mode",
|
||||
report.is_active ? "Active" : "Passive",
|
||||
|
||||
Reference in New Issue
Block a user