mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 14:51:37 +08:00
uavcan_status_monitor - improved CLI rendering
This commit is contained in:
@@ -94,7 +94,8 @@ class Monitor : public uavcan::NodeStatusMonitor
|
|||||||
|
|
||||||
void redraw(const uavcan::TimerEvent&)
|
void redraw(const uavcan::TimerEvent&)
|
||||||
{
|
{
|
||||||
std::cout << "\x1b\x5b\x48" << "\x1b\x5b\x32\x4a"
|
std::cout << "\x1b[1J" // Clear screen from the current cursor position to the beginning
|
||||||
|
<< "\x1b[H" // Move cursor to the coordinates 1,1
|
||||||
<< " NID | Status | Uptime (sec) | Vendor-specific status (hex/bin/dec)\n"
|
<< " NID | Status | Uptime (sec) | Vendor-specific status (hex/bin/dec)\n"
|
||||||
<< "-----+---------------+--------------+--------------------------------------\n";
|
<< "-----+---------------+--------------+--------------------------------------\n";
|
||||||
for (unsigned i = 1; i <= uavcan::NodeID::Max; i++)
|
for (unsigned i = 1; i <= uavcan::NodeID::Max; i++)
|
||||||
|
|||||||
Reference in New Issue
Block a user