diff --git a/html_orig/css/app.css b/html_orig/css/app.css index e718b5d..928a24e 100644 --- a/html_orig/css/app.css +++ b/html_orig/css/app.css @@ -613,6 +613,7 @@ ul > * { top: 0; margin-top: 0.61805rem; } .Box .Row.explain { + display: block; max-width: 600px; margin-left: 0; line-height: 1.2; } diff --git a/html_orig/index.php b/html_orig/index.php index 0a8836a..ced21b6 100644 --- a/html_orig/index.php +++ b/html_orig/index.php @@ -13,6 +13,11 @@ if (file_exists($_pf)) { $f = file_get_contents($_pf); $reps = DEBUG ? require(__DIR__ . '/_debug_replacements.php') : []; $str = str_replace(array_keys($reps), array_values($reps), $f); + + // special symbols + $str = str_replace('\,', ' ', $str); + $str = preg_replace('/(?<=\w)~(?=\w)/', ' ', $str); + include_str($str); } else { echo "404"; diff --git a/html_orig/lang/en.php b/html_orig/lang/en.php index a9a506d..1c6f066 100644 --- a/html_orig/lang/en.php +++ b/html_orig/lang/en.php @@ -24,13 +24,14 @@ return [ 'term.defaults' => 'Initial Settings', 'term.explain_initials' => ' - Those are the initial settings used after ESPTerm powers on. They - will also be applied immediately after you submit this form.', + Those are the initial settings used after ESPTerm powers on. + The selected colors will also be used after receiving a + screen- or attributes-reset command.', 'term.example' => 'Default colors preview', 'term.term_title' => 'Header text', - 'term.term_width' => 'Screen width / height', + 'term.term_width' => 'Width / height', 'term.default_fg_bg' => 'Text / background', 'term.buttons' => 'Button labels', 'term.theme' => 'Color scheme', @@ -124,7 +125,7 @@ return [ ', 'system.uart' => 'Serial Port', 'system.explain_uart' => ' - This form controls the primary UART. The debug port is fixed at 115200 baud, one stop-bit and no parity. + This form controls the primary, communication UART. The debug UART is fixed at 115.200 baud, one stop-bit and no parity. ', 'uart.baud' => 'Baud rate', 'uart.parity' => 'Parity', diff --git a/html_orig/pages/help.php b/html_orig/pages/help.php index ac62b71..fc95a02 100644 --- a/html_orig/pages/help.php +++ b/html_orig/pages/help.php @@ -1,15 +1,34 @@
-

Wiring

+

Troubleshooting

@@ -17,19 +36,22 @@

Screen

-
+

Color Reference

-

Color is set using \e[<c>m or \e[<c>;<c>m where "<c>" are numbers from the following tables:

+

Color is set using \e[<c>m where <c> are numbers separated by semicolons + (and \e is ESC, code 27). The actual color representation depends on a color theme which + can be selected in Terminal Settings.

Foreground @@ -45,7 +67,7 @@
- 90 + 90 91 92 93 @@ -58,18 +80,18 @@ Background
- 40 - 41 - 42 + 40 + 41 + 42 43 - 44 - 45 - 46 + 44 + 45 + 46 47
- 100 + 100 101 102 103 @@ -79,7 +101,10 @@ 107
-

Bright foreground can also be set using the "bold" attribute 1 (eg. \e[31;1m). For more details, see the ANSI code reference below.

+

To make the text bold, use the "bold" attribute (eg. \e[31;40;1m for + bold red on black).

+ +

The colors are reset to default using \e[0m. For more info, see the tables below.

@@ -87,13 +112,12 @@

All the user types on their keyboard is sent as-is to the UART, including ESC, ANSI sequences for arrow keys and CR-LF for Enter. - The input is limited to ASCII codes 32-126, backspace 8 and tab 9.

-

The buttons under the screen send ASCII codes 1, 2, 3, 4, 5.

+

The buttons under the screen send ASCII codes 1, 2, 3, 4, 5. This choice was made to make their parsing as simple as possible.

- Mouse input (click/tap) is sent as \e[<y>;<x>M. You can use this for on-screen buttons, menu navigation etc. + Mouse input (click/tap) is sent as \e[<y>;<x>M. You can use this for virtual on-screen buttons.

@@ -123,6 +147,14 @@ 0 Reset text attributes to default + + 1 + Bold + + + 21 or 22 + Bold off + 7 Inverse (fg/bg swap when printing) @@ -277,7 +309,7 @@ \e]W<r>;<c>\a rows;cols - Set screen size, maximum 25x80 (resp. total 2000 characters). This also clears the screen. + Set screen size (max ~ 80x30). This also clears the screen. This is a custom ESPTerm OSC command. @@ -304,13 +336,23 @@ \e]FR\a -- - "Factory Reset", emergency code when you mess up the WiFi, restores SSID to unique default, clears stored credentials & enters Client+AP mode. + "Factory Reset", emergency code when you mess up the WiFi, restores SSID to unique default, clears + stored credentials & enters Client+AP mode. + \e[5n -- Query device status, replies with \e[0n "device is OK". Can be used to check if the UART works. + + ASCII 24 (18h) + + This symbol is sent by ESPTerm when it becomes ready to receive commands. It can be used to wait before it becomes + ready on power-up, or to detect a spontaneous ESPTerm restart - that could happen due to RAM exhaustion due + to a memory leak, or perhaps a power outage. + +
diff --git a/html_orig/sass/layout/_box.scss b/html_orig/sass/layout/_box.scss index 1ed9469..d1fed9f 100755 --- a/html_orig/sass/layout/_box.scss +++ b/html_orig/sass/layout/_box.scss @@ -78,6 +78,7 @@ } .Row.explain { + display: block; // this stops flex messing up text with inline tags max-width: 600px; margin-left: 0; line-height: 1.2; diff --git a/user/ansi_parser_callbacks.c b/user/ansi_parser_callbacks.c index 5e4b1bc..61a4a72 100644 --- a/user/ansi_parser_callbacks.c +++ b/user/ansi_parser_callbacks.c @@ -231,8 +231,8 @@ apars_handle_CSI(char leadchar, int *params, char keychar) else if (n == 49) screen_set_bg(false); // default bg else if (n == 7) screen_inverse(true); // inverse else if (n == 27) screen_inverse(false); // positive - else if (n == 1) screen_set_bold(true); // ANSI bold = bright fg - else if (n == 21 || n == 22) screen_set_bold(false); // ANSI bold = bright fg + else if (n == 1) screen_set_bold(true); // bold + else if (n == 21 || n == 22) screen_set_bold(false); // bold off else if (n >= 90 && n <= 97) screen_set_fg(n-90+8); // AIX bright fg else if (n >= 100 && n <= 107) screen_set_bg(n-100+8); // AIX bright bg }