This passes the styleData.textColor property from the TableView to the
Text items used to populate the rows to ensure the proper color of the
text to match the alternating background colors of each row.
This fixes not being able to read the text on macOS where half of the
rows were black text on almost black background.
Fixes: #10449
The SERIAL_CONSOLE message now includes a target_system and
target_comonent which prevents serial messages being sent to the wrong
vehicle in case there are multiple vehicles connected.
More background:
https://github.com/mavlink/mavlink/pull/1725
* mavlink console: use TextArea and other improvements
This is a bit slower, so we do some mitigations:
- limit update rate to 30hz
- limit history (see next commit)
changes:
- user can select & copy output
- auto-scrolling: update is paused when scrolling up, any key input will
scroll to the bottom
- feel is more like a shell w/o extra text field.
(on mobile there's still a separate text field as input is handled
differently)
- handle multi-line commands from clipboard
- coloring of ERROR's and WARNing's
- set text focus to shell input
* MavlinkConsoleController: limit history to 500 lines
As CPU load for text change increases with more history due to the use of
TextArea.
* MavlinkConsoleController: add cursor x position support
Fixes handling of the 'erase current line from cursor' (K) command.
The bug was apparent for example when 'nsh> <ESC>[K' was split into several
packets. The first part was cleared when receiving the 2. packet.
* MavlinkConsoleController: newline handling fixes
- do not add a newline when entering a command
- ensure line exists when moving the cursor down