forked from Archive/PX4-Autopilot
Clear the screen more properly.
This commit is contained in:
parent
8833f81b48
commit
1ac8501d95
|
@ -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");
|
||||||
|
|
Loading…
Reference in New Issue