Files
ESPEasy/docs/source/Plugin/AdaGFX_commands.repl
T

213 lines
9.1 KiB
Plaintext

.. csv-table::
:escape: ^
:widths: 20, 30
"
Generic commands: ``<trigger>`` is the command-trigger, documented above.
","
Generic notes:
* If a text has comma's or spaces, then it should be 'wrapped' in either double quotes ``^"``, single quotes ``^'`` or back-ticks ``^```.
* For ``color`` arguments, see how colors can be defined in the ``txc`` subcommand description.
"
"
``<trigger>,clear[,<color>]``
","
Clear the screen using last set background color, or a specified color. Background color is either from configuration or ``txc`` subcommand.
"
"
``<trigger>,rot,<rotation>``
","
Rotate the display orientation clock-wise from the initial position, where rotation can be: (current display content will stay as-is!)
* 0 : No rotation
* 1 : 90 degrees
* 2 : 180 degrees
* 3 : 270 degrees
"
"
``<trigger>,tpm,<TextPrintMode>``
","
Select the Text print Mode
* 0 : Continue to next line (wrap text onto the next line)
* 1 : Truncate exceeding message (cut-off text that won't fit on the screen width)
* 2 : Clear then truncate exceeding message (Clear to width of screen, then print the message)
"
"
``<trigger>,txt,<text>``
","
Write simple text (entire rest of the text provided), use last position, color and size. Color is either from configuration or ``txc`` subcommand.
"
"
``<trigger>,txp,<x>,<y>``
","
Set text position (move the cursor). Depending on the setting **Text Coordinates in col/row**, these coordinates are pixels (default) or column/rows.
"
"
``<trigger>,txz,<x>,<y>,<text>``
","
Set text position (move the cursor) and print the text. Combines the ``txp`` and ``txt`` commands in 1. Depending on the setting **Text Coordinates in col/row**, these coordinates are pixels (default) or column/rows.
"
"
``<trigger>,txc,<foreColor>[,<backgroundColor>]``
","
Set text color (background is transparent if not provided, or the same as the foreground color).
Colors can be specified in 3 ways:
* *Color name* Some named colors are recognized:
* Full color display: ``White``, ``Black``, ``Red``, ``Green``, ``Blue``, ``Yellow``, ``Orange``, ``Navy``, ``Darkgreen``, ``Cyan``, ``Darkcyan``, ``Maroon``, ``Purple``, ``Olive``, ``Magenta``, ``Lightgrey``, ``Darkgrey``, ``Pink`` and ``Greenyellow``.
* 7-color (eInk) displays: ``White``, ``Black``, ``Red``, ``Green``, ``Blue``, ``Yellow`` and ``Orange``
* Monochrome (eInk, 1 add. color, and 1 or 2-tone greyscale) displays: ``White``, ``Black``, ``Inverse``, ``Red``, ``Light`` and ``Dark``
* *#RGB565* A ``#`` prefixed, 1 to 4 digit, hex-coded color value in RGB565 format (5 bits red, 6 bits green, 5 bits blue) giving the max. number of 65535 colors.
* *#RRGGBB* A ``#`` prefixed, 6 digit, hex coded RGB color value. Will be transformed to RGB565!
"
"
``<trigger>,txs,<size>``
","
Set font scaling option. Only values from 0 to 10 are accepted. 0 assumes 1 by default.
"
"
``<trigger>,txtfull,<x>,<y>,<size=1>,<foreColor=white>,<backColor=transparent>,<text>``
","
Write text at position X/Y with all options. Depending on the setting **Text Coordinates in col/row**, these coordinates are pixels (default) or column/rows.
All options that have a default specified (size, foreColor, backColor) can be left out, but text is expected. ForeColor and BackColor use the last set Foreground and Background colors (that will by default be white and transparent if not provided).
"
"
``<trigger>,asciitable[,<offset>,<fontscaling>]``
","
Show an ascii table on the display, starting at position 0,0. Display is not cleared before drawing the table.
``offset`` is in steps of 32 characters (0x20), and by default starts at 0x80, showing the 'high ascii' characters for the current font. Applicable range is -4..3, allowing to view the entire supported character set. The CR (0x0D) and LF (0x0A) characters are replaced by a space to not disturb the table on screen.
``fontscaling`` can be changed, from the default value 2, to enlarge the characters (possibly rendering less characters of the table, hence the offset can be applied). Does not change the current fontscaling setting.
This command is not available in builds that use the ``LIMIT_BUILD_SIZE`` compile-time option, as it is intended for debugging/development use.
"
"
``<trigger>,font,<fontname>``
","
Switch to font. Also applies font settings to recalculate the max. column and row settings.
Depending on compile-time settings, none or multiple fonts are available.
* *default* The default 6 * 10 font, includes most of the special characters like degrees centigrade and a few valuta symbols.
Enabled by default, but disabled in memory-challenged builds: (most extra fonts do *not* include special symbol characters)
* *sevenseg24* A rather large 7-segment 21 * 48 font
* *sevenseg18* A somewhat less large 7-segment 16 * 34 font
* *freesans* A sans-serif 10 * 21 font
Usually disabled fonts: (can be enabled in a Custom build, default included in the MAX builds)
* *angelina8prop* A proportional, handwriting, 6 * 16 font
* *novamono8pt* A modern 9 * 16 font
* *unispace8pt* A modern 12 * 24 font
* *unispaceitalic8pt* A modern italic (slanted) 12 * 24 font
* *whiterabbit8pt* A modern 12 * 24 font
* *angelina12prop* A proportional, handwriting, 8 * 24 font
* *novamono12pt* A modern 13 * 34 font
* *repetitionscrolling12pt* A modern 13 * 24 font
* *unispace12pt* A modern 13 * 18 font
* *unispaceitalic12pt* A modern italic (slanted) 13 * 18 font
* *whiterabbit12pt* A modern 13 * 18 font
* *amerikasans16pt* A proportional 17 * 20 font
* *whiterabbit16pt* A modern 16 * 20 font
* *whiterabbit18pt* A modern 18 * 22 font
* *whiterabbit20pt* A modern 20 * 24 font
"
"
``<trigger>,l,<x1>,<y1>,<x2>,<y2>,<color>``
","
Draw a simple line between point x1,y1 and x2,y2, using the (required) color, 1 pixel wide.
"
"
``<trigger>,lh,<y>,<width>,<color>``
","
Draw a horizontal line (width = Line 'width' in pixels (positive = right of first point, negative = left of first point).
"
"
``<trigger>,lv,<x>,<height>,<color>``
","
Draw a vertical line (height= Line 'height' in pixels (positive = below first point, negative = above first point).
"
"
``<trigger>,lm,<color>,<x1>,<y1>,<x2>,<y2>[,<colorN>][,<xN>,<yN>[,...]|c]``
","
Draw a continuous multi-line between point x1,y1, x2,y2, x3,y3, etc. using the (required) color, 1 pixel wide. The segments of line are drawn straight.
If the last y argument is missing, then the last x argument will be ignored.
If the argument value ``c`` is used, the multi-line is closed to the original starting coordinate, and drawing is stopped.
If ``<colorN>`` is used, then from the next segment that color will be used. Color can be changed multiple times if desired.
"
"
``<trigger>,lmr,<color>,<x>,<y>,<dx1>,<dy1>[,<colorN>][,<dxN>,<dyN>[,...]|c]``
","
Draw a continuous multi-line starting at point x,y, moving *relatively* using the delta-x (dx) and delta-y (dy) values, etc. using the (required) color, 1 pixel wide. The segments of line are drawn straight.
If the last dy argument is missing, then the last dx argument will be ignored.
If the argument value ``c`` is used, the multi-line is closed to the original starting coordinate, and drawing is stopped.
If ``<colorN>`` is used, then from the next segment that color will be used. Color can be changed multiple times if desired.
"
"
``<trigger>,r,<x>,<y>,<width>,<height>,<color>``
","
Draw a rectangle.
"
"
``<trigger>,rf,<x>,<y>,<width>,<height>,<bordercolor>,<innercolor>``
","
Draw a filled rectangle.
"
"
``<trigger>,c,<x>,<y>,<radius>,<color>``
","
Draw a circle.
"
"
``<trigger>,cf,<x>,<y>,<radius>,<bordercolor>,<innercolor>``
","
Draw a filled circle.
"
"
``<trigger>,t,<x1>,<y1>,<x2>,<y2>,<x3>,<y3>,<color>``
","
Draw a triangle.
"
"
``<trigger>,tf,<x1>,<y1>,<x2>,<y2>,<x3>,<y3>,<bordercolor>,<innercolor>``
","
Draw a filled triangle.
"
"
``<trigger>,rr,<x>,<y>,<width>,<height>,<corner_radius>,<color>``
","
Draw a rounded rectangle.
"
"``<trigger>,rrf,<x>,<y>,<width>,<height>,<corner_radius>,<bordercolor>,<innercolor>``
","
Draw a filled rounded rectangle.
"
"
``<trigger>,px,<x>,<y>,<color>``
","
Print a single pixel.
"
"
``<trigger>,pxh,<x>,<y>,<color1>[,<color2>,...]``
","
Print a horizontal chain of colored pixels (left to right, starting at position x,y). Just supply as many colors as pixels that need to be painted.
"
"
``<trigger>,pxv,<x>,<y>,<color1>[,<color2>,...]``
","
Print a vertical chain of colored pixels (top to bottom, starting at position x,y). Just supply as many colors as pixels that need to be painted.
"