From bf509da24bf5978f95cd0f064b93998e8fd20986 Mon Sep 17 00:00:00 2001 From: Peter Feerick <5500713+pfeerick@users.noreply.github.com> Date: Mon, 7 Sep 2026 13:58:25 +1000 Subject: [PATCH] fix: repair broken internal links across four patterns Fixes four distinct classes of broken relative links found in the published (non-scratch) pages under website/md-docs: - Mangled GitBook-artifact placeholder link (../lcd-functions-less-than-greater-than-luadoc-begin-lcd/...) now points at api-reference/display-lcd.md, or api-overview/constants/color-constants.md#indexed-colors where the color table is the actual referent. - Broken appendix references (../appendix/units.html, ../../part_vii_-_appendix/fonts.md) now point at api-overview/constants/units.md and api-overview/fonts.md. Also fixes a stray extra pair of parens around the units.html link in runtime-play-number.md and runtime.d.lua. - Links assuming a topic subfolder under api-reference/ (e.g. api-reference/variables/runtime-get-value.md) flattened to the actual flat layout (api-reference/runtime-get-value.md). - Off-by-one relative path to assets/luals/*.d.lua in programming/basics/editor.md (one ../ too many). review-*.md QA scratch pages and module-*.md dashboards carry duplicate copies of some of these same broken strings but are left as-is: they are excluded from the production build via the mkdocs.yml/mkdocs.dev.yml split (separate change) and are throwaway extraction artifacts, not hand-maintained prose. Verified with `mkdocs build --strict` (exit 0, zero warnings). Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_015yCHydHbzZYCKpav38SonD --- .../api-overview/constants/key_events.md | 2 +- .../script-types/widget-scripts.md | 2 +- .../md-docs/api-reference/lcd-draw-annulus.md | 2 +- website/md-docs/api-reference/lcd-draw-arc.md | 2 +- .../lcd-draw-bitmap-pattern-pie.md | 2 +- .../api-reference/lcd-draw-bitmap-pattern.md | 2 +- .../md-docs/api-reference/lcd-draw-channel.md | 2 +- .../md-docs/api-reference/lcd-draw-circle.md | 2 +- .../api-reference/lcd-draw-filled-circle.md | 2 +- .../lcd-draw-filled-rectangle.md | 2 +- .../api-reference/lcd-draw-filled-triangle.md | 2 +- .../md-docs/api-reference/lcd-draw-gauge.md | 2 +- .../api-reference/lcd-draw-hud-rectangle.md | 2 +- .../lcd-draw-line-with-clipping.md | 4 +- .../md-docs/api-reference/lcd-draw-number.md | 2 +- website/md-docs/api-reference/lcd-draw-pie.md | 2 +- .../md-docs/api-reference/lcd-draw-point.md | 2 +- .../api-reference/lcd-draw-rectangle.md | 2 +- .../md-docs/api-reference/lcd-draw-source.md | 2 +- .../md-docs/api-reference/lcd-draw-switch.md | 2 +- .../api-reference/lcd-draw-text-lines.md | 2 +- .../md-docs/api-reference/lcd-draw-text.md | 2 +- .../md-docs/api-reference/lcd-draw-timer.md | 2 +- .../api-reference/lcd-draw-triangle.md | 2 +- .../md-docs/api-reference/lcd-get-color.md | 2 +- .../md-docs/api-reference/lcd-invert-rect.md | 2 +- .../md-docs/api-reference/lcd-set-color.md | 2 +- .../md-docs/api-reference/lcd-size-text.md | 2 +- .../api-reference/runtime-get-field-info.md | 2 +- .../api-reference/runtime-play-number.md | 2 +- .../runtime-set-telemetry-value.md | 2 +- website/md-docs/assets/luals/lcd.d.lua | 54 +++++++++---------- website/md-docs/assets/luals/runtime.d.lua | 4 +- .../advanced-topics/optimization-tricks.md | 4 +- website/md-docs/programming/basics/editor.md | 8 +-- ...ta-exchange-with-the-edgetx-model-setup.md | 12 ++--- .../core-concepts/drawing-flags-and-colors.md | 8 +-- .../loading-code-modules-dynamically.md | 2 +- 38 files changed, 78 insertions(+), 78 deletions(-) diff --git a/website/md-docs/api-overview/constants/key_events.md b/website/md-docs/api-overview/constants/key_events.md index b22faee75..804f6ac49 100644 --- a/website/md-docs/api-overview/constants/key_events.md +++ b/website/md-docs/api-overview/constants/key_events.md @@ -22,7 +22,7 @@ Couple of examples: * a longer pres on key would generate: `FIRST`, `LONG`, `BREAK` * even longer press: `FIRST`, `LONG`, `REPEAT,`REPEAT, ..., `BREAK` -This normal key event sequence can be altered with the [killEvents(key)](../../api-reference/key-inputs/runtime-kill-events.md) function. Any time this function is called (after the `FIRST` event) all further key events for this key will be suppressed until the next key press of this key. Examples: +This normal key event sequence can be altered with the [killEvents(key)](../../api-reference/runtime-kill-events.md) function. Any time this function is called (after the `FIRST` event) all further key events for this key will be suppressed until the next key press of this key. Examples: * kill immediately after the key press would generate: `FIRST` * kill after the long key press would generate: `FIRST`, `LONG` diff --git a/website/md-docs/api-overview/script-types/widget-scripts.md b/website/md-docs/api-overview/script-types/widget-scripts.md index 4bf0c2f30..dc5f0a40e 100644 --- a/website/md-docs/api-overview/script-types/widget-scripts.md +++ b/website/md-docs/api-overview/script-types/widget-scripts.md @@ -17,7 +17,7 @@ Each model can have up to nine Main Views, with up to 8 widgets per screen, depe All widget scripts on the SD card are loaded into memory when the model is selected, even widgets that are not used. This has the side effect that any global functions defined in a widget script will always be available to other widget scripts. It also means that any Widget Script placed in proper location on the SD card will consume part of the radio's memory - even if it is not being used. !!! warning - It is important to either keep Widget Scripts small, or to use Lua's [loadScript()](../../api-reference/lua-scripts/runtime-load-script.md) function to load code dynamically + It is important to either keep Widget Scripts small, or to use Lua's [loadScript()](../../api-reference/runtime-load-script.md) function to load code dynamically Script executes until: diff --git a/website/md-docs/api-reference/lcd-draw-annulus.md b/website/md-docs/api-reference/lcd-draw-annulus.md index bb4e807a2..0f85b4d12 100644 --- a/website/md-docs/api-reference/lcd-draw-annulus.md +++ b/website/md-docs/api-reference/lcd-draw-annulus.md @@ -14,7 +14,7 @@ Draw an arc | `r2` | yes | `integer` | radii of the inside and outside of the annulus | | `start` | yes | `integer` | start and end of the annulus | | `end` | yes | `integer` | start and end of the annulus | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-arc.md b/website/md-docs/api-reference/lcd-draw-arc.md index e94b9de6c..facbbc1ac 100644 --- a/website/md-docs/api-reference/lcd-draw-arc.md +++ b/website/md-docs/api-reference/lcd-draw-arc.md @@ -13,7 +13,7 @@ Draw an arc | `r` | yes | `integer` | radius | | `start` | yes | `integer` | start and end of the arc | | `end` | yes | `integer` | start and end of the arc | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-bitmap-pattern-pie.md b/website/md-docs/api-reference/lcd-draw-bitmap-pattern-pie.md index ce3422bf1..1a086f435 100644 --- a/website/md-docs/api-reference/lcd-draw-bitmap-pattern-pie.md +++ b/website/md-docs/api-reference/lcd-draw-bitmap-pattern-pie.md @@ -13,7 +13,7 @@ Displays a bitmap pattern pie at (x,y) | `y` | yes | `integer` | starting coordinates | | `startAngle` | yes | `integer` | Start angle | | `endAngle` | yes | `integer` | End angle | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-bitmap-pattern.md b/website/md-docs/api-reference/lcd-draw-bitmap-pattern.md index 0b66dbffa..506c73210 100644 --- a/website/md-docs/api-reference/lcd-draw-bitmap-pattern.md +++ b/website/md-docs/api-reference/lcd-draw-bitmap-pattern.md @@ -11,7 +11,7 @@ Displays a bitmap pattern at (x,y) | `bitmap` | yes | `pointer` | point to a bitmap previously opened with Bitmap.open() | | `x` | yes | `integer` | starting coordinates | | `y` | yes | `integer` | starting coordinates | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-channel.md b/website/md-docs/api-reference/lcd-draw-channel.md index 2296ab393..ed0df12ae 100644 --- a/website/md-docs/api-reference/lcd-draw-channel.md +++ b/website/md-docs/api-reference/lcd-draw-channel.md @@ -11,7 +11,7 @@ Display a telemetry value at (x,y) | `x` | yes | `integer` | starting coordinate | | `y` | yes | `integer` | starting coordinate | | `source` | yes | `integer|string` | can be a source identifier (number) or a source name (string). See getValue() | -| `flags` | yes | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | yes | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-circle.md b/website/md-docs/api-reference/lcd-draw-circle.md index 1d7c4b129..16afabae1 100644 --- a/website/md-docs/api-reference/lcd-draw-circle.md +++ b/website/md-docs/api-reference/lcd-draw-circle.md @@ -11,7 +11,7 @@ Draw a circle at (x, y) of specified radius | `x` | yes | `integer` | center position | | `y` | yes | `integer` | center position | | `r` | yes | `integer` | radius in pixels | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-filled-circle.md b/website/md-docs/api-reference/lcd-draw-filled-circle.md index 90145922a..4e46fe223 100644 --- a/website/md-docs/api-reference/lcd-draw-filled-circle.md +++ b/website/md-docs/api-reference/lcd-draw-filled-circle.md @@ -11,7 +11,7 @@ Draw a filled circle at (x, y) of specified radius | `x` | yes | `integer` | center position | | `y` | yes | `integer` | center position | | `r` | yes | `integer` | radius in pixels | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-filled-rectangle.md b/website/md-docs/api-reference/lcd-draw-filled-rectangle.md index 1634cb223..1babee2b0 100644 --- a/website/md-docs/api-reference/lcd-draw-filled-rectangle.md +++ b/website/md-docs/api-reference/lcd-draw-filled-rectangle.md @@ -12,7 +12,7 @@ Draw a solid rectangle from top left corner (x,y) of specified width and height | `y` | yes | `integer` | top left corner position | | `w` | yes | `integer` | width in pixels | | `h` | yes | `integer` | height in pixels | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | | `opacity` | no | `integer` | opacity defaults to 0 (only on radios with color display) | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-filled-triangle.md b/website/md-docs/api-reference/lcd-draw-filled-triangle.md index 0e99408f5..2284aacc3 100644 --- a/website/md-docs/api-reference/lcd-draw-filled-triangle.md +++ b/website/md-docs/api-reference/lcd-draw-filled-triangle.md @@ -14,7 +14,7 @@ Draw a filled triangle | `y2` | yes | `integer` | coordinates of the three vertices | | `x3` | yes | `integer` | coordinates of the three vertices | | `y3` | yes | `integer` | coordinates of the three vertices | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-gauge.md b/website/md-docs/api-reference/lcd-draw-gauge.md index ab4b77bd1..05e5338f9 100644 --- a/website/md-docs/api-reference/lcd-draw-gauge.md +++ b/website/md-docs/api-reference/lcd-draw-gauge.md @@ -14,7 +14,7 @@ Draw a simple gauge that is filled based upon fill value | `h` | yes | `integer` | height in pixels | | `fill` | yes | `integer` | amount of fill to apply | | `maxfill` | yes | `integer` | total value of fill | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-hud-rectangle.md b/website/md-docs/api-reference/lcd-draw-hud-rectangle.md index 0a08bf5d3..a59e00451 100644 --- a/website/md-docs/api-reference/lcd-draw-hud-rectangle.md +++ b/website/md-docs/api-reference/lcd-draw-hud-rectangle.md @@ -14,7 +14,7 @@ Draw a rectangle in perspective | `xmax` | yes | `integer` | the limits of the rectangle | | `ymin` | yes | `integer` | the limits of the rectangle | | `ymax` | yes | `integer` | the limits of the rectangle | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-line-with-clipping.md b/website/md-docs/api-reference/lcd-draw-line-with-clipping.md index 0e29ddc19..21107f7f5 100644 --- a/website/md-docs/api-reference/lcd-draw-line-with-clipping.md +++ b/website/md-docs/api-reference/lcd-draw-line-with-clipping.md @@ -16,8 +16,8 @@ Draw a line only inside a rectangle | `xmax` | yes | `integer` | the limits of the rectangle inside which the line is drawn | | `ymin` | yes | `integer` | the limits of the rectangle inside which the line is drawn | | `ymax` | yes | `integer` | the limits of the rectangle inside which the line is drawn | -| `pattern` | yes | `FORCE` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `pattern` | yes | `FORCE` | please see [Lcd functions overview](display-lcd.md) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-number.md b/website/md-docs/api-reference/lcd-draw-number.md index 89dc6ac72..4cc2c4eb7 100644 --- a/website/md-docs/api-reference/lcd-draw-number.md +++ b/website/md-docs/api-reference/lcd-draw-number.md @@ -11,7 +11,7 @@ Display a number at (x,y) | `x` | yes | `integer` | starting coordinate | | `y` | yes | `integer` | starting coordinate | | `value` | yes | `integer` | value to display | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | | `inversColor` | no | `string` | overrides the inverse text color for INVERS | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-pie.md b/website/md-docs/api-reference/lcd-draw-pie.md index 0440c3eea..74df3c184 100644 --- a/website/md-docs/api-reference/lcd-draw-pie.md +++ b/website/md-docs/api-reference/lcd-draw-pie.md @@ -13,7 +13,7 @@ Draw a pie slice | `r` | yes | `integer` | radius | | `start` | yes | `integer` | start and end of the pie slice | | `end` | yes | `integer` | start and end of the pie slice | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-point.md b/website/md-docs/api-reference/lcd-draw-point.md index 8070ce136..2d51a93cb 100644 --- a/website/md-docs/api-reference/lcd-draw-point.md +++ b/website/md-docs/api-reference/lcd-draw-point.md @@ -10,7 +10,7 @@ Draw a single pixel at (x,y) position | --- | --- | --- | --- | | `x` | yes | `integer` | x position | | `y` | yes | `integer` | y position | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-rectangle.md b/website/md-docs/api-reference/lcd-draw-rectangle.md index 310823fef..a232fadc8 100644 --- a/website/md-docs/api-reference/lcd-draw-rectangle.md +++ b/website/md-docs/api-reference/lcd-draw-rectangle.md @@ -12,7 +12,7 @@ Draw a rectangle from top left corner (x,y) of specified width and height | `y` | yes | `integer` | top left corner position | | `w` | yes | `integer` | width in pixels | | `h` | yes | `integer` | height in pixels | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | | `t` | no | `integer` | thickness in pixels, defaults to 1 (only on radios with color display) | | `opacity` | no | `integer` | opacity defaults to 0 (only on radios with color display) | diff --git a/website/md-docs/api-reference/lcd-draw-source.md b/website/md-docs/api-reference/lcd-draw-source.md index fc00cb104..ebf717738 100644 --- a/website/md-docs/api-reference/lcd-draw-source.md +++ b/website/md-docs/api-reference/lcd-draw-source.md @@ -11,7 +11,7 @@ Displays the name of the corresponding input as defined by the source at (x,y) | `x` | yes | `integer` | starting coordinate | | `y` | yes | `integer` | starting coordinate | | `source` | yes | `integer` | source index | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-switch.md b/website/md-docs/api-reference/lcd-draw-switch.md index fdf5a71a8..6f3ddfe95 100644 --- a/website/md-docs/api-reference/lcd-draw-switch.md +++ b/website/md-docs/api-reference/lcd-draw-switch.md @@ -11,7 +11,7 @@ Draw a text representation of switch at (x,y) | `x` | yes | `integer` | starting coordinate | | `y` | yes | `integer` | starting coordinate | | `switch` | yes | `integer` | number of switch to display, negative number displays negated switch | -| `flags` | yes | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html), only SMLSIZE, BLINK and INVERS. | +| `flags` | yes | `integer` | please see [Lcd functions overview](display-lcd.md), only SMLSIZE, BLINK and INVERS. | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-text-lines.md b/website/md-docs/api-reference/lcd-draw-text-lines.md index 480fb29a1..0abd94d1a 100644 --- a/website/md-docs/api-reference/lcd-draw-text-lines.md +++ b/website/md-docs/api-reference/lcd-draw-text-lines.md @@ -13,7 +13,7 @@ Draw text inside rectangle (x,y,w,h) with line breaks | `w` | yes | `integer` | width and height of bounding rectangle | | `h` | yes | `integer` | width and height of bounding rectangle | | `text` | yes | `string` | text to display | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) for drawing flags and colors, and [Appendix](../../part_vii_-_appendix/fonts.md) for available characters in each font set. RIGHT, CENTER and VCENTER are not implemented. | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) for drawing flags and colors, and [Appendix](../api-overview/fonts.md) for available characters in each font set. RIGHT, CENTER and VCENTER are not implemented. | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-text.md b/website/md-docs/api-reference/lcd-draw-text.md index bead9ff89..ce110ff37 100644 --- a/website/md-docs/api-reference/lcd-draw-text.md +++ b/website/md-docs/api-reference/lcd-draw-text.md @@ -11,7 +11,7 @@ Draw a text beginning at (x,y) | `x` | yes | `integer` | starting coordinate | | `y` | yes | `integer` | starting coordinate | | `text` | yes | `string` | text to display | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) for drawing flags and colors, and [Appendix](../../part_vii_-_appendix/fonts.md) for available characters in each font set. | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) for drawing flags and colors, and [Appendix](../api-overview/fonts.md) for available characters in each font set. | | `inversColor` | no | `string` | overrides the inverse text color for INVERS | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-timer.md b/website/md-docs/api-reference/lcd-draw-timer.md index 23bbf211f..1615995e9 100644 --- a/website/md-docs/api-reference/lcd-draw-timer.md +++ b/website/md-docs/api-reference/lcd-draw-timer.md @@ -11,7 +11,7 @@ Display a value formatted as time at (x,y) | `x` | yes | `integer` | starting coordinate | | `y` | yes | `integer` | starting coordinate | | `value` | yes | `integer` | time in seconds | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | | `inversColor` | no | `string` | overrides the inverse text color for INVERS | ## Returns diff --git a/website/md-docs/api-reference/lcd-draw-triangle.md b/website/md-docs/api-reference/lcd-draw-triangle.md index a2fda4db0..ef4c839e9 100644 --- a/website/md-docs/api-reference/lcd-draw-triangle.md +++ b/website/md-docs/api-reference/lcd-draw-triangle.md @@ -14,7 +14,7 @@ Draw a triangle | `y2` | yes | `integer` | coordinates of the three vertices | | `x3` | yes | `integer` | coordinates of the three vertices | | `y3` | yes | `integer` | coordinates of the three vertices | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-get-color.md b/website/md-docs/api-reference/lcd-get-color.md index e54cbaa6f..019b0f7aa 100644 --- a/website/md-docs/api-reference/lcd-get-color.md +++ b/website/md-docs/api-reference/lcd-get-color.md @@ -8,7 +8,7 @@ Get the color value from flags | Name | Req | Type | Description | | --- | --- | --- | --- | -| `flags` | yes | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | yes | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-invert-rect.md b/website/md-docs/api-reference/lcd-invert-rect.md index 07f76e816..00011b004 100644 --- a/website/md-docs/api-reference/lcd-invert-rect.md +++ b/website/md-docs/api-reference/lcd-invert-rect.md @@ -12,7 +12,7 @@ Invert a rectangle zone from top left corner (x,y) of specified width and height | `y` | yes | `integer` | top left corner position | | `w` | yes | `integer` | width in pixels | | `h` | yes | `integer` | height in pixels | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/lcd-set-color.md b/website/md-docs/api-reference/lcd-set-color.md index 7517adc25..17e095eee 100644 --- a/website/md-docs/api-reference/lcd-set-color.md +++ b/website/md-docs/api-reference/lcd-set-color.md @@ -2,7 +2,7 @@ `lcd.setColor(colorIndex, color)` -Change an indexed color (theme colors and CUSTOM_COLOR). Please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html#color-constants) +Change an indexed color (theme colors and CUSTOM_COLOR). Please see [Lcd functions overview](../api-overview/constants/color-constants.md#indexed-colors) ## Parameters diff --git a/website/md-docs/api-reference/lcd-size-text.md b/website/md-docs/api-reference/lcd-size-text.md index be73a23f7..70409ec6c 100644 --- a/website/md-docs/api-reference/lcd-size-text.md +++ b/website/md-docs/api-reference/lcd-size-text.md @@ -9,7 +9,7 @@ Get the width and height of a text string drawn with flags | Name | Req | Type | Description | | --- | --- | --- | --- | | `text` | yes | `string` | | -| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | +| `flags` | no | `integer` | please see [Lcd functions overview](display-lcd.md) | ## Returns diff --git a/website/md-docs/api-reference/runtime-get-field-info.md b/website/md-docs/api-reference/runtime-get-field-info.md index da96a5d83..6e99f5028 100644 --- a/website/md-docs/api-reference/runtime-get-field-info.md +++ b/website/md-docs/api-reference/runtime-get-field-info.md @@ -14,7 +14,7 @@ Return detailed information about field (source) | Name | Type | Description | | --- | --- | --- | -| `-` | `table` | information about requested field, table elements: * `id` (number) field identifier * `name` (string) field name * `desc` (string) field description * `unit` (number) unit identifier [Full list](../appendix/units.html) | +| `-` | `table` | information about requested field, table elements: * `id` (number) field identifier * `name` (string) field name * `desc` (string) field description * `unit` (number) unit identifier [Full list](../api-overview/constants/units.md) | | `-` | `nil` | the requested field was not found | ## Availability diff --git a/website/md-docs/api-reference/runtime-play-number.md b/website/md-docs/api-reference/runtime-play-number.md index d3a17a6c3..38b19b0c9 100644 --- a/website/md-docs/api-reference/runtime-play-number.md +++ b/website/md-docs/api-reference/runtime-play-number.md @@ -9,7 +9,7 @@ Play a numerical value (text to speech) | Name | Req | Type | Description | | --- | --- | --- | --- | | `value` | yes | `integer` | number to play. Value is interpreted as integer. | -| `unit` | yes | `integer` | unit identifier [Full list]((../appendix/units.html)) | +| `unit` | yes | `integer` | unit identifier [Full list](../api-overview/constants/units.md) | | `attributes` | no | `integer` | possible values: * `0 or not present` plays integral part of the number (for a number 123 it plays 123) * `PREC1` plays a number with one decimal place (for a number 123 it plays 12.3) * `PREC2` plays a number with two decimal places (for a number 123 it plays 1.23) | ## Returns diff --git a/website/md-docs/api-reference/runtime-set-telemetry-value.md b/website/md-docs/api-reference/runtime-set-telemetry-value.md index 68d936edf..edbdd60cc 100644 --- a/website/md-docs/api-reference/runtime-set-telemetry-value.md +++ b/website/md-docs/api-reference/runtime-set-telemetry-value.md @@ -12,7 +12,7 @@ | `subID` | yes | `integer` | subID of the sensor, usually 0, valid range is from 0 to 7 | | `instance` | yes | `integer` | instance of the sensor (SensorID), valid range is from 0 to 0xFF | | `value` | yes | `integer` | fed to the sensor | -| `unit` | no | `unit_type` | unit of the sensor [Full list](../../appendix/units.html) | +| `unit` | no | `unit_type` | unit of the sensor [Full list](../api-overview/constants/units.md) | | `precision` | no | `prec_type` | the precision of the sensor * `0 or not present` no decimal precision. * `!= 0` value is divided by 10^precision, e.g. value=1000, prec=2 => 10.00. | | `name` | no | `string` | Name of the sensor if it does not yet exist (4 chars). * `not present` Name defaults to the Id. * `present` Sensor takes name of the argument. Argument must have name surrounded by quotes: e.g., "Name" | diff --git a/website/md-docs/assets/luals/lcd.d.lua b/website/md-docs/assets/luals/lcd.d.lua index 03e358abc..ea797a2d4 100644 --- a/website/md-docs/assets/luals/lcd.d.lua +++ b/website/md-docs/assets/luals/lcd.d.lua @@ -46,7 +46,7 @@ function lcd.clear(color) end ---@param r2 integer radii of the inside and outside of the annulus ---@param start integer start and end of the annulus ---@param end integer start and end of the annulus ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) function lcd.drawAnnulus(x, y, r1, r2, start, end, flags) end --- Draw an arc @@ -56,7 +56,7 @@ function lcd.drawAnnulus(x, y, r1, r2, start, end, flags) end ---@param r integer radius ---@param start integer start and end of the arc ---@param end integer start and end of the arc ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) function lcd.drawArc(x, y, r, start, end, flags) end --- Displays a bitmap at (x,y) @@ -72,7 +72,7 @@ function lcd.drawBitmap(bitmap, x, y, scale) end ---@param bitmap pointer point to a bitmap previously opened with Bitmap.open() ---@param x integer starting coordinates ---@param y integer starting coordinates ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) function lcd.drawBitmapPattern(bitmap, x, y, flags) end --- Displays a bitmap pattern pie at (x,y) @@ -82,7 +82,7 @@ function lcd.drawBitmapPattern(bitmap, x, y, flags) end ---@param y integer starting coordinates ---@param startangle integer Start angle ---@param endangle integer End angle ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) function lcd.drawBitmapPatternPie(bitmap, x, y, startangle, endangle, flags) end --- Display a telemetry value at (x,y) @@ -90,7 +90,7 @@ function lcd.drawBitmapPatternPie(bitmap, x, y, startangle, endangle, flags) end ---@param x integer starting coordinate ---@param y integer starting coordinate ---@param source integer|string can be a source identifier (number) or a source name (string). See getValue() ----@param flags integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags integer please see [Lcd functions overview](../../api-reference/display-lcd.md) function lcd.drawChannel(x, y, source, flags) end --- Draw a circle at (x, y) of specified radius @@ -98,7 +98,7 @@ function lcd.drawChannel(x, y, source, flags) end ---@param x integer center position ---@param y integer center position ---@param r integer radius in pixels ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) function lcd.drawCircle(x, y, r, flags) end --- Draw a combo box @@ -116,7 +116,7 @@ function lcd.drawCombobox(x, y, w, list, idx, flags) end ---@param x integer center position ---@param y integer center position ---@param r integer radius in pixels ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) function lcd.drawFilledCircle(x, y, r, flags) end --- Draw a solid rectangle from top left corner (x,y) of specified width and height @@ -125,7 +125,7 @@ function lcd.drawFilledCircle(x, y, r, flags) end ---@param y integer top left corner position ---@param w integer width in pixels ---@param h integer height in pixels ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) ---@param opacity? integer opacity defaults to 0 (only on radios with color display) function lcd.drawFilledRectangle(x, y, w, h, flags, opacity) end @@ -137,7 +137,7 @@ function lcd.drawFilledRectangle(x, y, w, h, flags, opacity) end ---@param y2 integer coordinates of the three vertices ---@param x3 integer coordinates of the three vertices ---@param y3 integer coordinates of the three vertices ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) function lcd.drawFilledTriangle(x1, y1, x2, y2, x3, y3, flags) end --- Draw a simple gauge that is filled based upon fill value @@ -148,7 +148,7 @@ function lcd.drawFilledTriangle(x1, y1, x2, y2, x3, y3, flags) end ---@param h integer height in pixels ---@param fill integer amount of fill to apply ---@param maxfill integer total value of fill ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) function lcd.drawGauge(x, y, w, h, fill, maxfill, flags) end --- Draw a rectangle in perspective @@ -159,7 +159,7 @@ function lcd.drawGauge(x, y, w, h, fill, maxfill, flags) end ---@param xmax integer the limits of the rectangle ---@param ymin integer the limits of the rectangle ---@param ymax integer the limits of the rectangle ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) function lcd.drawHudRectangle(pitch, roll, xmin, xmax, ymin, ymax, flags) end --- Draw a straight line on LCD @@ -182,8 +182,8 @@ function lcd.drawLine(x1, y1, x2, y2, pattern, flags) end ---@param xmax integer the limits of the rectangle inside which the line is drawn ---@param ymin integer the limits of the rectangle inside which the line is drawn ---@param ymax integer the limits of the rectangle inside which the line is drawn ----@param pattern FORCE please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param pattern FORCE please see [Lcd functions overview](../../api-reference/display-lcd.md) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) function lcd.drawLineWithClipping(x1, y1, x2, y2, xmin, xmax, ymin, ymax, pattern, flags) end --- Display a number at (x,y) @@ -191,7 +191,7 @@ function lcd.drawLineWithClipping(x1, y1, x2, y2, xmin, xmax, ymin, ymax, patter ---@param x integer starting coordinate ---@param y integer starting coordinate ---@param value integer value to display ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) ---@param inverscolor? string overrides the inverse text color for INVERS function lcd.drawNumber(x, y, value, flags, inverscolor) end @@ -202,7 +202,7 @@ function lcd.drawNumber(x, y, value, flags, inverscolor) end ---@param r integer radius ---@param start integer start and end of the pie slice ---@param end integer start and end of the pie slice ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) function lcd.drawPie(x, y, r, start, end, flags) end --- Draw a bitmap at (x,y) @@ -216,7 +216,7 @@ function lcd.drawPixmap(x, y, name) end --- @since 2.0.0 ---@param x integer x position ---@param y integer y position ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) function lcd.drawPoint(x, y, flags) end --- Draw a rectangle from top left corner (x,y) of specified width and height @@ -225,7 +225,7 @@ function lcd.drawPoint(x, y, flags) end ---@param y integer top left corner position ---@param w integer width in pixels ---@param h integer height in pixels ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) ---@param t? integer thickness in pixels, defaults to 1 (only on radios with color display) ---@param opacity? integer opacity defaults to 0 (only on radios with color display) function lcd.drawRectangle(x, y, w, h, flags, t, opacity) end @@ -242,7 +242,7 @@ function lcd.drawScreenTitle(title, page, pages) end ---@param x integer starting coordinate ---@param y integer starting coordinate ---@param source integer source index ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) function lcd.drawSource(x, y, source, flags) end --- Draw a text representation of switch at (x,y) @@ -250,7 +250,7 @@ function lcd.drawSource(x, y, source, flags) end ---@param x integer starting coordinate ---@param y integer starting coordinate ---@param switch integer number of switch to display, negative number displays negated switch ----@param flags integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html), only SMLSIZE, BLINK and INVERS. +---@param flags integer please see [Lcd functions overview](../../api-reference/display-lcd.md), only SMLSIZE, BLINK and INVERS. function lcd.drawSwitch(x, y, switch, flags) end --- Draw a text beginning at (x,y) @@ -258,7 +258,7 @@ function lcd.drawSwitch(x, y, switch, flags) end ---@param x integer starting coordinate ---@param y integer starting coordinate ---@param text string text to display ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) for drawing flags and colors, and [Appendix](../../part_vii_-_appendix/fonts.md) for available characters in each font set. +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) for drawing flags and colors, and [Appendix](../../api-overview/fonts.md) for available characters in each font set. ---@param inverscolor? string overrides the inverse text color for INVERS function lcd.drawText(x, y, text, flags, inverscolor) end @@ -269,7 +269,7 @@ function lcd.drawText(x, y, text, flags, inverscolor) end ---@param w integer width and height of bounding rectangle ---@param h integer width and height of bounding rectangle ---@param text string text to display ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) for drawing flags and colors, and [Appendix](../../part_vii_-_appendix/fonts.md) for available characters in each font set. RIGHT, CENTER and VCENTER are not implemented. +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) for drawing flags and colors, and [Appendix](../../api-overview/fonts.md) for available characters in each font set. RIGHT, CENTER and VCENTER are not implemented. ---@return integer x_y function lcd.drawTextLines(x, y, w, h, text, flags) end @@ -278,7 +278,7 @@ function lcd.drawTextLines(x, y, w, h, text, flags) end ---@param x integer starting coordinate ---@param y integer starting coordinate ---@param value integer time in seconds ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) ---@param inverscolor? string overrides the inverse text color for INVERS function lcd.drawTimer(x, y, value, flags, inverscolor) end @@ -290,7 +290,7 @@ function lcd.drawTimer(x, y, value, flags, inverscolor) end ---@param y2 integer coordinates of the three vertices ---@param x3 integer coordinates of the three vertices ---@param y3 integer coordinates of the three vertices ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) function lcd.drawTriangle(x1, y1, x2, y2, x3, y3, flags) end --- Exit full screen widget mode. @@ -299,7 +299,7 @@ function lcd.exitFullScreen() end --- Get the color value from flags --- @since 2.3.11 ----@param flags integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags integer please see [Lcd functions overview](../../api-reference/display-lcd.md) ---@return flag color function lcd.getColor(flags) end @@ -324,7 +324,7 @@ function lcd.getLastRightPos() end ---@param y integer top left corner position ---@param w integer width in pixels ---@param h integer height in pixels ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) function lcd.invertRect(x, y, w, h, flags) end --- Refresh the LCD screen @@ -335,13 +335,13 @@ function lcd.refresh() end --- @since 2.3.6 function lcd.resetBacklightTimeout() end ---- Change an indexed color (theme colors and CUSTOM_COLOR). Please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html#color-constants) +--- Change an indexed color (theme colors and CUSTOM_COLOR). Please see [Lcd functions overview](../../api-overview/constants/color-constants.md#indexed-colors) --- @since 2.2.0 function lcd.setColor() end --- Get the width and height of a text string drawn with flags --- @since 2.5.0 ---@param text string ----@param flags? integer please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) +---@param flags? integer please see [Lcd functions overview](../../api-reference/display-lcd.md) ---@return integer w_h function lcd.sizeText(text, flags) end diff --git a/website/md-docs/assets/luals/runtime.d.lua b/website/md-docs/assets/luals/runtime.d.lua index d4e1e0712..9b69f7555 100644 --- a/website/md-docs/assets/luals/runtime.d.lua +++ b/website/md-docs/assets/luals/runtime.d.lua @@ -329,7 +329,7 @@ function playHaptic(duration, pause, flags) end --- Play a numerical value (text to speech) --- @since 2.0.0 ---@param value integer number to play. Value is interpreted as integer. ----@param unit integer unit identifier [Full list]((../appendix/units.html)) +---@param unit integer unit identifier [Full list](../../api-overview/constants/units.md) ---@param attributes? integer possible values: * 0 or not present plays integral part of the number (for a number 123 it plays 123) * PREC1 plays a number with one decimal place (for a number 123 it plays 12.3) * PREC2 plays a number with two decimal places (for a number 123 it plays 1.23) ---@return nil none function playNumber(value, unit, attributes) end @@ -461,7 +461,7 @@ function setStickySwitch(id, value) end ---@param subid integer subID of the sensor, usually 0, valid range is from 0 to 7 ---@param instance integer instance of the sensor (SensorID), valid range is from 0 to 0xFF ---@param value integer fed to the sensor ----@param unit? unit_type unit of the sensor [Full list](../../appendix/units.html) +---@param unit? unit_type unit of the sensor [Full list](../../api-overview/constants/units.md) ---@param precision? prec_type the precision of the sensor * 0 or not present no decimal precision. * != 0 value is divided by 10^precision, e.g. value=1000, prec=2 => 10.00. ---@param name? string Name of the sensor if it does not yet exist (4 chars). * not present Name defaults to the Id. * present Sensor takes name of the argument. Argument must have name surrounded by quotes: e.g., "Name" ---@return boolean true diff --git a/website/md-docs/programming/advanced-topics/optimization-tricks.md b/website/md-docs/programming/advanced-topics/optimization-tricks.md index 5082cb096..4b8a939da 100644 --- a/website/md-docs/programming/advanced-topics/optimization-tricks.md +++ b/website/md-docs/programming/advanced-topics/optimization-tricks.md @@ -2,7 +2,7 @@ ## Faster getValue() -Normally one uses [getValue()](../../api-reference/variables/runtime-get-value.md) function with the source/filed name like so: +Normally one uses [getValue()](../../api-reference/runtime-get-value.md) function with the source/filed name like so: ```lua local foo = getValue("bar") @@ -18,7 +18,7 @@ local function run_a_lot() end ``` -Why is this method faster? With the function [getFieldInfo(name)](../../api-reference/variables/runtime-get-field-info.md) we get the `numerical id` of the wanted filed. The function has to find the requested value by its name in the table of all available sources. That search takes some time. +Why is this method faster? With the function [getFieldInfo(name)](../../api-reference/runtime-get-field-info.md) we get the `numerical id` of the wanted filed. The function has to find the requested value by its name in the table of all available sources. That search takes some time. When we use this syntax the search is only done once. In comparison in the first example the search must be performed every time `getValue("bar")` is called. diff --git a/website/md-docs/programming/basics/editor.md b/website/md-docs/programming/basics/editor.md index 1ae568dee..ff9ed736b 100644 --- a/website/md-docs/programming/basics/editor.md +++ b/website/md-docs/programming/basics/editor.md @@ -53,9 +53,9 @@ That gives you: Generated definition files from this project: -- [runtime.d.lua](../../../assets/luals/runtime.d.lua) -- [lcd.d.lua](../../../assets/luals/lcd.d.lua) -- [model.d.lua](../../../assets/luals/model.d.lua) -- [Bitmap.d.lua](../../../assets/luals/Bitmap.d.lua) +- [runtime.d.lua](../../assets/luals/runtime.d.lua) +- [lcd.d.lua](../../assets/luals/lcd.d.lua) +- [model.d.lua](../../assets/luals/model.d.lua) +- [Bitmap.d.lua](../../assets/luals/Bitmap.d.lua) These files are generated by the docs system from the current API model and can be used as editor input for IntelliSense-style support. diff --git a/website/md-docs/programming/core-concepts/data-exchange-with-the-edgetx-model-setup.md b/website/md-docs/programming/core-concepts/data-exchange-with-the-edgetx-model-setup.md index 695ce8f41..95fdbc8a2 100644 --- a/website/md-docs/programming/core-concepts/data-exchange-with-the-edgetx-model-setup.md +++ b/website/md-docs/programming/core-concepts/data-exchange-with-the-edgetx-model-setup.md @@ -11,7 +11,7 @@ In general terms, there are two different types of data that can be exchanged wi * Values, which generally fall on a scale between -1024 and 1024, also sometimes reported as -100% to 100%, e.g. for mixer values and channel outputs. * Switches, which are either `true` or `false.` -A specific data source type, e.g. Global Variables, can be indexed directly with an index that starts with 0 for the first one. This can be a little confusing, as e.g. GV1 for FM0 is read with [`model.getGlobalVariable(0, 0)`](../../api-reference/model-functions/model-get-global-variable.md), because GV1 is the first global variable, and FM0 is the first flight mode. But as long as you remember that all direct indices start with 0 for the first one, you should be fine! +A specific data source type, e.g. Global Variables, can be indexed directly with an index that starts with 0 for the first one. This can be a little confusing, as e.g. GV1 for FM0 is read with [`model.getGlobalVariable(0, 0)`](../../api-reference/model-get-global-variable.md), because GV1 is the first global variable, and FM0 is the first flight mode. But as long as you remember that all direct indices start with 0 for the first one, you should be fine! Global Variables is a _value_ data source that can return a value between -1024 and 1024. Examples of value sources are: @@ -23,20 +23,20 @@ Global Variables is a _value_ data source that can return a value between -1024 * Trainer channel inputs * Telemetry sensors -There is a way to access a value of _any_ such type with a _meta-index_. You use the function [`getFieldInfo(name)`](../../api-reference/variables/runtime-get-field-info.md) where `name` can be any of the valid source names listed [here](../../api-reference/variables/runtime-get-field-info.md). It returns a table with a description of the value source, including the field `id,` which is the meta-index. +There is a way to access a value of _any_ such type with a _meta-index_. You use the function [`getFieldInfo(name)`](../../api-reference/runtime-get-field-info.md) where `name` can be any of the valid source names listed [here](../../api-reference/runtime-get-field-info.md). It returns a table with a description of the value source, including the field `id,` which is the meta-index. -You can use `id` with the function [`getValue(id)`](../../api-reference/variables/runtime-get-value.md) to read the current value. You can also use `name` directly, but this is less efficient, as EdgeTX does a linear search for the name every time it is called. Therefore, the procedure of first extracting the meta-index from `getFieldInfo(name).id`, and then using that, is recommended. +You can use `id` with the function [`getValue(id)`](../../api-reference/runtime-get-value.md) to read the current value. You can also use `name` directly, but this is less efficient, as EdgeTX does a linear search for the name every time it is called. Therefore, the procedure of first extracting the meta-index from `getFieldInfo(name).id`, and then using that, is recommended. -For switches, [`getLogicalSwitchValue(index)`](../../api-reference/variables/runtime-get-logical-switch-value.md) uses a direct index to read this specific type of switch sources, again using the `index` 0 for LS1 etc. But there are also several types of switch sources, such as: +For switches, [`getLogicalSwitchValue(index)`](../../api-reference/runtime-get-logical-switch-value.md) uses a direct index to read this specific type of switch sources, again using the `index` 0 for LS1 etc. But there are also several types of switch sources, such as: * Logical switches * Switch positions, testing if a physical switch is in a particular position, e.g. `SA↑`. * Trim buttons * Transmitter and telemetry activity -You can find the meta-index of a particular switch source with [`getSwitchIndex(name)`](../../api-reference/variables/runtime-get-switch-index.md), where `name` is exactly the name that you see in the radio menus where you can select a switch source. +You can find the meta-index of a particular switch source with [`getSwitchIndex(name)`](../../api-reference/runtime-get-switch-index.md), where `name` is exactly the name that you see in the radio menus where you can select a switch source. -You can read the current value of a switch source with [`getSwitchValue(index)`](../../api-reference/variables/runtime-get-switch-value.md) as a `true`/`false` value. +You can read the current value of a switch source with [`getSwitchValue(index)`](../../api-reference/runtime-get-switch-value.md) as a `true`/`false` value. It can be very confusing that some source can be read both as a value and as a switch. As an example, elevator trim can be read as the current value of the _trim_: diff --git a/website/md-docs/programming/core-concepts/drawing-flags-and-colors.md b/website/md-docs/programming/core-concepts/drawing-flags-and-colors.md index 88a431fda..b3431ed4e 100644 --- a/website/md-docs/programming/core-concepts/drawing-flags-and-colors.md +++ b/website/md-docs/programming/core-concepts/drawing-flags-and-colors.md @@ -12,16 +12,16 @@ Since the flags are bits, you can add them up to combine, as long as you only ad RGB\_FLAG decides how the color value is encoded into the upper half (bits 17-32). -If RGB\_FLAG = 0, then an index into a color table is stored. This color table holds a default color (index 0), the theme colors, and CUSTOM\_COLOR. The entries in the color table can be changed with the function [`lcd.setColor`](../../api-reference/display-lcd/lcd-set-color.md). The advantage of this system is that the color changes everywhere that this indexed color is used, and this is how different color themes are created. **Notice that changing the theme colors affects the entire user interface of your radio!!** +If RGB\_FLAG = 0, then an index into a color table is stored. This color table holds a default color (index 0), the theme colors, and CUSTOM\_COLOR. The entries in the color table can be changed with the function [`lcd.setColor`](../../api-reference/lcd-set-color.md). The advantage of this system is that the color changes everywhere that this indexed color is used, and this is how different color themes are created. **Notice that changing the theme colors affects the entire user interface of your radio!!** If RGB\_FLAG = 1, then a 16-bit RGB565 color is stored. This is used directly by the system to draw a color on the screen. You should not change RGB\_FLAG explicitly; this is handled automatically by the various functions and Lua constants. But you should be aware of the following. -* [`lcd.setColor`](../../api-reference/display-lcd/lcd-set-color.md) must have an [indexed color](../../api-overview/constants/color-constants.md#indexed-colors) as its first argument, because this will be the index of the color in the table being changed. Giving another color, e.g. ORANGE, as the first argument will result in nothing. +* [`lcd.setColor`](../../api-reference/lcd-set-color.md) must have an [indexed color](../../api-overview/constants/color-constants.md#indexed-colors) as its first argument, because this will be the index of the color in the table being changed. Giving another color, e.g. ORANGE, as the first argument will result in nothing. * If no color is given to the flags with a drawing function, RGB\_FLAGS = 0 and the color index = 0. Therefore, the default color is stored in the color table under this index, and you can change the default color with `lcd.setColor(0, color)`. -* [`lcd.getColor`](../../api-reference/display-lcd/lcd-get-color.md) always returns a RGB color. This can be used to "save" an indexed color before you change it. -* [`lcd.RGB`](../../api-reference/display-lcd/lcd-rgb.md) obviously returns a RGB color. +* [`lcd.getColor`](../../api-reference/lcd-get-color.md) always returns a RGB color. This can be used to "save" an indexed color before you change it. +* [`lcd.RGB`](../../api-reference/lcd-rgb.md) obviously returns a RGB color. ### Colors in EdgeTX versus OpenTX diff --git a/website/md-docs/programming/core-concepts/loading-code-modules-dynamically.md b/website/md-docs/programming/core-concepts/loading-code-modules-dynamically.md index 87188dba6..6293ab0c3 100644 --- a/website/md-docs/programming/core-concepts/loading-code-modules-dynamically.md +++ b/website/md-docs/programming/core-concepts/loading-code-modules-dynamically.md @@ -6,7 +6,7 @@ description: >- # Loading Code Modules Dynamically -The [`loadScript()`](../../api-reference/lua-scripts/runtime-load-script.md) function will load a script from a the file and return a function that is the body of the script, as described in the previous section. So you could have the following Lua script file saved on the SD card: +The [`loadScript()`](../../api-reference/runtime-load-script.md) function will load a script from a the file and return a function that is the body of the script, as described in the previous section. So you could have the following Lua script file saved on the SD card: ```lua -- /SCRIPTS/TestScript.lua