status_panel.cpp
Go to the documentation of this file.
1 
29 
30 namespace log_view {
31 
33  wattron(window_, A_REVERSE);
34  std::string clear(width_, ' ');
35  mvwprintw(window_, 0, 0, clear.c_str());
36  mvwprintw(window_, 0, 0, "status: %s logs: %zu", connected_ ? "connected" : "not connected", logs_->size());
37 
38  std::string system_time = toString(system_time_.toSec(), 2);
39  std::string ros_time = "--";
40  if (ros_time_ != ros::Time(0)) {
41  ros_time = toString(ros_time_.toSec(), 2);
42  }
43 
44  std::string time_str = "ros time: " + ros_time + " system time: " + system_time;
45  mvwprintw(window_, 0, width_ - time_str.size(), time_str.c_str());
46  wattroff(window_, A_REVERSE);
47 }
48 
49 } // namespace log_view
ros::WallTime system_time_
Definition: status_panel.h:49
virtual void refresh()
std::string toString(double val, int precision)
Definition: utils.cpp:37


log_view
Author(s): Marc Alban
autogenerated on Thu Mar 4 2021 03:21:52