mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2025-12-08 19:53:05 +08:00
tools: mavlink_shell: fix backspace handling
Changed ASCII command from ASCII #127 to ASCII #8 Good: Changed ASCII command from ASCII #127 to ASCII #8 Reported-by: jsm09a <https://github.com/jsm09a> Signed-off-by: Siri <sriramj2@hotmail.com>
This commit is contained in:
committed by
GitHub
parent
469fe62166
commit
5023174715
@@ -191,7 +191,7 @@ def main():
|
||||
cur_history_index = len(command_history)
|
||||
mav_serialport.write(cur_line+'\n')
|
||||
cur_line = ''
|
||||
elif ord(ch) == 127: # backslash
|
||||
elif ord(ch) == 8: # backspace
|
||||
if len(cur_line) > 0:
|
||||
erase_last_n_chars(1)
|
||||
cur_line = cur_line[:-1]
|
||||
|
||||
Reference in New Issue
Block a user