mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-17 09:20:36 +08:00
Raft active state extension removed
This commit is contained in:
@@ -360,10 +360,6 @@ void redraw(const uavcan_linux::NodePtr& node,
|
||||
(report.state == RaftCore::ServerStateLeader) ? CLIColor::Green :
|
||||
CLIColor::Default);
|
||||
|
||||
render_top_str("Mode",
|
||||
report.is_active ? "Active" : "Passive",
|
||||
colorize_if(report.is_active, CLIColor::Magenta));
|
||||
|
||||
render_top_int("Last log index",
|
||||
report.last_log_index,
|
||||
CLIColor::Default);
|
||||
@@ -388,6 +384,10 @@ void redraw(const uavcan_linux::NodePtr& node,
|
||||
duration_to_string(time_since_last_activity).c_str(),
|
||||
CLIColor::Default);
|
||||
|
||||
render_top_str("Random timeout",
|
||||
duration_to_string(report.randomized_timeout).c_str(),
|
||||
CLIColor::Default);
|
||||
|
||||
render_top_int("Unknown nodes",
|
||||
report.num_unknown_nodes,
|
||||
colorize_if(report.num_unknown_nodes != 0, CLIColor::Magenta));
|
||||
@@ -630,6 +630,8 @@ int main(int argc, const char** argv)
|
||||
{
|
||||
try
|
||||
{
|
||||
std::srand(std::time(nullptr));
|
||||
|
||||
if (isatty(STDOUT_FILENO) != 1)
|
||||
{
|
||||
std::cerr << "This application cannot run if stdout is not associated with a terminal" << std::endl;
|
||||
|
||||
Reference in New Issue
Block a user