cansniffer: add interactive command to clear/redraw the screen
For efficiency reasons on slow embedded machines cansniffer usually does not clear the screen but only writes updates on required lines. Sometimes the written lines exceed the terminal lines and people resize the window which is not detected by cansniffer. With entering <SPACE><ENTER> in interactive mode the screen can be forced to redraw after resizing the terminal window. Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>pull/200/head
parent
bd6ef44321
commit
adf29573f4
|
|
@ -166,6 +166,7 @@ void print_usage(char *prg)
|
|||
" 8<ENTER> - toggle binary / HEX-ASCII output (small for EFF on 80 chars)\n"
|
||||
" B<ENTER> - toggle binary with gap / HEX-ASCII output (exceeds 80 chars!)\n"
|
||||
" c<ENTER> - toggle color mode\n"
|
||||
" <SPACE><ENTER> - force a clear screen\n"
|
||||
" #<ENTER> - notch currently marked/changed bits (can be used repeatedly)\n"
|
||||
" *<ENTER> - clear notched marked\n"
|
||||
" rMYNAME<ENTER> - read settings file (filter/notch)\n"
|
||||
|
|
@ -492,6 +493,10 @@ int handle_keyb(int fd){
|
|||
|
||||
break;
|
||||
|
||||
case ' ' :
|
||||
clearscreen = 1;
|
||||
break;
|
||||
|
||||
case '#' :
|
||||
notch = 1;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue