mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 04:43:34 +08:00
Clear the screen more properly.
This commit is contained in:
@@ -2646,17 +2646,17 @@ monitor(void)
|
|||||||
read(0, &c, 1);
|
read(0, &c, 1);
|
||||||
|
|
||||||
if (cancels-- == 0) {
|
if (cancels-- == 0) {
|
||||||
printf("\033[H"); /* move cursor home and clear screen */
|
printf("\033[2J\033[H"); /* move cursor home and clear screen */
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (g_dev != nullptr) {
|
if (g_dev != nullptr) {
|
||||||
|
|
||||||
printf("\033[H"); /* move cursor home and clear screen */
|
printf("\033[2J\033[H"); /* move cursor home and clear screen */
|
||||||
(void)g_dev->print_status();
|
(void)g_dev->print_status();
|
||||||
(void)g_dev->print_debug();
|
(void)g_dev->print_debug();
|
||||||
printf("[ Use 'px4io debug <N>' for more output. Hit <enter> three times to exit monitor mode ]\n");
|
printf("\n\n\n[ Use 'px4io debug <N>' for more output. Hit <enter> three times to exit monitor mode ]\n");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
errx(1, "driver not loaded, exiting");
|
errx(1, "driver not loaded, exiting");
|
||||||
|
|||||||
Reference in New Issue
Block a user