Commit Graph

4 Commits

Author SHA1 Message Date
Sam Demeulemeester
6b998e82e7 [TTY/Serial] Always use absolute positioning instead of relying on CR-LF 2022-06-19 16:47:10 +02:00
01e3
1c88824a7d
Optimize screen & serial output handling. (#85)
- Enable VGA/FB to output box drawing characters while maintaining VT100
   character set for serial. Shorten and simplify the screen setup code.

 - Track the background color to decide if the serial output needs to be
   inverted. Remove no longer needed logic for known areas of the screen that
   need to be inverted. As a bonus - popup menu can now be also inverted on
   serial.

 - Reduce the amount of data sent to serial by using CR+LF when possible
   instead of always relying on absolute positioning. Add tty_print()
   for positioning the cursor, remove no longer needed tty_print().

 - Remove no longer needed "LF -> LF+CR" logic from serial_echo_print().

Before (gcc-11.3.0-x86_64):
      text       data        bss      total filename
       929        357         64       1350 system/serial.o
      3517       1356         54       4927 app/display.o

After (gcc-11.3.0-x86_64):
      text       data        bss      total filename
       907        336         64       1307 system/serial.o
      3442       1242         54       4738 app/display.o

Co-authored-by: Sam Demeulemeester <38105886+x86fr@users.noreply.github.com>
2022-06-19 16:40:30 +02:00
Sam Demeulemeester
eae5dd2796 Correct TTY to match the new temperature location on display 2022-04-16 13:31:28 +02:00
Sam Demeulemeester
2e048a7c61
Add support for Serial/TTY (#32)
* Add preliminary support for TTY Serial/UART (#15)

* Use shadow_buffer instead of VGA buffer to get a framebuffer-agnostic TTY supprot

* Added menu browsing & inputs from Serial TTY (#15)

* Add fix for degree symbol on TTY. Correct serial.c & serial.h file created with CRLF (#15)

* Move tty_error_redraw() to insure correct redraw when a error occurs

* Many reindent / cleanup

* Various optimization from @martinwhitaker comments
2022-04-04 18:31:54 +02:00