diff --git a/.gitbook/README.md b/.gitbook/README.md deleted file mode 100644 index 3abe87812..000000000 --- a/.gitbook/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# .gitbook - diff --git a/.gitbook/assets/CompanionSpecialFunctions (1) (1).png b/.gitbook/assets/CompanionSpecialFunctions (1) (1).png deleted file mode 100644 index dd7b24f1d..000000000 Binary files a/.gitbook/assets/CompanionSpecialFunctions (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/CompanionSpecialFunctions (1).png b/.gitbook/assets/CompanionSpecialFunctions (1).png deleted file mode 100644 index dd7b24f1d..000000000 Binary files a/.gitbook/assets/CompanionSpecialFunctions (1).png and /dev/null differ diff --git a/.gitbook/assets/README.md b/.gitbook/assets/README.md deleted file mode 100644 index 6fb479426..000000000 --- a/.gitbook/assets/README.md +++ /dev/null @@ -1,53 +0,0 @@ -# io Library - -The **io** library has been simplified and only a subset of functions and their functionality is available. What follows is a complete reference of io functions that are available to OpenTX scripts - -## Available functions: - -* [io.open\(\)](io_open.md) -* [io.close\(\)](io_close.md) -* [io.read\(\)](io_read.md) -* [io.write\(\)](io_write.md) -* [io.seek\(\)](io_seek.md) - -## Examples - -### Read the whole file - -```lua --- this is an EdgeTX *One-time script - -local function run(event) - print("lua io.read test") -- print() statements are visible in Debug output window - local f = io.open("foo.bar", "r") - while true do - local data = io.read(f, 10) -- read up to 10 characters (newline char also counts!) - if #data == 0 then break end -- we get zero length string back when we reach end of the file - print("data: "..data) - end - io.close(f) - return 1 -end - -return { run=run } -``` - -### Append data to file - -```lua --- this is an EdgeTX One-time script - -local function run(event) - print("lua io.write test") - local f = io.open("foo.bar", "a") -- open file in append mode - io.write(f, "first line\r\nsecond line\r\n") - io.write(f, 4, "\r\n", 35.6778, "\r\n") -- one can write multiple items at the same time - local foo = -4.45 - io.write(f, foo, "\r\n") - io.close(f) - return 1 -- this will end the script execution -end - -return { run=run } -``` - diff --git a/.gitbook/assets/RadioSpecialFunctions (1) (1).png b/.gitbook/assets/RadioSpecialFunctions (1) (1).png deleted file mode 100644 index 2823c40a1..000000000 Binary files a/.gitbook/assets/RadioSpecialFunctions (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/RadioSpecialFunctions (1).png b/.gitbook/assets/RadioSpecialFunctions (1).png deleted file mode 100644 index 2823c40a1..000000000 Binary files a/.gitbook/assets/RadioSpecialFunctions (1).png and /dev/null differ diff --git a/.gitbook/assets/btn_donate_LG (1).gif b/.gitbook/assets/btn_donate_LG (1).gif deleted file mode 100644 index 43cef691e..000000000 Binary files a/.gitbook/assets/btn_donate_LG (1).gif and /dev/null differ diff --git a/.gitbook/assets/btn_donate_LG.gif b/.gitbook/assets/btn_donate_LG.gif deleted file mode 100644 index 43cef691e..000000000 Binary files a/.gitbook/assets/btn_donate_LG.gif and /dev/null differ diff --git a/.gitbook/assets/clear-example1 (1) (1) (1) (1) (1).png b/.gitbook/assets/clear-example1 (1) (1) (1) (1) (1).png deleted file mode 100644 index bac610f03..000000000 Binary files a/.gitbook/assets/clear-example1 (1) (1) (1) (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/clear-example1 (1) (1) (1) (1).png b/.gitbook/assets/clear-example1 (1) (1) (1) (1).png deleted file mode 100644 index bac610f03..000000000 Binary files a/.gitbook/assets/clear-example1 (1) (1) (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/clear-example2 (1) (1) (1) (1).png b/.gitbook/assets/clear-example2 (1) (1) (1) (1).png deleted file mode 100644 index cb8ed084e..000000000 Binary files a/.gitbook/assets/clear-example2 (1) (1) (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/clear-example2 (1) (1) (1).png b/.gitbook/assets/clear-example2 (1) (1) (1).png deleted file mode 100644 index cb8ed084e..000000000 Binary files a/.gitbook/assets/clear-example2 (1) (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/companion-settings (1).png b/.gitbook/assets/companion-settings (1).png deleted file mode 100644 index 04024e9e5..000000000 Binary files a/.gitbook/assets/companion-settings (1).png and /dev/null differ diff --git a/.gitbook/assets/companion-settings.png b/.gitbook/assets/companion-settings.png deleted file mode 100644 index 04024e9e5..000000000 Binary files a/.gitbook/assets/companion-settings.png and /dev/null differ diff --git a/.gitbook/assets/count-dn (1) (1).png b/.gitbook/assets/count-dn (1) (1).png deleted file mode 100644 index 981cc5c97..000000000 Binary files a/.gitbook/assets/count-dn (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/count-dn (1).png b/.gitbook/assets/count-dn (1).png deleted file mode 100644 index 981cc5c97..000000000 Binary files a/.gitbook/assets/count-dn (1).png and /dev/null differ diff --git a/.gitbook/assets/count-up (1) (1).png b/.gitbook/assets/count-up (1) (1).png deleted file mode 100644 index 7ac032e8e..000000000 Binary files a/.gitbook/assets/count-up (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/count-up (1).png b/.gitbook/assets/count-up (1).png deleted file mode 100644 index 7ac032e8e..000000000 Binary files a/.gitbook/assets/count-up (1).png and /dev/null differ diff --git a/.gitbook/assets/drawChannel-example (1) (1) (1) (1) (1).png b/.gitbook/assets/drawChannel-example (1) (1) (1) (1) (1).png deleted file mode 100644 index 1a95a9fc9..000000000 Binary files a/.gitbook/assets/drawChannel-example (1) (1) (1) (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/drawChannel-example (1) (1) (1) (1).png b/.gitbook/assets/drawChannel-example (1) (1) (1) (1).png deleted file mode 100644 index 1a95a9fc9..000000000 Binary files a/.gitbook/assets/drawChannel-example (1) (1) (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/drawCombobox-example (1).png b/.gitbook/assets/drawCombobox-example (1).png deleted file mode 100644 index 22411b224..000000000 Binary files a/.gitbook/assets/drawCombobox-example (1).png and /dev/null differ diff --git a/.gitbook/assets/drawCombobox-example.png b/.gitbook/assets/drawCombobox-example.png deleted file mode 100644 index 22411b224..000000000 Binary files a/.gitbook/assets/drawCombobox-example.png and /dev/null differ diff --git a/.gitbook/assets/drawFilledRectangle-example (1).png b/.gitbook/assets/drawFilledRectangle-example (1).png deleted file mode 100644 index 8312fa3f0..000000000 Binary files a/.gitbook/assets/drawFilledRectangle-example (1).png and /dev/null differ diff --git a/.gitbook/assets/drawFilledRectangle-example.png b/.gitbook/assets/drawFilledRectangle-example.png deleted file mode 100644 index 8312fa3f0..000000000 Binary files a/.gitbook/assets/drawFilledRectangle-example.png and /dev/null differ diff --git a/.gitbook/assets/drawGauge-example (1).png b/.gitbook/assets/drawGauge-example (1).png deleted file mode 100644 index 96d8f824c..000000000 Binary files a/.gitbook/assets/drawGauge-example (1).png and /dev/null differ diff --git a/.gitbook/assets/drawGauge-example.png b/.gitbook/assets/drawGauge-example.png deleted file mode 100644 index 96d8f824c..000000000 Binary files a/.gitbook/assets/drawGauge-example.png and /dev/null differ diff --git a/.gitbook/assets/drawLine-example (1).png b/.gitbook/assets/drawLine-example (1).png deleted file mode 100644 index 925f76e90..000000000 Binary files a/.gitbook/assets/drawLine-example (1).png and /dev/null differ diff --git a/.gitbook/assets/drawLine-example.png b/.gitbook/assets/drawLine-example.png deleted file mode 100644 index 925f76e90..000000000 Binary files a/.gitbook/assets/drawLine-example.png and /dev/null differ diff --git a/.gitbook/assets/drawNumber-example (1) (1).png b/.gitbook/assets/drawNumber-example (1) (1).png deleted file mode 100644 index aa979ef2e..000000000 Binary files a/.gitbook/assets/drawNumber-example (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/drawNumber-example (1).png b/.gitbook/assets/drawNumber-example (1).png deleted file mode 100644 index aa979ef2e..000000000 Binary files a/.gitbook/assets/drawNumber-example (1).png and /dev/null differ diff --git a/.gitbook/assets/drawPixmap-example (1).png b/.gitbook/assets/drawPixmap-example (1).png deleted file mode 100644 index 6def3add6..000000000 Binary files a/.gitbook/assets/drawPixmap-example (1).png and /dev/null differ diff --git a/.gitbook/assets/drawPixmap-example.png b/.gitbook/assets/drawPixmap-example.png deleted file mode 100644 index 6def3add6..000000000 Binary files a/.gitbook/assets/drawPixmap-example.png and /dev/null differ diff --git a/.gitbook/assets/drawPoint-example (1).png b/.gitbook/assets/drawPoint-example (1).png deleted file mode 100644 index 2f84fd32e..000000000 Binary files a/.gitbook/assets/drawPoint-example (1).png and /dev/null differ diff --git a/.gitbook/assets/drawPoint-example.png b/.gitbook/assets/drawPoint-example.png deleted file mode 100644 index 2f84fd32e..000000000 Binary files a/.gitbook/assets/drawPoint-example.png and /dev/null differ diff --git a/.gitbook/assets/drawRectangle-example (1).png b/.gitbook/assets/drawRectangle-example (1).png deleted file mode 100644 index e12b064f4..000000000 Binary files a/.gitbook/assets/drawRectangle-example (1).png and /dev/null differ diff --git a/.gitbook/assets/drawRectangle-example.png b/.gitbook/assets/drawRectangle-example.png deleted file mode 100644 index e12b064f4..000000000 Binary files a/.gitbook/assets/drawRectangle-example.png and /dev/null differ diff --git a/.gitbook/assets/drawScreenTitle-example (1) (1).png b/.gitbook/assets/drawScreenTitle-example (1) (1).png deleted file mode 100644 index e1dacd710..000000000 Binary files a/.gitbook/assets/drawScreenTitle-example (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/drawScreenTitle-example (1).png b/.gitbook/assets/drawScreenTitle-example (1).png deleted file mode 100644 index e1dacd710..000000000 Binary files a/.gitbook/assets/drawScreenTitle-example (1).png and /dev/null differ diff --git a/.gitbook/assets/drawSource-example (1).png b/.gitbook/assets/drawSource-example (1).png deleted file mode 100644 index 7439e1e1a..000000000 Binary files a/.gitbook/assets/drawSource-example (1).png and /dev/null differ diff --git a/.gitbook/assets/drawSource-example.png b/.gitbook/assets/drawSource-example.png deleted file mode 100644 index 7439e1e1a..000000000 Binary files a/.gitbook/assets/drawSource-example.png and /dev/null differ diff --git a/.gitbook/assets/drawSwitch-example (1).png b/.gitbook/assets/drawSwitch-example (1).png deleted file mode 100644 index fbbbfcbc6..000000000 Binary files a/.gitbook/assets/drawSwitch-example (1).png and /dev/null differ diff --git a/.gitbook/assets/drawSwitch-example.png b/.gitbook/assets/drawSwitch-example.png deleted file mode 100644 index fbbbfcbc6..000000000 Binary files a/.gitbook/assets/drawSwitch-example.png and /dev/null differ diff --git a/.gitbook/assets/drawText-example (1).png b/.gitbook/assets/drawText-example (1).png deleted file mode 100644 index ffcf79cca..000000000 Binary files a/.gitbook/assets/drawText-example (1).png and /dev/null differ diff --git a/.gitbook/assets/drawText-example.png b/.gitbook/assets/drawText-example.png deleted file mode 100644 index ffcf79cca..000000000 Binary files a/.gitbook/assets/drawText-example.png and /dev/null differ diff --git a/.gitbook/assets/drawTimer-example (1) (1).png b/.gitbook/assets/drawTimer-example (1) (1).png deleted file mode 100644 index f3b301514..000000000 Binary files a/.gitbook/assets/drawTimer-example (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/drawTimer-example (1).png b/.gitbook/assets/drawTimer-example (1).png deleted file mode 100644 index f3b301514..000000000 Binary files a/.gitbook/assets/drawTimer-example (1).png and /dev/null differ diff --git a/.gitbook/assets/flags (1).png b/.gitbook/assets/flags (1).png deleted file mode 100644 index 67d81014a..000000000 Binary files a/.gitbook/assets/flags (1).png and /dev/null differ diff --git a/.gitbook/assets/flags.png b/.gitbook/assets/flags.png deleted file mode 100644 index d3be7ddf7..000000000 Binary files a/.gitbook/assets/flags.png and /dev/null differ diff --git a/.gitbook/assets/getDateTime-example (1) (1).png b/.gitbook/assets/getDateTime-example (1) (1).png deleted file mode 100644 index 6bc929660..000000000 Binary files a/.gitbook/assets/getDateTime-example (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/getDateTime-example (1).png b/.gitbook/assets/getDateTime-example (1).png deleted file mode 100644 index 6bc929660..000000000 Binary files a/.gitbook/assets/getDateTime-example (1).png and /dev/null differ diff --git a/.gitbook/assets/getFieldInfo-example (1) (1) (1) (1).png b/.gitbook/assets/getFieldInfo-example (1) (1) (1) (1).png deleted file mode 100644 index 6ab922901..000000000 Binary files a/.gitbook/assets/getFieldInfo-example (1) (1) (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/getFieldInfo-example (1) (1) (1).png b/.gitbook/assets/getFieldInfo-example (1) (1) (1).png deleted file mode 100644 index 6ab922901..000000000 Binary files a/.gitbook/assets/getFieldInfo-example (1) (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/getGeneralSettings-example (1) (1).png b/.gitbook/assets/getGeneralSettings-example (1) (1).png deleted file mode 100644 index 66255ed9b..000000000 Binary files a/.gitbook/assets/getGeneralSettings-example (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/getGeneralSettings-example (1).png b/.gitbook/assets/getGeneralSettings-example (1).png deleted file mode 100644 index 66255ed9b..000000000 Binary files a/.gitbook/assets/getGeneralSettings-example (1).png and /dev/null differ diff --git a/.gitbook/assets/getValue-example (1) (1) (1).png b/.gitbook/assets/getValue-example (1) (1) (1).png deleted file mode 100644 index 208aa88ae..000000000 Binary files a/.gitbook/assets/getValue-example (1) (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/getValue-example (1) (1).png b/.gitbook/assets/getValue-example (1) (1).png deleted file mode 100644 index 208aa88ae..000000000 Binary files a/.gitbook/assets/getValue-example (1) (1).png and /dev/null differ diff --git a/.gitbook/assets/setGlobalVariable-example (1).png b/.gitbook/assets/setGlobalVariable-example (1).png deleted file mode 100644 index d851e207d..000000000 Binary files a/.gitbook/assets/setGlobalVariable-example (1).png and /dev/null differ diff --git a/.gitbook/assets/setGlobalVariable-example.png b/.gitbook/assets/setGlobalVariable-example.png deleted file mode 100644 index d851e207d..000000000 Binary files a/.gitbook/assets/setGlobalVariable-example.png and /dev/null differ diff --git a/.gitbook/assets/shocount (1).png b/.gitbook/assets/shocount (1).png deleted file mode 100644 index 4441319b9..000000000 Binary files a/.gitbook/assets/shocount (1).png and /dev/null differ diff --git a/.gitbook/assets/shocount.png b/.gitbook/assets/shocount.png deleted file mode 100644 index 4441319b9..000000000 Binary files a/.gitbook/assets/shocount.png and /dev/null differ diff --git a/.github/workflows/preview-docs.yml b/.github/workflows/preview-docs.yml new file mode 100644 index 000000000..6fbadf3ca --- /dev/null +++ b/.github/workflows/preview-docs.yml @@ -0,0 +1,121 @@ +# Builds a preview of the docs for each pull request and uploads it to +# Cloudflare as a Worker *version* with a preview alias. Production keeps +# serving the deployed version; the preview is only reachable at +# https://pr--edgetx-lua-reference-guide.edgetx.workers.dev/ +# +# The PR is built as the version its base branch publishes (main -> "dev", +# edgetx_ -> "", plus "latest" for the latest release branch) on +# top of the current gh-pages tree, so the preview is the whole site with +# that one version replaced. Nothing is pushed to gh-pages. +# +# Only runs for PRs from branches in this repo: fork PRs don't get the +# Cloudflare secrets, and building untrusted code with them available +# would be unsafe anyway. +name: Preview Docs + +on: + pull_request: + branches: + - main + - "edgetx_*" + +permissions: + contents: read + pull-requests: write + +concurrency: + group: preview-docs-${{ github.event.pull_request.number }} + cancel-in-progress: true + +jobs: + preview: + if: github.event.pull_request.head.repo.full_name == github.repository + runs-on: ubuntu-latest + + steps: + - name: Check out source + uses: actions/checkout@v7 + with: + fetch-depth: 0 + + - name: Resolve version metadata + id: version + shell: bash + env: + LATEST_BRANCH: ${{ vars.DOCS_LATEST_BRANCH || 'edgetx_2.12' }} + run: | + case "${GITHUB_BASE_REF}" in + main) + version_id="dev" + title="Dev" + ;; + edgetx_[0-9]*.[0-9]*) + version_id="${GITHUB_BASE_REF#edgetx_}" + title="${version_id}" + ;; + *) + echo "Unsupported base branch: ${GITHUB_BASE_REF}" >&2 + exit 1 + ;; + esac + + if [[ "${GITHUB_BASE_REF}" == "${LATEST_BRANCH}" ]]; then + aliases="${version_id} latest" + else + aliases="${version_id}" + fi + + { + echo "version_id=${version_id}" + echo "title=${title}" + echo "aliases=${aliases}" + echo "alias=pr-${{ github.event.pull_request.number }}" + } >> "${GITHUB_OUTPUT}" + + - name: Install uv + uses: astral-sh/setup-uv@v10.3.2 + + - name: Set up Python + uses: actions/setup-python@v7 + with: + python-version: "3.11" + + - name: Sync docs dependencies + run: uv sync + + - name: Configure git author + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + - name: Build preview into local gh-pages + env: + DOCS_EDIT_URI: edit/${{ github.head_ref }}/website/md-docs/ + run: | + git branch -f gh-pages origin/gh-pages + uv run mike deploy --update-aliases --title "${{ steps.version.outputs.title }}" ${{ steps.version.outputs.aliases }} + + - name: Export gh-pages tree for Cloudflare + run: | + rm -rf .site-publish + mkdir .site-publish + git archive gh-pages | tar -x -C .site-publish + + - name: Upload preview version to Cloudflare Workers + uses: cloudflare/wrangler-action@v4 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + command: versions upload --preview-alias ${{ steps.version.outputs.alias }} --message "PR #${{ github.event.pull_request.number }} @ ${{ github.event.pull_request.head.sha }}" + + - name: Comment preview link on the PR + env: + GH_TOKEN: ${{ github.token }} + PR_NUMBER: ${{ github.event.pull_request.number }} + HEAD_SHA: ${{ github.event.pull_request.head.sha }} + run: | + url="https://${{ steps.version.outputs.alias }}-edgetx-lua-reference-guide.edgetx.workers.dev/${{ steps.version.outputs.version_id }}/" + body="📖 **Docs preview:** ${url} + + Built from ${HEAD_SHA::7} as the \`${{ steps.version.outputs.version_id }}\` version, on top of the currently published site." + gh pr comment "${PR_NUMBER}" --edit-last --create-if-none --body "${body}" diff --git a/.github/workflows/publish-versioned-docs.yml b/.github/workflows/publish-versioned-docs.yml new file mode 100644 index 000000000..56a9f9102 --- /dev/null +++ b/.github/workflows/publish-versioned-docs.yml @@ -0,0 +1,148 @@ +# Publishes each docs branch via `mike deploy` on every push: +# main -> "dev" +# edgetx_ -> "", plus "latest" for the latest release branch +# +# Every branch carries its own MkDocs site (mkdocs.yml + website/md-docs/) +# and an identical copy of this workflow, so a push builds the branch it +# came from. The latest release branch comes from the DOCS_LATEST_BRANCH +# repository variable (falling back to edgetx_2.12), so moving "latest" to +# a new release is a settings change rather than an edit on every branch. +# +# mike keeps the accumulated versioned site on the gh-pages branch; after +# each deploy, the full gh-pages tree is published to Cloudflare Workers +# (static assets, see wrangler.jsonc). Requires the CLOUDFLARE_API_TOKEN and +# CLOUDFLARE_ACCOUNT_ID repository secrets. +name: Publish Versioned Docs + +on: + push: + branches: + - main + - "edgetx_*" + workflow_dispatch: + +permissions: + contents: write + +jobs: + publish: + runs-on: ubuntu-latest + + # One group per branch. GitHub keeps at most one pending run per group + # and cancels older pending ones, which is harmless here: the newest + # push to a branch already contains the older ones. Different branches + # publish in parallel and retry if another one updates gh-pages first. + concurrency: + group: publish-versioned-docs-${{ github.ref_name }} + cancel-in-progress: false + + steps: + - name: Check out source + uses: actions/checkout@v7 + with: + fetch-depth: 0 + + - name: Install uv + uses: astral-sh/setup-uv@v10.3.2 + + - name: Set up Python + uses: actions/setup-python@v7 + with: + python-version: "3.11" + + - name: Resolve version metadata + id: version + shell: bash + env: + LATEST_BRANCH: ${{ vars.DOCS_LATEST_BRANCH || 'edgetx_2.12' }} + run: | + branch="${GITHUB_REF_NAME}" + + case "${branch}" in + main) + version_id="dev" + title="Dev" + ;; + edgetx_[0-9]*.[0-9]*) + version_id="${branch#edgetx_}" + title="${version_id}" + ;; + *) + echo "Unsupported branch: ${branch}" >&2 + exit 1 + ;; + esac + + if [[ "${branch}" == "${LATEST_BRANCH}" ]]; then + aliases="${version_id} latest" + is_latest="true" + else + aliases="${version_id}" + is_latest="false" + fi + + { + echo "version_id=${version_id}" + echo "title=${title}" + echo "aliases=${aliases}" + echo "is_latest=${is_latest}" + } >> "${GITHUB_OUTPUT}" + + - name: Sync docs dependencies + run: uv sync + + - name: Configure git author + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + - name: Publish docs with mike + env: + # "Edit this page" should open the branch this version is built from. + DOCS_EDIT_URI: edit/${{ github.ref_name }}/website/md-docs/ + IS_LATEST: ${{ steps.version.outputs.is_latest }} + run: | + # Other branches may push to gh-pages while this one builds. mike's + # push is then rejected as non-fast-forward, so rebuild on top of + # the new tip and try again. + for attempt in 1 2 3 4 5; do + git fetch origin gh-pages + git branch -f gh-pages origin/gh-pages + if uv run mike deploy --push --update-aliases --title "${{ steps.version.outputs.title }}" ${{ steps.version.outputs.aliases }} \ + && { [[ "${IS_LATEST}" != "true" ]] || uv run mike set-default --push latest; }; then + exit 0 + fi + echo "gh-pages push failed (attempt ${attempt}), retrying" >&2 + sleep $((attempt * 10)) + done + exit 1 + + deploy: + needs: publish + runs-on: ubuntu-latest + + # One group across all branches, so uploads never overlap. If several + # are queued, GitHub keeps only the newest; that's fine because it + # exports gh-pages when it starts, which already includes every + # earlier publish. The last upload is therefore always the newest tree. + concurrency: + group: publish-versioned-docs-cloudflare + cancel-in-progress: false + + steps: + - name: Check out source + uses: actions/checkout@v7 + + - name: Export gh-pages tree for Cloudflare + run: | + git fetch --depth 1 origin gh-pages + rm -rf .site-publish + mkdir .site-publish + git archive FETCH_HEAD | tar -x -C .site-publish + + - name: Deploy to Cloudflare Workers + uses: cloudflare/wrangler-action@v4 + with: + apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} + accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} + command: deploy diff --git a/.gitignore b/.gitignore index fd14c6ef0..f0ad59430 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,10 @@ /_book/ /node_modules/ /book.pdf +/site/ +/.site-legacy-generated/ +/site-legacy/ +.tmp/ +.venv/ +__pycache__/ +/.site-publish/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..72dec0bbb --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,117 @@ +# Contributing + +This repo has three kinds of content. Mixing them up is the #1 way to lose +work — a regenerate silently overwrites a hand-edit. Check which class a +file belongs to before you edit it. For the full architecture rationale, see +[`MIGRATION-PLAN.md`](MIGRATION-PLAN.md); this file is just the practical +"where do I make this edit" guide. + +## The three content classes + +### 1. Generated API reference — do not hand-edit + +- `website/md-docs/api-reference/**` — every per-function page, plus + `module-*.md`, `review-*.md`, and `review.md` +- `docs-system/generated/luals/*.d.lua` and `website/md-docs/assets/luals/*.d.lua` + (both written by the same `build` run — see [Pipeline commands](#pipeline-commands)) + +These are produced by `tools/docs_pipeline.py build` from Lua API facts +(syntax, params, returns, availability) parsed out of `/*luadoc */` comments +in the upstream EdgeTX firmware source, plus any matching overlay content +merged on top. Every file in this class starts with a comment like: + +``` + +``` + +If you see that comment, don't edit the file directly — the next `build` run +overwrites it silently with no warning. Fix the actual source instead (see +below). + +### 2. Overlays — edit directly + +- `docs-system/overlays/.md` (legacy fallback: `.md`) + +Narrative content that doesn't belong in a terse C++ comment: long +descriptions, worked examples, compatibility notes, related topics. Merged +onto the end of the matching generated API reference page by `build`. +Missing overlays are fine — not every function needs one. + +### 3. Hand-authored guides — edit directly + +- `website/md-docs/programming/**` +- `website/md-docs/api-overview/**` +- `website/md-docs/radios/**` + +Plain markdown, no generation involved. Normal PR flow. + +## "I want to fix X" — which class am I in? + +- **Wrong or missing API fact** (syntax, params, returns, availability) on a + generated page → don't touch the `.md`/`.d.lua`. Fix the upstream + `/*luadoc */` comment in the EdgeTX firmware repo, then re-extract and + rebuild here. +- **Missing example or explanation** on a generated page → add or edit the + matching `docs-system/overlays/.md`, then rebuild. No upstream PR + needed. +- **Typo or content issue** on a hand-authored guide or an overlay → edit it + directly, normal PR. +- **A bug affecting many generated pages at once** (a broken link pattern, a + formatting mistake) → the bug is in `tools/docs_pipeline.py`'s renderer, + not in the individual pages. Fix the renderer, then rebuild. Do not hand- + patch every affected page one at a time — that's exactly what happened in + commits `0988101a` and `67ba1431`, and it's the mistake the generated-file + marker above exists to make visible. + +## Pipeline commands + +```sh +uv run python3 tools/docs_pipeline.py extract \ + --source-dir /path/to/edgetx/radio/src/lua \ + --docs-version 2.12 \ + --upstream-ref edgetx-2.12 \ + --output /tmp/api-model.2.12.json + +uv run python3 tools/docs_pipeline.py validate /tmp/api-model.2.12.json + +uv run python3 tools/docs_pipeline.py report /tmp/api-model.2.12.json \ + --output docs-system/generated/golden-module-quality.json + +uv run python3 tools/docs_pipeline.py build \ + --input /tmp/api-model.2.12.json \ + --overlay-dir docs-system/overlays \ + --docs-output website/md-docs/api-reference \ + --luals-output docs-system/generated/luals website/md-docs/assets/luals +``` + +`uv` is the required toolchain (`pyproject.toml` / `uv.lock` in the repo +root) — always run pipeline and MkDocs commands through `uv run`. See +[`docs-system/README.md`](docs-system/README.md) for the full pipeline +reference. + +## Local preview + +```sh +mkdocs serve -f mkdocs.dev.yml -a 127.0.0.1:8014 +``` + +`mkdocs.yml` is the public/production config. `mkdocs.dev.yml` inherits from +it and adds back the `Migration` nav section, per-module review dashboards, +and the API Review Dashboard (`exclude_docs: ""`) — that's why +`review-*.md`/`module-*.md` exist in `api-reference/` but never appear in +the public site nav. Keep only one preview server running at a time on +`8014`. + +## Before submitting a PR + +Verify with: + +```sh +uv run mkdocs build -f mkdocs.dev.yml --strict +``` + +A clean strict build (zero warnings) is expected before a PR is ready for +review. diff --git a/HANDOFF.md b/HANDOFF.md new file mode 100644 index 000000000..1a4498aca --- /dev/null +++ b/HANDOFF.md @@ -0,0 +1,160 @@ +# EdgeTX Lua Reference Guide Handoff + +## Current Status + +The docs structure is in a much better state than at the start of this session. + +The biggest completed improvements are: + +- top-level navigation was simplified and made more user-facing +- `API Overview` and `API Reference` now have clearer responsibilities +- `Sources`, `Switches`, and `Variables` were separated properly +- `Radio Hardware` was consolidated as a single group +- telemetry-related queue functions were moved under `Telemetry` +- RF-specific functions such as `getRAS` and `multiBuffer` remain under `RF module` +- several misplaced functions were moved into more natural groups: + - `getFlightMode` -> `Model Functions` + - `getOutputValue` -> `Model Functions` + - `getStickMode` -> `Radio Hardware` + - `getTrainerStatus` -> `Radio Hardware` + +The current local preview port in use is: + +- `http://127.0.0.1:8014/` + +There are now two configs: `mkdocs.yml` (public/production, what actually +ships) and `mkdocs.dev.yml` (internal, adds back the Migration section, +per-module dashboards, and the API Review Dashboard). Use +`mkdocs serve -f mkdocs.dev.yml -a 127.0.0.1:8014` to see the full internal +site; see README.md for details. + +## Navigation Decisions Locked In + +These decisions were made intentionally and should be treated as the current baseline: + +- `EdgeTX Lua Reference Guide` is the root docs identity +- `API Overview` is conceptual and reference context +- `API Reference` is the user-facing API grouping area +- `Programming` is for coding/how-to guidance +- `Radios` is a separate top-level group +- `Migration / Update` remains separate from user docs + +Within `API Reference`, the grouped structure is now closer to user language: + +- `Audio-Sound` +- `Display LCD` +- `Display LVGL` +- `Filesystem` +- `Lua Scripts` +- `Model Functions` +- `Radio Hardware` +- `RF module` +- `Serial Ports` +- `Sources` +- `Switches` +- `System` +- `Telemetry` +- `Time` +- `Variables` + +## What Still Needs Follow-Up + +There is still polish work left, but it is mostly refinement instead of major structural uncertainty: + +- fix older broken links carried over from legacy content +- improve weak placeholder summaries such as `Needs summary review` +- continue wording cleanup toward consistent user-facing language +- verify a few remaining edge-case function placements as they come up + +## Resolved: Nested API Reference URLs + +`api-reference/` is now nested by topic group (e.g. +`api-reference/display-lcd/lcd-draw-annulus.md`) instead of flat +(`api-reference/lcd-draw-annulus.md`). This replaces the two hand-patch +commits (`0988101a`, `67ba1431`) that fixed broken links by editing +already-generated files directly — the underlying page-path generation bug +in `tools/docs_pipeline.py` (`page_name_for_item`, `group_page_name`, +`module_page_name`, `page_href`, plus a new `nested_item_slug`/ +`scoped_symbol_parts` pair) is fixed at the source instead. + +This was ported and reworked directly onto `edgetx_2.12` from the +now-superseded `origin/docs/migrate-nested-topic-urls` branch (which had +stalled before the generated-file marker and dual-LuaLS-output work +landed) rather than merged — that branch is deleted. Along with the path +fix: `docs-system/api-groups.json`'s taxonomy was reconciled to match the +live nav (`hardware` → `radio-hardware`, the old merged `Variables` group +split into `Sources`/`Switches`/`Variables` to match the already-split live +pages), and a new `Inputs` nav entry was added for the previously-unwired +`key-inputs` group. `docs-system/generated/luals/` and +`website/md-docs/assets/luals/` are now both written by the same `build` +run (`--luals-output` takes multiple directories) and stay in sync. + +Extracted fresh from `EdgeTX/edgetx` branch `2.12` at `16713095a1` — same +153 items as the old stalled branch found, confirmed as still the current +`2.12` tip. At the time, `display-lvgl.md` and its 44 `lvgl-*.md` pages were +**not** backed by the real extraction model at all (LVGL had no upstream +`/*luadoc */` annotations yet) and were deliberately preserved rather than +regenerated; `build`'s zero-item-group guard protects hand-preserved +zero-item-group pages like that on future runs as long as they stay on +disk — but a manual `git checkout -- +website/md-docs/api-reference/display-lvgl.md website/md-docs/api-reference/lvgl-*.md` +was needed that first time since the whole directory was wiped clean before +rebuilding. See "Display LVGL: Resolved" below for how this gap actually +closed a short time later. + +Don't do a blanket wipe of `api-reference/` again without checking first +whether any group is still relying on the zero-item preservation guard for +real hand-authored content — a wipe removes the on-disk copy `build` needs +to compare against, so the guard can't do its job on the very next run. + +**Follow-up before this site is public**: no redirect plugin exists +(`mkdocs-redirects` or otherwise). Skipped for this rework since the site +isn't live yet, but it does emit a real `sitemap.xml` against +`site_url: https://luadoc.edgetx.org/` — add old-flat-path → +new-nested-path redirects before treating this as the live site, or any +external links/bookmarks/search results made before that point will break. + +## Display LVGL: Resolved + +`EdgeTX/edgetx#7771` ("docs(lua): add luadoc annotations for the LVGL Lua +API") landed real `/*luadoc */` annotations for all 45 `lvgl.*` functions, +merged (squash) into `2.12` as commit `8718d2473a`. `Display LVGL` is now +generated from the real extraction model exactly like every other group, +no longer a hand-preserved exception: + +- extraction went from 153 to 198 items (`lvgl`: 45), all 44 `lvgl-*.md` + flat pages replaced with nested `display-lvgl/.md` pages, the old + flat files deleted (`git rm`, not left as orphans) +- two other pipeline bugs were found and fixed along the way, both + independent of LVGL and improving already-live non-LVGL content too: + `FUNCTION_RE`/`PARAM_RE`/`RETVAL_RE`/`NOTICE_RE`/`STATUS_RE` were + anchored at true column 0 and silently dropped any indented tag line + (LVGL's annotations are indented inside their `LROT_BEGIN` table; this + also fixed `model.getSwashRing`'s missing availability and + `playNumber`'s missing `volume` param on the existing 2.12 baseline); + and multi-line bulleted parameter descriptions were being flattened into + unreadable run-on paragraphs in the rendered table cells (fixed to + render as real `
  • ` lists) +- a new `@common`/`@commonparams` luadoc tag pair (ported from + `JimB40/lua-reference-guide#7`) lets the shared "common object + properties" bullet list used by ~30 LVGL widget constructors be defined + once and referenced, instead of repeated verbatim in every function's + comment +- the previous hand-preserved content had real, systematic inaccuracies + worth knowing about if something looks different now: every function + showed a fabricated `Since: 3.0.0` (real values are `2.11.0`/`2.11.1`/ + `2.11.2`), and 32 of 44 were missing the optional `parent` argument from + their signature entirely + +`JimB40/lua-reference-guide#5` (the manual port that produced the old +hand-preserved content) and `#7` (the `@common`/`@commonparams` PR this +was ported from) are both closed as superseded. + +## Notes For Resume + +- prefer unified styling by copying existing repo patterns exactly +- prefer user-facing labels over internal/developer naming +- keep only one preview server active at a time on `8014` +- if preview looks stale, restart `8014` from the current files before assuming the docs are wrong +- to see Migration/review content locally, serve with `-f mkdocs.dev.yml`; plain `mkdocs serve` uses the public config and won't show it +- upstream C++ comments remain the long-term source of truth for generated API syntax diff --git a/MIGRATION-PLAN.md b/MIGRATION-PLAN.md new file mode 100644 index 000000000..3105465b6 --- /dev/null +++ b/MIGRATION-PLAN.md @@ -0,0 +1,369 @@ +# EdgeTX Lua Docs Migration Plan + +## Summary + +This project will move away from GitBook and rebuild the Lua API documentation flow around the EdgeTX source code. The long-term source of truth for API syntax, parameters, return values, availability, and practical typing will live in the official EdgeTX code repository, not in this docs repository. + +The first published output of the new system will be the EdgeTX 2.12 documentation set. However, the annotation model and source cleanup work should start in the current upstream EdgeTX codebase, then be backported or adapted as needed for the 2.12 release line. + +The new pipeline should generate two downstream products from the same extracted API data: + +- Markdown API reference for the published docs site +- LuaLS `*.d.lua` definition files for autocomplete, inline documentation, and type checking + +## Goals + +- Make upstream code comments the single maintained source of truth for Lua API facts +- Stop relying on GitBook as the docs platform +- Generate API reference pages from source annotations +- Keep richer narrative content separate from generated API truth +- Support LuaLS generation from the same extracted model +- Publish EdgeTX 2.12 first using the new pipeline +- Use one unified MkDocs experience for all versions that are migrated to the new site +- Preserve old-version content when needed without recreating GitBook inside MkDocs + +## Operating Model + +### Upstream EdgeTX code repo + +The official EdgeTX code repository is the authoritative source for: + +- API symbol names +- syntax and signatures +- parameter definitions +- return values +- availability and version metadata +- implementation-coupled notes +- practical type information used for LuaLS + +If API documentation truth is wrong or missing, it should be fixed there first through upstream PRs. + +### This docs repo + +This repository becomes a downstream consumer and publisher: + +- extract API annotations from upstream source +- build normalized intermediate API data +- render Markdown reference pages +- render LuaLS definition files +- merge overlay content for richer docs +- publish a static docs site + +This repo should not become a competing owner of API syntax truth. + +## Docs Experience Policy + +The migration will standardize on one docs platform and one presentation model for all versions that move onto the new site. + +Rules: + +- GitBook is treated as a legacy publishing system, not a design target to be recreated inside MkDocs +- EdgeTX 2.12 is the first release intended to publish from the new MkDocs pipeline +- Any older versions that are later imported into MkDocs should use the same MkDocs shell, navigation model, and version-switching behavior as newer versions +- Older versions may retain legacy content, known gaps, or historical wording, but should not require a separate GitBook-like theme inside MkDocs +- Content fixes remain branch-specific and are only applied to older release lines when explicitly backported or edited there +- Older versions should be published from their own branches or release refs, not copied into the 2.12 docs tree + +This means the project preserves historical content where useful, but does not preserve GitBook presentation at all costs. + +## Migration Strategy + +### Phase 1: Normalize upstream source annotations + +Review and improve Lua API comments in the current EdgeTX upstream codebase. + +The new annotation format should cover: + +- canonical API id +- module or namespace +- syntax or signature +- short summary +- parameters with names, required or optional state, and practical types +- return values with practical types +- availability metadata such as version introduced and radio or display support +- short implementation-specific notes when necessary + +This phase should: + +- inventory all Lua API entry points +- identify missing or inconsistent annotations +- normalize parameter naming and optional argument notation +- add practical type information where useful for LuaLS +- avoid placing long examples or heavy prose in source comments +- land the cleanup in upstream PRs + +### Phase 2: Define extraction schema + +Build a deterministic extractor that reads normalized upstream annotations and produces a versioned intermediate representation. + +The intermediate model should include at least: + +- `id` +- `symbol` +- `container` or `module` +- `kind` +- `syntax` +- `summary` +- `parameters` +- `returns` +- `availability` +- `notes` +- `types` +- `source_location` +- `upstream_ref` +- `docs_version` + +The extractor should fail clearly on malformed annotations, duplicates, or missing required fields. + +### Phase 3: Generate Markdown API reference + +Use the intermediate model to generate API reference Markdown files. + +Requirements: + +- no hand editing of generated Markdown +- stable output for the same upstream input +- generated sections remain authoritative for API truth +- pages map cleanly into the final docs navigation + +### Phase 4: Generate LuaLS definitions + +Use the same intermediate model to generate LuaLS `*.d.lua` files. + +The type fidelity target is practical editor usefulness, not a perfect formal type system. The generator should support: + +- primitive Lua types +- optional parameters +- unions such as `integer|string` +- structured tables for stable inputs and return values +- constants and module namespaces + +The existing `edgetx-lua-stdlib` repository should be treated as a strong reference for output shape and usability, but not as the long-term source of truth. + +### Phase 5: Add overlay enrichment + +Keep richer documentation outside generated source data. + +Overlay files should be stored separately per API item and may contain: + +- long descriptions +- examples +- related topics +- extended notes +- assets or screenshots if needed + +Merge rules: + +- generated syntax and core API metadata always win +- overlays add narrative content only +- missing overlays are valid + +### Phase 6: Replace GitBook with MkDocs Material + +Publish the docs as a static site using MkDocs Material. + +The site should combine: + +- generated API reference pages +- hand-authored guides and conceptual docs +- overlay-enriched sections where available + +MkDocs replaces GitBook for: + +- site rendering +- navigation +- search +- theming +- static publishing + +The first supported MkDocs release is EdgeTX 2.12. Older releases may be added later, but if they are added they should adopt the same MkDocs presentation rather than a separate legacy theme. + +### Phase 7: Unify versioned publishing + +Publish documentation versions through one MkDocs and `mike` pipeline. + +Requirements: + +- each published docs version maps to a specific source branch or release ref +- `main` or equivalent development work publishes as a development version such as `dev` +- EdgeTX 2.12 becomes the first release alias promoted as `latest` when ready +- older versions such as 2.11 or 2.10 can be imported later as legacy-content versions +- imported legacy versions should display a small notice that the content is historical and may not include later corrections +- imported legacy versions should be built from their own branch content, not from duplicated copies stored under another version + +**Status: done.** 2.4 through 2.11 are imported and published via `mike`, built from `tools/import_legacy_gitbook.py` against each version's own GitBook-era branch content (2.4-2.7 and 2.11 come from the upstream `EdgeTX/lua-reference-guide` repo, since this fork doesn't carry those branches). Deployed manually (`mike deploy --config-file ... --push` per version), not via `.github/workflows/publish-versioned-docs.yml` -- that workflow only handles `main`/`edgetx_2.12`, since the legacy branches don't exist in this fork for it to trigger from. `opentx_2.2`/`opentx_2.3` (pre-EdgeTX) were left out of scope. + +Non-requirement: + +- imported legacy versions do not need to match historical GitBook visuals + +## Versioning Approach + +Two tracks must be kept separate: + +- current upstream EdgeTX main is where annotation quality and source format are improved first +- EdgeTX 2.12 is the first target documentation version to be published with the new pipeline + +Important rule: + +- release docs must always be generated from the matching release source ref + +That means 2.12 docs and 2.12 LuaLS output must be generated from a 2.12-compatible upstream ref, not from current main. If needed, comment and annotation fixes from current main should be backported to the 2.12 code line. + +Publishing policy: + +- EdgeTX 2.12 is the first release line to publish on the new MkDocs site +- `main` may publish as `dev` for ongoing work before release +- pre-2.12 versions may remain on GitBook during transition +- if pre-2.12 versions are later migrated into MkDocs, their content should remain branch-specific but their presentation should use the shared MkDocs design +- no release branch should be changed implicitly by work done for another release branch +- older versions should be published from their own branches or release refs rather than copied into the 2.12 branch + +Recommended rollout: + +1. Finish the MkDocs design, generation flow, and version-switching behavior on `2.12` and `dev` +2. Publish `2.12` as the first release on the new site +3. Decide whether older versions need to be imported into MkDocs immediately or can remain on GitBook temporarily +4. If older versions are imported, mark them as legacy content with a banner instead of recreating GitBook styling +5. Retire GitBook once the MkDocs versioned site is sufficiently complete + +## Implementation Plan + +The migration implementation should be executed in ordered workstreams so the first shippable outcome is a working EdgeTX 2.12 docs site published from MkDocs. + +### Workstream 1: Lock the 2.12 site shell + +Scope: + +- finalize `mkdocs.yml` structure +- finalize theme, branding, navigation, and version-switcher behavior +- define the shared page layout for generated API pages and hand-authored guides +- define the legacy-version banner pattern for older branches that may later be imported + +Done when: + +- the 2.12 site builds locally without structural blockers +- key navigation sections are stable +- the site theme is accepted as the shared MkDocs UI for all migrated versions + +### Workstream 2: Finish pipeline outputs for 2.12 + +Scope: + +- finalize extraction schema and generator behavior +- generate Markdown API reference pages from a pinned 2.12-compatible upstream ref +- generate LuaLS definition files from the same input +- define which parts of the docs are generated versus hand-authored overlays + +Done when: + +- generated API docs are reproducible +- LuaLS output is generated from the same API model +- overlay merge rules are working and documented by example + +### Workstream 3: Prepare branch-based version publishing + +Scope: + +- update the publishing workflow for `edgetx_2.12` +- keep `main` publishing as `dev` +- confirm version ids, aliases, and `latest` promotion rules +- confirm that each version is built from its own branch or release ref + +Done when: + +- `main` publishes as `dev` +- `edgetx_2.12` publishes as the release version for 2.12 +- the release version can be promoted to `latest` when ready +- no version relies on copied content from another branch + +### Workstream 4: Validate the 2.12 release candidate + +Scope: + +- verify local builds +- verify generated docs links, navigation, and grouping +- verify search behavior and page discoverability +- verify representative LuaLS definitions against expected editor usefulness +- review warnings and fix the highest-value blockers + +Done when: + +- local preview is usable for day-to-day review +- major docs sections render correctly +- high-value broken links and nav issues are resolved or explicitly accepted +- the 2.12 site is good enough to publish as the first MkDocs release + +### Workstream 5: Decide legacy-version migration timing + +**Status: done.** 2.4 through 2.11 are imported into MkDocs and published via `mike`, each from its own branch content with the legacy-version notice enabled. See the note under "Versioning Approach" above for how. `opentx_2.2`/`opentx_2.3` were left on their own (pre-EdgeTX, not part of this migration). + +## Immediate Execution Order + +The recommended order of implementation is: + +1. Finish the shared MkDocs site shell for `2.12` +2. Finish the 2.12 extraction and generation pipeline outputs +3. Update the publish workflow to support `edgetx_2.12`, `dev`, and `latest` +4. Validate the complete 2.12 site locally +5. Publish 2.12 as the first MkDocs release +6. ~~Revisit whether 2.11 and older should remain on GitBook or be imported later~~ -- done, see Workstream 5 + +## First Actionable Tasks + +- finalize `mkdocs.yml` and shared site assets for the 2.12 UI +- verify generated API pages are correctly wired into navigation +- add `edgetx_2.12` publishing support to the GitHub Actions workflow +- define the exact alias rule for promoting 2.12 to `latest` +- add a reusable legacy-version notice for future older-version imports +- collect and prioritize current MkDocs build warnings into fix now versus defer + +## LuaLS Considerations + +LuaLS should be a first-class output of the new system, not an afterthought. + +The upstream annotation contract must carry enough structured information to support: + +- editor autocomplete +- inline documentation +- type checking +- module and constant discovery + +The recommended type strategy is practical typing: + +- be precise where the API is stable and clear +- use structured table types where the interface is well defined +- use broader types where behavior is dynamic or uncertain +- avoid inventing precision that is not justified by the implementation + +## Testing And Validation + +The migration should include the following validation steps: + +- confirm all exported Lua API entries in the upstream codebase have valid annotations +- validate the extractor against malformed and incomplete annotations +- generate Markdown docs from a pinned 2.12 upstream ref +- generate LuaLS files from the same pinned 2.12 upstream ref +- compare generated 2.12 docs against the current published 2.12 docs +- compare generated LuaLS output against the current `edgetx-lua-stdlib` structure and coverage +- verify output is stable across repeated runs +- verify overlay merge keeps generated API truth authoritative +- verify MkDocs builds the combined site successfully + +## Non-Goals For First Version + +- generating tutorials or conceptual guides from code +- using AI as a required part of the build pipeline +- making this docs repo the owner of API truth +- building a custom docs web app instead of using a static docs framework + +## Defaults And Assumptions + +- The official EdgeTX source repository is upstream and authoritative +- This repository is downstream and publishes generated outputs +- EdgeTX 2.12 is the first release line to publish through the new system +- GitBook will be replaced rather than reimplemented inside MkDocs +- A unified MkDocs design is preferred over preserving historical GitBook styling +- Older versions may remain temporarily on GitBook during transition, but migrated versions should share the MkDocs UI +- AI may help draft overlay content, but only as an optional reviewed workflow +- LuaLS generation is part of the intended final architecture diff --git a/README.md b/README.md index 21f325015..d864d932c 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,52 @@ -# EdgeTX LUA Reference Guide +# EdgeTX Lua Reference Guide -This guide covers the development of user-written scripts for R/C transmitters running the EdgeTX operating system with Lua support. Readers should be familiar with EdgeTX, the EdgeTX Companion, and know how to transfer files the SD card in the transmitter. +This repository contains the EdgeTX Lua documentation site. -{% hint style="info" %} -The latest version of this guide will always be available [here](https://luadoc.edgetx.org). At the top of the left sidebar there is a version option if you are running an older version of EdgeTX and need the docs for that specific version. -{% endhint %} +The live documentation source for the current site is in [website](website). -## Sections +## Repo Layout -| Chapter | Content | -| ------------------------------------------- | ----------------------------------------------------------------------------- | -| [Overview](overview/) | Covers various topics of LUA implementation in EdgeTX operating system system | -| [LUA API Reference](lua-api-reference/) | Reference of all constants and functions available in EdgeTX LUA API | -| [LUA API Programming](lua-api-programming/) | EdgeTX LUA programming guide that covers coding techniques with examples. | -| [Appendixes](appendix/) | | +- `website/`: MkDocs content, theme assets, and navigation for the current docs site +- `docs-system/`: extraction contracts, overlays, generated artifacts, and pipeline notes +- `tools/`: local build and generation helpers -## EdgeTX LUA development support +## Local Preview -Quickest way to get support from seasoned EdgeTX LUA developers is to join our Discord server and ask on dedicated #lua channel +```sh +uv run mkdocs serve -a 127.0.0.1:8014 +``` -[Join the chat on Discord](https://discord.gg/DrHkAn28sq) +This uses `mkdocs.yml`, the public/production config. It excludes the +Migration section, the API Review Dashboard, and the per-module +extraction dashboards, matching what actually ships on the published +site. -## LUA Reference guide collaboration +## Internal Preview (Migration docs + Review Workbench) -Please feel free to make suggestions or corrections to the documentation. +To see the Migration section, the per-module dashboards, and the API +review pages, serve the internal config instead: -* Preferred method of editing is to use [GitBook](https://www.gitbook.com), as it uses WYSWIG editor allowing two-stage publication. If you want to change or add whole page or become collaborator _\_. -* For simple typos or proof reading you may submit PR to [lua-reference-guide](https://github.com/EdgeTX/lua-reference-guide/pulls)[ ](https://github.com/EdgeTX/lua-reference-guide)repository on EdgeTX GitHub. +```sh +uv run mkdocs serve -f mkdocs.dev.yml -a 127.0.0.1:8014 +``` -## Project support +`mkdocs.dev.yml` inherits from `mkdocs.yml` and un-excludes everything +dropped from the public build. Keep only one preview server active on +`8014` at a time — switch configs by stopping one and starting the +other. -The EdgeTX team has no intention of making a profit from their work - EdgeTX is free and open source and will remain free and open source. However, the project is more expensive to maintain than most open source projects. This in mainly because there is a never ending flood of hardware to integrate and maintain code for. Hardware that costs. In addition, in order to develop for this hardware, certain specalised test and measurement equipment is also required. +## Review Workbench -In order to support this, EdgeTX has chosen to use OpenCollective to allow for donations from the community, as well as funding from manufacturers who choose to partner with and sponsor the project. This also allows for transparent accounting of what the funds are spent on. +For live API review pages with saved type decisions, run the local decision server in a second terminal: -Please visit [our OpenCollective page](https://opencollective.com/edgetx) if you would like to financially help support the project! +```sh +uv run python3 tools/review_decision_server.py +``` + +Then open the internal preview (see above) at `http://127.0.0.1:8014/` and use the API review dashboard under the site navigation. + +## Contributing + +- Edit the current docs under `website/` +- Keep generated or pipeline-specific notes under `docs-system/` +- Use the internal preview at `http://127.0.0.1:8014/` for review during local work diff --git a/SUMMARY.md b/SUMMARY.md deleted file mode 100644 index 21006a55c..000000000 --- a/SUMMARY.md +++ /dev/null @@ -1,206 +0,0 @@ -# Table of contents - -* [EdgeTX LUA Reference Guide](README.md) -* [Overview](overview/README.md) - * [Lua Basics](overview/lua-basics.md) - * [LUA version and included libraries](overview/version-libraries/README.md) - * [io Library](overview/version-libraries/io-library.md) - * [Script Types](overview/script-types/README.md) - * [One-Time Scripts](overview/script-types/one-time-scripts.md) - * [Telemetry Scripts](overview/script-types/telemetry-scripts.md) - * [Widget Scripts](overview/script-types/widget-scripts.md) - * [Function Scripts](overview/script-types/function-scripts.md) - * [Mixes Scripts](overview/script-types/mixes-scripts.md) - * [Radios](overview/radios/README.md) - * [BetaFPV](overview/radios/betafpv.md) - * [FlySky](overview/radios/flysky.md) - * [FrSky](overview/radios/frsky.md) - * [Jumper](overview/radios/jumper.md) - * [Radiomaster](overview/radios/radiomaster/README.md) - * [TX16S](overview/radios/radiomaster/tx16s.md) - * [Internal indexes](overview/internal-indexes/README.md) - * [Source List](overview/internal-indexes/source-list.md) - * [Switch Positions List](overview/internal-indexes/switch-positions-id.md) -* [LUA API Reference](lua-api-reference/README.md) - * [Constants](lua-api-reference/constants/README.md) - * [Color Constants](lua-api-reference/constants/color-constants.md) - * [Flags and Pattern Constants](lua-api-reference/constants/flags-and-pattern-constants.md) - * [Key Event Constants](lua-api-reference/constants/key-event-constants.md) - * [Logical Switch Function Constants](lua-api-reference/constants/logical-switch-function-constants.md) - * [Screen Constants](lua-api-reference/constants/screen-constants.md) - * [Special Character Constants](lua-api-reference/constants/special-character-constants.md) - * [Special Function Constants](lua-api-reference/constants/special-function-constants.md) - * [Touch Event Constants](lua-api-reference/constants/touch-event-constants.md) - * [Widget Options Constants](lua-api-reference/constants/widget-options.md) - * [Units](lua-api-reference/constants/units.md) - * [Display LCD](lua-api-reference/display-lcd/README.md) - * [lcd.RGB](lua-api-reference/display-lcd/RGB.md) - * [lcd.clear](lua-api-reference/display-lcd/clear.md) - * [lcd.drawBitmap](lua-api-reference/display-lcd/drawBitmap.md) - * [lcd.drawChannel](lua-api-reference/display-lcd/drawChannel.md) - * [lcd.drawCombobox(x, y, w, list, idx \[, flags\])](lua-api-reference/display-lcd/drawCombobox.md) - * [lcd.drawFilledRectangle(x, y, w, h \[, flags\])](lua-api-reference/display-lcd/drawFilledRectangle.md) - * [lcd.drawGauge(x, y, w, h, fill, maxfill \[, flags\])](lua-api-reference/display-lcd/drawGauge.md) - * [lcd.drawLine(x1, y1, x2, y2, pattern, flags)](lua-api-reference/display-lcd/drawLine.md) - * [lcd.drawNumber(x, y, value \[, flags\])](lua-api-reference/display-lcd/drawNumber.md) - * [lcd.drawPixmap(x, y, name)](lua-api-reference/display-lcd/drawPixmap.md) - * [lcd.drawPoint(x, y)](lua-api-reference/display-lcd/drawPoint.md) - * [lcd.drawRectangle(x, y, w, h \[, flags \[, t\]\])](lua-api-reference/display-lcd/drawRectangle.md) - * [lcd.drawScreenTitle(title, page, pages)](lua-api-reference/display-lcd/drawScreenTitle.md) - * [lcd.drawSource(x, y, source \[, flags\])](lua-api-reference/display-lcd/drawSource.md) - * [lcd.drawSwitch(x, y, switch, flags)](lua-api-reference/display-lcd/drawSwitch.md) - * [lcd.drawText(x, y, text \[, flags\])](lua-api-reference/display-lcd/drawText.md) - * [lcd.drawTimer(x, y, value \[, flags\])](lua-api-reference/display-lcd/drawTimer.md) - * [lcd.drawAnnulus(x, y, r1, r2, start, end \[, flags\])](lua-api-reference/display-lcd/drawannulus.md) - * [lcd.drawArc(x, y, r, start, end \[, flags\])](lua-api-reference/display-lcd/drawarc.md) - * [lcd.drawCircle(x, y, r \[, flags\])](lua-api-reference/display-lcd/drawcircle.md) - * [lcd.drawFilledCircle(x, y, r \[, flags\])](lua-api-reference/display-lcd/drawfilledcircle.md) - * [lcd.drawFilledTriangle(x1, y1, x2, y2, x3, y3 \[, flags\])](lua-api-reference/display-lcd/drawfilledtriangle.md) - * [lcd.drawHudRectangle(pitch, roll, xmin, xmax, ymin, ymax \[, flags\])](lua-api-reference/display-lcd/drawhudrectangle.md) - * [lcd.drawLineWithClipping(x1, y1, x2, y2, xmin, xmax, ymin, ymax, pattern \[, flags\])](lua-api-reference/display-lcd/drawlinewithclipping.md) - * [lcd.drawPie(x, y, r, start, end \[, flags\])](lua-api-reference/display-lcd/drawpie.md) - * [lcd.drawTriangle(x1, y1, x2, y2, x3, y3 \[, flags\])](lua-api-reference/display-lcd/drawtriangle.md) - * [lcd.getColor(area)](lua-api-reference/display-lcd/getColor.md) - * [lcd.getLastLeftPos()](lua-api-reference/display-lcd/getLastLeftPos.md) - * [lcd.getLastPos()](lua-api-reference/display-lcd/getLastPos.md) - * [lcd.getLastRightPos()](lua-api-reference/display-lcd/getLastRightPos.md) - * [lcd.drawBitmapPattern(bitmap, x, y \[, flags\])](lua-api-reference/display-lcd/lcd.drawbitmappattern.md) - * [lcd.drawBitmapPatternPie(bitmap, x, y, startAngle, endAngle \[, flags\])](lua-api-reference/display-lcd/lcd.drawbitmappatternpie.md) - * [lcd.drawTextLines(x, y, w, h, text \[, flags\])](lua-api-reference/display-lcd/lcd.drawtextlines.md) - * [lcd.exitFullScreen()](lua-api-reference/display-lcd/lcd.exitfullscreen.md) - * [lcd.invertRect(x, y, w, h \[, flags\])](lua-api-reference/display-lcd/lcd.invertrect.md) - * [Lcd Functions Overview](lua-api-reference/display-lcd/lcd-functions-overview.md) - * [lcd.refresh()](lua-api-reference/display-lcd/refresh.md) - * [lcd.resetBacklightTimeout()](lua-api-reference/display-lcd/resetBacklightTimeout.md) - * [lcd.setColor(area, color)](lua-api-reference/display-lcd/setColor.md) - * [lcd.sizeText(text \[, flags\])](lua-api-reference/display-lcd/sizetext.md) - * [popupConfirmation(title, message, event)](lua-api-reference/display-lcd/popupconfirmation.md) - * [popupInput(title, event, input, min, max)](lua-api-reference/display-lcd/popupinput.md) - * [popupWarning(title, event)](lua-api-reference/display-lcd/popupwarning.md) - * [GREY()](lua-api-reference/display-lcd/grey.md) - * [Model Functions](lua-api-reference/model/README.md) - * [model.defaultInputs](lua-api-reference/model/defaultinputs.md) - * [model.deleteFlightModes](lua-api-reference/model/deleteflightmodes.md) - * [model.deleteInput](lua-api-reference/model/deleteinput.md) - * [model.deleteInputs](lua-api-reference/model/deleteinputs.md) - * [model.deleteMix](lua-api-reference/model/deletemix.md) - * [model.deleteMixes](lua-api-reference/model/deletemixes.md) - * [model.getCurve](lua-api-reference/model/getcurve.md) - * [model.getCustomFunction(function)](lua-api-reference/model/getcustomfunction.md) - * [model.getFlightMode(index)](lua-api-reference/model/getflightmode.md) - * [model.getGlobalVariable(index, flight\_mode)](lua-api-reference/model/getglobalvariable.md) - * [model.getInfo](lua-api-reference/model/getinfo.md) - * [model.getInput(input, line)](lua-api-reference/model/getinput.md) - * [model.getInputsCount(input)](lua-api-reference/model/getinputscount.md) - * [model.getLogicalSwitch(switch)](lua-api-reference/model/getlogicalswitch.md) - * [model.getMix(channel, line)](lua-api-reference/model/getmix.md) - * [model.getMixesCount(channel)](lua-api-reference/model/getmixescount.md) - * [model.getModule(index)](lua-api-reference/model/getmodule.md) - * [model.getOutput(index)](lua-api-reference/model/getoutput.md) - * [model.getSensor(sensor)](lua-api-reference/model/getsensor.md) - * [model.getTimer(timer)](lua-api-reference/model/gettimer.md) - * [model.insertInput(input, line, value)](lua-api-reference/model/insertinput.md) - * [model.insertMix(channel, line, value)](lua-api-reference/model/insertmix.md) - * [model.getSwashRing()](lua-api-reference/model/model.getswashring.md) - * [model.setSwashRing(params)](lua-api-reference/model/model.setswashring-params.md) - * [model.resetSensor(sensor)](lua-api-reference/model/resetsensor.md) - * [model.resetTimer(timer)](lua-api-reference/model/resettimer.md) - * [model.setCurve(curve, params)](lua-api-reference/model/setcurve.md) - * [model.setCustomFunction(function, value)](lua-api-reference/model/setcustomfunction.md) - * [model.setFlightMode(index, params)](lua-api-reference/model/setflightmode.md) - * [model.setGlobalVariable(index, flight\_mode, value)](lua-api-reference/model/setglobalvariable.md) - * [model.setInfo(value)](lua-api-reference/model/setinfo.md) - * [model.setLogicalSwitch(switch, value)](lua-api-reference/model/setlogicalswitch.md) - * [model.setModule(index, value)](lua-api-reference/model/setmodule.md) - * [model.setOutput(index, value)](lua-api-reference/model/setoutput.md) - * [model.setTimer(timer, value)](lua-api-reference/model/settimer.md) - * [Bitmap Functions](lua-api-reference/bitmap/README.md) - * [Bitmap.resize(bitmap, width, height)](lua-api-reference/bitmap/bitmap.resize.md) - * [Bitmap.toMask(bitmap)](lua-api-reference/bitmap/bitmap.tomask.md) - * [Bitmap.getSize(name)](lua-api-reference/bitmap/getsize.md) - * [Bitmap.open(name)](lua-api-reference/bitmap/open.md) - * [Filesystem](lua-api-reference/filesystem/README.md) - * [chdir(directory)](lua-api-reference/filesystem/chdir.md) - * [del(file or directory)](lua-api-reference/filesystem/del.md) - * [dir(directory)](lua-api-reference/filesystem/dir.md) - * [fstat(path)](lua-api-reference/filesystem/fstat.md) - * [Serial Ports](lua-api-reference/serial-ports/README.md) - * [serialGetPower(port\_nr)](lua-api-reference/serial-ports/serialgetpower.md) - * [serialRead(\[num\])](lua-api-reference/serial-ports/serialread.md) - * [serialSetPower(port\_nr, value)](lua-api-reference/serial-ports/serialsetpower.md) - * [serialWrite(str)](lua-api-reference/serial-ports/serialwrite.md) - * [setSerialBaudrate(baudrate)](lua-api-reference/serial-ports/setserialbaudrate.md) - * [System](lua-api-reference/system/README.md) - * [defaultChannel(stick)](lua-api-reference/system/defaultchannel.md) - * [defaultStick(channel)](lua-api-reference/system/defaultstick.md) - * [getGeneralSettings()](lua-api-reference/system/getgeneralsettings.md) - * [getVersion()](lua-api-reference/system/getversion.md) - * [Key Inputs](lua-api-reference/key-inputs/README.md) - * [getRotEncMode()](lua-api-reference/key-inputs/getrotencmode.md) - * [getRotEncSpeed()](lua-api-reference/key-inputs/getrotencspeed.md) - * [killEvents(key)](lua-api-reference/key-inputs/killevents.md) - * [LUA Scripts](lua-api-reference/lua-scripts/README.md) - * [getAvailableMemory()](lua-api-reference/lua-scripts/getavailablememory.md) - * [getUsage()](lua-api-reference/lua-scripts/getusage.md) - * [loadScript(file \[, mode\], \[,env\])](lua-api-reference/lua-scripts/loadscript.md) - * [Time](lua-api-reference/time/README.md) - * [getDateTime()](lua-api-reference/time/getdatetime.md) - * [getGlobalTimer()](lua-api-reference/time/getglobaltimer.md) - * [getRtcTime()](lua-api-reference/time/getrtctime.md) - * [getTime()](lua-api-reference/time/gettime.md) - * [resetGlobalTimer(\[type\])](lua-api-reference/time/resetglobaltimer.md) - * [Audio-Sound](lua-api-reference/audio-sound/README.md) - * [playDuration(duration \[, hourFormat\])](lua-api-reference/audio-sound/playduration.md) - * [playFile(name)](lua-api-reference/audio-sound/playfile.md) - * [playHaptic(duration, pause \[, flags\])](lua-api-reference/audio-sound/playhaptic.md) - * [playNumber(value, unit \[, attributes\])](lua-api-reference/audio-sound/playnumber.md) - * [playTone(frequency, duration, pause \[, flags \[, freqIncr\]\])](lua-api-reference/audio-sound/playtone.md) - * [flushAudio()](lua-api-reference/audio-sound/flushaudio.md) - * [Telemetry](lua-api-reference/telemetry/README.md) - * [getRSSI()](lua-api-reference/telemetry/getrssi.md) - * [RF module](lua-api-reference/rf-module/README.md) - * [accessTelemetryPush()](lua-api-reference/rf-module/accesstelemetrypush.md) - * [crossfireTelemetryPop()](lua-api-reference/rf-module/crossfiretelemetrypop.md) - * [crossfireTelemetryPush()](lua-api-reference/rf-module/crossfiretelemetrypush.md) - * [ghostTelemetryPop()](lua-api-reference/rf-module/ghosttelemetrypop.md) - * [ghostTelemetryPush()](lua-api-reference/rf-module/ghosttelemetrypush.md) - * [sportTelemetryPop()](lua-api-reference/rf-module/sporttelemetrypop.md) - * [sportTelemetryPush()](lua-api-reference/rf-module/sporttelemetrypush.md) - * [getRAS()](lua-api-reference/rf-module/getras.md) - * [multiBuffer(address\[,value\])](lua-api-reference/rf-module/multibuffer-address-value.md) - * [GPS](lua-api-reference/gps/README.md) - * [getTxGPS()](lua-api-reference/gps/gettxgps.md) - * [Variables](lua-api-reference/variables/README.md) - * [getFieldInfo(source)](lua-api-reference/variables/getfieldinfo.md) - * [getFlightMode(mode)](lua-api-reference/variables/getflightmode.md) - * [getLogicalSwitchValue(id)](lua-api-reference/variables/getlogicalswitchvalue.md) - * [getOutputValue(outputIndex)](lua-api-reference/variables/getoutputvalue.md) - * [getShmVar(id)](lua-api-reference/variables/getshmvar.md) - * [getSourceIndex(sourceName)](lua-api-reference/variables/getsourceindex.md) - * [getSourceName(sourceIndex)](lua-api-reference/variables/getsourcename.md) - * [getSourceValue(source)](lua-api-reference/variables/getsourcevalue.md) - * [getSwitchIndex(positionName)](lua-api-reference/variables/getswitchindex.md) - * [getSwitchName(switchIndex)](lua-api-reference/variables/getswitchname.md) - * [getSwitchValue(switchIndex)](lua-api-reference/variables/getswitchvalue.md) - * [getValue(source)](lua-api-reference/variables/getvalue.md) - * [setShmVar(id, value)](lua-api-reference/variables/setshmvar.md) - * [setStickySwitch(id, value)](lua-api-reference/variables/setstickyswitch.md) - * [sources(\[first\[, last\]\])](lua-api-reference/variables/sources.md) - * [switches(\[first\[, last\]\])](lua-api-reference/variables/switches.md) -* [LUA API Programming](lua-api-programming/README.md) - * [Data Exchange with the EdgeTX Model Setup](lua-api-programming/data-exchange-with-the-edgetx-model-setup.md) - * [Drawing Flags and Colors](lua-api-programming/drawing-flags-and-colors.md) - * [Init Function Syntax](lua-api-programming/init-function-syntax.md) - * [Input Table Syntax](lua-api-programming/input-table-syntax.md) - * [Loading Code Modules Dynamically](lua-api-programming/loading-code-modules-dynamically.md) - * [Output Table Syntax](lua-api-programming/output-table-syntax.md) - * [Return Statement Syntax](lua-api-programming/return-statement-syntax.md) - * [Run Function Syntax](lua-api-programming/run-function-syntax.md) - * [Saving Memory](lua-api-programming/saving-memory.md) - * [Using Key and Touch Events](lua-api-programming/using-key-and-touch-events.md) - * [Advanced Topics](advanced-topics/README.md) - * [Debugging techniques](advanced-topics/debugging-techniques.md) - * [Lua data sharing across scripts](advanced-topics/lua-data-sharing-across-scripts.md) - * [Speed/memory optimizaton tricks](advanced-topics/optimization-tricks.md) -* [Appendixes](appendix/README.md) - * [Fonts](appendix/fonts.md) diff --git a/advanced-topics/optimization-tricks.md b/advanced-topics/optimization-tricks.md deleted file mode 100644 index 8c4508c9b..000000000 --- a/advanced-topics/optimization-tricks.md +++ /dev/null @@ -1,27 +0,0 @@ -# Speed/memory optimizaton tricks - -## Faster getValue() - -Normally one uses [getValue()](../part\_iii\_-\_opentx\_lua\_api\_reference/general-functions-less-than-greater-than-luadoc-begin-general/getvalue.md) function with the source/filed name like so: - -```lua -local foo = getValue("bar") -``` - -This works and is recommended method for portability. But if a particular script needs to get the value of certain field a lot, then it is faster to use this syntax: - -```lua -local my_id = getFieldInfo("bar").id -- here we get the numerical id of the filed "bar" - -local function run_a_lot() - local my_value = getValue(my_id) -- exactly the same effect as local my_value = getValue("bar"), but faster -end -``` - -Why is this method faster? With the function [getFieldInfo(name)](../part\_iii\_-\_opentx\_lua\_api\_reference/general-functions-less-than-greater-than-luadoc-begin-general/getfieldinfo.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. - -So when the `getValue(my_id)` is called the search can be skipped and the requested value if fetched directly. - -Of course there is a trade-of, the second example uses little more memory (for variable `my_id`). diff --git a/appendix/README.md b/appendix/README.md deleted file mode 100644 index 95c43b78a..000000000 --- a/appendix/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Part VII - Appendix - -Various additional documents - diff --git a/appendix/fonts.md b/appendix/fonts.md deleted file mode 100644 index 2adbb2409..000000000 --- a/appendix/fonts.md +++ /dev/null @@ -1,104 +0,0 @@ -# Fonts - -## Taranis X7 & X9 series - -### English \(Default\) - -| Font Set | Height | Available Characters | -| :--- | :--- | :--- | -| XXLSIZE | 38px | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_22x38_num.png) | -| DBLSIZE | 16px | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_10x14.png) | -| MIDSIZE | 12px | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_08x10.png) | -| 0 Default | 8px | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_05x07.png) | -| SMLSIZE | 6px | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_04x06.png) | - -### Czech - -| Font Set | Available Characters | -| :--- | :--- | -| XXLSIZE | -- | -| DBLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_cz_10x14.png) | -| MIDSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_cz_08x10.png) | -| 0 Default | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_cz_05x07.png) | -| SMLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_cz_04x06.png) | - -### Finnish - -| Font Set | Available Characters | -| :--- | :--- | -| XXLSIZE | -- | -| DBLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_fi_10x14.png) | -| MIDSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_fi_08x10.png) | -| SMLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_fi_04x06.png) | -| 0 Default | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_fi_05x07.png) | - -### French - -| Font Set | Available Characters | -| :--- | :--- | -| XXLSIZE | -- | -| DBLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_fr_10x14.png) | -| MIDSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_fr_08x10.png) | -| 0 Default | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_fr_05x07.png) | -| SMLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_fr_04x06.png) | - -### German - -| Font Set | Available Characters | -| :--- | :--- | -| XXLSIZE | -- | -| DBLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_de_10x14.png) | -| MIDSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_de_08x10.png) | -| 0 Default | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_de_05x07.png) | -| SMLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_de_04x06.png) | - -### Italian - -| Font Set | Available Characters | -| :--- | :--- | -| XXLSIZE | -- | -| DBLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_it_10x14.png) | -| MIDSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_it_08x10.png) | -| 0 Default | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_it_05x07.png) | -| SMLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_it_04x06.png) | - -### Polish - -| Font Set | Available Characters | -| :--- | :--- | -| XXLSIZE | -- | -| DBLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_pl_10x14.png) | -| MIDSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_pl_08x10.png) | -| 0 Default | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_pl_05x07.png) | -| SMLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_pl_04x06.png) | - -### Portuguese - -| Font Set | Available Characters | -| :--- | :--- | -| XXLSIZE | -- | -| DBLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_pt_10x14.png) | -| MIDSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_pt_08x10.png) | -| 0 Default | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_pt_05x07.png) | -| SMLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_pt_04x06.png) | - -### Spanish - -| Font Set | Available Characters | -| :--- | :--- | -| XXLSIZE | -- | -| DBLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_es_10x14.png) | -| MIDSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_es_08x10.png) | -| 0 Default | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_es_05x07.png) | -| SMLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_es_04x06.png) | - -### Swedish - -| Font Set | Available Characters | -| :--- | :--- | -| XXLSIZE | -- | -| DBLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_se_10x14.png) | -| MIDSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_se_08x10.png) | -| 0 Default | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_se_05x07.png) | -| SMLSIZE | ![](https://raw.githubusercontent.com/opentx/opentx/2.2/radio/src/fonts/std/font_se_04x06.png) | - diff --git a/archive/bit32.library.md b/archive/bit32.library.md deleted file mode 100644 index 13d4cd5d4..000000000 --- a/archive/bit32.library.md +++ /dev/null @@ -1,4 +0,0 @@ -# bit32.Library - -TODO - diff --git a/archive/io-library/README.md b/archive/io-library/README.md deleted file mode 100644 index 55dff2d4b..000000000 --- a/archive/io-library/README.md +++ /dev/null @@ -1,52 +0,0 @@ -# io Library - -The **io** library has been simplified and only a subset of functions and their functionality is available. What follows is a complete reference of io functions that are available to EdgeTX scripts - -## Available functions: - -* io.open() -* io.close() -* io.read() -* io.write() -* io.seek() - -## Examples - -### Read the whole file - -```lua --- this is a stand-alone script - -local function run(event) - print("lua io.read test") -- print() statements are visible in Debug output window - local f = io.open("foo.bar", "r") - while true do - local data = io.read(f, 10) -- read up to 10 characters (newline char also counts!) - if #data == 0 then break end -- we get zero length string back when we reach end of the file - print("data: "..data) - end - io.close(f) - return 1 -end - -return { run=run } -``` - -### Append data to file - -```lua --- this is a stand-alone script - -local function run(event) - print("lua io.write test") - local f = io.open("foo.bar", "a") -- open file in append mode - io.write(f, "first line\r\nsecond line\r\n") - io.write(f, 4, "\r\n", 35.6778, "\r\n") -- one can write multiple items at the same time - local foo = -4.45 - io.write(f, foo, "\r\n") - io.close(f) - return 1 -- this will end the script execution -end - -return { run=run } -``` diff --git a/archive/io-library/io.close.md b/archive/io-library/io.close.md deleted file mode 100644 index 3198b3218..000000000 --- a/archive/io-library/io.close.md +++ /dev/null @@ -1,11 +0,0 @@ -# io.close() - -The io.close() function is used to close open file. - -## Parameters - -* `file object` a file object that was returned by the io.open() function. - -## Return value - -* none diff --git a/archive/io-library/io.open.md b/archive/io-library/io.open.md deleted file mode 100644 index 63da604cc..000000000 --- a/archive/io-library/io.open.md +++ /dev/null @@ -1,16 +0,0 @@ -# io.open() - -The io.open() function is used to open the file on SD card for subsequent reading or writing. After the script is done with the file manipulation io.close() function should be used. - -## Parameters - -* `filename` full path to the file starting from the SD card root directory. This function can't create a new file in non-existing directory. -* `mode` supported mode strings are: - * `"r"` read access. File must exist beforehand. The read pointer is located at the beginning of file. This is the default mode if is omitted. - * `"w"` write access. File is opened or created (if it didn't exist) and truncated (all existing file contents are lost). - * "a" write access. File is opened or created (if it didn't exist) and write pointer is located at the end of the file. The existing file contents are preserved. - -## Return value - -* `` if file was successfully opened. -* `nil` if file could not be opened. diff --git a/archive/io-library/io.read.md b/archive/io-library/io.read.md deleted file mode 100644 index 0ed13f47b..000000000 --- a/archive/io-library/io.read.md +++ /dev/null @@ -1,15 +0,0 @@ -# io.read() - -The io.read() function is used to read data from the file on SD card. - -_Notice:_ other read _commands_ (like "_all", etc..) are \*not supported_. - -## Parameters - -* `file object` a file object that was returned by the io.open() function. The file must be opened in read mode. -* `length` number of characters/bytes to read. The number of actual read/returned characters can be less if the file end is reached. - -## Return value - -* `` a string with a length equal or less than -* `""` a zero length string if the end of file was reached diff --git a/archive/io-library/io.seek.md b/archive/io-library/io.seek.md deleted file mode 100644 index 923b68581..000000000 --- a/archive/io-library/io.seek.md +++ /dev/null @@ -1,15 +0,0 @@ -# io.seek() - -The io.seek() function is used to move the current read/write position. - -_Notice:_ other read standard seek bases (like "cur", "end") are **not supported**. - -## Parameters - -* `file object` a file object that was returned by the io.open() function. -* `offset` position the read/write file pointer at the specified offset from the beginning of the file. If specified offset is bigger than the file size, then the pointer is moved to the end of the file. - -## Return value - -* `0` success -* `` any other value means failure. diff --git a/archive/io-library/io.write.md b/archive/io-library/io.write.md deleted file mode 100644 index 3d1e83012..000000000 --- a/archive/io-library/io.write.md +++ /dev/null @@ -1,13 +0,0 @@ -# io.write() - -The io.write() function is used to write data to the file on SD card. - -## Parameters - -* `file object` a file object that was returned by the io.open() function. The file must be opened in write or append mode. -* `data` any Lua type that can be converted into string. If more than one data parameter is used their contents are written to the file by one in the same order as they are specified. - -## Return value - -* `` if data was successfully opened. -* `nil, , ` if the data can't be written. diff --git a/archive/math.library.md b/archive/math.library.md deleted file mode 100644 index 006048af4..000000000 --- a/archive/math.library.md +++ /dev/null @@ -1,4 +0,0 @@ -# math.Library - -TODO - diff --git a/archive/string.library.md b/archive/string.library.md deleted file mode 100644 index 13c9e6b9e..000000000 --- a/archive/string.library.md +++ /dev/null @@ -1,4 +0,0 @@ -# string.Library - -TODO - diff --git a/archive/table-library.md b/archive/table-library.md deleted file mode 100644 index f0f3c98ea..000000000 --- a/archive/table-library.md +++ /dev/null @@ -1,3 +0,0 @@ -# table Library - -Due to memory limitation table library is only available on Color LCD Radios. diff --git a/docs-system/README.md b/docs-system/README.md new file mode 100644 index 000000000..31804d9a5 --- /dev/null +++ b/docs-system/README.md @@ -0,0 +1,75 @@ +# Docs Pipeline + +This directory contains the first implementation of the new Lua docs pipeline. + +## Layout + +- `schema/` defines the normalized API model consumed by renderers +- `examples/` contains sample extracted API data +- `overlays/` contains human-authored overlay content +- `generated/` contains tracked sample output generated from the example data + +## Commands + +```sh +uv run python3 tools/docs_pipeline.py extract \ + --source-dir /path/to/edgetx/radio/src/lua \ + --docs-version 2.12 \ + --upstream-ref edgetx-2.12 \ + --output /tmp/api-model.2.12.json + +uv run python3 tools/docs_pipeline.py validate /tmp/api-model.2.12.json + +uv run python3 tools/docs_pipeline.py report /tmp/api-model.2.12.json \ + --output docs-system/generated/golden-module-quality.json + +uv run python3 tools/docs_pipeline.py build \ + --input /tmp/api-model.2.12.json \ + --overlay-dir docs-system/overlays \ + --docs-output website/md-docs/api-reference \ + --luals-output docs-system/generated/luals website/md-docs/assets/luals + +uv run python3 tools/docs_pipeline.py validate docs-system/examples/api-model.sample.json +uv run python3 tools/docs_pipeline.py build \ + --input docs-system/examples/api-model.sample.json \ + --overlay-dir docs-system/overlays \ + --docs-output website/md-docs/api-reference \ + --luals-output docs-system/generated/luals website/md-docs/assets/luals + +uv run python3 tools/review_decision_server.py +uv run mkdocs build +``` + +## Notes + +This pipeline now includes a first extractor for real EdgeTX `/*luadoc */` blocks. It currently targets the existing upstream comment format and intentionally keeps the normalized model conservative until the upstream annotation contract is improved. + +The intended boundary is: + +- upstream C++ comments carry compact API facts such as syntax, summary, params, returns, and availability +- downstream overlays carry richer teaching material such as examples, long explanations, compatibility notes, media, and rename guidance + +The extractor now only promotes the first summary paragraph plus tagged API fields from `/*luadoc */` blocks. If a function needs richer documentation, add it under `docs-system/overlays/.md` or the legacy `docs-system/overlays/.md`. + +The normalized model also supports a docs-owned stable `doc_id` plus alias metadata: + +- `doc_id` for stable page and overlay identity +- `symbol` for the current preferred callable name +- `aliases` for still-supported alternate names +- `deprecated_aliases` for names being phased out + +Semantic review types live in `docs-system/type-definitions.json`. The generated LuaLS output emits `---@alias` lines from that registry so docs-oriented types such as `lcd_color_RGB565` remain LuaLS-compatible. + +The repo now includes a minimal `pyproject.toml` and `uv.lock` for the docs toolchain. `uv run ...` is the preferred way to execute both the pipeline and MkDocs locally. + +`--luals-output` accepts one or more directories and writes the same generated `.d.lua` files to each. Always pass both `docs-system/generated/luals` (the pipeline's own tracked output) and `website/md-docs/assets/luals` (the copy the site actually links to from `programming/basics/editor.md`) so the two never drift apart again. + +Every generated Markdown and `.d.lua` file starts with a `GENERATED FILE — do not hand-edit` marker. If a generated page is wrong, fix the upstream `/*luadoc */` comment (for API facts) or the matching `docs-system/overlays/.md` (for narrative content), then rebuild — never edit the generated file directly, since the next `build` run overwrites it silently. + +The `report` command is focused on the current golden modules: + +- `runtime` +- `lcd` +- `model` + +It helps separate parser-fixable issues from likely upstream comment problems before opening EdgeTX PRs. diff --git a/docs-system/REAL-EXTRACTION-NOTES.md b/docs-system/REAL-EXTRACTION-NOTES.md new file mode 100644 index 000000000..9cdf78745 --- /dev/null +++ b/docs-system/REAL-EXTRACTION-NOTES.md @@ -0,0 +1,82 @@ +# Real Extraction Notes + +This note captures the first extraction run against a real local EdgeTX checkout, so the migration work can continue from a concrete baseline instead of sample data only. + +## Extraction Baseline + +- EdgeTX source: `/Users/pfeerick/repos/EdgeTX/edgetx` +- Lua source dir: `radio/src/lua` +- Extracted from branch `2.12` +- Extracted from commit `8718d2473a` (EdgeTX/edgetx#7771 merged: adds `/*luadoc */` annotations for the LVGL Lua API) +- Docs version used for the local run: `2.12` + +## Current Results + +- Extracted API items: `198` +- Modules discovered: + - `runtime`: `73` + - `lcd`: `39` + - `model`: `37` + - `Bitmap`: `4` + - `lvgl`: `45` + +Generated artifacts: + +- API model: `docs-system/generated/api-model.local.json` +- Quality report: `docs-system/generated/golden-module-quality.json` +- Markdown preview: `docs-system/generated/site-preview/` +- LuaLS preview: `docs-system/generated/luals-preview/` + +## Quality Snapshot + +From the current quality report: + +- `runtime`: `19` unknown parameter types, `16` unknown return types +- `lcd`: `7` unknown parameter types, `0` unknown return types +- `model`: `5` unknown parameter types, `1` unknown return type +- backlog entries recorded: `31` + +## What The Prototype Already Proves + +- The extractor can parse the current upstream `/*luadoc */` format across the real Lua source tree. +- The normalized model is good enough to produce large-scale Markdown and LuaLS previews. +- The remaining quality issues are now mostly annotation-quality gaps rather than a missing pipeline. + +## First High-Value Cleanup Targets + +These look like the best next targets because they affect common APIs and surface directly in generated docs and LuaLS output. + +### Runtime return typing + +Examples: + +- `getRSSI()` returns three values, but all currently resolve to `unknown` +- `getSourceValue()` still emits unknown return types for freshness/current-state values +- `popupConfirmation`, `popupInput`, and `popupWarning` have weak return typing + +### Structured table parameters + +Examples: + +- `model.setModule(value)` +- `model.setInfo(value)` +- `model.setTimer(value)` + +These are likely better solved by improving upstream annotation detail rather than only parser heuristics. + +### LCD optional color/flag parameters + +Examples: + +- `lcd.drawText(..., inversColor)` +- `lcd.drawTimer(...)` +- `lcd.drawNumber(...)` + +Some of these may be parser-fixable if we add better heuristics for color and flag-related parameter descriptions. + +## Recommendation For The Next Pass + +1. Focus on `runtime`, especially frequently used functions with `unknown` returns. +2. Improve upstream `/*luadoc */` comments first where the comments are underspecified. +3. Add parser heuristics only where the source comments are already clear and structured enough to support them. +4. Re-run `extract`, `report`, and `build` after each focused annotation batch to measure improvement. diff --git a/docs-system/api-groups.json b/docs-system/api-groups.json new file mode 100644 index 000000000..f9eb75602 --- /dev/null +++ b/docs-system/api-groups.json @@ -0,0 +1,143 @@ +{ + "groups": [ + { + "name": "Display LCD", + "slug": "display-lcd", + "description": "Drawing, layout, color, and display helpers for LCD rendering.", + "modules": ["lcd", "Bitmap"], + "ids": ["GREY", "lcd.RGB", "popupConfirmation", "popupInput", "popupWarning"] + }, + { + "name": "Display LVGL", + "slug": "display-lvgl", + "description": "LVGL bindings and UI helpers for display-oriented Lua scripts.", + "modules": ["lvgl"], + "ids": [] + }, + { + "name": "Model Functions", + "slug": "model-functions", + "description": "Model data access and editing APIs.", + "modules": ["model"], + "ids": ["getFlightMode", "getOutputValue"] + }, + { + "name": "Filesystem", + "slug": "filesystem", + "description": "File and directory access for scripts.", + "ids": ["chdir", "del", "dir", "fstat", "mkdir", "rename"] + }, + { + "name": "Serial Ports", + "slug": "serial-ports", + "description": "Serial transport configuration and I/O.", + "ids": ["serialGetPower", "serialRead", "serialSetPower", "serialWrite", "setSerialBaudrate"] + }, + { + "name": "Radio Hardware", + "slug": "radio-hardware", + "description": "Hardware-facing APIs and low-level device controls.", + "ids": ["applyRGBLedColors", "setIMU_X", "setIMU_Y", "setRGBLedColor", "setCFSLedColor", "getTxGPS", "getStickMode"] + }, + { + "name": "System", + "slug": "system", + "description": "General runtime, device, and system-level helpers.", + "ids": [ + "getAvailableMemory", + "getGeneralSettings", + "getUsage", + "getVersion", + "screenshot" + ] + }, + { + "name": "Inputs", + "slug": "key-inputs", + "description": "Key and stick related helpers for interactive scripts.", + "ids": ["defaultChannel", "defaultStick", "getRotEncMode", "getRotEncSpeed", "killEvents"] + }, + { + "name": "Lua Scripts", + "slug": "lua-scripts", + "description": "Script lifecycle helpers and interactive popups.", + "ids": ["loadScript"] + }, + { + "name": "Time", + "slug": "time", + "description": "Date, clock, and timer helpers.", + "ids": ["getDateTime", "getGlobalTimer", "getRtcTime", "getTime", "resetGlobalTimer"] + }, + { + "name": "Audio-Sound", + "slug": "audio-sound", + "description": "Audio playback and haptic feedback helpers.", + "ids": ["flushAudio", "playDuration", "playFile", "playHaptic", "playNumber", "playTone"] + }, + { + "name": "Telemetry", + "slug": "telemetry", + "description": "Telemetry value access, injection, and protocol helpers.", + "ids": [ + "crossfireTelemetryPop", + "getRAS", + "getRSSI", + "getTrainerStatus", + "ghostTelemetryPop", + "setTelemetryValue", + "sportTelemetryPop" + ] + }, + { + "name": "RF module", + "slug": "rf-module", + "description": "RF link and module transport helpers.", + "ids": [ + "accessTelemetryPush", + "crossfireTelemetryPush", + "ghostTelemetryPush", + "multiBuffer", + "serialGetPower", + "serialSetPower", + "sportTelemetryPush" + ] + }, + { + "name": "Sources", + "slug": "sources", + "description": "Source identification and value lookup for telemetry and other data sources.", + "ids": [ + "sources", + "getFieldInfo", + "getSourceIndex", + "getSourceName", + "getSourceValue", + "getValue" + ] + }, + { + "name": "Switches", + "slug": "switches", + "description": "Switch identification, value lookup, and sticky-switch helpers.", + "ids": [ + "switches", + "getLogicalSwitchValue", + "getSwitchIndex", + "getSwitchInfo", + "getSwitchName", + "getSwitchValue", + "setStickySwitch" + ] + }, + { + "name": "Variables", + "slug": "variables", + "description": "Shared-memory variables exposed to scripts.", + "ids": [ + "getShmVar", + "setShmVar" + ] + } + ] +} diff --git a/docs-system/examples/api-model.sample.json b/docs-system/examples/api-model.sample.json new file mode 100644 index 000000000..8b242a4af --- /dev/null +++ b/docs-system/examples/api-model.sample.json @@ -0,0 +1,83 @@ +{ + "docs_version": "2.12", + "upstream_ref": "edgetx-2.12", + "generated_at": "2026-03-23T00:00:00Z", + "items": [ + { + "id": "lcd.drawBitmap", + "doc_id": "lcd.draw-bitmap", + "symbol": "lcd.drawBitmap", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawBitmap(bitmap, x, y [, scale])", + "summary": "Display a previously opened bitmap at coordinates and optionally scale it.", + "parameters": [ + { + "name": "bitmap", + "type": "bitmapPointer", + "required": true, + "description": "Pointer returned by Bitmap.open()." + }, + { + "name": "x", + "type": "integer", + "required": true, + "description": "Top coordinate." + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "Left coordinate." + }, + { + "name": "scale", + "type": "integer", + "required": false, + "description": "Scale percent where 100 keeps original size." + } + ], + "returns": [], + "availability": { + "since": "2.3.0", + "radios": ["color-lcd"] + }, + "notes": [ + "Only available on radios with color display." + ], + "source_location": "radio/src/lua/api_colorlcd.cpp" + }, + { + "id": "getVersionInfo", + "doc_id": "runtime.get-version", + "symbol": "getVersionInfo", + "aliases": ["getVersion"], + "deprecated_aliases": ["getVersion"], + "module": "runtime", + "kind": "function", + "syntax": "getVersionInfo()", + "summary": "Return the firmware version and platform details.", + "parameters": [], + "returns": [ + { + "name": "version", + "type": "string", + "description": "Version string." + }, + { + "name": "radio", + "type": "string", + "description": "Radio or simulator identifier." + } + ], + "availability": { + "since": "2.4.0", + "radios": ["all"] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp" + } + ] +} diff --git a/docs-system/generated/api-model.local.json b/docs-system/generated/api-model.local.json new file mode 100644 index 000000000..58c17e6f7 --- /dev/null +++ b/docs-system/generated/api-model.local.json @@ -0,0 +1,8205 @@ +{ + "docs_version": "2.12", + "upstream_ref": "2.12@8718d2473a", + "generated_at": "2026-09-09T02:38:02.672726Z", + "items": [ + { + "id": "Bitmap.getSize", + "doc_id": "bitmap.get-size", + "symbol": "Bitmap.getSize", + "aliases": [], + "deprecated_aliases": [], + "module": "Bitmap", + "kind": "function", + "syntax": "Bitmap.getSize(name)", + "summary": "Return width, height of a bitmap object", + "parameters": [ + { + "name": "name", + "type": "pointer", + "required": true, + "description": "point to a bitmap previously opened with Bitmap.open()" + } + ], + "returns": [ + { + "name": "width_in_pixels", + "type": "integer", + "description": "width in pixels" + }, + { + "name": "height_in_pixels", + "type": "integer", + "description": "height in pixels" + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function Bitmap.getSize(name)\n\nReturn width, height of a bitmap object\n\n@param bitmap (pointer) point to a bitmap previously opened with Bitmap.open()\n\n@retval multiple returns 2 values:\n * (number) width in pixels\n * (number) height in pixels\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.2.0", + "source_line": 546 + }, + { + "id": "Bitmap.open", + "doc_id": "bitmap.open", + "symbol": "Bitmap.open", + "aliases": [], + "deprecated_aliases": [], + "module": "Bitmap", + "kind": "function", + "syntax": "Bitmap.open(name)", + "summary": "Loads a bitmap in memory, for later use with lcd.drawBitmap(). Bitmaps should be loaded only\nonce, returned object should be stored and used for drawing. If loading fails for whatever\nreason the resulting bitmap object will have width and height set to zero.", + "parameters": [ + { + "name": "name", + "type": "string", + "required": true, + "description": "full path to the bitmap on SD card (i.e. \u201c/IMAGES/test.bmp\u201d)" + } + ], + "returns": [ + { + "name": "bitmap", + "type": "object", + "description": "a bitmap object that can be used with other bitmap functions" + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function Bitmap.open(name)\n\nLoads a bitmap in memory, for later use with lcd.drawBitmap(). Bitmaps should be loaded only\nonce, returned object should be stored and used for drawing. If loading fails for whatever\nreason the resulting bitmap object will have width and height set to zero.\n\nBitmap loading can fail if:\n * File is not found or contains invalid image\n * System is low on memory\n * Combined memory usage of all Lua script bitmaps exceeds certain value\n\n@param name (string) full path to the bitmap on SD card (i.e. \u201c/IMAGES/test.bmp\u201d)\n\n@retval bitmap (object) a bitmap object that can be used with other bitmap functions\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.2.0", + "source_line": 488 + }, + { + "id": "Bitmap.resize", + "doc_id": "bitmap.resize", + "symbol": "Bitmap.resize", + "aliases": [], + "deprecated_aliases": [], + "module": "Bitmap", + "kind": "function", + "syntax": "Bitmap.resize(bitmap, width, height)", + "summary": "Return a resized bitmap object", + "parameters": [ + { + "name": "bitmap", + "type": "pointer", + "required": true, + "description": "point to a bitmap previously opened with Bitmap.open()" + }, + { + "name": "width", + "type": "integer", + "required": true, + "description": "the new bitmap width" + }, + { + "name": "height", + "type": "integer", + "required": true, + "description": "the new bitmap height" + } + ], + "returns": [], + "availability": { + "since": "2.8.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function Bitmap.resize(bitmap, width, height)\n\nReturn a resized bitmap object\n\n@param bitmap (pointer) point to a bitmap previously opened with Bitmap.open()\n\n@param width (number) the new bitmap width\n\n@param height (number) the new bitmap height\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.8.0", + "source_line": 575 + }, + { + "id": "Bitmap.toMask", + "doc_id": "bitmap.to-mask", + "symbol": "Bitmap.toMask", + "aliases": [], + "deprecated_aliases": [], + "module": "Bitmap", + "kind": "function", + "syntax": "Bitmap.toMask(bitmap)", + "summary": "Return a 8bit bitmap mask that can be used with lcd.drawBitmapPattern()", + "parameters": [ + { + "name": "bitmap", + "type": "pointer", + "required": true, + "description": "point to a bitmap previously opened with Bitmap.open()" + } + ], + "returns": [ + { + "name": "a", + "type": "unknown", + "description": "bitmap mask" + } + ], + "availability": { + "since": "2.8.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function Bitmap.toMask(bitmap)\n\nReturn a 8bit bitmap mask that can be used with lcd.drawBitmapPattern()\n\n@param bitmap (pointer) point to a bitmap previously opened with Bitmap.open()\n\n@retval a bitmap mask\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.8.0", + "source_line": 626 + }, + { + "id": "GREY", + "doc_id": "runtime.grey", + "symbol": "GREY", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "GREY()", + "summary": "Returns gray value which can be used in LCD functions", + "parameters": [], + "returns": [ + { + "name": "", + "type": "integer", + "description": "a value that represents amount of *greyness* (from 0 to 15)" + } + ], + "availability": { + "since": "2.0.13", + "radios": [ + "all" + ] + }, + "notes": [ + "Only available on Taranis" + ], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function GREY()\n\nReturns gray value which can be used in LCD functions\n\n@retval (number) a value that represents amount of *greyness* (from 0 to 15)\n\n@notice Only available on Taranis\n\n@status current Introduced in 2.0.13", + "source_line": 1716 + }, + { + "id": "accessTelemetryPush", + "doc_id": "runtime.access-telemetry-push", + "symbol": "accessTelemetryPush", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "accessTelemetryPush()", + "summary": "This functions allows for sending SPORT / ACCESS telemetry data toward the receiver,\nand more generally, to anything connected SPORT bus on the receiver or transmitter.", + "parameters": [ + { + "name": "module", + "type": "integer", + "required": true, + "description": "module index (0 = internal, 1 = external)" + }, + { + "name": "rxUid", + "type": "integer", + "required": true, + "description": "receiver index" + }, + { + "name": "sensorId", + "type": "unknown", + "required": true, + "description": "physical sensor ID" + }, + { + "name": "frameId", + "type": "unknown", + "required": true, + "description": "frame ID" + }, + { + "name": "dataId", + "type": "unknown", + "required": true, + "description": "data ID" + }, + { + "name": "value", + "type": "unknown", + "required": true, + "description": "value" + } + ], + "returns": [ + { + "name": "", + "type": "boolean", + "description": "data queued in output buffer or not." + } + ], + "availability": { + "since": "2.3", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function accessTelemetryPush()\n\nThis functions allows for sending SPORT / ACCESS telemetry data toward the receiver,\nand more generally, to anything connected SPORT bus on the receiver or transmitter.\n\nWhen called without parameters, it will only return the status of the output buffer without sending anything.\n\n@param module module index (0 = internal, 1 = external)\n\n@param rxUid receiver index\n\n@param sensorId physical sensor ID\n\n@param frameId frame ID\n\n@param dataId data ID\n\n@param value value\n\n@retval boolean data queued in output buffer or not.\n\n@status current Introduced in 2.3", + "source_line": 1062 + }, + { + "id": "applyRGBLedColors", + "doc_id": "runtime.apply-rgbled-colors", + "symbol": "applyRGBLedColors", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "applyRGBLedColors()", + "summary": "Apply RGB led colors previously defined by setRGBLedColor", + "parameters": [], + "returns": [], + "availability": { + "since": "2.10", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function applyRGBLedColors()\n\n Apply RGB led colors previously defined by setRGBLedColor\n\n@status current Introduced in 2.10", + "source_line": 3007 + }, + { + "id": "chdir", + "doc_id": "runtime.chdir", + "symbol": "chdir", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "chdir(directory)", + "summary": "Change the working directory", + "parameters": [ + { + "name": "directory", + "type": "string", + "required": true, + "description": "New working directory" + } + ], + "returns": [], + "availability": { + "since": "2.3.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_filesystem.cpp", + "raw_luadoc": "@function chdir(directory)\n\n Change the working directory\n\n@param directory (string) New working directory\n\n@status current Introduced in 2.3.0", + "source_line": 187 + }, + { + "id": "crossfireTelemetryPop", + "doc_id": "runtime.crossfire-telemetry-pop", + "symbol": "crossfireTelemetryPop", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "crossfireTelemetryPop()", + "summary": "Pops a received Crossfire Telemetry packet from the queue.", + "parameters": [], + "returns": [ + { + "name": "", + "type": "nil", + "description": "queue does not contain any (or enough) bytes to form a whole packet" + }, + { + "name": "command", + "type": "integer", + "description": "" + }, + { + "name": "packet", + "type": "table", + "description": "data bytes" + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function crossfireTelemetryPop()\n\nPops a received Crossfire Telemetry packet from the queue.\n\n@retval nil queue does not contain any (or enough) bytes to form a whole packet\n\n@retval multiple returns 2 values:\n * command (number)\n * packet (table) data bytes\n\n@status current Introduced in 2.2.0", + "source_line": 1140 + }, + { + "id": "crossfireTelemetryPush", + "doc_id": "runtime.crossfire-telemetry-push", + "symbol": "crossfireTelemetryPush", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "crossfireTelemetryPush()", + "summary": "This functions allows for sending telemetry data toward the TBS Crossfire link.", + "parameters": [ + { + "name": "command", + "type": "unknown", + "required": true, + "description": "command" + }, + { + "name": "data", + "type": "table", + "required": true, + "description": "table of data bytes" + } + ], + "returns": [ + { + "name": "", + "type": "boolean", + "description": "data queued in output buffer or not." + }, + { + "name": "", + "type": "nil", + "description": "incorrect telemetry protocol." + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function crossfireTelemetryPush()\n\nThis functions allows for sending telemetry data toward the TBS Crossfire link.\n\nWhen called without parameters, it will only return the status of the output buffer without sending anything.\n\n@param command command\n\n@param data table of data bytes\n\n@retval boolean data queued in output buffer or not.\n\n@retval nil incorrect telemetry protocol.\n\n@status current Introduced in 2.2.0, retval nil added in 2.3.4", + "source_line": 1178 + }, + { + "id": "defaultChannel", + "doc_id": "runtime.default-channel", + "symbol": "defaultChannel", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "defaultChannel(stick)", + "summary": "Get channel assigned to stick. See Default Channel Order in General Settings", + "parameters": [ + { + "name": "stick", + "type": "integer", + "required": true, + "description": "stick number (from 0 to 3)" + } + ], + "returns": [ + { + "name": "", + "type": "integer", + "description": "channel assigned to this stick (from 0 to 3)" + }, + { + "name": "", + "type": "nil", + "description": "stick not found" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function defaultChannel(stick)\n\nGet channel assigned to stick. See Default Channel Order in General Settings\n\n@param stick (number) stick number (from 0 to 3)\n\n@retval number channel assigned to this stick (from 0 to 3)\n\n@retval nil stick not found\n\n@status current Introduced in 2.0.0", + "source_line": 2047 + }, + { + "id": "defaultStick", + "doc_id": "runtime.default-stick", + "symbol": "defaultStick", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "defaultStick(channel)", + "summary": "Get stick that is assigned to a channel. See Default Channel Order in General Settings.", + "parameters": [ + { + "name": "channel", + "type": "integer", + "required": true, + "description": "channel number (0 means CH1)" + } + ], + "returns": [ + { + "name": "", + "type": "integer", + "description": "Stick assigned to this channel (from 0 to 3)" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function defaultStick(channel)\n\nGet stick that is assigned to a channel. See Default Channel Order in General Settings.\n\n@param channel (number) channel number (0 means CH1)\n\n@retval number Stick assigned to this channel (from 0 to 3)\n\n@status current Introduced in 2.0.0", + "source_line": 1962 + }, + { + "id": "del", + "doc_id": "runtime.del", + "symbol": "del", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "del(file or directory)", + "summary": "Returns FRESULT (e.g. 0=OK, 4=File not found, 5=Path not found, 6=Path invalid)", + "parameters": [], + "returns": [], + "availability": { + "since": "2.9.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_filesystem.cpp", + "raw_luadoc": "@function del(file or directory)\n\n Returns FRESULT (e.g. 0=OK, 4=File not found, 5=Path not found, 6=Path invalid)\n\n@status current Introduced in 2.9.0\n\n### Example\n\n```lua\n if del(\"/SCRIPTS/TOOLS/deleteme.txt\") == 0 then\n -- successfully deleted file\n else\n -- failed to delete file\n end\n```", + "source_line": 157 + }, + { + "id": "dir", + "doc_id": "runtime.dir", + "symbol": "dir", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "dir(directory)", + "summary": "Return an iterator listing all the files and directories name in a directory", + "parameters": [ + { + "name": "directory", + "type": "string", + "required": true, + "description": "Working directory" + } + ], + "returns": [], + "availability": { + "since": "2.5.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_filesystem.cpp", + "raw_luadoc": "@function dir(directory)\n\n Return an iterator listing all the files and directories name in a directory\n\n@param directory (string) Working directory\n\n@status current Introduced in 2.5.0\n\n### Example\n\n```lua\n for fname in dir(\".\") do\n print(fname)\n end\n```", + "source_line": 50 + }, + { + "id": "flushAudio", + "doc_id": "runtime.flush-audio", + "symbol": "flushAudio", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "flushAudio()", + "summary": "flushes audio queue", + "parameters": [], + "returns": [], + "availability": { + "since": "unknown", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function flushAudio()\n\nflushes audio queue\n\n@status experimental", + "source_line": 2074 + }, + { + "id": "fstat", + "doc_id": "runtime.fstat", + "symbol": "fstat", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "fstat(path)", + "summary": "Checks the existence of file or directory.\n If not exist, return nil.\n If exist, return the object information.", + "parameters": [ + { + "name": "path", + "type": "string", + "required": true, + "description": "path to the object" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "object info, table elements:\n* `size` (number) file size\n* `attrib` (number) file attribute flags\n* `time` (table) table with last time modified date and times, table elements:\n * `year` (number) year\n * `mon` (number) month\n * `day` (number) day of month\n * `hour` (number) hours\n * `hour12` (number) hours in US format\n * `min` (number) minutes\n * `sec` (number) seconds\n * `suffix` (text) am or pm" + } + ], + "availability": { + "since": "2.5.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_filesystem.cpp", + "raw_luadoc": "@function fstat(path)\n\n Checks the existence of file or directory.\n If not exist, return nil.\n If exist, return the object information.\n\n@param path (string) path to the object\n\n@retval table object info, table elements:\n* `size` (number) file size\n* `attrib` (number) file attribute flags\n* `time` (table) table with last time modified date and times, table elements:\n * `year` (number) year\n * `mon` (number) month\n * `day` (number) day of month\n * `hour` (number) hours\n * `hour12` (number) hours in US format\n * `min` (number) minutes\n * `sec` (number) seconds\n * `suffix` (text) am or pm\n\n### Example\n\n```lua\n info = fstat(\"radio\")\n if info ~= nil then\n if (info.attrib == AM_DIR) then\n print(\"is a directory\")\n end\n\n size = info.size\n time = info.time\n end\n```\n@status current Introduced in 2.5.0", + "source_line": 88 + }, + { + "id": "getAvailableMemory", + "doc_id": "runtime.get-available-memory", + "symbol": "getAvailableMemory", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getAvailableMemory()", + "summary": "Get available memory remaining in the Heap for Lua.", + "parameters": [], + "returns": [ + { + "name": "usage", + "type": "integer", + "description": "a value returned in b" + } + ], + "availability": { + "since": "unknown", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getAvailableMemory()\n\nGet available memory remaining in the Heap for Lua.\n\n@retval usage (number) a value returned in b", + "source_line": 2213 + }, + { + "id": "getDateTime", + "doc_id": "runtime.get-date-time", + "symbol": "getDateTime", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getDateTime()", + "summary": "Return current system date and time that is kept by the RTC unit", + "parameters": [], + "returns": [ + { + "name": "", + "type": "table", + "description": "current date and time, table elements:\n* `year` (number) year\n * `mon` (number) month\n * `day` (number) day of month\n * `hour` (number) hours\n * `hour12` (number) hours in US format\n * `min` (number) minutes\n * `sec` (number) seconds\n * `suffix` (text) am or pm" + } + ], + "availability": { + "since": "unknown", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getDateTime()\n\nReturn current system date and time that is kept by the RTC unit\n\n@retval table current date and time, table elements:\n * `year` (number) year\n * `mon` (number) month\n * `day` (number) day of month\n * `hour` (number) hours\n * `hour12` (number) hours in US format\n * `min` (number) minutes\n * `sec` (number) seconds\n * `suffix` (text) am or pm", + "source_line": 233 + }, + { + "id": "getFieldInfo", + "doc_id": "runtime.get-field-info", + "symbol": "getFieldInfo", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getFieldInfo(source)", + "summary": "Return detailed information about field (source)", + "parameters": [ + { + "name": "source", + "type": "string", + "required": true, + "description": "can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source." + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "information about requested field, table elements:\n* `id` (number) field identifier\n * `name` (string) field name\n * `desc` (string) field description\n * `unit` (number) unit identifier, see the Units reference for the full list" + }, + { + "name": "", + "type": "nil", + "description": "the requested field was not found" + } + ], + "availability": { + "since": "2.0.8", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getFieldInfo(source)\n\nReturn detailed information about field (source)\n\nThe list of valid sources is available:\n\n| OpenTX Version | Radio |\n|----------------|-------|\n| 2.0 | [all](http://downloads-20.open-tx.org/firmware/lua_fields.txt) |\n| 2.1 | [X9D and X9D+](http://downloads-21.open-tx.org/firmware/lua_fields_taranis.txt), [X9E](http://downloads-21.open-tx.org/firmware/lua_fields_taranis_x9e.txt) |\n| 2.2 | [X9D and X9D+](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9e.txt), [Horus](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x12s.txt) |\n| 2.3 | [X9D and X9D+](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9e.txt), [X7](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x7.txt), [Horus](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x12s.txt) |\n\n@param source can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source.\n\n@retval table information about requested field, table elements:\n * `id` (number) field identifier\n * `name` (string) field name\n * `desc` (string) field description\n * `unit` (number) unit identifier, see the Units reference for the full list\n\n@retval nil the requested field was not found\n\n@status current Introduced in 2.0.8, 'unit' field added in 2.2.0, and argument also can be an index number as of 2.6.0", + "source_line": 608 + }, + { + "id": "getFlightMode", + "doc_id": "runtime.get-flight-mode", + "symbol": "getFlightMode", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getFlightMode(mode)", + "summary": "Return flight mode data.", + "parameters": [ + { + "name": "mode", + "type": "integer", + "required": true, + "description": "flight mode number to return (0 - 8). If mode parameter is not specified (or contains invalid value), then the current flight mode data is returned." + } + ], + "returns": [ + { + "name": "current_flight_mode_number_0_8", + "type": "integer", + "description": "(current) flight mode number (0 - 8)" + }, + { + "name": "current_flight_mode_name", + "type": "string", + "description": "(current) flight mode name" + } + ], + "availability": { + "since": "2.1.7", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getFlightMode(mode)\n\nReturn flight mode data.\n\n@param mode (number) flight mode number to return (0 - 8). If mode parameter\nis not specified (or contains invalid value), then the current flight mode data is returned.\n\n@retval multiple returns 2 values:\n * (number) (current) flight mode number (0 - 8)\n * (string) (current) flight mode name\n\n@status current Introduced in 2.1.7", + "source_line": 1427 + }, + { + "id": "getGeneralSettings", + "doc_id": "runtime.get-general-settings", + "symbol": "getGeneralSettings", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getGeneralSettings()", + "summary": "Returns (some of) the general radio settings", + "parameters": [], + "returns": [ + { + "name": "", + "type": "table", + "description": "with elements:\n* `battWarn` (number) radio battery range - warning value\n * `battMin` (number) radio battery range - minimum value\n * `battMax` (number) radio battery range - maximum value\n * `imperial` (number) set to a value different from 0 if the radio is set to the\n IMPERIAL units\n * `language` (string) radio language (used for menus)\n * `voice` (string) voice language (used for speech)\n * `gtimer` (number) radio global timer in seconds (does not include current session)" + } + ], + "availability": { + "since": "2.0.6", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getGeneralSettings()\n\nReturns (some of) the general radio settings\n\n@retval table with elements:\n * `battWarn` (number) radio battery range - warning value\n * `battMin` (number) radio battery range - minimum value\n * `battMax` (number) radio battery range - maximum value\n * `imperial` (number) set to a value different from 0 if the radio is set to the\n IMPERIAL units\n * `language` (string) radio language (used for menus)\n * `voice` (string) voice language (used for speech)\n * `gtimer` (number) radio global timer in seconds (does not include current session)\n\n@status current Introduced in 2.0.6, `imperial` added in TODO,\n`language` and `voice` added in 2.2.0, gtimer added in 2.2.2.", + "source_line": 1735 + }, + { + "id": "getGlobalTimer", + "doc_id": "runtime.get-global-timer", + "symbol": "getGlobalTimer", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getGlobalTimer()", + "summary": "Returns radio timers", + "parameters": [], + "returns": [ + { + "name": "", + "type": "table", + "description": "with elements:\n* `gtimer` (number) radio global timer in seconds\n* `session` (number) radio session in seconds\n* `ttimer` (number) radio throttle timer in seconds\n* `tptimer` (number) radio throttle percent timer in seconds" + } + ], + "availability": { + "since": "unknown", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getGlobalTimer()\n\nReturns radio timers\n\n@retval table with elements:\n* `gtimer` (number) radio global timer in seconds\n* `session` (number) radio session in seconds\n* `ttimer` (number) radio throttle timer in seconds\n* `tptimer` (number) radio throttle percent timer in seconds\n\n@status current Introduced added in 2.3.0.", + "source_line": 1775 + }, + { + "id": "getLogicalSwitchValue", + "doc_id": "runtime.get-logical-switch-value", + "symbol": "getLogicalSwitchValue", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getLogicalSwitchValue(id)", + "summary": "", + "parameters": [ + { + "name": "id", + "type": "integer", + "required": true, + "description": "identifying the logical switch (zero for LS1 etc.)." + } + ], + "returns": [ + { + "name": "value", + "type": "true/false", + "description": "." + } + ], + "availability": { + "since": "2.6", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getLogicalSwitchValue(id)\n\n@param id: integer identifying the logical switch (zero for LS1 etc.).\n\n@retval value: true/false.\n\nReads the value of a logical switch.\n\n@status current Introduced in 2.6", + "source_line": 2563 + }, + { + "id": "getOutputValue", + "doc_id": "runtime.get-output-value", + "symbol": "getOutputValue", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getOutputValue(outputIndex)", + "summary": "", + "parameters": [ + { + "name": "outputIndex", + "type": "integer", + "required": true, + "description": "identifying the output channel number 0 for CH1, up to MAX_OUTPUT_CHANNELS - 1." + } + ], + "returns": [ + { + "name": "", + "type": "integer", + "description": "current output value (number). Zero is returned for:\n* non-existing outputs" + } + ], + "availability": { + "since": "2.8.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getOutputValue(outputIndex)\n\n@param outputIndex: integer identifying the output channel number 0 for CH1, up to MAX_OUTPUT_CHANNELS - 1.\n\n@retval value current output value (number). Zero is returned for:\n * non-existing outputs\n\n@status current Introduced in 2.8.0", + "source_line": 2851 + }, + { + "id": "getRAS", + "doc_id": "runtime.get-ras", + "symbol": "getRAS", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getRAS()", + "summary": "Return the RAS value or nil if no valid hardware found", + "parameters": [], + "returns": [ + { + "name": "", + "type": "integer", + "description": "representing RAS value. Value bellow 0x33 (51 decimal) are all ok, value above 0x33 indicate a hardware antenna issue. This is just a hardware pass/fail measure and does not represent the quality of the radio link" + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "all" + ] + }, + "notes": [ + "RAS was called SWR in the past" + ], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getRAS()\n\nReturn the RAS value or nil if no valid hardware found\n\n@retval number representing RAS value. Value bellow 0x33 (51 decimal) are all ok, value above 0x33 indicate a hardware antenna issue.\nThis is just a hardware pass/fail measure and does not represent the quality of the radio link\n\n@notice RAS was called SWR in the past\n\n@status current Introduced in 2.2.0", + "source_line": 1365 + }, + { + "id": "getRSSI", + "doc_id": "runtime.get-rssi", + "symbol": "getRSSI", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getRSSI()", + "summary": "Get RSSI value as well as low and critical RSSI alarm levels (in dB)", + "parameters": [], + "returns": [ + { + "name": "rssi", + "type": "unknown", + "description": "RSSI value (0 if no link)" + }, + { + "name": "alarm_low", + "type": "unknown", + "description": "Configured low RSSI alarm level" + }, + { + "name": "alarm_crit", + "type": "unknown", + "description": "Configured critical RSSI alarm level" + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getRSSI()\n\nGet RSSI value as well as low and critical RSSI alarm levels (in dB)\n\n@retval rssi RSSI value (0 if no link)\n\n@retval alarm_low Configured low RSSI alarm level\n\n@retval alarm_crit Configured critical RSSI alarm level\n\n@status current Introduced in 2.2.0", + "source_line": 2087 + }, + { + "id": "getRotEncMode", + "doc_id": "runtime.get-rot-enc-mode", + "symbol": "getRotEncMode", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getRotEncMode()", + "summary": "Return rotary encoder mode", + "parameters": [], + "returns": [ + { + "name": "", + "type": "integer", + "description": "in list: Normal = 0, Both V and H inverted = 1, V-N = 2, V-A = 3 return 0 on radio without rotary encoder" + } + ], + "availability": { + "since": "2.8.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getRotEncMode()\n\nReturn rotary encoder mode\n\n@retval number in list: Normal = 0, Both V and H inverted = 1, V-N = 2, V-A = 3\n return 0 on radio without rotary encoder\n\n@status current Introduced in 2.8.0", + "source_line": 874 + }, + { + "id": "getRotEncSpeed", + "doc_id": "runtime.get-rot-enc-speed", + "symbol": "getRotEncSpeed", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getRotEncSpeed()", + "summary": "Return rotary encoder current speed", + "parameters": [], + "returns": [ + { + "name": "", + "type": "integer", + "description": "in list: ROTENC_LOWSPEED, ROTENC_MIDSPEED, ROTENC_HIGHSPEED returns ROTENC_LOWSPEED on radio without rotary encoder" + } + ], + "availability": { + "since": "2.3.10", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getRotEncSpeed()\n\nReturn rotary encoder current speed\n\n@retval number in list: ROTENC_LOWSPEED, ROTENC_MIDSPEED, ROTENC_HIGHSPEED\n returns ROTENC_LOWSPEED on radio without rotary encoder\n\n@status current Introduced in 2.3.10", + "source_line": 858 + }, + { + "id": "getRtcTime", + "doc_id": "runtime.get-rtc-time", + "symbol": "getRtcTime", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getRtcTime()", + "summary": "Return current RTC system date as unix timstamp (in seconds since 1. Jan 1970)", + "parameters": [], + "returns": [ + { + "name": "", + "type": "integer", + "description": "Number of seconds elapsed since 1. Jan 1970" + } + ], + "availability": { + "since": "unknown", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getRtcTime()\n\nReturn current RTC system date as unix timstamp (in seconds since 1. Jan 1970)\n\nPlease note the RTC timestamp is kept internally as a 32bit integer, which will overflow\nin 2038.\n\n@retval number Number of seconds elapsed since 1. Jan 1970", + "source_line": 256 + }, + { + "id": "getShmVar", + "doc_id": "runtime.get-shm-var", + "symbol": "getShmVar", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getShmVar(id)", + "summary": "", + "parameters": [ + { + "name": "id", + "type": "integer", + "required": true, + "description": "between 1 and 16 identifying the shared memory variable." + } + ], + "returns": [ + { + "name": "value", + "type": "integer", + "description": ". The value of the shared memory variable." + } + ], + "availability": { + "since": "2.6", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getShmVar(id)\n\n@param id: integer between 1 and 16 identifying the shared memory variable.\n\n@retval value: integer. The value of the shared memory variable.\n\nGets the value of a shared memory variable that can be used for passing data between Lua widgets and other Lua scripts.\n\n@status current Introduced in 2.6\n\n@notice Only available on radios with color display", + "source_line": 2503 + }, + { + "id": "getSourceIndex", + "doc_id": "runtime.get-source-index", + "symbol": "getSourceIndex", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getSourceIndex(sourceName)", + "summary": "", + "parameters": [ + { + "name": "sourceName", + "type": "string", + "required": true, + "description": "naming a value source as it is shown on radio menus where you can select it. Notice that many names have special characters in them." + } + ], + "returns": [ + { + "name": "sourceIndex", + "type": "integer", + "description": ". The source index, which can be used as input for `getSourceName(sourceIndex)`, `getValue(sourceIndex)`, and `getFieldInfo(sourceIndex)`." + } + ], + "availability": { + "since": "2.6", + "radios": [ + "all" + ] + }, + "notes": [ + "the source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so `getValue(index)` will work with the indices obtained here.\nThis function is rather time consuming, and should not be used repeatedly in a script, if it can be avoided." + ], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getSourceIndex(sourceName)\n\n@param sourceName: string naming a value source as it is shown on radio menus where you can select it. Notice that many names have special characters in them.\n\n@retval sourceIndex: integer. The source index, which can be used as input for `getSourceName(sourceIndex)`, `getValue(sourceIndex)`, and `getFieldInfo(sourceIndex)`.\n\n@notice the source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so `getValue(index)` will work with the indices obtained here.\nThis function is rather time consuming, and should not be used repeatedly in a script, if it can be avoided.\n\n@status current Introduced in 2.6", + "source_line": 2746 + }, + { + "id": "getSourceName", + "doc_id": "runtime.get-source-name", + "symbol": "getSourceName", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getSourceName(sourceIndex)", + "summary": "", + "parameters": [ + { + "name": "sourceIndex", + "type": "integer", + "required": true, + "description": "identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`." + } + ], + "returns": [ + { + "name": "sourceName", + "type": "string", + "description": "naming the value source as it is shown on radio menus where a source can be chosen." + } + ], + "availability": { + "since": "2.6", + "radios": [ + "all" + ] + }, + "notes": [ + "the source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so `getValue(index)` will work with the indices used here." + ], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getSourceName(sourceIndex)\n\n@param sourceIndex: integer identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`.\n\n@retval sourceName: string naming the value source as it is shown on radio menus where a source can be chosen.\n\n@notice the source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so `getValue(index)` will work with the indices used here.\n\n@status current Introduced in 2.6", + "source_line": 2772 + }, + { + "id": "getSourceValue", + "doc_id": "runtime.get-source-value", + "symbol": "getSourceValue", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getSourceValue(source)", + "summary": "Returns the value of a source. Superseeds getValue.", + "parameters": [ + { + "name": "source", + "type": "string", + "required": true, + "description": "can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source." + } + ], + "returns": [ + { + "name": "", + "type": "integer", + "description": "current source value (number), or last known telemetry item value." + }, + { + "name": "isCurrent", + "type": "unknown", + "description": "is true for telemetry sources that are within the \"Sensor Lost\" duration and telemetry is streaming . Always true for non-telemetry items." + }, + { + "name": "isFresh", + "type": "unknown", + "description": "is true for telemetry sources which have been recently updated and telemetry is streaming. Always true for non-telemetry items." + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [ + "Getting a value by its numerical identifier is much faster than by its name.\nWhile `Cels` sensor returns current values of all cells in a table, a `Cels+` or\n`Cels-` will return a single value - the maximum or minimum Cels value." + ], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getSourceValue(source)\n\nReturns the value of a source. Superseeds getValue.\n\nThe list of fixed sources:\n\n| OpenTX Version | Radio |\n|----------------|-------|\n| 2.0 | [all](http://downloads-20.open-tx.org/firmware/lua_fields.txt) |\n| 2.1 | [X9D and X9D+](http://downloads-21.open-tx.org/firmware/lua_fields_taranis.txt), [X9E](http://downloads-21.open-tx.org/firmware/lua_fields_taranis_x9e.txt) |\n| 2.2 | [X9D and X9D+](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9e.txt), [Horus](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x12s.txt) |\n| 2.3 | [X9D and X9D+](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9e.txt), [X7](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x7.txt), [Horus](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x12s.txt) |\n\nIn OpenTX 2.1.x the telemetry sources no longer have a predefined name.\nTo get a telemetry value simply use it's sensor name. For example:\n * Altitude sensor has a name \"Alt\"\n * to get the current altitude use the source \"Alt\"\n * to get the minimum altitude use the source \"Alt-\", to get the maximum use \"Alt+\"\n\n@param source can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source.\n\n@retval value current source value (number), or last known telemetry item value.\n\nvalue is nil for non-existing sources. all non-allowed sensors while FAI MODE is active, or if a telemetry item value has never been received\n\nvalue is a table for GPS position:\n\n * `lat` (number) latitude, positive is North\n * `lon` (number) longitude, positive is East\n * `pilot-lat` (number) pilot latitude, positive is North\n * `pilot-lon` (number) pilot longitude, positive is East\n\nvalue is a table for date/time, see getDateTime()\n\nvalue is a table for battery cells(except where no cells were detected in which case the returned value is 0):\n * table has one item for each detected cell:\n * key (number) cell number (1 to number of cells)\n * value (number) current cell voltage\n\n@retval isCurrent is true for telemetry sources that are within the \"Sensor Lost\" duration and telemetry is streaming . Always true for non-telemetry items.\n\n@retval isFresh is true for telemetry sources which have been recently updated and telemetry is streaming. Always true for non-telemetry items.\n\n@status current Introduced in 2.0.0, changed in 2.1.0, `Cels+` and `Cels-` added in 2.1.9\n\n@notice Getting a value by its numerical identifier is much faster than by its name.\nWhile `Cels` sensor returns current values of all cells in a table, a `Cels+` or\n`Cels-` will return a single value - the maximum or minimum Cels value.", + "source_line": 726 + }, + { + "id": "getStickMode", + "doc_id": "runtime.get-stick-mode", + "symbol": "getStickMode", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getStickMode()", + "summary": "", + "parameters": [], + "returns": [ + { + "name": "", + "type": "integer", + "description": "a 1 to 4 value corresponding to radio stick mode" + } + ], + "availability": { + "since": "3.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getStickMode()\n\n@retval : integer, a 1 to 4 value corresponding to radio stick mode\n\n@status current Introduced in 3.0", + "source_line": 3023 + }, + { + "id": "getSwitchIndex", + "doc_id": "runtime.get-switch-index", + "symbol": "getSwitchIndex", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getSwitchIndex(positionName)", + "summary": "", + "parameters": [ + { + "name": "positionName", + "type": "string", + "required": true, + "description": "naming a switch position as it is shown on radio menus where you can select a switch. Notice that many names have special characters in them like arrow up/down etc." + } + ], + "returns": [ + { + "name": "value", + "type": "integer", + "description": ". The switchIndex, which can be used as input for `getSwitchName(switchIndex)` and `getSwitchValue(switchIndex)`. Also corresponds to the fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches." + } + ], + "availability": { + "since": "2.6", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getSwitchIndex(positionName)\n\n@param positionName: string naming a switch position as it is shown on radio menus where you can select a switch. Notice that many names have\nspecial characters in them like arrow up/down etc.\n\n@retval value: integer. The switchIndex, which can be used as input for `getSwitchName(switchIndex)` and `getSwitchValue(switchIndex)`. Also corresponds\nto the fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches.\n\n@status current Introduced in 2.6", + "source_line": 2623 + }, + { + "id": "getSwitchInfo", + "doc_id": "runtime.get-switch-info", + "symbol": "getSwitchInfo", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getSwitchInfo(sourceIndex)", + "summary": "", + "parameters": [ + { + "name": "sourceIndex", + "type": "integer", + "required": true, + "description": "identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`." + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "information about requested field, table elements:\n* `type` (number) field identifier\n0 = SWITCH_NONE\n1 = SWITCH_TOGGLE\n2 = SWITCH_2POS\n3 = SWITCH_3POS" + } + ], + "availability": { + "since": "2.12", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getSwitchInfo(sourceIndex)\n\n@param sourceIndex: integer identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`.\n\n@retval table information about requested field, table elements:\n* `type` (number) field identifier\n0 = SWITCH_NONE\n1 = SWITCH_TOGGLE\n2 = SWITCH_2POS\n3 = SWITCH_3POS\n\n* `isCustomisableSwitch` (boolean) field identifier\nreturn true if switch is a customisable switch\n\n* `name` (string) switch name\n\n@status current Introduced in 2.12", + "source_line": 2587 + }, + { + "id": "getSwitchName", + "doc_id": "runtime.get-switch-name", + "symbol": "getSwitchName", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getSwitchName(switchIndex)", + "summary": "", + "parameters": [ + { + "name": "switchIndex", + "type": "integer", + "required": true, + "description": "identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches." + } + ], + "returns": [ + { + "name": "value", + "type": "string", + "description": "naming the switch position as it is shown on radio menus where a switch can be chosen." + } + ], + "availability": { + "since": "2.6", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getSwitchName(switchIndex)\n\n@param switchIndex: integer identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by\n`model.getLogicalSwitch(switch)` identifying switches.\n\n@retval value: string naming the switch position as it is shown on radio menus where a switch can be chosen.\n\n@status current Introduced in 2.6", + "source_line": 2648 + }, + { + "id": "getSwitchValue", + "doc_id": "runtime.get-switch-value", + "symbol": "getSwitchValue", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getSwitchValue(switchIndex)", + "summary": "", + "parameters": [ + { + "name": "switchIndex", + "type": "integer", + "required": true, + "description": "identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches." + } + ], + "returns": [ + { + "name": "value", + "type": "integer", + "description": ". The value of the switch." + } + ], + "availability": { + "since": "2.6", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getSwitchValue(switchIndex)\n\n@param switchIndex: integer identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by\n`model.getLogicalSwitch(switch)` identifying switches.\n\n@retval value: true/false. The value of the switch.\n\n@status current Introduced in 2.6", + "source_line": 2671 + }, + { + "id": "getTime", + "doc_id": "runtime.get-time", + "symbol": "getTime", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getTime()", + "summary": "Return the time since the radio was started in multiple of 10ms", + "parameters": [], + "returns": [ + { + "name": "", + "type": "integer", + "description": "Number of 10ms ticks since the radio was started Example: run time: 12.54 seconds, return value: 1254" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getTime()\n\nReturn the time since the radio was started in multiple of 10ms\n\n@retval number Number of 10ms ticks since the radio was started Example:\nrun time: 12.54 seconds, return value: 1254\n\nThe timer internally uses a 32-bit counter which is enough for 497 days so\noverflows will not happen.\n\n@status current Introduced in 2.0.0", + "source_line": 187 + }, + { + "id": "getTrainerStatus", + "doc_id": "runtime.get-trainer-status", + "symbol": "getTrainerStatus", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getTrainerStatus()", + "summary": "", + "parameters": [], + "returns": [ + { + "name": "", + "type": "integer", + "description": "current output value (number). 0 - Not Connected\n 1 - Connected\n 2 - Disconnected\n 3 - Reconnected" + } + ], + "availability": { + "since": "2.9.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getTrainerStatus()\n\n@retval value current output value (number).\n 0 - Not Connected\n 1 - Connected\n 2 - Disconnected\n 3 - Reconnected\n\n@status current Introduced in 2.9.0", + "source_line": 2872 + }, + { + "id": "getTxGPS", + "doc_id": "runtime.get-tx-gps", + "symbol": "getTxGPS", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getTxGPS()", + "summary": "Return the internal GPS position or nil if no valid hardware found", + "parameters": [], + "returns": [ + { + "name": "", + "type": "table", + "description": "representing the current radio position\n* `lat` (number) internal GPS latitude, positive is North\n * `lon` (number) internal GPS longitude, positive is East\n * `numsat` (number) current number of sats locked in by the GPS sensor\n * `fix` (boolean) fix status\n * `alt` (number) internal GPS altitude in 0.1m\n * `speed` (number) internal GPSspeed in 0.1m/s\n * `heading` (number) internal GPS ground course estimation in degrees * 10\n * `hdop` (number) internal GPS horizontal dilution of precision" + } + ], + "availability": { + "since": "2.2.2", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getTxGPS()\n\nReturn the internal GPS position or nil if no valid hardware found\n\n@retval table representing the current radio position\n * `lat` (number) internal GPS latitude, positive is North\n * `lon` (number) internal GPS longitude, positive is East\n * `numsat` (number) current number of sats locked in by the GPS sensor\n * `fix` (boolean) fix status\n * `alt` (number) internal GPS altitude in 0.1m\n * `speed` (number) internal GPSspeed in 0.1m/s\n * `heading` (number) internal GPS ground course estimation in degrees * 10\n * `hdop` (number) internal GPS horizontal dilution of precision\n\n@status current Introduced in 2.2.2", + "source_line": 1388 + }, + { + "id": "getUsage", + "doc_id": "runtime.get-usage", + "symbol": "getUsage", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getUsage()", + "summary": "Get percent of already used Lua instructions in current script execution cycle.", + "parameters": [], + "returns": [ + { + "name": "usage", + "type": "integer", + "description": "a value from 0 to 100 (percent)" + } + ], + "availability": { + "since": "2.2.1", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getUsage()\n\nGet percent of already used Lua instructions in current script execution cycle.\n\n@retval usage (number) a value from 0 to 100 (percent)\n\n@status current Introduced in 2.2.1", + "source_line": 2190 + }, + { + "id": "getValue", + "doc_id": "runtime.get-value", + "symbol": "getValue", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getValue(source)", + "summary": "Returns the value of a source.", + "parameters": [ + { + "name": "source", + "type": "string", + "required": true, + "description": "can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source." + } + ], + "returns": [ + { + "name": "", + "type": "integer", + "description": "current source value (number). Zero is returned for:\n* non-existing sources\n * for all telemetry source when the telemetry stream is not received\n * far all non allowed sensors while FAI MODE is active" + }, + { + "name": "", + "type": "table", + "description": "GPS position is returned in a table:\n* `lat` (number) latitude, positive is North\n * `lon` (number) longitude, positive is East\n * `pilot-lat` (number) pilot latitude, positive is North\n * `pilot-lon` (number) pilot longitude, positive is East" + }, + { + "name": "", + "type": "table", + "description": "GPS date/time, see getDateTime()" + }, + { + "name": "", + "type": "table", + "description": "Cells are returned in a table (except where no cells were detected in which\ncase the returned value is 0):\n * table has one item for each detected cell:\n * key (number) cell number (1 to number of cells)\n * value (number) current cell voltage" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [ + "Getting a value by its numerical identifier is faster then by its name.\nWhile `Cels` sensor returns current values of all cells in a table, a `Cels+` or\n`Cels-` will return a single value - the maximum or minimum Cels value." + ], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getValue(source)\n\nReturns the value of a source.\n\nThe list of fixed sources:\n\n| OpenTX Version | Radio |\n|----------------|-------|\n| 2.0 | [all](http://downloads-20.open-tx.org/firmware/lua_fields.txt) |\n| 2.1 | [X9D and X9D+](http://downloads-21.open-tx.org/firmware/lua_fields_taranis.txt), [X9E](http://downloads-21.open-tx.org/firmware/lua_fields_taranis_x9e.txt) |\n| 2.2 | [X9D and X9D+](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9e.txt), [Horus](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x12s.txt) |\n| 2.3 | [X9D and X9D+](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9e.txt), [X7](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x7.txt), [Horus](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x12s.txt) |\n\nIn OpenTX 2.1.x the telemetry sources no longer have a predefined name.\nTo get a telemetry value simply use it's sensor name. For example:\n * Altitude sensor has a name \"Alt\"\n * to get the current altitude use the source \"Alt\"\n * to get the minimum altitude use the source \"Alt-\", to get the maximum use \"Alt+\"\n\n@param source can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source.\n\n@retval value current source value (number). Zero is returned for:\n * non-existing sources\n * for all telemetry source when the telemetry stream is not received\n * far all non allowed sensors while FAI MODE is active\n\n@retval table GPS position is returned in a table:\n * `lat` (number) latitude, positive is North\n * `lon` (number) longitude, positive is East\n * `pilot-lat` (number) pilot latitude, positive is North\n * `pilot-lon` (number) pilot longitude, positive is East\n\n@retval table GPS date/time, see getDateTime()\n\n@retval table Cells are returned in a table\n(except where no cells were detected in which\ncase the returned value is 0):\n * table has one item for each detected cell:\n * key (number) cell number (1 to number of cells)\n * value (number) current cell voltage\n\n@status current Introduced in 2.0.0, changed in 2.1.0, `Cels+` and\n`Cels-` added in 2.1.9\n\n@notice Getting a value by its numerical identifier is faster then by its name.\nWhile `Cels` sensor returns current values of all cells in a table, a `Cels+` or\n`Cels-` will return a single value - the maximum or minimum Cels value.", + "source_line": 658 + }, + { + "id": "getVersion", + "doc_id": "runtime.get-version", + "symbol": "getVersion", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "getVersion()", + "summary": "Return OpenTX version", + "parameters": [], + "returns": [ + { + "name": "", + "type": "string", + "description": "OpenTX version (ie \"2.1.5\")" + }, + { + "name": "opentx_version_ie_2", + "type": "string", + "description": "OpenTX version (ie \"2.1.5\")" + }, + { + "name": "radio_type_x12s_x10_x9e_x9d_x9d_or_x7", + "type": "string", + "description": "radio type: `x12s`, `x10`, `x9e`, `x9d+`, `x9d` or `x7`." + }, + { + "name": "major_version_ie_2_if_version_2", + "type": "integer", + "description": "major version (ie 2 if version 2.1.5)" + }, + { + "name": "minor_version_ie_1_if_version_2", + "type": "integer", + "description": "minor version (ie 1 if version 2.1.5)" + }, + { + "name": "revision_number_ie_5_if_version_2", + "type": "integer", + "description": "revision number (ie 5 if version 2.1.5)" + }, + { + "name": "os_name_i", + "type": "string", + "description": "OS name (i.e. EdgeTX or nil if OpenTX)" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function getVersion()\n\nReturn OpenTX version\n\n@retval string OpenTX version (ie \"2.1.5\")\n\n@retval multiple values (available since 2.1.7):\n * (string) OpenTX version (ie \"2.1.5\")\n * (string) radio type: `x12s`, `x10`, `x9e`, `x9d+`, `x9d` or `x7`.\nIf running in simulator the \"-simu\" is added\n * (number) major version (ie 2 if version 2.1.5)\n * (number) minor version (ie 1 if version 2.1.5)\n * (number) revision number (ie 5 if version 2.1.5)\nSince EdgeTX 2.4.0, sixth value added\n * (string) OS name (i.e. EdgeTX or nil if OpenTX)\n\n@status current Introduced in 2.0.0, expanded in 2.1.7, radio type strings changed in 2.2.0, os name added in EdgeTX 2.4.0\n\n### Example\n\nThis example also runs in OpenTX versions where the function returned only one value:\n\n```lua\nlocal function run(event)\n local ver, radio, maj, minor, rev, osname = getVersion()\n print(\"version: \"..ver)\n if radio then print (\"radio: \"..radio) end\n if maj then print (\"maj: \"..maj) end\n if minor then print (\"minor: \"..minor) end\n if rev then print (\"rev: \"..rev) end\n if osname then print (\"osname: \"..osname) end\n return 1\nend\n\nreturn { run=run }\n```\nOutput of the above script in simulator:\n```\nversion: 2.4.0\nradio: tx16s-simu\nmaj: 2\nminor: 4\nrev: 0\nosname: EdgeTX\n```", + "source_line": 129 + }, + { + "id": "ghostTelemetryPop", + "doc_id": "runtime.ghost-telemetry-pop", + "symbol": "ghostTelemetryPop", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "ghostTelemetryPop()", + "summary": "Pops a received Ghost Telemetry packet from the queue.", + "parameters": [], + "returns": [ + { + "name": "", + "type": "nil", + "description": "queue does not contain any (or enough) bytes to form a whole packet" + }, + { + "name": "type", + "type": "integer", + "description": "" + }, + { + "name": "packet", + "type": "table", + "description": "data bytes" + } + ], + "availability": { + "since": "2.7.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function ghostTelemetryPop()\n\nPops a received Ghost Telemetry packet from the queue.\n\n@retval nil queue does not contain any (or enough) bytes to form a whole packet\n\n@retval multiple returns 2 values:\n * type (number)\n * packet (table) data bytes\n\n@status current Introduced in 2.7.0", + "source_line": 1261 + }, + { + "id": "ghostTelemetryPush", + "doc_id": "runtime.ghost-telemetry-push", + "symbol": "ghostTelemetryPush", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "ghostTelemetryPush()", + "summary": "This functions allows for sending telemetry data toward the Ghost link.", + "parameters": [ + { + "name": "command", + "type": "unknown", + "required": true, + "description": "command" + }, + { + "name": "data", + "type": "table", + "required": true, + "description": "table of data bytes" + } + ], + "returns": [ + { + "name": "", + "type": "boolean", + "description": "data queued in output buffer or not." + }, + { + "name": "", + "type": "nil", + "description": "incorrect telemetry protocol." + } + ], + "availability": { + "since": "2.7.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function ghostTelemetryPush()\n\nThis functions allows for sending telemetry data toward the Ghost link.\n\nWhen called without parameters, it will only return the status of the output buffer without sending anything.\n\n@param command command\n\n@param data table of data bytes\n\n@retval boolean data queued in output buffer or not.\n\n@retval nil incorrect telemetry protocol.\n\n@status current Introduced in 2.7.0", + "source_line": 1299 + }, + { + "id": "killEvents", + "doc_id": "runtime.kill-events", + "symbol": "killEvents", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "killEvents(key)", + "summary": "Stops key state machine. See [Key Events](../key_events.md) for the detailed description.", + "parameters": [ + { + "name": "key", + "type": "integer", + "required": true, + "description": "key to be killed, can also include event type (only the key part is used)" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function killEvents(key)\n\nStops key state machine. See [Key Events](../key_events.md) for the detailed description.\n\n@param key (number) key to be killed, can also include event type (only the key part is used)\n\n@status current Introduced in 2.0.0", + "source_line": 1684 + }, + { + "id": "lcd.RGB", + "doc_id": "lcd.rgb", + "symbol": "lcd.RGB", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.RGB(r, g, b | rgb)", + "summary": "Returns a drawing flag with RGB color code", + "parameters": [ + { + "name": "r", + "type": "integer", + "required": true, + "description": "a number between 0 and 255 that expresses the amount of red in the color" + }, + { + "name": "g", + "type": "integer", + "required": true, + "description": "a number between 0 and 255 that expresses the amount of green in the color" + }, + { + "name": "b", + "type": "integer", + "required": true, + "description": "a number between 0 and 255 that expresses the amount of blue in the color" + }, + { + "name": "rgb", + "type": "integer", + "required": true, + "description": "a number between 0 and 0xFFFFFF that expresses the RGB value (0xFF000=RED, 0x00FF00=GREEN, 0x0000FF=BLUE)" + } + ], + "returns": [ + { + "name": "flag", + "type": "integer", + "description": "with RGB565 color" + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display. Use *either* lcd.RGB(r,g,b) *or* lcd.RGB(rgb)" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.RGB(r, g, b | rgb)\n\nReturns a drawing flag with RGB color code\n\n@param r (integer) a number between 0 and 255 that expresses the amount of red in the color\n\n@param g (integer) a number between 0 and 255 that expresses the amount of green in the color\n\n@param b (integer) a number between 0 and 255 that expresses the amount of blue in the color\n\n@param rgb (integer) a number between 0 and 0xFFFFFF that expresses the RGB value (0xFF000=RED, 0x00FF00=GREEN, 0x0000FF=BLUE)\n\n@retval flag with RGB565 color\n\n@notice Only available on radios with color display. Use *either* lcd.RGB(r,g,b) *or* lcd.RGB(rgb)\n\n@status current Introduced in 2.2.0", + "source_line": 981 + }, + { + "id": "lcd.clear", + "doc_id": "lcd.clear", + "symbol": "lcd.clear", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.clear([color])", + "summary": "Clear the LCD screen", + "parameters": [ + { + "name": "color", + "type": "unknown", + "required": false, + "description": "" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "bw-lcd", + "color-lcd" + ] + }, + "notes": [ + "This function only works in stand-alone and telemetry scripts." + ], + "source_location": "radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.clear([color])\n\nClear the LCD screen\n\n@param color (optional, only on color screens)\n\n@status current Introduced in 2.0.0, `color` parameter introduced in 2.2.0 RC12\n\n@notice This function only works in stand-alone and telemetry scripts.", + "source_line": 57 + }, + { + "id": "lcd.drawAnnulus", + "doc_id": "lcd.draw-annulus", + "symbol": "lcd.drawAnnulus", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawAnnulus(x, y, r1, r2, start, end [, flags])", + "summary": "Draw an arc", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "coordinates of the center" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "coordinates of the center" + }, + { + "name": "r1", + "type": "integer", + "required": true, + "description": "radii of the inside and outside of the annulus" + }, + { + "name": "r2", + "type": "integer", + "required": true, + "description": "radii of the inside and outside of the annulus" + }, + { + "name": "start", + "type": "integer", + "required": true, + "description": "start and end of the annulus" + }, + { + "name": "end", + "type": "integer", + "required": true, + "description": "start and end of the annulus" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + } + ], + "returns": [], + "availability": { + "since": "2.4.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.drawAnnulus(x, y, r1, r2, start, end [, flags])\n\nDraw an arc\n\n@param x,y (positive numbers) coordinates of the center\n\n@param r1,r2 (positive numbers) radii of the inside and outside of the annulus\n\n@param start,end (positive numbers) start and end of the annulus\n\n@param flags (optional) please see the Lcd functions overview\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.4.0", + "source_line": 1218 + }, + { + "id": "lcd.drawArc", + "doc_id": "lcd.draw-arc", + "symbol": "lcd.drawArc", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawArc(x, y, r, start, end [, flags])", + "summary": "Draw an arc", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "coordinates of the center" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "coordinates of the center" + }, + { + "name": "r", + "type": "integer", + "required": true, + "description": "radius" + }, + { + "name": "start", + "type": "integer", + "required": true, + "description": "start and end of the arc" + }, + { + "name": "end", + "type": "integer", + "required": true, + "description": "start and end of the arc" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + } + ], + "returns": [], + "availability": { + "since": "2.4.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.drawArc(x, y, r, start, end [, flags])\n\nDraw an arc\n\n@param x,y (positive numbers) coordinates of the center\n\n@param r (positive number) radius\n\n@param start,end (positive numbers) start and end of the arc\n\n@param flags (optional) please see the Lcd functions overview\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.4.0", + "source_line": 1146 + }, + { + "id": "lcd.drawBitmap", + "doc_id": "lcd.draw-bitmap", + "symbol": "lcd.drawBitmap", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawBitmap(bitmap, x, y [, scale])", + "summary": "Displays a bitmap at (x,y)", + "parameters": [ + { + "name": "bitmap", + "type": "pointer", + "required": true, + "description": "point to a bitmap previously opened with Bitmap.open()" + }, + { + "name": "x", + "type": "integer", + "required": true, + "description": "starting coordinates" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "starting coordinates" + }, + { + "name": "scale", + "type": "integer", + "required": false, + "description": "scale in %, 50 divides size by two, 100 is unchanged, 200 doubles size. Omitting scale draws image in 1:1 scale and is faster than specifying 100 for scale." + } + ], + "returns": [], + "availability": { + "since": "2.2.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.drawBitmap(bitmap, x, y [, scale])\n\nDisplays a bitmap at (x,y)\n\n@param bitmap (pointer) point to a bitmap previously opened with Bitmap.open()\n\n@param x,y (positive numbers) starting coordinates\n\n@param scale (positive numbers) scale in %, 50 divides size by two, 100 is unchanged, 200 doubles size.\nOmitting scale draws image in 1:1 scale and is faster than specifying 100 for scale.\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.2.0", + "source_line": 671 + }, + { + "id": "lcd.drawBitmapPattern", + "doc_id": "lcd.draw-bitmap-pattern", + "symbol": "lcd.drawBitmapPattern", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawBitmapPattern(bitmap, x, y [, flags])", + "summary": "Displays a bitmap pattern at (x,y)", + "parameters": [ + { + "name": "bitmap", + "type": "pointer", + "required": true, + "description": "point to a bitmap previously opened with Bitmap.open()" + }, + { + "name": "x", + "type": "integer", + "required": true, + "description": "starting coordinates" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "starting coordinates" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + } + ], + "returns": [], + "availability": { + "since": "2.8.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.drawBitmapPattern(bitmap, x, y [, flags])\n\nDisplays a bitmap pattern at (x,y)\n\n@param bitmap (pointer) point to a bitmap previously opened with Bitmap.open()\n\n@param x,y (positive numbers) starting coordinates\n\n@param flags (optional) please see the Lcd functions overview\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.8.0", + "source_line": 710 + }, + { + "id": "lcd.drawBitmapPatternPie", + "doc_id": "lcd.draw-bitmap-pattern-pie", + "symbol": "lcd.drawBitmapPatternPie", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawBitmapPatternPie(bitmap, x, y, startAngle, endAngle [, flags])", + "summary": "Displays a bitmap pattern pie at (x,y)", + "parameters": [ + { + "name": "bitmap", + "type": "pointer", + "required": true, + "description": "point to a bitmap previously opened with Bitmap.open()" + }, + { + "name": "x", + "type": "integer", + "required": true, + "description": "starting coordinates" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "starting coordinates" + }, + { + "name": "startAngle", + "type": "unknown", + "required": true, + "description": "Start angle" + }, + { + "name": "endAngle", + "type": "unknown", + "required": true, + "description": "End angle" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + } + ], + "returns": [], + "availability": { + "since": "2.8.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.drawBitmapPatternPie(bitmap, x, y, startAngle, endAngle [, flags])\n\nDisplays a bitmap pattern pie at (x,y)\n\n@param bitmap (pointer) point to a bitmap previously opened with Bitmap.open()\n\n@param x,y (positive numbers) starting coordinates\n\n@param startAngle Start angle\n\n@param endAngle End angle\n\n@param flags (optional) please see the Lcd functions overview\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.8.0", + "source_line": 743 + }, + { + "id": "lcd.drawChannel", + "doc_id": "lcd.draw-channel", + "symbol": "lcd.drawChannel", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawChannel(x, y, source, flags)", + "summary": "Display a telemetry value at (x,y)", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "starting coordinate" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "starting coordinate" + }, + { + "name": "source", + "type": "integer|string", + "required": true, + "description": "can be a source identifier (number) or a source name (string). See getValue()" + }, + { + "name": "flags", + "type": "integer", + "required": true, + "description": "please see the Lcd functions overview" + } + ], + "returns": [], + "availability": { + "since": "2.0.6", + "radios": [ + "bw-lcd", + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.drawChannel(x, y, source, flags)\n\nDisplay a telemetry value at (x,y)\n\n@param x,y (positive numbers) starting coordinate\n\n@param source can be a source identifier (number) or a source name (string).\nSee getValue()\n\n@param flags (optional) please see the Lcd functions overview\n\n@status current Introduced in 2.0.6, changed in 2.1.0 (only telemetry sources are valid)", + "source_line": 390 + }, + { + "id": "lcd.drawCircle", + "doc_id": "lcd.draw-circle", + "symbol": "lcd.drawCircle", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawCircle(x, y, r [, flags])", + "summary": "Draw a circle at (x, y) of specified radius", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "center position" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "center position" + }, + { + "name": "r", + "type": "integer", + "required": true, + "description": "radius in pixels" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + } + ], + "returns": [], + "availability": { + "since": "2.4.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.drawCircle(x, y, r [, flags])\n\nDraw a circle at (x, y) of specified radius\n\n@param x,y (positive numbers) center position\n\n@param r (number) radius in pixels\n\n@param flags (optional) please see the Lcd functions overview\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.4.0", + "source_line": 1018 + }, + { + "id": "lcd.drawCombobox", + "doc_id": "lcd.draw-combobox", + "symbol": "lcd.drawCombobox", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawCombobox(x, y, w, list, idx [, flags])", + "summary": "Draw a combo box", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "top left corner position" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "top left corner position" + }, + { + "name": "w", + "type": "integer", + "required": true, + "description": "width of combo box in pixels" + }, + { + "name": "list", + "type": "table", + "required": true, + "description": "combo box elements, each element is a string" + }, + { + "name": "idx", + "type": "integer", + "required": true, + "description": "index of entry to highlight" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "drawing flags, the flags can not be combined:\n* `BLINK` combo box is expanded\n * `INVERS` combo box collapsed, text inversed\n * `0 or not present` combo box collapsed, text normal" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "bw-lcd" + ] + }, + "notes": [ + "Only available on Taranis" + ], + "source_location": "radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.drawCombobox(x, y, w, list, idx [, flags])\n\nDraw a combo box\n\n@param x,y (positive numbers) top left corner position\n\n@param w (number) width of combo box in pixels\n\n@param list (table) combo box elements, each element is a string\n\n@param idx (integer) index of entry to highlight\n\n@param flags (unsigned number) drawing flags, the flags can not be combined:\n * `BLINK` combo box is expanded\n * `INVERS` combo box collapsed, text inversed\n * `0 or not present` combo box collapsed, text normal\n\n@notice Only available on Taranis\n\n@status current Introduced in 2.0.0", + "source_line": 555 + }, + { + "id": "lcd.drawFilledCircle", + "doc_id": "lcd.draw-filled-circle", + "symbol": "lcd.drawFilledCircle", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawFilledCircle(x, y, r [, flags])", + "summary": "Draw a filled circle at (x, y) of specified radius", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "center position" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "center position" + }, + { + "name": "r", + "type": "integer", + "required": true, + "description": "radius in pixels" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + } + ], + "returns": [], + "availability": { + "since": "2.4.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.drawFilledCircle(x, y, r [, flags])\n\nDraw a filled circle at (x, y) of specified radius\n\n@param x,y (positive numbers) center position\n\n@param r (number) radius in pixels\n\n@param flags (optional) please see the Lcd functions overview\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.4.0", + "source_line": 1049 + }, + { + "id": "lcd.drawFilledRectangle", + "doc_id": "lcd.draw-filled-rectangle", + "symbol": "lcd.drawFilledRectangle", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawFilledRectangle(x, y, w, h [, flags [, opacity]])", + "summary": "Draw a solid rectangle from top left corner (x,y) of specified width and height", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "top left corner position" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "top left corner position" + }, + { + "name": "w", + "type": "integer", + "required": true, + "description": "width in pixels" + }, + { + "name": "h", + "type": "integer", + "required": true, + "description": "height in pixels" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + }, + { + "name": "opacity", + "type": "integer", + "required": false, + "description": "opacity defaults to 0 (only on radios with color display)" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "bw-lcd", + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.drawFilledRectangle(x, y, w, h [, flags [, opacity]])\n\nDraw a solid rectangle from top left corner (x,y) of specified width and height\n\n@param x,y (positive numbers) top left corner position\n\n@param w (number) width in pixels\n\n@param h (number) height in pixels\n\n@param flags (optional) please see the Lcd functions overview\n\n@param opacity (number) opacity defaults to 0 (only on radios with color display)\n\n@status current Introduced in 2.0.0", + "source_line": 820 + }, + { + "id": "lcd.drawFilledTriangle", + "doc_id": "lcd.draw-filled-triangle", + "symbol": "lcd.drawFilledTriangle", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawFilledTriangle(x1, y1, x2, y2, x3, y3 [, flags])", + "summary": "Draw a filled triangle", + "parameters": [ + { + "name": "x1", + "type": "integer", + "required": true, + "description": "coordinates of the three vertices" + }, + { + "name": "y1", + "type": "integer", + "required": true, + "description": "coordinates of the three vertices" + }, + { + "name": "x2", + "type": "integer", + "required": true, + "description": "coordinates of the three vertices" + }, + { + "name": "y2", + "type": "integer", + "required": true, + "description": "coordinates of the three vertices" + }, + { + "name": "x3", + "type": "integer", + "required": true, + "description": "coordinates of the three vertices" + }, + { + "name": "y3", + "type": "integer", + "required": true, + "description": "coordinates of the three vertices" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + } + ], + "returns": [], + "availability": { + "since": "2.4.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.drawFilledTriangle(x1, y1, x2, y2, x3, y3 [, flags])\n\nDraw a filled triangle\n\n@param x1,y1,x2,y2,x3,y3 (positive numbers) coordinates of the three vertices\n\n@param flags (optional) please see the Lcd functions overview\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.4.0", + "source_line": 1114 + }, + { + "id": "lcd.drawGauge", + "doc_id": "lcd.draw-gauge", + "symbol": "lcd.drawGauge", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawGauge(x, y, w, h, fill, maxfill [, flags])", + "summary": "Draw a simple gauge that is filled based upon fill value", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "top left corner position" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "top left corner position" + }, + { + "name": "w", + "type": "integer", + "required": true, + "description": "width in pixels" + }, + { + "name": "h", + "type": "integer", + "required": true, + "description": "height in pixels" + }, + { + "name": "fill", + "type": "integer", + "required": true, + "description": "amount of fill to apply" + }, + { + "name": "maxfill", + "type": "integer", + "required": true, + "description": "total value of fill" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "bw-lcd", + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.drawGauge(x, y, w, h, fill, maxfill [, flags])\n\nDraw a simple gauge that is filled based upon fill value\n\n@param x,y (positive numbers) top left corner position\n\n@param w (number) width in pixels\n\n@param h (number) height in pixels\n\n@param fill (number) amount of fill to apply\n\n@param maxfill (number) total value of fill\n\n@param flags (optional) please see the Lcd functions overview\n\n@status current Introduced in 2.0.0, changed in 2.2.0", + "source_line": 892 + }, + { + "id": "lcd.drawHudRectangle", + "doc_id": "lcd.draw-hud-rectangle", + "symbol": "lcd.drawHudRectangle", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawHudRectangle(pitch, roll, xmin, xmax, ymin, ymax [, flags])", + "summary": "Draw a rectangle in perspective", + "parameters": [ + { + "name": "pitch", + "type": "integer", + "required": true, + "description": "pitch and roll to define the orientation of the rectangle" + }, + { + "name": "roll", + "type": "integer", + "required": true, + "description": "pitch and roll to define the orientation of the rectangle" + }, + { + "name": "xmin", + "type": "integer", + "required": true, + "description": "the limits of the rectangle" + }, + { + "name": "xmax", + "type": "integer", + "required": true, + "description": "the limits of the rectangle" + }, + { + "name": "ymin", + "type": "integer", + "required": true, + "description": "the limits of the rectangle" + }, + { + "name": "ymax", + "type": "integer", + "required": true, + "description": "the limits of the rectangle" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + } + ], + "returns": [], + "availability": { + "since": "2.4.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.drawHudRectangle(pitch, roll, xmin, xmax, ymin, ymax [, flags])\n\nDraw a rectangle in perspective\n\n@param pitch,roll (positive numbers) pitch and roll to define the orientation of the rectangle\n\n@param xmin,xmax,ymin,ymax (positive numbers) the limits of the rectangle\n\n@param flags (optional) please see the Lcd functions overview\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.4.0", + "source_line": 1366 + }, + { + "id": "lcd.drawLine", + "doc_id": "lcd.draw-line", + "symbol": "lcd.drawLine", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawLine(x1, y1, x2, y2, pattern, [flags])", + "summary": "Draw a straight line on LCD", + "parameters": [ + { + "name": "x1", + "type": "integer", + "required": true, + "description": "starting coordinate" + }, + { + "name": "y1", + "type": "integer", + "required": true, + "description": "starting coordinate" + }, + { + "name": "x2", + "type": "integer", + "required": true, + "description": "end coordinate" + }, + { + "name": "y2", + "type": "integer", + "required": true, + "description": "end coordinate" + }, + { + "name": "pattern", + "type": "unknown", + "required": true, + "description": "SOLID or DOTTED" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "lcdflags" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "bw-lcd", + "color-lcd" + ] + }, + "notes": [ + "If the start or the end of the line is outside the LCD dimensions, then the\nwhole line will not be drawn (starting from OpenTX 2.1.5)" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.drawLine(x1, y1, x2, y2, pattern, [flags])\n\nDraw a straight line on LCD\n\n@param x1,y1 (positive numbers) starting coordinate\n\n@param x2,y2 (positive numbers) end coordinate\n\n@param pattern SOLID or DOTTED\n\n@param flags (optional) lcdflags\n\n@notice If the start or the end of the line is outside the LCD dimensions, then the\nwhole line will not be drawn (starting from OpenTX 2.1.5)\n\n@status current Introduced in 2.0.0, flags introduced in 2.3.6", + "source_line": 125 + }, + { + "id": "lcd.drawLineWithClipping", + "doc_id": "lcd.draw-line-with-clipping", + "symbol": "lcd.drawLineWithClipping", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawLineWithClipping(x1, y1, x2, y2, xmin, xmax, ymin, ymax, pattern [, flags])", + "summary": "Draw a line only inside a rectangle", + "parameters": [ + { + "name": "x1", + "type": "integer", + "required": true, + "description": "coordinates of the start and end of the unclipped line" + }, + { + "name": "y1", + "type": "integer", + "required": true, + "description": "coordinates of the start and end of the unclipped line" + }, + { + "name": "x2", + "type": "integer", + "required": true, + "description": "coordinates of the start and end of the unclipped line" + }, + { + "name": "y2", + "type": "integer", + "required": true, + "description": "coordinates of the start and end of the unclipped line" + }, + { + "name": "xmin", + "type": "integer", + "required": true, + "description": "the limits of the rectangle inside which the line is drawn" + }, + { + "name": "xmax", + "type": "integer", + "required": true, + "description": "the limits of the rectangle inside which the line is drawn" + }, + { + "name": "ymin", + "type": "integer", + "required": true, + "description": "the limits of the rectangle inside which the line is drawn" + }, + { + "name": "ymax", + "type": "integer", + "required": true, + "description": "the limits of the rectangle inside which the line is drawn" + }, + { + "name": "pattern", + "type": "FORCE", + "required": true, + "description": "please see the Lcd functions overview" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + } + ], + "returns": [], + "availability": { + "since": "2.4.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.drawLineWithClipping(x1, y1, x2, y2, xmin, xmax, ymin, ymax, pattern [, flags])\n\nDraw a line only inside a rectangle\n\n@param x1,y1,x2,y1 (positive numbers) coordinates of the start and end of the unclipped line\n\n@param xmin,xmax,ymin,ymax (positive numbers) the limits of the rectangle inside which the line is drawn\n\n@param pattern (FORCE, ERASE, DOTTED) please see the Lcd functions overview\n\n@param flags (optional) please see the Lcd functions overview\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.4.0", + "source_line": 1254 + }, + { + "id": "lcd.drawNumber", + "doc_id": "lcd.draw-number", + "symbol": "lcd.drawNumber", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawNumber(x, y, value [, flags [, inversColor]])", + "summary": "Display a number at (x,y)", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "starting coordinate" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "starting coordinate" + }, + { + "name": "value", + "type": "integer", + "required": true, + "description": "value to display" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + }, + { + "name": "inversColor", + "type": "unknown", + "required": false, + "description": "overrides the inverse text color for INVERS" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "bw-lcd", + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.drawNumber(x, y, value [, flags])\n\nDisplay a number at (x,y)\n\n@param x,y (positive numbers) starting coordinate\n\n@param value (number) value to display\n\n@param flags (unsigned number) drawing flags:\n * `0 or not specified` display with no decimal (like abs())\n * `PREC1` display with one decimal place (number 386 is displayed as 38.6)\n * `PREC2` display with tow decimal places (number 386 is displayed as 3.86)\n * other general LCD flag also apply\n * `SHADOWED` Horus only, apply a shadow effect\n\n@status current Introduced in 2.0.0, `SHADOWED` introduced in 2.2.1", + "source_line": 365 + }, + { + "id": "lcd.drawPie", + "doc_id": "lcd.draw-pie", + "symbol": "lcd.drawPie", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawPie(x, y, r, start, end [, flags])", + "summary": "Draw a pie slice", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "coordinates of the center" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "coordinates of the center" + }, + { + "name": "r", + "type": "integer", + "required": true, + "description": "radius" + }, + { + "name": "start", + "type": "integer", + "required": true, + "description": "start and end of the pie slice" + }, + { + "name": "end", + "type": "integer", + "required": true, + "description": "start and end of the pie slice" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + } + ], + "returns": [], + "availability": { + "since": "2.4.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.drawPie(x, y, r, start, end [, flags])\n\nDraw a pie slice\n\n@param x,y (positive numbers) coordinates of the center\n\n@param r (positive number) radius\n\n@param start,end (positive numbers) start and end of the pie slice\n\n@param flags (optional) please see the Lcd functions overview\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.4.0", + "source_line": 1182 + }, + { + "id": "lcd.drawPixmap", + "doc_id": "lcd.draw-pixmap", + "symbol": "lcd.drawPixmap", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawPixmap(x, y, name)", + "summary": "Draw a bitmap at (x,y)", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "starting coordinates" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "starting coordinates" + }, + { + "name": "name", + "type": "string", + "required": true, + "description": "full path to the bitmap on SD card (i.e. \u201c/IMAGES/test.bmp\u201d)" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "bw-lcd" + ] + }, + "notes": [ + "Maximum image size is [display width / 2] x [display height] pixels." + ], + "source_location": "radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.drawPixmap(x, y, name)\n\nDraw a bitmap at (x,y)\n\n@param x,y (positive numbers) starting coordinates\n\n@param name (string) full path to the bitmap on SD card (i.e. \u201c/IMAGES/test.bmp\u201d)\n\n@notice Maximum image size is [display width / 2] x [display height] pixels.\n\n@status current Introduced in 2.0.0", + "source_line": 388 + }, + { + "id": "lcd.drawPoint", + "doc_id": "lcd.draw-point", + "symbol": "lcd.drawPoint", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawPoint(x, y, [flags])", + "summary": "Draw a single pixel at (x,y) position", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "x position" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "y position" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "bw-lcd", + "color-lcd" + ] + }, + "notes": [ + "Taranis has an LCD display width of 212 pixels and height of 64 pixels.\nPosition (0,0) is at top left. Y axis is negative, top line is 0,\nbottom line is 63. Drawing on an existing black pixel produces white pixel (TODO check this!)" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.drawPoint(x, y, [flags])\n\nDraw a single pixel at (x,y) position\n\n@param x (positive number) x position\n\n@param y (positive number) y position\n\n@param flags (optional) please see the Lcd functions overview\n\n@notice Taranis has an LCD display width of 212 pixels and height of 64 pixels.\nPosition (0,0) is at top left. Y axis is negative, top line is 0,\nbottom line is 63. Drawing on an existing black pixel produces white pixel (TODO check this!)\n\n@status current Introduced in 2.0.0", + "source_line": 92 + }, + { + "id": "lcd.drawRectangle", + "doc_id": "lcd.draw-rectangle", + "symbol": "lcd.drawRectangle", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawRectangle(x, y, w, h [, flags [, t [, opacity]]])", + "summary": "Draw a rectangle from top left corner (x,y) of specified width and height", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "top left corner position" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "top left corner position" + }, + { + "name": "w", + "type": "integer", + "required": true, + "description": "width in pixels" + }, + { + "name": "h", + "type": "integer", + "required": true, + "description": "height in pixels" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + }, + { + "name": "t", + "type": "integer", + "required": false, + "description": "thickness in pixels, defaults to 1 (only on radios with color display)" + }, + { + "name": "opacity", + "type": "integer", + "required": false, + "description": "opacity defaults to 0 (only on radios with color display)" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "bw-lcd", + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.drawRectangle(x, y, w, h [, flags [, t [, opacity]]])\n\nDraw a rectangle from top left corner (x,y) of specified width and height\n\n@param x,y (positive numbers) top left corner position\n\n@param w (number) width in pixels\n\n@param h (number) height in pixels\n\n@param flags (optional) please see the Lcd functions overview\n\n@param t (number) thickness in pixels, defaults to 1 (only on radios with color display)\n\n@param opacity (number) opacity defaults to 0 (only on radios with color display)\n\n@status current Introduced in 2.0.0, changed in 2.2.0", + "source_line": 782 + }, + { + "id": "lcd.drawScreenTitle", + "doc_id": "lcd.draw-screen-title", + "symbol": "lcd.drawScreenTitle", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawScreenTitle(title, page, pages)", + "summary": "Draw a title bar", + "parameters": [ + { + "name": "title", + "type": "string", + "required": true, + "description": "text for the title" + }, + { + "name": "page", + "type": "integer", + "required": true, + "description": "page number" + }, + { + "name": "pages", + "type": "integer", + "required": true, + "description": "total number of pages. Only used as indicator on the right side of title bar. (i.e. idx=2, cnt=5, display `2/5`)" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "bw-lcd" + ] + }, + "notes": [ + "Only available on Taranis" + ], + "source_location": "radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.drawScreenTitle(title, page, pages)\n\nDraw a title bar\n\n@param title (string) text for the title\n\n@param page (number) page number\n\n@param pages (number) total number of pages. Only used as indicator on\nthe right side of title bar. (i.e. idx=2, cnt=5, display `2/5`)\n\n@notice Only available on Taranis\n\n@status current Introduced in 2.0.0", + "source_line": 522 + }, + { + "id": "lcd.drawSource", + "doc_id": "lcd.draw-source", + "symbol": "lcd.drawSource", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawSource(x, y, source [, flags])", + "summary": "Displays the name of the corresponding input as defined by the source at (x,y)", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "starting coordinate" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "starting coordinate" + }, + { + "name": "source", + "type": "integer", + "required": true, + "description": "source index" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "bw-lcd", + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.drawSource(x, y, source [, flags])\n\nDisplays the name of the corresponding input as defined by the source at (x,y)\n\n@param x,y (positive numbers) starting coordinate\n\n@param source (number) source index\n\n@param flags (optional) please see the Lcd functions overview\n\n@status current Introduced in 2.0.0", + "source_line": 460 + }, + { + "id": "lcd.drawSwitch", + "doc_id": "lcd.draw-switch", + "symbol": "lcd.drawSwitch", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawSwitch(x, y, switch, flags)", + "summary": "Draw a text representation of switch at (x,y)", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "starting coordinate" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "starting coordinate" + }, + { + "name": "switch", + "type": "integer", + "required": true, + "description": "number of switch to display, negative number displays negated switch" + }, + { + "name": "flags", + "type": "integer", + "required": true, + "description": "please see the Lcd functions overview, only SMLSIZE, BLINK and INVERS." + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "bw-lcd", + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.drawSwitch(x, y, switch, flags)\n\nDraw a text representation of switch at (x,y)\n\n@param x,y (positive numbers) starting coordinate\n\n@param switch (number) number of switch to display, negative number\ndisplays negated switch\n\n@param flags (optional) please see the Lcd functions overview, only SMLSIZE, BLINK and INVERS.\n\n@status current Introduced in 2.0.0", + "source_line": 431 + }, + { + "id": "lcd.drawText", + "doc_id": "lcd.draw-text", + "symbol": "lcd.drawText", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawText(x, y, text [, flags [, inversColor]])", + "summary": "Draw a text beginning at (x,y)", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "starting coordinate" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "starting coordinate" + }, + { + "name": "text", + "type": "string", + "required": true, + "description": "text to display" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview for drawing flags and colors, and the Appendix for available characters in each font set." + }, + { + "name": "inversColor", + "type": "unknown", + "required": false, + "description": "overrides the inverse text color for INVERS" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "bw-lcd", + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.drawText(x, y, text [, flags])\n\nDraw a text beginning at (x,y)\n\n@param x,y (positive numbers) starting coordinate\n\n@param text (string) text to display\n\n@param flags (unsigned number) drawing flags. All values can be\ncombined together using the + character. ie BLINK + DBLSIZE.\nSee the [Appendix](../appendix/fonts.md) for available characters in each font set.\n * `0 or not specified` normal font\n * `XXLSIZE` jumbo sized font\n * `DBLSIZE` double size font\n * `MIDSIZE` mid sized font\n * `SMLSIZE` small font\n * `INVERS` inverted display\n * `BLINK` blinking text\n * `SHADOWED` Horus only, apply a shadow effect\n\n@status current Introduced in 2.0.0, `SHADOWED` introduced in 2.2.1", + "source_line": 224 + }, + { + "id": "lcd.drawTextLines", + "doc_id": "lcd.draw-text-lines", + "symbol": "lcd.drawTextLines", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawTextLines(x, y, w, h, text [, flags])", + "summary": "Draw text inside rectangle (x,y,w,h) with line breaks", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "starting coordinate" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "starting coordinate" + }, + { + "name": "w", + "type": "integer", + "required": true, + "description": "width and height of bounding rectangle" + }, + { + "name": "h", + "type": "integer", + "required": true, + "description": "width and height of bounding rectangle" + }, + { + "name": "text", + "type": "string", + "required": true, + "description": "text to display" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview for drawing flags and colors, and the Appendix for available characters in each font set. RIGHT, CENTER and VCENTER are not implemented." + } + ], + "returns": [ + { + "name": "x,y", + "type": "integer", + "description": "point where text drawing ended" + } + ], + "availability": { + "since": "2.5.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.drawTextLines(x, y, w, h, text [, flags])\n\nDraw text inside rectangle (x,y,w,h) with line breaks\n\n@param x,y (positive numbers) starting coordinate\n\n@param w,h (positive numbers) width and height of bounding rectangle\n\n@param text (string) text to display\n\n@param flags (optional) please see the Lcd functions overview for drawing flags and colors, and the Appendix for available characters in each font set. RIGHT, CENTER and VCENTER are not implemented.\n\n@retval x,y (integers) point where text drawing ended\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.5.0, return x,y added in 2.11.0", + "source_line": 271 + }, + { + "id": "lcd.drawTimer", + "doc_id": "lcd.draw-timer", + "symbol": "lcd.drawTimer", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawTimer(x, y, value [, flags [, inversColor]])", + "summary": "Display a value formatted as time at (x,y)", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "starting coordinate" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "starting coordinate" + }, + { + "name": "value", + "type": "integer", + "required": true, + "description": "time in seconds" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + }, + { + "name": "inversColor", + "type": "unknown", + "required": false, + "description": "overrides the inverse text color for INVERS" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "bw-lcd", + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.drawTimer(x, y, value [, flags])\n\nDisplay a value formatted as time at (x,y)\n\n@param x,y (positive numbers) starting coordinate\n\n@param value (number) time in seconds\n\n@param flags (unsigned number) drawing flags:\n * `0 or not specified` normal representation (minutes and seconds)\n * `TIMEHOUR` display hours\n * other general LCD flag also apply\n * `SHADOWED` Horus only, apply a shadow effect\n\n@status current Introduced in 2.0.0, `SHADOWED` introduced in 2.2.1", + "source_line": 338 + }, + { + "id": "lcd.drawTriangle", + "doc_id": "lcd.draw-triangle", + "symbol": "lcd.drawTriangle", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.drawTriangle(x1, y1, x2, y2, x3, y3 [, flags])", + "summary": "Draw a triangle", + "parameters": [ + { + "name": "x1", + "type": "integer", + "required": true, + "description": "coordinates of the three vertices" + }, + { + "name": "y1", + "type": "integer", + "required": true, + "description": "coordinates of the three vertices" + }, + { + "name": "x2", + "type": "integer", + "required": true, + "description": "coordinates of the three vertices" + }, + { + "name": "y2", + "type": "integer", + "required": true, + "description": "coordinates of the three vertices" + }, + { + "name": "x3", + "type": "integer", + "required": true, + "description": "coordinates of the three vertices" + }, + { + "name": "y3", + "type": "integer", + "required": true, + "description": "coordinates of the three vertices" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + } + ], + "returns": [], + "availability": { + "since": "2.4.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.drawTriangle(x1, y1, x2, y2, x3, y3 [, flags])\n\nDraw a triangle\n\n@param x1,y1,x2,y2,x3,y3 (positive numbers) coordinates of the three vertices\n\n@param flags (optional) please see the Lcd functions overview\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.4.0", + "source_line": 1080 + }, + { + "id": "lcd.exitFullScreen", + "doc_id": "lcd.exit-full-screen", + "symbol": "lcd.exitFullScreen", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.exitFullScreen()", + "summary": "Exit full screen widget mode.", + "parameters": [], + "returns": [], + "availability": { + "since": "2.5.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.exitFullScreen()\n\nExit full screen widget mode.\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.5.0", + "source_line": 1400 + }, + { + "id": "lcd.getColor", + "doc_id": "lcd.get-color", + "symbol": "lcd.getColor", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.getColor(flags)", + "summary": "Get the color value from flags", + "parameters": [ + { + "name": "flags", + "type": "integer", + "required": true, + "description": "please see the Lcd functions overview" + } + ], + "returns": [ + { + "name": "color", + "type": "integer", + "description": "only the RGB565 color value of the input" + } + ], + "availability": { + "since": "2.3.11", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.getColor(flags)\n\nGet the color value from flags\n\n@param flags (flags) please see the Lcd functions overview\n\n@retval color (flag) only the RGB565 color value of the input\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.3.11", + "source_line": 955 + }, + { + "id": "lcd.getLastLeftPos", + "doc_id": "lcd.get-last-left-pos", + "symbol": "lcd.getLastLeftPos", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.getLastLeftPos()", + "summary": "Returns the leftmost x position from previous drawtext or drawNumber output", + "parameters": [], + "returns": [ + { + "name": "number", + "type": "integer", + "description": "x position" + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "bw-lcd" + ] + }, + "notes": [ + "Only available on Taranis" + ], + "source_location": "radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.getLastLeftPos()\n\nReturns the leftmost x position from previous drawtext or drawNumber output\n\n@retval number (integer) x position\n\n@notice Only available on Taranis\n\n@status current Introduced in 2.2.0", + "source_line": 188 + }, + { + "id": "lcd.getLastPos", + "doc_id": "lcd.get-last-pos", + "symbol": "lcd.getLastPos", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.getLastPos()", + "summary": "Returns the rightmost x position from previous output", + "parameters": [], + "returns": [ + { + "name": "number", + "type": "integer", + "description": "x position" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "bw-lcd" + ] + }, + "notes": [ + "Only available on Taranis", + "For added clarity, it is recommended to use lcd.getLastRightPos()" + ], + "source_location": "radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.getLastPos()\n\nReturns the rightmost x position from previous output\n\n@retval number (integer) x position\n\n@notice Only available on Taranis\n\n@notice For added clarity, it is recommended to use lcd.getLastRightPos()\n\n@status current Introduced in 2.0.0", + "source_line": 154 + }, + { + "id": "lcd.getLastRightPos", + "doc_id": "lcd.get-last-right-pos", + "symbol": "lcd.getLastRightPos", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.getLastRightPos()", + "summary": "Returns the rightest x position from previous drawtext or drawNumber output", + "parameters": [], + "returns": [ + { + "name": "number", + "type": "integer", + "description": "x position" + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "bw-lcd" + ] + }, + "notes": [ + "Only available on Taranis", + "This is strictly equivalent to former lcd.getLastPos()" + ], + "source_location": "radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.getLastRightPos()\n\nReturns the rightest x position from previous drawtext or drawNumber output\n\n@retval number (integer) x position\n\n@notice Only available on Taranis\n\n@notice This is strictly equivalent to former lcd.getLastPos()\n\n@status current Introduced in 2.2.0", + "source_line": 168 + }, + { + "id": "lcd.invertRect", + "doc_id": "lcd.invert-rect", + "symbol": "lcd.invertRect", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.invertRect(x, y, w, h [, flags])", + "summary": "Invert a rectangle zone from top left corner (x,y) of specified width and height", + "parameters": [ + { + "name": "x", + "type": "integer", + "required": true, + "description": "top left corner position" + }, + { + "name": "y", + "type": "integer", + "required": true, + "description": "top left corner position" + }, + { + "name": "w", + "type": "integer", + "required": true, + "description": "width in pixels" + }, + { + "name": "h", + "type": "integer", + "required": true, + "description": "height in pixels" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + } + ], + "returns": [], + "availability": { + "since": "2.8.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.invertRect(x, y, w, h [, flags])\n\nInvert a rectangle zone from top left corner (x,y) of specified width and height\n\n@param x,y (positive numbers) top left corner position\n\n@param w (number) width in pixels\n\n@param h (number) height in pixels\n\n@param flags (optional) please see the Lcd functions overview\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.8.0", + "source_line": 857 + }, + { + "id": "lcd.refresh", + "doc_id": "lcd.refresh", + "symbol": "lcd.refresh", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.refresh()", + "summary": "Refresh the LCD screen", + "parameters": [], + "returns": [], + "availability": { + "since": "2.2.0", + "radios": [ + "bw-lcd", + "color-lcd" + ] + }, + "notes": [ + "This function only works in stand-alone and telemetry scripts." + ], + "source_location": "radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.refresh()\n\nRefresh the LCD screen\n\nFrom 2.4.0 on color LCDs, this is done automatically when the screen\nneeds to be refreshed (on events and depending on refresh period).\n\n@status current Only used on non-color LCDs.", + "source_line": 39 + }, + { + "id": "lcd.resetBacklightTimeout", + "doc_id": "lcd.reset-backlight-timeout", + "symbol": "lcd.resetBacklightTimeout", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.resetBacklightTimeout()", + "summary": "Reset the backlight timeout", + "parameters": [], + "returns": [], + "availability": { + "since": "2.3.6", + "radios": [ + "bw-lcd", + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp", + "raw_luadoc": "@function lcd.resetBacklightTimeout()\n\nReset the backlight timeout\n\n@status current Introduced in 2.3.6", + "source_line": 76 + }, + { + "id": "lcd.setColor", + "doc_id": "lcd.set-color", + "symbol": "lcd.setColor", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.setColor(colorIndex, color)", + "summary": "Change an indexed color (theme colors and CUSTOM_COLOR). Please see the Lcd functions overview for indexed color constants", + "parameters": [], + "returns": [], + "availability": { + "since": "2.2.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.setColor(colorIndex, color)\n\nChange an indexed color (theme colors and CUSTOM_COLOR). Please see the Lcd functions overview for indexed color constants\n\nPlease notice that changing theme colors affects not only other Lua widgets, but the entire radio interface.\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.2.0", + "source_line": 932 + }, + { + "id": "lcd.sizeText", + "doc_id": "lcd.size-text", + "symbol": "lcd.sizeText", + "aliases": [], + "deprecated_aliases": [], + "module": "lcd", + "kind": "function", + "syntax": "lcd.sizeText(text [, flags])", + "summary": "Get the width and height of a text string drawn with flags", + "parameters": [ + { + "name": "text", + "type": "string", + "required": true, + "description": "" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "please see the Lcd functions overview" + } + ], + "returns": [ + { + "name": "w,h", + "type": "integer", + "description": "width and height of the text" + } + ], + "availability": { + "since": "2.5.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_colorlcd.cpp", + "raw_luadoc": "@function lcd.sizeText(text [, flags])\n\nGet the width and height of a text string drawn with flags\n\n@param text (string)\n\n@param flags (optional) please see the Lcd functions overview\n\n@retval w,h (integers) width and height of the text\n\n@notice Only available on radios with color display\n\n@status current Introduced in 2.5.0", + "source_line": 247 + }, + { + "id": "loadScript", + "doc_id": "runtime.load-script", + "symbol": "loadScript", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "loadScript(file [, mode], [,env])", + "summary": "Load a Lua script file. This is similar to Lua's own [loadfile()](https://www.lua.org/manual/5.2/manual.html#pdf-loadfile)\nAPI method, but it uses OpenTx's optional pre-compilation feature to save memory and time during load.", + "parameters": [ + { + "name": "file", + "type": "string", + "required": true, + "description": "Full path and file name of script. The file extension is optional and ignored (see `mode` param to control which extension will be used). However, if an extension is specified, it should be \".lua\" (or \".luac\"), otherwise it is treated\n as part of the file name and the .lua/.luac will be appended to that." + }, + { + "name": "mode", + "type": "string", + "required": false, + "description": "(optional) Controls whether to force loading the text (.lua) or pre-compiled binary (.luac) version of the script. By default ETX will load the newest version and compile a new binary if necessary (overwriting any\n existing .luac version of the same script, and stripping some debug info like line numbers).\n You can use `mode` to control the loading behavior more specifically. Possible values are:\n * `b` only binary.\n * `t` only text.\n * `T` (default on simulator) prefer text but load binary if that is the only version available.\n * `bt` (default on radio) either binary or text, whichever is newer (binary preferred when timestamps are equal).\n * Add `x` to avoid automatic compilation of source file to .luac version.\n Eg: \"tx\", \"bx\", or \"btx\".\n * Add `c` to force compilation of source file to .luac version (even if existing version is newer than source file).\n Eg: \"tc\" or \"btc\" (forces \"t\", overrides \"x\").\n * Add `d` to keep extra debug info in the compiled binary.\n Eg: \"td\", \"btd\", or \"tcd\" (no effect with just \"b\" or with \"x\")." + }, + { + "name": "env", + "type": "integer", + "required": false, + "description": "See documentation for Lua function loadfile()." + } + ], + "returns": [ + { + "name": "", + "type": "function|nil", + "description": "The loaded script, or `nil` if there was an error (e.g. file not found or syntax error)." + }, + { + "name": "", + "type": "string|nil", + "description": "Error message(s), if any. Blank if no error occurred." + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "all" + ] + }, + "notes": [ + "Note that you will get an error if you specify `mode` as \"b\" or \"t\" and that specific version of the file does not exist (eg. no .luac file when \"b\" is used).\n Also note that `mode` is NOT passed on to Lua's loader function, so unlike with loadfile() the actual file content is not checked (as if no mode or \"bt\" were passed to loadfile())." + ], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function loadScript(file [, mode], [,env])\n\nLoad a Lua script file. This is similar to Lua's own [loadfile()](https://www.lua.org/manual/5.2/manual.html#pdf-loadfile)\nAPI method, but it uses OpenTx's optional pre-compilation feature to save memory and time during load.\n\nReturn values are same as from Lua API loadfile() method: If the script was loaded w/out errors\nthen the loaded script (or \"chunk\") is returned as a function. Otherwise, returns nil plus the error message.\n\n@param file (string) Full path and file name of script. The file extension is optional and ignored (see `mode` param to control\n which extension will be used). However, if an extension is specified, it should be \".lua\" (or \".luac\"), otherwise it is treated\n as part of the file name and the .lua/.luac will be appended to that.\n\n@param mode (string) (optional) Controls whether to force loading the text (.lua) or pre-compiled binary (.luac)\n version of the script. By default ETX will load the newest version and compile a new binary if necessary (overwriting any\n existing .luac version of the same script, and stripping some debug info like line numbers).\n You can use `mode` to control the loading behavior more specifically. Possible values are:\n * `b` only binary.\n * `t` only text.\n * `T` (default on simulator) prefer text but load binary if that is the only version available.\n * `bt` (default on radio) either binary or text, whichever is newer (binary preferred when timestamps are equal).\n * Add `x` to avoid automatic compilation of source file to .luac version.\n Eg: \"tx\", \"bx\", or \"btx\".\n * Add `c` to force compilation of source file to .luac version (even if existing version is newer than source file).\n Eg: \"tc\" or \"btc\" (forces \"t\", overrides \"x\").\n * Add `d` to keep extra debug info in the compiled binary.\n Eg: \"td\", \"btd\", or \"tcd\" (no effect with just \"b\" or with \"x\").\n\n@notice\n Note that you will get an error if you specify `mode` as \"b\" or \"t\" and that specific version of the file does not exist (eg. no .luac file when \"b\" is used).\n Also note that `mode` is NOT passed on to Lua's loader function, so unlike with loadfile() the actual file content is not checked (as if no mode or \"bt\" were passed to loadfile()).\n\n@param env (integer) See documentation for Lua function loadfile().\n\n@retval function The loaded script, or `nil` if there was an error (e.g. file not found or syntax error).\n\n@retval string Error message(s), if any. Blank if no error occurred.\n\n@status current Introduced in 2.2.0\n\n### Example\n\n```lua\n fun, err = loadScript(\"/SCRIPTS/FUNCTIONS/print.lua\")\n if (fun ~= nil) then\n fun(\"Hello from loadScript()\")\n else\n print(err)\n end\n```", + "source_line": 2111 + }, + { + "id": "lvgl.align", + "doc_id": "lvgl.align", + "symbol": "lvgl.align", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.align([parent, ]params)", + "summary": "Display a button showing a text alignment name. Tapping it opens a popup menu to choose an alignment from, using EdgeTX styling.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected alignment, defaults to nil\n * `set` (function) called when the user taps an alignment in the popup; passed the selected alignment value, defaults to nil" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.align([parent, ]params)\n\n Display a button showing a text alignment name. Tapping it opens a popup menu to choose an alignment from, using EdgeTX styling.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected alignment, defaults to nil\n * `set` (function) called when the user taps an alignment in the popup; passed the selected alignment value, defaults to nil\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`.\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 1048 + }, + { + "id": "lvgl.arc", + "doc_id": "lvgl.arc", + "symbol": "lvgl.arc", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.arc([parent, ]params)", + "summary": "Display an arc.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `thickness` (number) width of the arc's line, defaults to 1\n * `radius` (number or function) radius of the arc, defaults to 0\n * `startAngle` (number or function) starting angle in degrees (0-360), 0 is 3 o'clock, defaults to 0\n * `endAngle` (number or function) ending angle in degrees, defaults to 360\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n * `rounded` (boolean) if true the ends of the arc are rounded, defaults to false\n * `bgColor` (color or function) color of the background arc, not used by default\n * `bgOpacity` (number or function) opacity of the background arc, defaults to 0 (not visible)\n * `bgStartAngle` (number or function) starting angle of the background arc in degrees, defaults to 0\n * `bgEndAngle` (number or function) ending angle of the background arc in degrees, defaults to 360" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Arc objects have two elements, a foreground arc and a background arc. By default the background arc is not shown -- to show it, set both `bgColor` and `bgOpacity`.\n @notice If `opacity` or `bgOpacity` is less than 255 and `rounded` is true, the ends of the arc will not draw correctly. This is an LVGL limitation." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.arc([parent, ]params)\n\n Display an arc.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n `w`, `h`, and `size` should not be used with `lvgl.arc` -- use `radius` instead.\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `thickness` (number) width of the arc's line, defaults to 1\n * `radius` (number or function) radius of the arc, defaults to 0\n * `startAngle` (number or function) starting angle in degrees (0-360), 0 is 3 o'clock, defaults to 0\n * `endAngle` (number or function) ending angle in degrees, defaults to 360\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n * `rounded` (boolean) if true the ends of the arc are rounded, defaults to false\n * `bgColor` (color or function) color of the background arc, not used by default\n * `bgOpacity` (number or function) opacity of the background arc, defaults to 0 (not visible)\n * `bgStartAngle` (number or function) starting angle of the background arc in degrees, defaults to 0\n * `bgEndAngle` (number or function) ending angle of the background arc in degrees, defaults to 360\n\n @retval table LVGL object\n\n @notice Arc objects have two elements, a foreground arc and a background arc. By default the background arc is not shown -- to show it, set both `bgColor` and `bgOpacity`.\n @notice If `opacity` or `bgOpacity` is less than 255 and `rounded` is true, the ends of the arc will not draw correctly. This is an LVGL limitation.\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 765 + }, + { + "id": "lvgl.box", + "doc_id": "lvgl.box", + "symbol": "lvgl.box", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.box([parent, ]params)", + "summary": "Create a container for managing object layout.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default\n * `flexPad` (number) padding between rows/columns when flex layout is used; recommend using `lvgl.PAD_xxx` values, defaults to `PAD_OUTLINE`\n * `scrollBar` (boolean) enables/disables scroll bars, defaults to true\n * `scrollDir` (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the box bounds (stand alone scripts only), defaults to `lvgl.SCROLL_ALL`\n * `scrolled` (function) called when the box content is scrolled; passed `x`, `y` of the current scroll position, defaults to nil\n * `scrollTo` (function) overrides the box scroll position; must return `x`, `y` to scroll to, defaults to nil\n * `align` (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4); avoid combining an alignment with a scrollbar on the same axis, defaults to `CENTER | VTOP`\n * `borderPad` (number or table) border padding around the container edges; a single number applies to all sides, or a table `{left=?, right=?, top=?, bottom=?}` (added in 2.11.5), defaults to `PAD_OUTLINE` if `flexFlow` is set, otherwise 0" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "The box is a helper for managing screen layouts.\n @notice When adding controls such as button/toggle/textEdit, leave enough space around them for the focus outline.\n @notice In a stand alone tool script, the box automatically adds scroll bars if child objects fall outside its boundaries; for widgets, out-of-bounds children are clipped instead.\n @notice `scrollBar`, `scrollDir`, `scrolled`, and `scrollTo` were added in 2.11.2." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.box([parent, ]params)\n\n Create a container for managing object layout.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default\n * `flexPad` (number) padding between rows/columns when flex layout is used; recommend using `lvgl.PAD_xxx` values, defaults to `PAD_OUTLINE`\n * `scrollBar` (boolean) enables/disables scroll bars, defaults to true\n * `scrollDir` (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the box bounds (stand alone scripts only), defaults to `lvgl.SCROLL_ALL`\n * `scrolled` (function) called when the box content is scrolled; passed `x`, `y` of the current scroll position, defaults to nil\n * `scrollTo` (function) overrides the box scroll position; must return `x`, `y` to scroll to, defaults to nil\n * `align` (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4); avoid combining an alignment with a scrollbar on the same axis, defaults to `CENTER | VTOP`\n * `borderPad` (number or table) border padding around the container edges; a single number applies to all sides, or a table `{left=?, right=?, top=?, bottom=?}` (added in 2.11.5), defaults to `PAD_OUTLINE` if `flexFlow` is set, otherwise 0\n\n @retval table LVGL object\n\n @notice The box is a helper for managing screen layouts.\n @notice When adding controls such as button/toggle/textEdit, leave enough space around them for the focus outline.\n @notice In a stand alone tool script, the box automatically adds scroll bars if child objects fall outside its boundaries; for widgets, out-of-bounds children are clipped instead.\n @notice `scrollBar`, `scrollDir`, `scrolled`, and `scrollTo` were added in 2.11.2.\n\n @status current Introduced in 2.11.0, align added in 2.11.4, borderPad added in 2.11.5, floating added in 2.11.6, scrollBar/scrollDir/scrolled/scrollTo added in 2.11.2", + "source_line": 1185 + }, + { + "id": "lvgl.build", + "doc_id": "lvgl.build", + "symbol": "lvgl.build", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.build([parent, ]params)", + "summary": "Build a complex UI in a single operation from a table of object definitions.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the built objects to; if omitted they attach to the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "a table of tables, each defining one LVGL object:\n* `type` (string or type constant) mandatory, selects the kind of object to create, e.g. `\"rectangle\"` or `lvgl.RECTANGLE`; named type constants (e.g. `lvgl.RECTANGLE`) added in 2.11.4, string names work in all versions\n * `name` (string) optional name used to look up this object in the returned table, defaults to an empty string\n * `children` (table) optional nested table of the same shape, to create child objects\n * any other key accepted by the constructor function for the chosen `type`" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "named LVGL objects (only entries whose definition included a `name` are included)" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Objects can be nested via `children`, another table of tables using the same shape as the top-level `params`.\n@notice Very large or deeply nested tables may fail to compile to `.luac` -- if a script works from `.lua` but fails from `.luac`, split the call into multiple smaller `lvgl.build()` calls." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.build([parent, ]params)\n\nBuild a complex UI in a single operation from a table of object definitions.\n\n@param parent (object) optional LVGL object to attach the built objects to; if omitted they attach to the top-level script window\n\n@param params (table) a table of tables, each defining one LVGL object:\n * `type` (string or type constant) mandatory, selects the kind of object to create, e.g. `\"rectangle\"` or `lvgl.RECTANGLE`; named type constants (e.g. `lvgl.RECTANGLE`) added in 2.11.4, string names work in all versions\n * `name` (string) optional name used to look up this object in the returned table, defaults to an empty string\n * `children` (table) optional nested table of the same shape, to create child objects\n * any other key accepted by the constructor function for the chosen `type`\n\n@retval table named LVGL objects (only entries whose definition included a `name` are included)\n\n@notice Objects can be nested via `children`, another table of tables using the same shape as the top-level `params`.\n@notice Very large or deeply nested tables may fail to compile to `.luac` -- if a script works from `.lua` but fails from `.luac`, split the call into multiple smaller `lvgl.build()` calls.\n\n@status current Introduced in 2.11.0, named type constants added in 2.11.4", + "source_line": 453 + }, + { + "id": "lvgl.button", + "doc_id": "lvgl.button", + "symbol": "lvgl.button", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.button([parent, ]params)", + "summary": "Add a text button using the EdgeTX style.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `text` (string or function) text displayed in the button, defaults to an empty string\n * `press` (function) called when the user taps the button, after releasing ENTER or the screen; may optionally return a non-zero integer to display the button in the checked state, defaults to nil\n * `longpress` (function) called on a long tap; may optionally return a non-zero integer to display the button in the checked state, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `checked` (boolean) sets the initial checked state; can be updated with `lvgl.set()`, defaults to false\n * `color` (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color\n * `textColor` (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color\n * `cornerRadius` (number) radius for the button's corners, defaults to the EdgeTX button style radius\n * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE`" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.button([parent, ]params)\n\n Add a text button using the EdgeTX style.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `text` (string or function) text displayed in the button, defaults to an empty string\n * `press` (function) called when the user taps the button, after releasing ENTER or the screen; may optionally return a non-zero integer to display the button in the checked state, defaults to nil\n * `longpress` (function) called on a long tap; may optionally return a non-zero integer to display the button in the checked state, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `checked` (boolean) sets the initial checked state; can be updated with `lvgl.set()`, defaults to false\n * `color` (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color\n * `textColor` (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color\n * `cornerRadius` (number) radius for the button's corners, defaults to the EdgeTX button style radius\n * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE`\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 834 + }, + { + "id": "lvgl.choice", + "doc_id": "lvgl.choice", + "symbol": "lvgl.choice", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.choice([parent, ]params)", + "summary": "Display a button showing an option value. Tapping it opens a popup menu of options to choose from, using EdgeTX styling.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `title` (string) text displayed in the popup menu's header, defaults to an empty string\n * `values` (table) simple table of option strings shown in the popup; can be changed via `lvgl.set()` since 2.11.6, defaults to an empty list\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the index of the currently selected option (1..number of values), defaults to nil\n * `set` (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `filter` (function) called for each option when the popup opens, passed the option's index; return true to show it, false to hide it, defaults to nil\n * `popupWidth` (number) width of the popup window, defaults to 0 (use default width)" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.choice([parent, ]params)\n\n Display a button showing an option value. Tapping it opens a popup menu of options to choose from, using EdgeTX styling.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `title` (string) text displayed in the popup menu's header, defaults to an empty string\n * `values` (table) simple table of option strings shown in the popup; can be changed via `lvgl.set()` since 2.11.6, defaults to an empty list\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the index of the currently selected option (1..number of values), defaults to nil\n * `set` (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `filter` (function) called for each option when the popup opens, passed the option's index; return true to show it, false to hide it, defaults to nil\n * `popupWidth` (number) width of the popup window, defaults to 0 (use default width)\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`.\n\n @status current Introduced in 2.11.0, values updatable via lvgl.set() added in 2.11.6, floating added in 2.11.6", + "source_line": 952 + }, + { + "id": "lvgl.circle", + "doc_id": "lvgl.circle", + "symbol": "lvgl.circle", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.circle([parent, ]params)", + "summary": "Display a solid or outlined circle.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `thickness` (number) width of the border line, defaults to 1\n * `filled` (boolean) if true the circle is filled with `color`, defaults to false\n * `radius` (number or function) radius of the circle, defaults to 0\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.circle([parent, ]params)\n\n Display a solid or outlined circle.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n `w`, `h`, and `size` should not be used with `lvgl.circle` -- use `radius` instead.\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `thickness` (number) width of the border line, defaults to 1\n * `filled` (boolean) if true the circle is filled with `color`, defaults to false\n * `radius` (number or function) radius of the circle, defaults to 0\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n\n @retval table LVGL object\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 744 + }, + { + "id": "lvgl.clear", + "doc_id": "lvgl.clear", + "symbol": "lvgl.clear", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.clear([parent])", + "summary": "Delete LVGL objects.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object whose children should be deleted; if omitted, the entire script UI is deleted" + } + ], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "If `parent` is not set, the entire script UI is deleted -- use this when the UI changes dramatically (e.g. widget size changes).\n@notice If `parent` is set, only its child LVGL objects are deleted -- use this to remove and replace a specific set of objects." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.clear([parent])\n\nDelete LVGL objects.\n\n@param parent (object) optional LVGL object whose children should be deleted; if omitted, the entire script UI is deleted\n\n@retval none\n\n@notice If `parent` is not set, the entire script UI is deleted -- use this when the UI changes dramatically (e.g. widget size changes).\n@notice If `parent` is set, only its child LVGL objects are deleted -- use this to remove and replace a specific set of objects.\n\n@status current Introduced in 2.11.0", + "source_line": 138 + }, + { + "id": "lvgl.close", + "doc_id": "lvgl.close", + "symbol": "lvgl.close", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.close(obj)", + "summary": "Close an LVGL object that represents a closable container or dialog.", + "parameters": [ + { + "name": "obj", + "type": "object", + "required": true, + "description": "LVGL object previously created by the `lvgl` library" + } + ], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.close(obj)\n\nClose an LVGL object that represents a closable container or dialog.\n\n@param obj (object) LVGL object previously created by the `lvgl` library\n\n@retval none\n\n@status current Introduced in 2.11.0", + "source_line": 252 + }, + { + "id": "lvgl.color", + "doc_id": "lvgl.color", + "symbol": "lvgl.color", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.color([parent, ]params)", + "summary": "Display a button showing a color swatch. Tapping it opens the color picker dialog, using EdgeTX styling.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called once when the object is created, to get the initial color, defaults to nil\n * `set` (function) called when the user picks a color; passed the selected color value, defaults to nil" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects a color.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.color([parent, ]params)\n\n Display a button showing a color swatch. Tapping it opens the color picker dialog, using EdgeTX styling.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called once when the object is created, to get the initial color, defaults to nil\n * `set` (function) called when the user picks a color; passed the selected color value, defaults to nil\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects a color.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`.\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 1069 + }, + { + "id": "lvgl.confirm", + "doc_id": "lvgl.confirm", + "symbol": "lvgl.confirm", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.confirm(params)", + "summary": "Display a Yes/No confirmation dialog box.", + "parameters": [ + { + "name": "params", + "type": "table", + "required": true, + "description": "* `title` (string) text displayed in the dialog's header, defaults to an empty string\n * `message` (string) text displayed in the dialog's body, defaults to an empty string\n * `confirm` (function) called when the user taps Yes, defaults to nil\n * `cancel` (function) called when the user taps No, defaults to nil" + } + ], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.confirm` -- only the settings listed above apply." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.confirm(params)\n\n Display a Yes/No confirmation dialog box.\n\n @param params (table):\n * `title` (string) text displayed in the dialog's header, defaults to an empty string\n * `message` (string) text displayed in the dialog's body, defaults to an empty string\n * `confirm` (function) called when the user taps Yes, defaults to nil\n * `cancel` (function) called when the user taps No, defaults to nil\n\n @retval none\n\n @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.confirm` -- only the settings listed above apply.\n\n @status current Introduced in 2.11.0", + "source_line": 1285 + }, + { + "id": "lvgl.dialog", + "doc_id": "lvgl.dialog", + "symbol": "lvgl.dialog", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.dialog(params)", + "summary": "Display a dialog box.", + "parameters": [ + { + "name": "params", + "type": "table", + "required": true, + "description": "* `title` (string) text displayed in the dialog's header, defaults to an empty string\n * `close` (function) called when the dialog is closed, defaults to nil\n * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default\n * `flexPad` (number) padding between rows/columns when flex layout is used, defaults to `PAD_OUTLINE`" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.dialog` -- only the settings listed above apply." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.dialog(params)\n\n Display a dialog box.\n\n @param params (table):\n * `title` (string) text displayed in the dialog's header, defaults to an empty string\n * `close` (function) called when the dialog is closed, defaults to nil\n * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default\n * `flexPad` (number) padding between rows/columns when flex layout is used, defaults to `PAD_OUTLINE`\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.dialog` -- only the settings listed above apply.\n\n @status current Introduced in 2.11.0", + "source_line": 1265 + }, + { + "id": "lvgl.disable", + "doc_id": "lvgl.disable", + "symbol": "lvgl.disable", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.disable(obj)", + "summary": "Disable interaction for an LVGL control object.", + "parameters": [ + { + "name": "obj", + "type": "object", + "required": true, + "description": "LVGL object previously created by the `lvgl` library" + } + ], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.disable(obj)\n\nDisable interaction for an LVGL control object.\n\n@param obj (object) LVGL object previously created by the `lvgl` library\n\n@retval none\n\n@status current Introduced in 2.11.0", + "source_line": 232 + }, + { + "id": "lvgl.enable", + "doc_id": "lvgl.enable", + "symbol": "lvgl.enable", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.enable(obj)", + "summary": "Enable interaction for an LVGL control object.", + "parameters": [ + { + "name": "obj", + "type": "object", + "required": true, + "description": "LVGL object previously created by the `lvgl` library" + } + ], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.enable(obj)\n\nEnable interaction for an LVGL control object.\n\n@param obj (object) LVGL object previously created by the `lvgl` library\n\n@retval none\n\n@status current Introduced in 2.11.0", + "source_line": 212 + }, + { + "id": "lvgl.exitFullScreen", + "doc_id": "lvgl.exit-full-screen", + "symbol": "lvgl.exitFullScreen", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.exitFullScreen()", + "summary": "If the script is running in full screen mode, return it to normal mode.", + "parameters": [], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.exitFullScreen()\n\nIf the script is running in full screen mode, return it to normal mode.\n\n@retval none\n\n@status current Introduced in 2.11.0", + "source_line": 538 + }, + { + "id": "lvgl.file", + "doc_id": "lvgl.file", + "symbol": "lvgl.file", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.file([parent, ]params)", + "summary": "Display a button showing a filename. Tapping it opens a popup file picker, using EdgeTX styling.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `title` (string) text displayed in the popup's header, defaults to an empty string\n * `get` (function) called when the popup is opened, and after the selection changes, to get the currently selected filename; must return a string, defaults to nil\n * `set` (function) called when the user picks a file; passed the selected filename (without path), defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `folder` (string) SD card folder to browse for files, defaults to nil\n * `extension` (string) extension filter, e.g. `.png` or concatenated `.png.bmp` to match multiple, defaults to nil (no filter)\n * `hideExtension` (boolean) if true, the extension is stripped before `set` is called and hidden in the picker list, defaults to false\n * `maxLen` (number) maximum filename length (measured after `hideExtension` stripping, if set); files with longer names are not shown in the picker list, defaults to 255" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user picks a file.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.file([parent, ]params)\n\n Display a button showing a filename. Tapping it opens a popup file picker, using EdgeTX styling.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `title` (string) text displayed in the popup's header, defaults to an empty string\n * `get` (function) called when the popup is opened, and after the selection changes, to get the currently selected filename; must return a string, defaults to nil\n * `set` (function) called when the user picks a file; passed the selected filename (without path), defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `folder` (string) SD card folder to browse for files, defaults to nil\n * `extension` (string) extension filter, e.g. `.png` or concatenated `.png.bmp` to match multiple, defaults to nil (no filter)\n * `hideExtension` (boolean) if true, the extension is stripped before `set` is called and hidden in the picker list, defaults to false\n * `maxLen` (number) maximum filename length (measured after `hideExtension` stripping, if set); files with longer names are not shown in the picker list, defaults to 255\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user picks a file.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`.\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 1157 + }, + { + "id": "lvgl.font", + "doc_id": "lvgl.font", + "symbol": "lvgl.font", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.font([parent, ]params)", + "summary": "Display a button showing a font name. Tapping it opens a popup menu to choose a font from, using EdgeTX styling.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected font, defaults to nil\n * `set` (function) called when the user taps a font in the popup; passed the selected font value, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.font([parent, ]params)\n\n Display a button showing a font name. Tapping it opens a popup menu to choose a font from, using EdgeTX styling.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected font, defaults to nil\n * `set` (function) called when the user taps a font in the popup; passed the selected font value, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`.\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 1026 + }, + { + "id": "lvgl.getContext", + "doc_id": "lvgl.get-context", + "symbol": "lvgl.getContext", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.getContext()", + "summary": "For a widget script, returns the local instance table created by (and returned from) the script's `create()` function.", + "parameters": [], + "returns": [ + { + "name": "", + "type": "table", + "description": "the widget instance's local data table, or nil for stand alone tool scripts" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.getContext()\n\nFor a widget script, returns the local instance table created by (and returned from) the script's `create()` function.\n\n@retval table the widget instance's local data table, or nil for stand alone tool scripts\n\n@status current Introduced in 2.11.0", + "source_line": 554 + }, + { + "id": "lvgl.getScrollPos", + "doc_id": "lvgl.get-scroll-pos", + "symbol": "lvgl.getScrollPos", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.getScrollPos(parent)", + "summary": "Get the current scroll position of a container object.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": true, + "description": "LVGL container object (e.g. `box`, `rectangle`, or `page`)" + } + ], + "returns": [ + { + "name": "number,", + "type": "unknown", + "description": "number the X and Y scroll position of the container's top-left corner" + } + ], + "availability": { + "since": "2.11.2", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only applies to container objects such as `box`, `rectangle`, and `page`." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.getScrollPos(parent)\n\nGet the current scroll position of a container object.\n\n@param parent (object) LVGL container object (e.g. `box`, `rectangle`, or `page`)\n\n@retval number, number the X and Y scroll position of the container's top-left corner\n\n@notice Only applies to container objects such as `box`, `rectangle`, and `page`.\n\n@status current Introduced in 2.11.2", + "source_line": 574 + }, + { + "id": "lvgl.hide", + "doc_id": "lvgl.hide", + "symbol": "lvgl.hide", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.hide(parent)", + "summary": "Hide an LVGL object.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": true, + "description": "LVGL object to hide" + } + ], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "The `visible` setting function can also be used to dynamically show and hide objects." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.hide(parent)\n\nHide an LVGL object.\n\n@param parent (object) LVGL object to hide\n\n@retval none\n\n@notice The `visible` setting function can also be used to dynamically show and hide objects.\n\n@status current Introduced in 2.11.0", + "source_line": 190 + }, + { + "id": "lvgl.hline", + "doc_id": "lvgl.hline", + "symbol": "lvgl.hline", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.hline([parent, ]params)", + "summary": "Display a horizontal line.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `rounded` (boolean) if true the line's end caps are rounded, defaults to false\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n * `dashGap` (number) gap size for dashed lines, defaults to 0\n * `dashWidth` (number) dash size for dashed lines, defaults to 0; both `dashGap` and `dashWidth` must be > 0 to draw dashed lines" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.hline([parent, ]params)\n\n Display a horizontal line.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n `w` sets the length of the line; `h` sets its thickness.\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `rounded` (boolean) if true the line's end caps are rounded, defaults to false\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n * `dashGap` (number) gap size for dashed lines, defaults to 0\n * `dashWidth` (number) dash size for dashed lines, defaults to 0; both `dashGap` and `dashWidth` must be > 0 to draw dashed lines\n\n @retval table LVGL object\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 660 + }, + { + "id": "lvgl.image", + "doc_id": "lvgl.image", + "symbol": "lvgl.image", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.image([parent, ]params)", + "summary": "Display an image, centered in the frame `(x, y, w, h)`. Images can be scaled to fit entirely within the frame or to fill it completely.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `file` (string) full path to the image file on the SD card, defaults to an empty string\n * `fill` (boolean) if true the image is scaled to completely fill the frame (may be cropped); if false it is scaled to fit entirely within the frame (may have empty borders), defaults to false" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "`w` and `h` are required." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.image([parent, ]params)\n\n Display an image, centered in the frame `(x, y, w, h)`. Images can be scaled to fit entirely within the frame or to fill it completely.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `file` (string) full path to the image file on the SD card, defaults to an empty string\n * `fill` (boolean) if true the image is scaled to completely fill the frame (may be cropped); if false it is scaled to fit entirely within the frame (may have empty borders), defaults to false\n\n @retval table LVGL object\n\n @notice `w` and `h` are required.\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 795 + }, + { + "id": "lvgl.isAppMode", + "doc_id": "lvgl.is-app-mode", + "symbol": "lvgl.isAppMode", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.isAppMode()", + "summary": "Test if the script is running in App Mode.", + "parameters": [], + "returns": [ + { + "name": "", + "type": "boolean", + "description": "true if running in App Mode, false otherwise" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.isAppMode()\n\nTest if the script is running in App Mode.\n\n@retval boolean true if running in App Mode, false otherwise\n\n@status current Introduced in 2.11.0", + "source_line": 498 + }, + { + "id": "lvgl.isFullScreen", + "doc_id": "lvgl.is-full-screen", + "symbol": "lvgl.isFullScreen", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.isFullScreen()", + "summary": "Test if the script is running in full screen mode.", + "parameters": [], + "returns": [ + { + "name": "", + "type": "boolean", + "description": "true if running in full screen mode, false otherwise" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Always returns true for stand alone tool scripts." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.isFullScreen()\n\nTest if the script is running in full screen mode.\n\n@retval boolean true if running in full screen mode, false otherwise\n\n@notice Always returns true for stand alone tool scripts.\n\n@status current Introduced in 2.11.0", + "source_line": 517 + }, + { + "id": "lvgl.label", + "doc_id": "lvgl.label", + "symbol": "lvgl.label", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.label([parent, ]params)", + "summary": "Display a text label.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `text` (string or function) text to display, defaults to an empty string\n * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE`\n * `align` (text alignment value or function) sets the text justification, e.g. `RIGHT`, `VCENTER`; defaults to `LEFT`. `RIGHT`/`CENTER` require `w` to be set. `LEFT`/`RIGHT`/`CENTER` align text horizontally within the label's bounding box `(x,y,w,h)`; `VCENTER`/`VTOP`/`VBOTTOM` align the label's bounding box vertically within the parent object" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.label([parent, ]params)\n\n Display a text label.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `text` (string or function) text to display, defaults to an empty string\n * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE`\n * `align` (text alignment value or function) sets the text justification, e.g. `RIGHT`, `VCENTER`; defaults to `LEFT`. `RIGHT`/`CENTER` require `w` to be set. `LEFT`/`RIGHT`/`CENTER` align text horizontally within the label's bounding box `(x,y,w,h)`; `VCENTER`/`VTOP`/`VBOTTOM` align the label's bounding box vertically within the parent object\n\n @retval table LVGL object\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 621 + }, + { + "id": "lvgl.line", + "doc_id": "lvgl.line", + "symbol": "lvgl.line", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.line([parent, ]params)", + "summary": "Display one or more connected line segments.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `rounded` (boolean) if true the line's end caps are rounded, defaults to false\n * `thickness` (number) thickness of each line segment, defaults to 1\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n * `pts` (table or function) table of points, each a `{x, y}` pair; at least two points are required, defaults to nil" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.line([parent, ]params)\n\n Display one or more connected line segments.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n `x`, `y`, `w`, and `h` are not used.\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `rounded` (boolean) if true the line's end caps are rounded, defaults to false\n * `thickness` (number) thickness of each line segment, defaults to 1\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n * `pts` (table or function) table of points, each a `{x, y}` pair; at least two points are required, defaults to nil\n\n @retval table LVGL object\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 702 + }, + { + "id": "lvgl.menu", + "doc_id": "lvgl.menu", + "symbol": "lvgl.menu", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.menu(params)", + "summary": "Open a popup menu with multiple options to choose from, using EdgeTX styling.", + "parameters": [ + { + "name": "params", + "type": "table", + "required": true, + "description": "* `title` (string) text displayed in the popup's header, defaults to an empty string\n * `values` (table) simple table of option strings shown in the popup, defaults to an empty list\n * `get` (function) called when the popup is opened, to get the index of the currently selected option (1..number of values), defaults to nil\n * `set` (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil" + } + ], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.11.1", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.menu` -- only the settings listed above apply.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.menu(params)\n\n Open a popup menu with multiple options to choose from, using EdgeTX styling.\n\n @param params (table):\n * `title` (string) text displayed in the popup's header, defaults to an empty string\n * `values` (table) simple table of option strings shown in the popup, defaults to an empty list\n * `get` (function) called when the popup is opened, to get the index of the currently selected option (1..number of values), defaults to nil\n * `set` (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil\n\n @retval none\n\n @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.menu` -- only the settings listed above apply.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`.\n\n @status current Introduced in 2.11.1", + "source_line": 1320 + }, + { + "id": "lvgl.message", + "doc_id": "lvgl.message", + "symbol": "lvgl.message", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.message(params)", + "summary": "Display a message dialog box.", + "parameters": [ + { + "name": "params", + "type": "table", + "required": true, + "description": "* `title` (string) text displayed in the dialog's header, defaults to an empty string\n * `message` (string) text displayed in the dialog's body, defaults to an empty string\n * `details` (string) additional text displayed in the dialog's body, defaults to an empty string" + } + ], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.message` -- only the settings listed above apply." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.message(params)\n\n Display a message dialog box.\n\n @param params (table):\n * `title` (string) text displayed in the dialog's header, defaults to an empty string\n * `message` (string) text displayed in the dialog's body, defaults to an empty string\n * `details` (string) additional text displayed in the dialog's body, defaults to an empty string\n\n @retval none\n\n @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.message` -- only the settings listed above apply.\n\n @status current Introduced in 2.11.0", + "source_line": 1303 + }, + { + "id": "lvgl.momentaryButton", + "doc_id": "lvgl.momentary-button", + "symbol": "lvgl.momentaryButton", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.momentaryButton([parent, ]params)", + "summary": "Add a momentary text button using the EdgeTX style.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `text` (string or function) text displayed in the button, defaults to an empty string\n * `press` (function) called immediately when the user first taps the button or presses ENTER, defaults to nil\n * `release` (function) called when the user releases ENTER or stops touching the screen, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `color` (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color\n * `textColor` (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color\n * `cornerRadius` (number) radius for the button's corners, defaults to the EdgeTX button style radius\n * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE`" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice Unlike `lvgl.button`, `press` fires immediately on tap/press rather than on release. The button shows the checked state until ENTER is released or the screen is no longer touched." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.momentaryButton([parent, ]params)\n\n Add a momentary text button using the EdgeTX style.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `text` (string or function) text displayed in the button, defaults to an empty string\n * `press` (function) called immediately when the user first taps the button or presses ENTER, defaults to nil\n * `release` (function) called when the user releases ENTER or stops touching the screen, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `color` (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color\n * `textColor` (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color\n * `cornerRadius` (number) radius for the button's corners, defaults to the EdgeTX button style radius\n * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE`\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice Unlike `lvgl.button`, `press` fires immediately on tap/press rather than on release. The button shows the checked state until ENTER is released or the screen is no longer touched.\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 860 + }, + { + "id": "lvgl.numberEdit", + "doc_id": "lvgl.number-edit", + "symbol": "lvgl.numberEdit", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.numberEdit([parent, ]params)", + "summary": "Add a number edit box using the EdgeTX style.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called to get the current value to display, defaults to nil\n * `set` (function) called for every change to the number while editing; passed the new value, defaults to nil\n * `edited` (function) called after the user finishes editing; passed the final value (added in 2.11.5), defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `min` (number) minimum allowed value, defaults to -1024\n * `max` (number) maximum allowed value, defaults to 1024\n * `display` (function) overrides how the value is displayed; passed the current value, must return a string, defaults to nil" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice Use `set` to react to every change during editing, or `edited` to only react to the final value once editing is complete." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.numberEdit([parent, ]params)\n\n Add a number edit box using the EdgeTX style.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called to get the current value to display, defaults to nil\n * `set` (function) called for every change to the number while editing; passed the new value, defaults to nil\n * `edited` (function) called after the user finishes editing; passed the final value (added in 2.11.5), defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `min` (number) minimum allowed value, defaults to -1024\n * `max` (number) maximum allowed value, defaults to 1024\n * `display` (function) overrides how the value is displayed; passed the current value, must return a string, defaults to nil\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice Use `set` to react to every change during editing, or `edited` to only react to the final value once editing is complete.\n\n @status current Introduced in 2.11.0, edited added in 2.11.5, floating added in 2.11.6", + "source_line": 927 + }, + { + "id": "lvgl.page", + "doc_id": "lvgl.page", + "symbol": "lvgl.page", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.page(params)", + "summary": "Create a page layout for a One-Time script using EdgeTX styling: a header with title/sub-title lines and a back button in the top-left corner. Should be created as the top-level LVGL object, with all other objects added as its children.", + "parameters": [ + { + "name": "params", + "type": "table", + "required": true, + "description": "* `title` (string or function) title text in the header; function support added in 2.11.4, defaults to an empty string\n * `subtitle` (string or function) sub-title text in the header; function support added in 2.11.4, defaults to an empty string\n * `icon` (string) full path to a 30x30 grey-scale mask image for the back button icon (white = transparent, black = opaque); defaults to the EdgeTX logo icon\n * `back` (function) called when RTN is pressed, or when the back button is tapped -- the top-left header button if `backButton` is not set, otherwise a second button on the top-right, defaults to nil\n * `menu` (function) called when the top-left header button is tapped, but only if `backButton` is set to true -- in that case `back` moves to a second button on the top-right, defaults to nil\n * `prevButton` (table) adds a prev navigation button; table has a `press` function and optional `active` function (added in 2.11.4), defaults to nil\n * `nextButton` (table) adds a next navigation button; table has a `press` function and optional `active` function (added in 2.11.4), defaults to nil\n * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this page, not used by default\n * `flexPad` (number) padding between rows/columns when flex layout is used, defaults to `PAD_OUTLINE`\n * `scrollBar` (boolean) enables/disables scroll bars, defaults to true\n * `scrollDir` (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the page bounds (stand alone scripts only), defaults to `lvgl.SCROLL_ALL`\n * `scrolled` (function) called when the page content is scrolled; passed `x`, `y` of the current scroll position, defaults to nil\n * `scrollTo` (function) overrides the page scroll position; must return `x`, `y` to scroll to, defaults to nil\n * `align` (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4), defaults to `CENTER | VTOP`\n * `backButton` (boolean) if true, adds a second header button on the top-right calling `back`, and repurposes the top-left button to call `menu` instead (added in 2.11.4), defaults to false\n * `borderPad` (number or table) border padding around the container edges; a single number applies to all sides, or a table `{left=?, right=?, top=?, bottom=?}` (added in 2.11.5), defaults to `PAD_OUTLINE` if `flexFlow` is set, otherwise 0" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.page` -- only the settings listed above apply.\n @notice The page automatically adds scroll bars if child objects fall outside its boundaries.\n @notice `scrollBar`, `scrollDir`, `scrolled`, and `scrollTo` were added in 2.11.2.\n @notice The PAGE keys are not automatically mapped to `prevButton`/`nextButton` -- the script's `run` function must detect and handle them itself." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.page(params)\n\n Create a page layout for a One-Time script using EdgeTX styling: a header with title/sub-title lines and a back button in the top-left corner. Should be created as the top-level LVGL object, with all other objects added as its children.\n\n @param params (table):\n * `title` (string or function) title text in the header; function support added in 2.11.4, defaults to an empty string\n * `subtitle` (string or function) sub-title text in the header; function support added in 2.11.4, defaults to an empty string\n * `icon` (string) full path to a 30x30 grey-scale mask image for the back button icon (white = transparent, black = opaque); defaults to the EdgeTX logo icon\n * `back` (function) called when RTN is pressed, or when the back button is tapped -- the top-left header button if `backButton` is not set, otherwise a second button on the top-right, defaults to nil\n * `menu` (function) called when the top-left header button is tapped, but only if `backButton` is set to true -- in that case `back` moves to a second button on the top-right, defaults to nil\n * `prevButton` (table) adds a prev navigation button; table has a `press` function and optional `active` function (added in 2.11.4), defaults to nil\n * `nextButton` (table) adds a next navigation button; table has a `press` function and optional `active` function (added in 2.11.4), defaults to nil\n * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this page, not used by default\n * `flexPad` (number) padding between rows/columns when flex layout is used, defaults to `PAD_OUTLINE`\n * `scrollBar` (boolean) enables/disables scroll bars, defaults to true\n * `scrollDir` (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the page bounds (stand alone scripts only), defaults to `lvgl.SCROLL_ALL`\n * `scrolled` (function) called when the page content is scrolled; passed `x`, `y` of the current scroll position, defaults to nil\n * `scrollTo` (function) overrides the page scroll position; must return `x`, `y` to scroll to, defaults to nil\n * `align` (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4), defaults to `CENTER | VTOP`\n * `backButton` (boolean) if true, adds a second header button on the top-right calling `back`, and repurposes the top-left button to call `menu` instead (added in 2.11.4), defaults to false\n * `borderPad` (number or table) border padding around the container edges; a single number applies to all sides, or a table `{left=?, right=?, top=?, bottom=?}` (added in 2.11.5), defaults to `PAD_OUTLINE` if `flexFlow` is set, otherwise 0\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.page` -- only the settings listed above apply.\n @notice The page automatically adds scroll bars if child objects fall outside its boundaries.\n @notice `scrollBar`, `scrollDir`, `scrolled`, and `scrollTo` were added in 2.11.2.\n @notice The PAGE keys are not automatically mapped to `prevButton`/`nextButton` -- the script's `run` function must detect and handle them itself.\n\n @status current Introduced in 2.11.0, title/subtitle function support, menu, prevButton, nextButton, align, and backButton added in 2.11.4, borderPad added in 2.11.5, scrollBar/scrollDir/scrolled/scrollTo added in 2.11.2", + "source_line": 1231 + }, + { + "id": "lvgl.qrcode", + "doc_id": "lvgl.qrcode", + "symbol": "lvgl.qrcode", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.qrcode([parent, ]params)", + "summary": "Display a QR code.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `data` (string) URL or other content to encode, defaults to an empty string\n * `bgColor` (color) background color for the QR code image, defaults to `COLOR_THEME_SECONDARY3`" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.qrcode([parent, ]params)\n\n Display a QR code.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n `w` and `h` should be set to the same value for a QR code.\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `data` (string) URL or other content to encode, defaults to an empty string\n * `bgColor` (color) background color for the QR code image, defaults to `COLOR_THEME_SECONDARY3`\n\n @retval table LVGL object\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 814 + }, + { + "id": "lvgl.rectangle", + "doc_id": "lvgl.rectangle", + "symbol": "lvgl.rectangle", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.rectangle([parent, ]params)", + "summary": "Display a rectangle. Based on `lvgl.box`, so all `lvgl.box` settings also apply.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `thickness` (number) width of the border line, defaults to 1\n * `filled` (boolean or function) if true the rectangle is filled with `color`, defaults to false (function support added in 2.11.4)\n * `rounded` (number) if greater than 0, rounds the corners with this radius; must be >= `thickness` if set, defaults to 0\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "When used in a stand alone tool script, the rectangle automatically adds scroll bars if any child objects are placed outside its boundaries. For widgets, child objects outside the bounds are clipped instead." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.rectangle([parent, ]params)\n\n Display a rectangle. Based on `lvgl.box`, so all `lvgl.box` settings also apply.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `thickness` (number) width of the border line, defaults to 1\n * `filled` (boolean or function) if true the rectangle is filled with `color`, defaults to false (function support added in 2.11.4)\n * `rounded` (number) if greater than 0, rounds the corners with this radius; must be >= `thickness` if set, defaults to 0\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n\n @retval table LVGL object\n\n @notice When used in a stand alone tool script, the rectangle automatically adds scroll bars if any child objects are placed outside its boundaries. For widgets, child objects outside the bounds are clipped instead.\n\n @status current Introduced in 2.11.0, filled function support added in 2.11.4, floating added in 2.11.6", + "source_line": 639 + }, + { + "id": "lvgl.set", + "doc_id": "lvgl.set", + "symbol": "lvgl.set", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.set(parent, params)", + "summary": "Update the settings of an existing LVGL object. Can also be used to change settings that have no dedicated update function (e.g. rectangle thickness). Can also be called as `parent:set(params)`.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": true, + "description": "LVGL object to update; unlike the constructor functions, this parameter is required, not optional" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "settings to update; use the same keys documented for the object's constructor function" + } + ], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.set(parent, params)\n\nUpdate the settings of an existing LVGL object. Can also be used to change settings that have no dedicated update function (e.g. rectangle thickness). Can also be called as `parent:set(params)`.\n\n@param parent (object) LVGL object to update; unlike the constructor functions, this parameter is required, not optional\n\n@param params (table) settings to update; use the same keys documented for the object's constructor function\n\n@retval none\n\n@status current Introduced in 2.11.0", + "source_line": 116 + }, + { + "id": "lvgl.setting", + "doc_id": "lvgl.setting", + "symbol": "lvgl.setting", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.setting([parent, ]params)", + "summary": "Create a container for a single row of a settings page, automatically padded for controls such as toggle/textEdit/button.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `title` (string or function) text displayed on the left; function support added in 2.11.6, defaults to an empty string" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.setting([parent, ]params)\n\n Create a container for a single row of a settings page, automatically padded for controls such as toggle/textEdit/button.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `title` (string or function) text displayed on the left; function support added in 2.11.6, defaults to an empty string\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n\n @status current Introduced in 2.11.0, title function support added in 2.11.6, floating added in 2.11.6", + "source_line": 1213 + }, + { + "id": "lvgl.show", + "doc_id": "lvgl.show", + "symbol": "lvgl.show", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.show(parent)", + "summary": "Show an LVGL object.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": true, + "description": "LVGL object to show" + } + ], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "The `visible` setting function can also be used to dynamically show and hide objects." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.show(parent)\n\nShow an LVGL object.\n\n@param parent (object) LVGL object to show\n\n@retval none\n\n@notice The `visible` setting function can also be used to dynamically show and hide objects.\n\n@status current Introduced in 2.11.0", + "source_line": 168 + }, + { + "id": "lvgl.slider", + "doc_id": "lvgl.slider", + "symbol": "lvgl.slider", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.slider([parent, ]params)", + "summary": "Add a horizontal slider using the EdgeTX style.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `min` (number) minimum value at the left end of the range, defaults to 0\n * `max` (number) maximum value at the right end of the range, defaults to 100\n * `get` (function) called to get the current knob value; should return a value between `min` and `max` inclusive, defaults to nil\n * `set` (function) called when the user moves the knob; passed the new value, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.slider([parent, ]params)\n\n Add a horizontal slider using the EdgeTX style.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n `w` sets the size of the slider; `h` is not used.\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `min` (number) minimum value at the left end of the range, defaults to 0\n * `max` (number) maximum value at the right end of the range, defaults to 100\n * `get` (function) called to get the current knob value; should return a value between `min` and `max` inclusive, defaults to nil\n * `set` (function) called when the user moves the knob; passed the new value, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 978 + }, + { + "id": "lvgl.source", + "doc_id": "lvgl.source", + "symbol": "lvgl.source", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.source([parent, ]params)", + "summary": "Display a button showing a source name. Tapping it opens the source-select popup, using EdgeTX styling.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected source, defaults to nil\n * `set` (function) called when the user picks a source; passed the selected source value, defaults to nil\n * `filter` (number) controls which source types the user can pick; combine `lvgl.SRC_xxx` constants to build a custom filter, defaults to `lvgl.SRC_ALL`" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.source([parent, ]params)\n\n Display a button showing a source name. Tapping it opens the source-select popup, using EdgeTX styling.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected source, defaults to nil\n * `set` (function) called when the user picks a source; passed the selected source value, defaults to nil\n * `filter` (number) controls which source types the user can pick; combine `lvgl.SRC_xxx` constants to build a custom filter, defaults to `lvgl.SRC_ALL`\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`.\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 1135 + }, + { + "id": "lvgl.switch", + "doc_id": "lvgl.switch", + "symbol": "lvgl.switch", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.switch([parent, ]params)", + "summary": "Display a button showing a switch name. Tapping it opens the switch-select popup, using EdgeTX styling.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected switch, defaults to nil\n * `set` (function) called when the user picks a switch; passed the selected switch value, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `filter` (number) controls which switch types the user can pick; combine `lvgl.SW_xxx` constants to build a custom filter, defaults to `lvgl.SW_ALL`" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.switch([parent, ]params)\n\n Display a button showing a switch name. Tapping it opens the switch-select popup, using EdgeTX styling.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected switch, defaults to nil\n * `set` (function) called when the user picks a switch; passed the selected switch value, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `filter` (number) controls which switch types the user can pick; combine `lvgl.SW_xxx` constants to build a custom filter, defaults to `lvgl.SW_ALL`\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`.\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 1112 + }, + { + "id": "lvgl.textEdit", + "doc_id": "lvgl.text-edit", + "symbol": "lvgl.textEdit", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.textEdit([parent, ]params)", + "summary": "Add a text edit box using the EdgeTX style.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `value` (string or function) text to edit; if a function, the text can be changed by both script and user, defaults to an empty string\n * `length` (number) maximum editable text length, 1 to 128, defaults to 32\n * `set` (function) called when the user edits the text; passed the new string content, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.textEdit([parent, ]params)\n\n Add a text edit box using the EdgeTX style.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `value` (string or function) text to edit; if a function, the text can be changed by both script and user, defaults to an empty string\n * `length` (number) maximum editable text length, 1 to 128, defaults to 32\n * `set` (function) called when the user edits the text; passed the new string content, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 906 + }, + { + "id": "lvgl.timer", + "doc_id": "lvgl.timer", + "symbol": "lvgl.timer", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.timer([parent, ]params)", + "summary": "Display a button showing a timer name. Tapping it opens a popup menu to choose a timer from, using EdgeTX styling.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected timer, defaults to nil\n * `set` (function) called when the user taps a timer in the popup; passed the selected timer value, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.timer([parent, ]params)\n\n Display a button showing a timer name. Tapping it opens a popup menu to choose a timer from, using EdgeTX styling.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected timer, defaults to nil\n * `set` (function) called when the user taps a timer in the popup; passed the selected timer value, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`.\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 1090 + }, + { + "id": "lvgl.toggle", + "doc_id": "lvgl.toggle", + "symbol": "lvgl.toggle", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.toggle([parent, ]params)", + "summary": "Add a toggle switch using the EdgeTX style.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called to get the current state; must return a boolean or number (0/false = off, 1/true = on), defaults to nil\n * `set` (function) called when the user interacts with the switch; passed a single number, 0 = off, 1 = on, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.toggle([parent, ]params)\n\n Add a toggle switch using the EdgeTX style.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called to get the current state; must return a boolean or number (0/false = off, 1/true = on), defaults to nil\n * `set` (function) called when the user interacts with the switch; passed a single number, 0 = off, 1 = on, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 886 + }, + { + "id": "lvgl.triangle", + "doc_id": "lvgl.triangle", + "symbol": "lvgl.triangle", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.triangle([parent, ]params)", + "summary": "Display a filled triangle.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n * `pts` (table or function) table of exactly three points, each a `{x, y}` pair, defaults to nil" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Unlike the line-drawing objects, LVGL has no built-in triangle primitive. The drawing method used is simple and does not anti-alias." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.triangle([parent, ]params)\n\n Display a filled triangle.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n `x`, `y`, `w`, and `h` are not used.\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n * `pts` (table or function) table of exactly three points, each a `{x, y}` pair, defaults to nil\n\n @retval table LVGL object\n\n @notice Unlike the line-drawing objects, LVGL has no built-in triangle primitive. The drawing method used is simple and does not anti-alias.\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 723 + }, + { + "id": "lvgl.verticalSlider", + "doc_id": "lvgl.vertical-slider", + "symbol": "lvgl.verticalSlider", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.verticalSlider([parent, ]params)", + "summary": "Add a vertical slider using the EdgeTX style.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `min` (number) minimum value at the bottom end of the range, defaults to 0\n * `max` (number) maximum value at the top end of the range, defaults to 100\n * `get` (function) called to get the current knob value; should return a value between `min` and `max` inclusive, defaults to nil\n * `set` (function) called when the user moves the knob; passed the new value, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise." + ], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.verticalSlider([parent, ]params)\n\n Add a vertical slider using the EdgeTX style.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n `h` sets the size of the slider; `w` is not used.\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `min` (number) minimum value at the bottom end of the range, defaults to 0\n * `max` (number) maximum value at the top end of the range, defaults to 100\n * `get` (function) called to get the current knob value; should return a value between `min` and `max` inclusive, defaults to nil\n * `set` (function) called when the user moves the knob; passed the new value, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n\n @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget\n\n @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 1002 + }, + { + "id": "lvgl.vline", + "doc_id": "lvgl.vline", + "symbol": "lvgl.vline", + "aliases": [], + "deprecated_aliases": [], + "module": "lvgl", + "kind": "function", + "syntax": "lvgl.vline([parent, ]params)", + "summary": "Display a vertical line.", + "parameters": [ + { + "name": "parent", + "type": "object", + "required": false, + "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `rounded` (boolean) if true the line's end caps are rounded, defaults to false\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n * `dashGap` (number) gap size for dashed lines, defaults to 0\n * `dashWidth` (number) dash size for dashed lines, defaults to 0; both `dashGap` and `dashWidth` must be > 0 to draw dashed lines" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "LVGL object" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "color-lcd" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_colorlcd_lvgl.cpp", + "raw_luadoc": "@function lvgl.vline([parent, ]params)\n\n Display a vertical line.\n\n @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window\n\n `h` sets the length of the line; `w` sets its thickness.\n\n @param params (table):\n * `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `rounded` (boolean) if true the line's end caps are rounded, defaults to false\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n * `dashGap` (number) gap size for dashed lines, defaults to 0\n * `dashWidth` (number) dash size for dashed lines, defaults to 0; both `dashGap` and `dashWidth` must be > 0 to draw dashed lines\n\n @retval table LVGL object\n\n @status current Introduced in 2.11.0, floating added in 2.11.6", + "source_line": 681 + }, + { + "id": "mkdir", + "doc_id": "runtime.mkdir", + "symbol": "mkdir", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "mkdir(directory)", + "summary": "Create a directory", + "parameters": [ + { + "name": "directory", + "type": "string", + "required": true, + "description": "Directory to create" + } + ], + "returns": [], + "availability": { + "since": "2.11.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_filesystem.cpp", + "raw_luadoc": "@function mkdir(directory)\n\n Create a directory\n\n@param directory (string) Directory to create\n\n@status current Introduced in 2.11.0\n\n Returns FRESULT (e.g. 0=OK, 6=Path invalid, 8=Directory exists)", + "source_line": 205 + }, + { + "id": "model.defaultInputs", + "doc_id": "model.default-inputs", + "symbol": "model.defaultInputs", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.defaultInputs()", + "summary": "Set all inputs to defaults", + "parameters": [], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.defaultInputs()\n\nSet all inputs to defaults\n\n@status current Introduced in 2.0.0", + "source_line": 767 + }, + { + "id": "model.deleteFlightModes", + "doc_id": "model.delete-flight-modes", + "symbol": "model.deleteFlightModes", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.deleteFlightModes()", + "summary": "Clear all flightModes", + "parameters": [], + "returns": [], + "availability": { + "since": "2.3.10", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.deleteFlightModes()\n\nClear all flightModes\n\n@status current Introduced in 2.3.10", + "source_line": 457 + }, + { + "id": "model.deleteInput", + "doc_id": "model.delete-input", + "symbol": "model.deleteInput", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.deleteInput(input, line)", + "summary": "Delete line from specified input", + "parameters": [ + { + "name": "input", + "type": "integer", + "required": true, + "description": "input number (use 0 for Input1)" + }, + { + "name": "line", + "type": "integer", + "required": true, + "description": "input line (use 0 for first line)" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.deleteInput(input, line)\n\nDelete line from specified input\n\n@param input (unsigned number) input number (use 0 for Input1)\n\n@param line (unsigned number) input line (use 0 for first line)\n\n@status current Introduced in 2.0.0", + "source_line": 728 + }, + { + "id": "model.deleteInputs", + "doc_id": "model.delete-inputs", + "symbol": "model.deleteInputs", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.deleteInputs()", + "summary": "Delete all Inputs", + "parameters": [], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.deleteInputs()\n\nDelete all Inputs\n\n@status current Introduced in 2.0.0", + "source_line": 754 + }, + { + "id": "model.deleteMix", + "doc_id": "model.delete-mix", + "symbol": "model.deleteMix", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.deleteMix(channel, line)", + "summary": "Delete mixer line from specified Channel", + "parameters": [ + { + "name": "channel", + "type": "integer", + "required": true, + "description": "channel number (use 0 for CH1)" + }, + { + "name": "line", + "type": "integer", + "required": true, + "description": "mix number (use 0 for first line(mix))" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.deleteMix(channel, line)\n\nDelete mixer line from specified Channel\n\n@param channel (unsigned number) channel number (use 0 for CH1)\n\n@param line (unsigned number) mix number (use 0 for first line(mix))\n\n@status current Introduced in 2.0.0", + "source_line": 979 + }, + { + "id": "model.deleteMixes", + "doc_id": "model.delete-mixes", + "symbol": "model.deleteMixes", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.deleteMixes()", + "summary": "Remove all mixers", + "parameters": [], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.deleteMixes()\n\nRemove all mixers\n\n@status current Introduced in 2.0.0", + "source_line": 1005 + }, + { + "id": "model.getCurve", + "doc_id": "model.get-curve", + "symbol": "model.getCurve", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.getCurve(curve)", + "summary": "Get Curve parameters", + "parameters": [ + { + "name": "curve", + "type": "integer", + "required": true, + "description": "curve number (use 0 for Curve1)" + } + ], + "returns": [ + { + "name": "", + "type": "nil", + "description": "requested curve does not exist" + }, + { + "name": "", + "type": "table", + "description": "curve data:\n* `name` (string) name\n * `type` (number) type\n * `smooth` (boolean) smooth\n * `points` (number) number of points\n * `y` (table) table of Y values:\n * `key` is point number (zero based)\n * `value` is y value\n * `x` (table) **only included for custom curve type**:\n * `key` is point number (zero based)\n * `value` is x value" + } + ], + "availability": { + "since": "2.0.12", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.getCurve(curve)\n\nGet Curve parameters\n\n@param curve (unsigned number) curve number (use 0 for Curve1)\n\n@retval nil requested curve does not exist\n\n@retval table curve data:\n * `name` (string) name\n * `type` (number) type\n * `smooth` (boolean) smooth\n * `points` (number) number of points\n * `y` (table) table of Y values:\n * `key` is point number (zero based)\n * `value` is y value\n * `x` (table) **only included for custom curve type**:\n * `key` is point number (zero based)\n * `value` is x value\n\n Note that functions returns the tables starting with index 0 contrary to LUA's\n usual index starting with 1\n\n@status current Introduced in 2.0.12", + "source_line": 1123 + }, + { + "id": "model.getCustomFunction", + "doc_id": "model.get-custom-function", + "symbol": "model.getCustomFunction", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.getCustomFunction(function)", + "summary": "Get Custom Function parameters", + "parameters": [ + { + "name": "function", + "type": "integer", + "required": true, + "description": "custom function number (use 0 for CF1)" + } + ], + "returns": [ + { + "name": "", + "type": "nil", + "description": "requested custom function does not exist" + }, + { + "name": "", + "type": "table", + "description": "custom function data:\n* `switch` (number) switch index\n * `func` (number) function index\n * `name` (string) Name of track to play (only returned only returned if action is play track, sound or script)\n * `value` (number) value (only returned only returned if action is **not** play track, sound or script)\n * `mode` (number) mode (only returned only returned if action is **not** play track, sound or script)\n * `param` (number) parameter (only returned only returned if action is **not** play track, sound or script)\n * `active` (number) 0 = disabled, 1 = enabled\n * `repetition` (number) -1 to 60, range and meaning depend on function" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.getCustomFunction(function)\n\nGet Custom Function parameters\n\n@param function (unsigned number) custom function number (use 0 for CF1)\n\n@retval nil requested custom function does not exist\n\n@retval table custom function data:\n * `switch` (number) switch index\n * `func` (number) function index\n * `name` (string) Name of track to play (only returned only returned if action is play track, sound or script)\n * `value` (number) value (only returned only returned if action is **not** play track, sound or script)\n * `mode` (number) mode (only returned only returned if action is **not** play track, sound or script)\n * `param` (number) parameter (only returned only returned if action is **not** play track, sound or script)\n * `active` (number) 0 = disabled, 1 = enabled\n * `repetition` (number) -1 to 60, range and meaning depend on function\n\n@status current Introduced in 2.0.0, TODO rename function", + "source_line": 1385 + }, + { + "id": "model.getFlightMode", + "doc_id": "model.get-flight-mode", + "symbol": "model.getFlightMode", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.getFlightMode(index)", + "summary": "", + "parameters": [ + { + "name": "index", + "type": "integer", + "required": true, + "description": "flight mode number (use 0 for FM0)" + } + ], + "returns": [ + { + "name": "", + "type": "nil", + "description": "requested input or line does not exist" + }, + { + "name": "", + "type": "table", + "description": "input data:\n* `name` (string) input line name\n * `switch` (number) input switch index\n * `fadeIn` (number) fade in value (in 0.1s)\n * `fadeOut` (number) fade out value (in 0.1s)\n * `trimsValues` (table) table of trim values:\n * `key` is trim number (zero based)\n * `value` is trim value\n * `trimsModes` (table) table of trim mode:\n * `key` is trim number (zero based)\n * `value` is trim mode" + } + ], + "availability": { + "since": "2.3.10", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.getFlightMode(index)\n\n@param index (unsigned number) flight mode number (use 0 for FM0)\n \nReturn input data for given input and line number\n\n@retval nil requested input or line does not exist\n\n@retval table input data:\n * `name` (string) input line name\n * `switch` (number) input switch index\n * `fadeIn` (number) fade in value (in 0.1s)\n * `fadeOut` (number) fade out value (in 0.1s)\n * `trimsValues` (table) table of trim values:\n * `key` is trim number (zero based)\n * `value` is trim value\n * `trimsModes` (table) table of trim mode:\n * `key` is trim number (zero based)\n * `value` is trim mode\n\n@status current Introduced in 2.3.10", + "source_line": 470 + }, + { + "id": "model.getGlobalVariable", + "doc_id": "model.get-global-variable", + "symbol": "model.getGlobalVariable", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.getGlobalVariable(index, flight_mode)", + "summary": "Return current global variable value", + "parameters": [ + { + "name": "index", + "type": "integer", + "required": true, + "description": "zero based global variable index, use 0 for GV1, 8 for GV9" + }, + { + "name": "flight_mode", + "type": "integer", + "required": true, + "description": "Flight mode number (0 = FM0, 8 = FM8)" + } + ], + "returns": [ + { + "name": "", + "type": "nil", + "description": "requested global variable does not exist" + }, + { + "name": "", + "type": "integer", + "description": "current value of global variable" + } + ], + "availability": { + "since": "unknown", + "radios": [ + "all" + ] + }, + "notes": [ + "a simple warning or notice" + ], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.getGlobalVariable(index, flight_mode)\n\nReturn current global variable value\n\n@notice a simple warning or notice\n\n@param index zero based global variable index, use 0 for GV1, 8 for GV9\n\n@param flight_mode Flight mode number (0 = FM0, 8 = FM8)\n\n@retval nil requested global variable does not exist\n\n@retval number current value of global variable\n\nExample:\n\n```lua\n -- get GV3 (index = 2) from Flight mode 0 (FM0)\n val = model.getGlobalVariable(2, 0)\n```", + "source_line": 1589 + }, + { + "id": "model.getGlobalVariableDetails", + "doc_id": "model.get-global-variable-details", + "symbol": "model.getGlobalVariableDetails", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.getGlobalVariableDetails(index)", + "summary": "Returns details about a Global Variable, but not values", + "parameters": [ + { + "name": "index", + "type": "integer", + "required": true, + "description": "zero based global variable index, use 0 for GV1, 8 for GV9" + } + ], + "returns": [ + { + "name": "", + "type": "table", + "description": "details of the global variable:\n* `name` (string) global variable name\n * `min` (number) minimum value\n * `max` (number) maximum value\n * `prec` (number) precision\n * `unit` (number) unit\n * `popup` (boolean) show popup - if exists" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.getGlobalVariableDetails(index)\n\nReturns details about a Global Variable, but not values\n\n@param index (number) zero based global variable index, use 0 for GV1, 8 for GV9\n\n@retval table details of the global variable:\n * `name` (string) global variable name\n * `min` (number) minimum value\n * `max` (number) maximum value\n * `prec` (number) precision\n * `unit` (number) unit\n * `popup` (boolean) show popup - if exists\n\n@status current Introduced in 2.11.0", + "source_line": 1650 + }, + { + "id": "model.getInfo", + "doc_id": "model.get-info", + "symbol": "model.getInfo", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.getInfo()", + "summary": "Get current Model information", + "parameters": [], + "returns": [ + { + "name": "", + "type": "table", + "description": "model information:\n* `name` (string) model name\n * `extendedLimits` (boolean) extended limits enabled\n * `jitterFilter` (number) model level ADC filter\n * `bitmap` (string) bitmap name (not present on X7)\n * `filename` (string) model filename" + } + ], + "availability": { + "since": "2.0.6", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.getInfo()\n\nGet current Model information\n\n@retval table model information:\n * `name` (string) model name\n * `extendedLimits` (boolean) extended limits enabled\n * `jitterFilter` (number) model level ADC filter\n * `bitmap` (string) bitmap name (not present on X7)\n * `filename` (string) model filename\n\n@status current Introduced in 2.0.6, changed in 2.2.0, filename added in 2.6.0, extendedLimits, jitterFilter, and labels added in 2.8.0", + "source_line": 45 + }, + { + "id": "model.getInput", + "doc_id": "model.get-input", + "symbol": "model.getInput", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.getInput(input, line)", + "summary": "Return input data for given input and line number", + "parameters": [ + { + "name": "input", + "type": "integer", + "required": true, + "description": "input number (use 0 for Input1)" + }, + { + "name": "line", + "type": "integer", + "required": true, + "description": "input line (use 0 for first line)" + } + ], + "returns": [ + { + "name": "", + "type": "nil", + "description": "requested input or line does not exist" + }, + { + "name": "", + "type": "table", + "description": "input data:\n* `name` (string) input line name\n * `inputName` (string) input input name\n * `source` (number) input source index\n * `scale` (number) input scaling (for telemetry)\n * `weight` (number) input weight\n * `offset` (number) input offset\n * `switch` (number) input switch index\n * `curveType` (number) curve type (function, expo, custom curve)\n * `curveValue` (number) curve index\n * `carryTrim` deprecated, please use trimSource instead. WARNING: carryTrim was getting negative values (carryTrim = - trimSource)\n * `trimSource` (number) a positive number representing trim source\n * `side` (number) input side (positive, negative or all)\n * `flightModes` (number) bit-mask of active flight modes" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.getInput(input, line)\n\nReturn input data for given input and line number\n\n@param input (unsigned number) input number (use 0 for Input1)\n\n@param line (unsigned number) input line (use 0 for first line)\n\n@retval nil requested input or line does not exist\n\n@retval table input data:\n * `name` (string) input line name\n * `inputName` (string) input input name\n * `source` (number) input source index\n * `scale` (number) input scaling (for telemetry)\n * `weight` (number) input weight\n * `offset` (number) input offset\n * `switch` (number) input switch index\n * `curveType` (number) curve type (function, expo, custom curve)\n * `curveValue` (number) curve index\n * `carryTrim` deprecated, please use trimSource instead. WARNING: carryTrim was getting negative values (carryTrim = - trimSource)\n * `trimSource` (number) a positive number representing trim source\n * `side` (number) input side (positive, negative or all)\n * `flightModes` (number) bit-mask of active flight modes\n\n@status current Introduced in 2.0.0, curveType/curveValue/carryTrim added in 2.3, inputName added 2.3.10, flighmode reworked in 2.3.11, broken carryTrim replaced by trimSource in 2.8.1, scale added in 2.10, side added in 2.11", + "source_line": 594 + }, + { + "id": "model.getInputsCount", + "doc_id": "model.get-inputs-count", + "symbol": "model.getInputsCount", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.getInputsCount(input)", + "summary": "Return number of lines for given input", + "parameters": [ + { + "name": "input", + "type": "integer", + "required": true, + "description": "input number (use 0 for Input1)" + } + ], + "returns": [ + { + "name": "", + "type": "integer", + "description": "number of configured lines for given input" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.getInputsCount(input)\n\nReturn number of lines for given input\n\n@param input (unsigned number) input number (use 0 for Input1)\n\n@retval number number of configured lines for given input\n\n@status current Introduced in 2.0.0", + "source_line": 438 + }, + { + "id": "model.getLogicalSwitch", + "doc_id": "model.get-logical-switch", + "symbol": "model.getLogicalSwitch", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.getLogicalSwitch(switch)", + "summary": "Get Logical Switch parameters", + "parameters": [ + { + "name": "switch", + "type": "integer", + "required": true, + "description": "logical switch number (use 0 for LS1)" + } + ], + "returns": [ + { + "name": "", + "type": "nil", + "description": "requested logical switch does not exist" + }, + { + "name": "", + "type": "table", + "description": "logical switch data:\n* `func` (number) function index\n * `v1` (number) V1 value (index)\n * `v2` (number) V2 value (index or value)\n * `v3` (number) V3 value (index or value)\n * `and` (number) AND switch index\n * `delay` (number) delay (time in 1/10 s)\n * `duration` (number) duration (time in 1/10 s)\n * `state` (boolean) current state of the logical switch\n * `persistent` (boolean) if true then the state is persistent across reboot of the radio" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.getLogicalSwitch(switch)\n\nGet Logical Switch parameters\n\n@param switch (unsigned number) logical switch number (use 0 for LS1)\n\n@retval nil requested logical switch does not exist\n\n@retval table logical switch data:\n * `func` (number) function index\n * `v1` (number) V1 value (index)\n * `v2` (number) V2 value (index or value)\n * `v3` (number) V3 value (index or value)\n * `and` (number) AND switch index\n * `delay` (number) delay (time in 1/10 s)\n * `duration` (number) duration (time in 1/10 s)\n * `state` (boolean) current state of the logical switch\n * `persistent` (boolean) if true then the state is persistent across reboot of the radio\n\n@status current Introduced in 2.0.0, state and persistent added in 2.11.2", + "source_line": 1018 + }, + { + "id": "model.getMix", + "doc_id": "model.get-mix", + "symbol": "model.getMix", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.getMix(channel, line)", + "summary": "Get configuration for specified Mix", + "parameters": [ + { + "name": "channel", + "type": "integer", + "required": true, + "description": "channel number (use 0 for CH1)" + }, + { + "name": "line", + "type": "integer", + "required": true, + "description": "mix number (use 0 for first line(mix))" + } + ], + "returns": [ + { + "name": "", + "type": "nil", + "description": "requested channel or line does not exist" + }, + { + "name": "", + "type": "table", + "description": "mix data:\n* `name` (string) mix line name\n * `source` (number) source index\n * `weight` (number) weight value (-512 to 511) or source (>= 1024 or <= -1024)\n * `offset` (number) offset value (-512 to 511) or source (>= 1024 or <= -1024)\n * `switch` (number) switch index\n * `multiplex` (number) multiplex (0 = ADD, 1 = MULTIPLY, 2 = REPLACE)\n * `curveType` (number) curve type (function, expo, custom curve)\n * `curveValue` (number) curve index\n * `flightModes` (number) bit-mask of active flight modes\n * `carryTrim` (boolean) carry trim\n * `mixWarn` (number) warning (0 = off, 1 = 1 beep, .. 3 = 3 beeps)\n * `delayPrec` precision of delay up/down (1 or 10)\n * `delayUp` (number) delay up (time in 1/10 s)\n * `delayDown` (number) delay down\n * `speedPrec` precision of speed up/down (1 or 10)\n * `speedUp` (number) speed up\n * `speedDown` (number) speed down" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.getMix(channel, line)\n\nGet configuration for specified Mix\n\n@param channel (unsigned number) channel number (use 0 for CH1)\n\n@param line (unsigned number) mix number (use 0 for first line(mix))\n\n@retval nil requested channel or line does not exist\n\n@retval table mix data:\n * `name` (string) mix line name\n * `source` (number) source index\n * `weight` (number) weight value (-512 to 511) or source (>= 1024 or <= -1024)\n * `offset` (number) offset value (-512 to 511) or source (>= 1024 or <= -1024)\n * `switch` (number) switch index\n * `multiplex` (number) multiplex (0 = ADD, 1 = MULTIPLY, 2 = REPLACE)\n * `curveType` (number) curve type (function, expo, custom curve)\n * `curveValue` (number) curve index\n * `flightModes` (number) bit-mask of active flight modes\n * `carryTrim` (boolean) carry trim\n * `mixWarn` (number) warning (0 = off, 1 = 1 beep, .. 3 = 3 beeps)\n * `delayPrec` precision of delay up/down (1 or 10)\n * `delayUp` (number) delay up (time in 1/10 s)\n * `delayDown` (number) delay down\n * `speedPrec` precision of speed up/down (1 or 10)\n * `speedUp` (number) speed up\n * `speedDown` (number) speed down\n\n@status current Introduced in 2.0.0, parameters below `multiplex` added in 2.0.13, `speedPrec` added in 2.10, `delayPrec` added in 2.11", + "source_line": 827 + }, + { + "id": "model.getMixesCount", + "doc_id": "model.get-mixes-count", + "symbol": "model.getMixesCount", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.getMixesCount(channel)", + "summary": "Get the number of Mixer lines that the specified Channel has", + "parameters": [ + { + "name": "channel", + "type": "integer", + "required": true, + "description": "channel number (use 0 for CH1)" + } + ], + "returns": [ + { + "name": "", + "type": "integer", + "description": "number of mixes for requested channel" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.getMixesCount(channel)\n\nGet the number of Mixer lines that the specified Channel has\n\n@param channel (unsigned number) channel number (use 0 for CH1)\n\n@retval number number of mixes for requested channel\n\n@status current Introduced in 2.0.0", + "source_line": 808 + }, + { + "id": "model.getModule", + "doc_id": "model.get-module", + "symbol": "model.getModule", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.getModule(index)", + "summary": "Get RF module parameters", + "parameters": [ + { + "name": "index", + "type": "integer", + "required": true, + "description": "module index (0 for internal, 1 for external)" + } + ], + "returns": [ + { + "name": "", + "type": "nil", + "description": "requested module does not exist" + }, + { + "name": "", + "type": "table", + "description": "module parameters:\n* `subType` (number) protocol index\n * `modelId` (number) receiver number\n * `firstChannel` (number) start channel (0 is CH1)\n * `channelsCount` (number) number of channels sent to module\n * `Type` (number) module type\n * if the module type is Multi additional information are available\n * `protocol` (number) protocol number (Multi only)\n * `subProtocol` (number) sub-protocol number (Multi only)\n * `channelsOrder` (number) first 4 channels expected order (Multi only)\n * if the module type is LemonDSMP additional info is available\n * `channelsOrder` (number) first 4 channels expected order (DSMP only)" + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.getModule(index)\n\nGet RF module parameters\n\n`Type` values:\n * 0 NONE\n * 1 PPM\n * 2 XJT_PXX1\n * 3 ISRM_PXX2\n * 4 DSM2\n * 5 CROSSFIRE\n * 6 MULTIMODULE\n * 7 R9M_PXX1\n * 8 R9M_PXX2\n * 9 R9M_LITE_PXX1\n * 10 R9M_LITE_PXX2\n * 11 R9M_LITE_PRO_PXX1\n * 12 R9M_LITE_PRO_PXX2\n * 13 SBUS\n * 14 XJT_LITE_PXX2\n * 15 MODULE_TYPE_FLYSKY_AFHDS3,\n * 16 ??\n * 17 MODULE_TYPE_LEMON_DSMP\n\n`subType` values for XJT_PXX1:\n * -1 OFF\n * 0 D16\n * 1 D8\n * 2 LR12\n\n@param index (number) module index (0 for internal, 1 for external)\n\n@retval nil requested module does not exist\n\n@retval table module parameters:\n * `subType` (number) protocol index\n * `modelId` (number) receiver number\n * `firstChannel` (number) start channel (0 is CH1)\n * `channelsCount` (number) number of channels sent to module\n * `Type` (number) module type\n * if the module type is Multi additional information are available\n * `protocol` (number) protocol number (Multi only)\n * `subProtocol` (number) sub-protocol number (Multi only)\n * `channelsOrder` (number) first 4 channels expected order (Multi only)\n * if the module type is LemonDSMP additional info is available\n * `channelsOrder` (number) first 4 channels expected order (DSMP only)\n\n@status current Introduced in 2.2.0", + "source_line": 124 + }, + { + "id": "model.getOutput", + "doc_id": "model.get-output", + "symbol": "model.getOutput", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.getOutput(index)", + "summary": "Get servo parameters", + "parameters": [ + { + "name": "index", + "type": "integer", + "required": true, + "description": "output number (use 0 for CH1)" + } + ], + "returns": [ + { + "name": "", + "type": "nil", + "description": "requested output does not exist" + }, + { + "name": "", + "type": "table", + "description": "output parameters:\n* `name` (string) name\n * `min` (number) Minimum % * 10\n * `max` (number) Maximum % * 10\n * `offset` (number) Subtrim * 10\n * `ppmCenter` (number) offset from PPM Center. 0 = 1500\n * `symetrical` (number) linear Subtrim 0 = Off, 1 = On\n * `revert` (number) irection 0 = \u00ad\u00ad\u00ad---, 1 = INV\n * `curve`\n * (number) Curve number (0 for Curve1)\n * or `nil` if no curve set" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.getOutput(index)\n\nGet servo parameters\n\n@param index (unsigned number) output number (use 0 for CH1)\n\n@retval nil requested output does not exist\n\n@retval table output parameters:\n * `name` (string) name\n * `min` (number) Minimum % * 10\n * `max` (number) Maximum % * 10\n * `offset` (number) Subtrim * 10\n * `ppmCenter` (number) offset from PPM Center. 0 = 1500\n * `symetrical` (number) linear Subtrim 0 = Off, 1 = On\n * `revert` (number) irection 0 = \u00ad\u00ad\u00ad---, 1 = INV\n * `curve`\n * (number) Curve number (0 for Curve1)\n * or `nil` if no curve set\n\n@status current Introduced in 2.0.0", + "source_line": 1487 + }, + { + "id": "model.getSensor", + "doc_id": "model.get-sensor", + "symbol": "model.getSensor", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.getSensor(sensor)", + "summary": "Get Telemetry Sensor parameters", + "parameters": [ + { + "name": "sensor", + "type": "integer", + "required": true, + "description": "sensor number (use 0 for sensor 1)" + } + ], + "returns": [ + { + "name": "", + "type": "nil", + "description": "requested sensor does not exist" + }, + { + "name": "", + "type": "table", + "description": "with sensor data:\n* `type` (number) 0 = custom, 1 = calculated\n * `name` (string) Name\n * `unit` (number) See list of units in the appendix of the OpenTX Lua Reference Guide\n * `prec` (number) Number of decimals\n * `id` (number) Only custom sensors\n * `instance` (number) Only custom sensors\n * `formula` (number) Only calculated sensors. 0 = Add etc. see list of formula choices in Companion popup" + } + ], + "availability": { + "since": "2.3.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.getSensor(sensor)\n\nGet Telemetry Sensor parameters\n\n@param sensor (unsigned number) sensor number (use 0 for sensor 1)\n\n@retval nil requested sensor does not exist\n\n@retval table with sensor data:\n * `type` (number) 0 = custom, 1 = calculated\n * `name` (string) Name\n * `unit` (number) See list of units in the appendix of the OpenTX Lua Reference Guide\n * `prec` (number) Number of decimals\n * `id` (number) Only custom sensors\n * `instance` (number) Only custom sensors\n * `formula` (number) Only calculated sensors. 0 = Add etc. see list of formula choices in Companion popup\n\n@status current Introduced in 2.3.0", + "source_line": 1731 + }, + { + "id": "model.getSwashRing", + "doc_id": "model.get-swash-ring", + "symbol": "model.getSwashRing", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.getSwashRing()", + "summary": "Get heli swash parameters", + "parameters": [], + "returns": [ + { + "name": "", + "type": "table", + "description": "with heli swash parameters:\n* `type` (number) 0=---, 1=120, 2=120X, 3=140, 4=90\n* `value` (number) swash ring value (normally 0)\n* `collectiveSource` (number) source index\n* `aileronSource` (number) source index\n* `elevatorSource` (number) source index\n* `collectiveWeight`(value) -100 to 100\n* `aileronWeight` (value) -100 to 100\n* `elevatorWeight` (value) -100 to 100" + } + ], + "availability": { + "since": "2.8.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.getSwashRing()\n\nGet heli swash parameters\n\n@retval table with heli swash parameters:\n* `type` (number) 0=---, 1=120, 2=120X, 3=140, 4=90\n* `value` (number) swash ring value (normally 0)\n* `collectiveSource` (number) source index\n* `aileronSource` (number) source index\n* `elevatorSource` (number) source index\n* `collectiveWeight`(value) -100 to 100\n* `aileronWeight` (value) -100 to 100\n* `elevatorWeight` (value) -100 to 100\n\n @status current Introduced in 2.8.0", + "source_line": 1798 + }, + { + "id": "model.getTimer", + "doc_id": "model.get-timer", + "symbol": "model.getTimer", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.getTimer(timer)", + "summary": "Get model timer parameters", + "parameters": [ + { + "name": "timer", + "type": "integer", + "required": true, + "description": "timer index (0 for Timer 1)" + } + ], + "returns": [ + { + "name": "", + "type": "nil", + "description": "requested timer does not exist" + }, + { + "name": "", + "type": "table", + "description": "timer parameters:\n* `mode` (number) timer trigger source: off, abs, stk, stk%, sw/!sw, !m_sw/!m_sw\n * `start` (number) start value [seconds], 0 for up timer, 0> down timer\n * `value` (number) current value [seconds]\n * `countdownBeep` (number) countdown beep (0\u00ad = silent, 1 =\u00ad beeps, 2\u00ad = voice)\n * `minuteBeep` (boolean) minute beep\n * `persistent` (number) persistent timer\n * `name` (string) timer name\n * `showElapsed` (boolean) show elapsed" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.getTimer(timer)\n\nGet model timer parameters\n\n@param timer (number) timer index (0 for Timer 1)\n\n@retval nil requested timer does not exist\n\n@retval table timer parameters:\n * `mode` (number) timer trigger source: off, abs, stk, stk%, sw/!sw, !m_sw/!m_sw\n * `start` (number) start value [seconds], 0 for up timer, 0> down timer\n * `value` (number) current value [seconds]\n * `countdownBeep` (number) countdown beep (0\u00ad = silent, 1 =\u00ad beeps, 2\u00ad = voice)\n * `minuteBeep` (boolean) minute beep\n * `persistent` (number) persistent timer\n * `name` (string) timer name\n * `showElapsed` (boolean) show elapsed\n\n@status current Introduced in 2.0.0, name added in 2.3.6, showElapsed added in 2.8.0", + "source_line": 284 + }, + { + "id": "model.insertInput", + "doc_id": "model.insert-input", + "symbol": "model.insertInput", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.insertInput(input, line, value)", + "summary": "Insert an Input at specified line", + "parameters": [ + { + "name": "input", + "type": "integer", + "required": true, + "description": "input number (use 0 for Input1)" + }, + { + "name": "line", + "type": "integer", + "required": true, + "description": "input line (use 0 for first line)" + }, + { + "name": "value", + "type": "table", + "required": true, + "description": "input data, see model.getInput()" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.insertInput(input, line, value)\n\nInsert an Input at specified line\n\n@param input (unsigned number) input number (use 0 for Input1)\n\n@param line (unsigned number) input line (use 0 for first line)\n\n@param value (table) input data, see model.getInput()\n\n@status current Introduced in 2.0.0, curveType/curveValue/carryTrim added in 2.3, inputName added 2.3.10, broken carryTrim replaced by trimSource in EdgeTX 2.8.1, scale added in 2.10", + "source_line": 650 + }, + { + "id": "model.insertMix", + "doc_id": "model.insert-mix", + "symbol": "model.insertMix", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.insertMix(channel, line, value)", + "summary": "Insert a mixer line into Channel", + "parameters": [ + { + "name": "channel", + "type": "integer", + "required": true, + "description": "channel number (use 0 for CH1)" + }, + { + "name": "line", + "type": "integer", + "required": true, + "description": "mix number (use 0 for first line(mix))" + }, + { + "name": "value", + "type": "table", + "required": true, + "description": "see model.getMix() for table format" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.insertMix(channel, line, value)\n\nInsert a mixer line into Channel\n\n@param channel (unsigned number) channel number (use 0 for CH1)\n\n@param line (unsigned number) mix number (use 0 for first line(mix))\n\n@param value (table) see model.getMix() for table format\n\n@status current Introduced in 2.0.0, parameters below `multiplex` added in 2.0.13", + "source_line": 892 + }, + { + "id": "model.resetSensor", + "doc_id": "model.reset-sensor", + "symbol": "model.resetSensor", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.resetSensor(sensor)", + "summary": "Reset Telemetry Sensor parameters", + "parameters": [ + { + "name": "sensor", + "type": "integer", + "required": true, + "description": "sensor number (use 0 for sensor 1)" + } + ], + "returns": [ + { + "name": "", + "type": "nil", + "description": "" + } + ], + "availability": { + "since": "2.3.11", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.resetSensor(sensor)\n\nReset Telemetry Sensor parameters\n\n@param sensor (unsigned number) sensor number (use 0 for sensor 1)\n\n@retval nil\n\n@status current Introduced in 2.3.11", + "source_line": 1775 + }, + { + "id": "model.resetTimer", + "doc_id": "model.reset-timer", + "symbol": "model.resetTimer", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.resetTimer(timer)", + "summary": "Reset model timer to a startup value", + "parameters": [ + { + "name": "timer", + "type": "integer", + "required": true, + "description": "timer index (0 for Timer 1)" + } + ], + "returns": [], + "availability": { + "since": "unknown", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.resetTimer(timer)\n\nReset model timer to a startup value\n\n@param timer (number) timer index (0 for Timer 1)\n\n@status current Introduced in TODO", + "source_line": 393 + }, + { + "id": "model.setCurve", + "doc_id": "model.set-curve", + "symbol": "model.setCurve", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.setCurve(curve, params)", + "summary": "Set Curve parameters", + "parameters": [ + { + "name": "curve", + "type": "integer", + "required": true, + "description": "curve number (use 0 for Curve1)" + }, + { + "name": "params", + "type": "integer", + "required": true, + "description": "see model.getCurve return format for table format. setCurve uses standard lua array indexing and arrays start at index 1" + } + ], + "returns": [ + { + "name": "0", + "type": "integer", + "description": "- Everything okay 1 - Wrong number of points\n 2 - Invalid Curve number\n 3 - Cuve does not fit anymore\n 4 - point of out of index\n 5 - x value not monotonically increasing\n 6 - y value not in range [-100;100]\n 7 - extra values for y are set\n 8 - extra values for x are set" + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.setCurve(curve, params)\n\nSet Curve parameters\n\n@param curve (unsigned number) curve number (use 0 for Curve1)\n\n@param params see model.getCurve return format for table format. setCurve uses standard\n lua array indexing and arrays start at index 1\n\nThe first and last x value must -100 and 100 and x values must be monotonically increasing\n\n@retval 0 - Everything okay\n 1 - Wrong number of points\n 2 - Invalid Curve number\n 3 - Cuve does not fit anymore\n 4 - point of out of index\n 5 - x value not monotonically increasing\n 6 - y value not in range [-100;100]\n 7 - extra values for y are set\n 8 - extra values for x are set\n\n@status current Introduced in 2.2.0\n\nExample setting a 4-point custom curve:\n```lua\n params = {}\n params[\"x\"] = {-100, -34, 77, 100}\n params[\"y\"] = {-70, 20, -89, -100}\n params[\"smooth\"] = true\n params[\"type\"] = 1\n val = model.setCurve(2, params)\n ```\nsetting a 6-point standard smoothed curve\n ```lua\n val = model.setCurve(3, {smooth=true, y={-100, -50, 0, 50, 100, 80}})\n ```", + "source_line": 1191 + }, + { + "id": "model.setCustomFunction", + "doc_id": "model.set-custom-function", + "symbol": "model.setCustomFunction", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.setCustomFunction(function, value)", + "summary": "Set Custom Function parameters", + "parameters": [ + { + "name": "function", + "type": "integer", + "required": true, + "description": "custom function number (use 0 for CF1)" + }, + { + "name": "value", + "type": "table", + "required": true, + "description": "custom function parameters, see model.getCustomFunction() for table format" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [ + "If a parameter is missing from the value, then\nthat parameter remains unchanged." + ], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.setCustomFunction(function, value)\n\nSet Custom Function parameters\n\n@param function (unsigned number) custom function number (use 0 for CF1)\n\n@param value (table) custom function parameters, see model.getCustomFunction() for table format\n\n@notice If a parameter is missing from the value, then\nthat parameter remains unchanged.\n\n@status current Introduced in 2.0.0, TODO rename function", + "source_line": 1431 + }, + { + "id": "model.setFlightMode", + "doc_id": "model.set-flight-mode", + "symbol": "model.setFlightMode", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.setFlightMode(index, params)", + "summary": "Set Flight mode parameters", + "parameters": [ + { + "name": "index", + "type": "integer", + "required": true, + "description": "flight mode number (use 0 for FM0)" + }, + { + "name": "params", + "type": "unknown", + "required": true, + "description": "see model.getFlightMode return format for table format." + } + ], + "returns": [], + "availability": { + "since": "2.3.10", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.setFlightMode(index, params)\n\nSet Flight mode parameters\n\n@param index (unsigned number) flight mode number (use 0 for FM0)\n\n@param params see model.getFlightMode return format for table format.\n\n@status current Introduced in 2.3.10", + "source_line": 526 + }, + { + "id": "model.setGlobalVariable", + "doc_id": "model.set-global-variable", + "symbol": "model.setGlobalVariable", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.setGlobalVariable(index, flight_mode, value)", + "summary": "Sets current global variable value. See also model.getGlobalVariable()", + "parameters": [ + { + "name": "index", + "type": "integer", + "required": true, + "description": "zero based global variable index, use 0 for GV1, 8 for GV9" + }, + { + "name": "flight_mode", + "type": "integer", + "required": true, + "description": "Flight mode number (0 = FM0, 8 = FM8)" + }, + { + "name": "value", + "type": "unknown", + "required": true, + "description": "new value for global variable. Permitted range is from -1024 to 1024." + } + ], + "returns": [], + "availability": { + "since": "unknown", + "radios": [ + "all" + ] + }, + "notes": [ + "Global variable can only store integer values,\nany floating point value is converted into integer value\nby truncating everything behind a floating point." + ], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.setGlobalVariable(index, flight_mode, value)\n\nSets current global variable value. See also model.getGlobalVariable()\n\n@param index zero based global variable index, use 0 for GV1, 8 for GV9\n\n@param flight_mode Flight mode number (0 = FM0, 8 = FM8)\n\n@param value new value for global variable. Permitted range is\nfrom -1024 to 1024.\n\n@notice Global variable can only store integer values,\nany floating point value is converted into integer value\nby truncating everything behind a floating point.", + "source_line": 1622 + }, + { + "id": "model.setGlobalVariableDetails", + "doc_id": "model.set-global-variable-details", + "symbol": "model.setGlobalVariableDetails", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.setGlobalVariableDetails(index, params)", + "summary": "Sets details about a Global Variable, but not values", + "parameters": [ + { + "name": "index", + "type": "integer", + "required": true, + "description": "zero based global variable index, use 0 for GV1, 8 for GV9" + }, + { + "name": "params", + "type": "table", + "required": true, + "description": "see model.getGlobalVariableDetails(index) return format for table format" + } + ], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.11.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.setGlobalVariableDetails(index, params)\n\nSets details about a Global Variable, but not values\n\n@param index (number) zero based global variable index, use 0 for GV1, 8 for GV9\n\n@param params (table) see model.getGlobalVariableDetails(index) return format for table format\n\n@retval none\n\n@status current Introduced in 2.11.0", + "source_line": 1684 + }, + { + "id": "model.setInfo", + "doc_id": "model.set-info", + "symbol": "model.setInfo", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.setInfo(value)", + "summary": "Set the current Model information", + "parameters": [ + { + "name": "value", + "type": "unknown", + "required": true, + "description": "model information data, see model.getInfo()" + } + ], + "returns": [], + "availability": { + "since": "2.0.6", + "radios": [ + "all" + ] + }, + "notes": [ + "If a parameter is missing from the value, then\nthat parameter remains unchanged." + ], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.setInfo(value)\n\nSet the current Model information\n\n@param value model information data, see model.getInfo()\n\n@notice If a parameter is missing from the value, then\nthat parameter remains unchanged.\n\n@status current Introduced in 2.0.6, extendedLimits and jitterFilter added in 2.8.0", + "source_line": 83 + }, + { + "id": "model.setLogicalSwitch", + "doc_id": "model.set-logical-switch", + "symbol": "model.setLogicalSwitch", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.setLogicalSwitch(switch, value)", + "summary": "Set Logical Switch parameters", + "parameters": [ + { + "name": "switch", + "type": "integer", + "required": true, + "description": "logical switch number (use 0 for LS1)" + }, + { + "name": "value", + "type": "table", + "required": true, + "description": "see model.getLogicalSwitch() for table format" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [ + "If a parameter is missing from the value, then\nthat parameter remains unchanged.", + "To set the `and` member (which is Lua keyword)\nuse the following syntax: `model.setLogicalSwitch(30, {func=4,v1=1,v2=-99, [\"and\"]=24})`" + ], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.setLogicalSwitch(switch, value)\n\nSet Logical Switch parameters\n\n@param switch (unsigned number) logical switch number (use 0 for LS1)\n\n@param value (table) see model.getLogicalSwitch() for table format\n\n@notice If a parameter is missing from the value, then\nthat parameter remains unchanged.\n\n@notice To set the `and` member (which is Lua keyword)\nuse the following syntax: `model.setLogicalSwitch(30, {func=4,v1=1,v2=-99, [\"and\"]=24})`\n\n@status current Introduced in 2.0.0, state and persistent added in 2.11.2", + "source_line": 1062 + }, + { + "id": "model.setModule", + "doc_id": "model.set-module", + "symbol": "model.setModule", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.setModule(index, value)", + "summary": "Set RF module parameters", + "parameters": [ + { + "name": "index", + "type": "integer", + "required": true, + "description": "module index (0 for internal, 1 for external)" + }, + { + "name": "value", + "type": "unknown", + "required": true, + "description": "module parameters, see model.getModule()" + } + ], + "returns": [], + "availability": { + "since": "2.2.0", + "radios": [ + "all" + ] + }, + "notes": [ + "If a parameter is missing from the value, then\nthat parameter remains unchanged." + ], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.setModule(index, value)\n\nSet RF module parameters\n\n@param index (number) module index (0 for internal, 1 for external)\n\n@param value module parameters, see model.getModule()\n\n@notice If a parameter is missing from the value, then\nthat parameter remains unchanged.\n\n@status current Introduced in 2.2.0, modified in 2.3.12 (proto/subproto)", + "source_line": 219 + }, + { + "id": "model.setOutput", + "doc_id": "model.set-output", + "symbol": "model.setOutput", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.setOutput(index, value)", + "summary": "Set servo parameters", + "parameters": [ + { + "name": "index", + "type": "integer", + "required": true, + "description": "channel number (use 0 for CH1)" + }, + { + "name": "value", + "type": "table", + "required": true, + "description": "servo parameters, see model.getOutput() for table format" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [ + "If a parameter is missing from the value, then\nthat parameter remains unchanged." + ], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.setOutput(index, value)\n\nSet servo parameters\n\n@param index (unsigned number) channel number (use 0 for CH1)\n\n@param value (table) servo parameters, see model.getOutput() for table format\n\n@notice If a parameter is missing from the value, then\nthat parameter remains unchanged.\n\n@status current Introduced in 2.0.0", + "source_line": 1532 + }, + { + "id": "model.setSwashRing", + "doc_id": "model.set-swash-ring", + "symbol": "model.setSwashRing", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.setSwashRing(params)", + "summary": "Set heli swash parameters", + "parameters": [ + { + "name": "params", + "type": "table", + "required": true, + "description": "swash ring parameters, see model.getSwashRing() for table format" + } + ], + "returns": [], + "availability": { + "since": "2.8.0", + "radios": [ + "all" + ] + }, + "notes": [ + "If a parameter is missing, then that parameter remains unchanged." + ], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.setSwashRing(params)\n\nSet heli swash parameters\n\n@param value (table) swash ring parameters, see model.getSwashRing() for table format\n\n@notice If a parameter is missing, then that parameter remains unchanged.\n\n@status current Introduced in 2.8.0", + "source_line": 1830 + }, + { + "id": "model.setTimer", + "doc_id": "model.set-timer", + "symbol": "model.setTimer", + "aliases": [], + "deprecated_aliases": [], + "module": "model", + "kind": "function", + "syntax": "model.setTimer(timer, value)", + "summary": "Set model timer parameters", + "parameters": [ + { + "name": "timer", + "type": "integer", + "required": true, + "description": "timer index (0 for Timer 1)" + }, + { + "name": "value", + "type": "unknown", + "required": true, + "description": "timer parameters, see model.getTimer()" + } + ], + "returns": [], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [ + "If a parameter is missing from the value, then\nthat parameter remains unchanged." + ], + "source_location": "radio/src/lua/api_model.cpp", + "raw_luadoc": "@function model.setTimer(timer, value)\n\nSet model timer parameters\n\n@param timer (number) timer index (0 for Timer 1)\n\n@param value timer parameters, see model.getTimer()\n\n@notice If a parameter is missing from the value, then\nthat parameter remains unchanged.\n\n@status current Introduced in 2.0.0, name added in 2.3.6, showElapsed added in 2.8.0", + "source_line": 329 + }, + { + "id": "multiBuffer", + "doc_id": "runtime.multi-buffer", + "symbol": "multiBuffer", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "multiBuffer(address[,value])", + "summary": "This function reads/writes the Multi protocol buffer to interact with a protocol.", + "parameters": [ + { + "name": "address", + "type": "unknown", + "required": true, + "description": "to read/write in the buffer @param (optional): value to write in the buffer" + } + ], + "returns": [ + { + "name": "", + "type": "integer", + "description": "value (number)" + } + ], + "availability": { + "since": "2.3.2", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function multiBuffer(address[,value])\n\nThis function reads/writes the Multi protocol buffer to interact with a protocol.\n\n@param address to read/write in the buffer\n@param (optional): value to write in the buffer\n\n@retval buffer value (number)\n\n@status current Introduced in 2.3.2", + "source_line": 2265 + }, + { + "id": "playDuration", + "doc_id": "runtime.play-duration", + "symbol": "playDuration", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "playDuration(duration [, hourFormat [, volume]])", + "summary": "Play a time value (text to speech)", + "parameters": [ + { + "name": "duration", + "type": "integer", + "required": true, + "description": "number of seconds to play. Only integral part is used." + }, + { + "name": "hourFormat", + "type": "integer", + "required": false, + "description": "* `0 or not present` play format: minutes and seconds.\n * `!= 0` play format: hours, minutes and seconds.\n *\n@param volume (number):\n - (1..5) override radio settings Wav volume for the duration of file\n - omitting the parameter uses radio settings Wav volume" + } + ], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.1.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function playDuration(duration [, hourFormat [, volume]])\n\nPlay a time value (text to speech)\n\n@param duration (number) number of seconds to play. Only integral part is used.\n\n@param hourFormat (number):\n * `0 or not present` play format: minutes and seconds.\n * `!= 0` play format: hours, minutes and seconds.\n * \n@param volume (number):\n - (1..5) override radio settings Wav volume for the duration of file\n - omitting the parameter uses radio settings Wav volume\n\n@retval none \n\n@status current Introduced in 2.1.0, changed in 2.10\n\n// targets: BW, COLOR\n//\n// EXAMPLES:\n// playDuration(101, 0, 5) -- play duration 101s, seconds format, use Wav volume 5\n// playDuration(101, 0, 1) -- play duration 101s, seconds format, use Wav volume 1\n// playDuration(101, 1) -- play duration 101s, hour format, use radio settings Wav volume", + "source_line": 1545 + }, + { + "id": "playFile", + "doc_id": "runtime.play-file", + "symbol": "playFile", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "playFile(filename [, volume])", + "summary": "Play a file from the SD card", + "parameters": [ + { + "name": "filename", + "type": "string", + "required": true, + "description": "full path to wav file (i.e. \"/SOUNDS/en/system/tada.wav\") Introduced in 2.1.0: If you use a relative path, the current language is prepended\nto the path (example: for English language: `/SOUNDS/en` is prepended)" + }, + { + "name": "volume", + "type": "integer", + "required": false, + "description": "- (1..5) override radio settings Wav volume for the duration of file\n - omitting the parameter uses radio settings Wav volume" + } + ], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function playFile(filename [, volume])\n\nPlay a file from the SD card\n\n@param filename (string) full path to wav file (i.e. \"/SOUNDS/en/system/tada.wav\")\nIntroduced in 2.1.0: If you use a relative path, the current language is prepended\nto the path (example: for English language: `/SOUNDS/en` is prepended)\n\n@param volume (number):\n - (1..5) override radio settings Wav volume for the duration of file\n - omitting the parameter uses radio settings Wav volume\n\n@retval none \n\n@status current Introduced in 2.0.0, changed in 2.1.0, changed in 2.10\n\n// targets: BW, COLOR\n//\n// EXAMPLES:\n// playFile(\"armed.wav\", 5) -- play file armed.wav, use Wav volume 5\n// playFile(\"armed.wav\", 1) -- play file armed.wav, use Wav volume 1\n// playFile(\"armed.wav\")\t\t-- play file armed.wav, use radio settings Wav volume", + "source_line": 1455 + }, + { + "id": "playHaptic", + "doc_id": "runtime.play-haptic", + "symbol": "playHaptic", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "playHaptic(duration, pause [, flags])", + "summary": "Generate haptic feedback", + "parameters": [ + { + "name": "duration", + "type": "integer", + "required": true, + "description": "length of the haptic feedback in milliseconds" + }, + { + "name": "pause", + "type": "integer", + "required": true, + "description": "length of the silence after haptic feedback in milliseconds" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "* `0 or not present` play with normal priority\n * `PLAY_NOW` play immediately" + } + ], + "returns": [], + "availability": { + "since": "2.2.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function playHaptic(duration, pause [, flags])\n\nGenerate haptic feedback\n\n@param duration (number) length of the haptic feedback in milliseconds\n\n@param pause (number) length of the silence after haptic feedback in milliseconds\n\n@param flags (number):\n * `0 or not present` play with normal priority\n * `PLAY_NOW` play immediately\n\n@status current Introduced in 2.2.0", + "source_line": 1656 + }, + { + "id": "playNumber", + "doc_id": "runtime.play-number", + "symbol": "playNumber", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "playNumber(value, unit [, attributes [, volume]])", + "summary": "Play a numerical value (text to speech)", + "parameters": [ + { + "name": "value", + "type": "integer", + "required": true, + "description": "number to play. Value is interpreted as integer." + }, + { + "name": "unit", + "type": "integer", + "required": true, + "description": "unit identifier, see the Units reference for the full list" + }, + { + "name": "attributes", + "type": "integer", + "required": false, + "description": "possible values:\n* `0 or not present` plays integral part of the number (for a number 123 it plays 123)\n * `PREC1` plays a number with one decimal place (for a number 123 it plays 12.3)\n * `PREC2` plays a number with two decimal places (for a number 123 it plays 1.23)" + }, + { + "name": "volume", + "type": "integer", + "required": false, + "description": "- (1..5) override radio settings Wav volume for the duration of file\n - omitting the parameter uses radio settings Wav volume" + } + ], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function playNumber(value, unit [, attributes [, volume]])\n\nPlay a numerical value (text to speech)\n\n@param value (number) number to play. Value is interpreted as integer.\n\n@param unit (number) unit identifier, see the Units reference for the full list\n\n@param attributes (unsigned number) possible values:\n * `0 or not present` plays integral part of the number (for a number 123 it plays 123)\n * `PREC1` plays a number with one decimal place (for a number 123 it plays 12.3)\n * `PREC2` plays a number with two decimal places (for a number 123 it plays 1.23)\n \n @param volume (number):\n - (1..5) override radio settings Wav volume for the duration of file\n - omitting the parameter uses radio settings Wav volume\n\n@retval none \n\n@status current Introduced in 2.0.0, changed in 2.10\n\n// targets: BW, COLOR\n//\n// EXAMPLES:\n// playNumber(123, 3, 0, 5) -- play number 123, unit mAh, use Wav volume 5\n// playNumber(123, 3, 0, 1) -- play number 123, unit mAh, use Wav volume 1\n// playNumber(123, 3, 0) -- play number 123, unit mAh, use radio settings Wav volume", + "source_line": 1501 + }, + { + "id": "playTone", + "doc_id": "runtime.play-tone", + "symbol": "playTone", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "playTone(frequency, duration, pause [, flags [, freqIncr [, volume]]])", + "summary": "Play a tone", + "parameters": [ + { + "name": "frequency", + "type": "integer", + "required": true, + "description": "tone frequency in Hz (from 150 to 15000)" + }, + { + "name": "duration", + "type": "integer", + "required": true, + "description": "length of the tone in milliseconds" + }, + { + "name": "pause", + "type": "integer", + "required": true, + "description": "length of the silence after the tone in milliseconds" + }, + { + "name": "flags", + "type": "integer", + "required": false, + "description": "* `0 or not present` play with normal priority.\n * `PLAY_BACKGROUND` play in background (built in vario function uses this context)\n * `PLAY_NOW` play immediately" + }, + { + "name": "freqIncr", + "type": "integer", + "required": false, + "description": "positive number increases the tone pitch (frequency with time), negative number decreases it. The frequency changes every 10 milliseconds, the change is `freqIncr * 10Hz`.\nThe valid range is from -127 to 127." + }, + { + "name": "volume", + "type": "integer", + "required": false, + "description": "- (1..5) override radio settings Beep volume for the duration of file\n - omitting the parameter uses radio settings Beep volume" + } + ], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.1.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function playTone(frequency, duration, pause [, flags [, freqIncr [, volume]]])\n\nPlay a tone\n\n@param frequency (number) tone frequency in Hz (from 150 to 15000)\n\n@param duration (number) length of the tone in milliseconds\n\n@param pause (number) length of the silence after the tone in milliseconds\n\n@param flags (number):\n * `0 or not present` play with normal priority.\n * `PLAY_BACKGROUND` play in background (built in vario function uses this context)\n * `PLAY_NOW` play immediately\n\n@param freqIncr (number) positive number increases the tone pitch (frequency with time),\nnegative number decreases it. The frequency changes every 10 milliseconds, the change is `freqIncr * 10Hz`.\nThe valid range is from -127 to 127.\n\n@param volume (number):\n - (1..5) override radio settings Beep volume for the duration of file\n - omitting the parameter uses radio settings Beep volume\n\n@retval none \n\n@status current Introduced in 2.1.0, changed in 2.10\n\n// targets: BW, COLOR\n//\n// EXAMPLES:\n// playTone(2550, 160, 20, 3, -10, 5) -- play tone, use Beep volume 5\n// playTone(2550, 160, 20, 3, -10, 1) -- play tone, use Beep volume 1\n// playTone(2550, 160, 20, 3, -10)\t\t-- play tone, use radio settings Beep volume", + "source_line": 1585 + }, + { + "id": "popupConfirmation", + "doc_id": "runtime.popup-confirmation", + "symbol": "popupConfirmation", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "popupConfirmation(title, event)", + "summary": "Raises a pop-up on screen that asks for confirmation", + "parameters": [ + { + "name": "title", + "type": "string", + "required": true, + "description": "title to display" + }, + { + "name": "message", + "type": "string", + "required": true, + "description": "text to display" + }, + { + "name": "event", + "type": "integer", + "required": true, + "description": "the event variable that is passed in from the Run function (key pressed)" + } + ], + "returns": [ + { + "name": "\"CANCEL\"", + "type": "unknown", + "description": "user pushed EXIT key" + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "all" + ] + }, + "notes": [ + "Use only from stand-alone and telemetry scripts." + ], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function popupConfirmation(title, event) deprecated, please replace by\n@function popupConfirmation(title, message, event)\n\nRaises a pop-up on screen that asks for confirmation\n\n@param title (string) title to display\n\n@param message (string) text to display\n\n@param event (number) the event variable that is passed in from the\nRun function (key pressed)\n\n@retval \"CANCEL\" user pushed EXIT key\n\n@notice Use only from stand-alone and telemetry scripts.\n\n@status current Introduced in 2.2.0, changed to (title, message, event) in 2.3.8", + "source_line": 1899 + }, + { + "id": "popupInput", + "doc_id": "runtime.popup-input", + "symbol": "popupInput", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "popupInput(title, event, input, min, max)", + "summary": "Raises a pop-up on screen that allows uses input", + "parameters": [ + { + "name": "title", + "type": "string", + "required": true, + "description": "text to display" + }, + { + "name": "event", + "type": "integer", + "required": true, + "description": "the event variable that is passed in from the Run function (key pressed)" + }, + { + "name": "input", + "type": "integer", + "required": true, + "description": "value that can be adjusted by the +/- keys" + }, + { + "name": "min", + "type": "integer", + "required": true, + "description": "min value that input can reach (by pressing the - key)" + }, + { + "name": "max", + "type": "integer", + "required": true, + "description": "max value that input can reach" + } + ], + "returns": [ + { + "name": "", + "type": "integer", + "description": "result of the input adjustment" + }, + { + "name": "\"OK\"", + "type": "unknown", + "description": "user pushed ENT key" + }, + { + "name": "\"CANCEL\"", + "type": "unknown", + "description": "user pushed EXIT key" + } + ], + "availability": { + "since": "2.0.0", + "radios": [ + "all" + ] + }, + "notes": [ + "Use only from stand-alone and telemetry scripts." + ], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function popupInput(title, event, input, min, max)\n\nRaises a pop-up on screen that allows uses input\n\n@param title (string) text to display\n\n@param event (number) the event variable that is passed in from the\nRun function (key pressed)\n\n@param input (number) value that can be adjusted by the +/- keys\n\n@param min (number) min value that input can reach (by pressing the - key)\n\n@param max (number) max value that input can reach\n\n@retval number result of the input adjustment\n\n@retval \"OK\" user pushed ENT key\n\n@retval \"CANCEL\" user pushed EXIT key\n\n@notice Use only from stand-alone and telemetry scripts.\n\n@status current Introduced in 2.0.0", + "source_line": 1800 + }, + { + "id": "popupWarning", + "doc_id": "runtime.popup-warning", + "symbol": "popupWarning", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "popupWarning(title, event)", + "summary": "Raises a pop-up on screen that shows a warning", + "parameters": [ + { + "name": "title", + "type": "string", + "required": true, + "description": "text to display" + }, + { + "name": "event", + "type": "integer", + "required": true, + "description": "the event variable that is passed in from the Run function (key pressed)" + } + ], + "returns": [ + { + "name": "\"CANCEL\"", + "type": "unknown", + "description": "user pushed EXIT key" + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "all" + ] + }, + "notes": [ + "Use only from stand-alone and telemetry scripts." + ], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function popupWarning(title, event)\n\nRaises a pop-up on screen that shows a warning\n\n@param title (string) text to display\n\n@param event (number) the event variable that is passed in from the\nRun function (key pressed)\n\n@retval \"CANCEL\" user pushed EXIT key\n\n@notice Use only from stand-alone and telemetry scripts.\n\n@status current Introduced in 2.2.0", + "source_line": 1852 + }, + { + "id": "rename", + "doc_id": "runtime.rename", + "symbol": "rename", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "rename(from_path, to_path)", + "summary": "Rename a file or directory\n If the file or directory is being moved to a new parent directory, then the new parent\n directory must already exist.", + "parameters": [ + { + "name": "from_path", + "type": "string", + "required": true, + "description": "Current path to rename @param to_path (string) Path to rename to" + } + ], + "returns": [], + "availability": { + "since": "2.11.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_filesystem.cpp", + "raw_luadoc": "@function rename(from_path, to_path)\n\n Rename a file or directory\n If the file or directory is being moved to a new parent directory, then the new parent\n directory must already exist.\n\n@param from_path (string) Current path to rename\n@param to_path (string) Path to rename to\n\n@status current Introduced in 2.11.0\n\n Returns FRESULT (e.g. 0=OK, 6=Path invalid, 8=Directory exists)", + "source_line": 226 + }, + { + "id": "resetGlobalTimer", + "doc_id": "runtime.reset-global-timer", + "symbol": "resetGlobalTimer", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "resetGlobalTimer([type])", + "summary": "Resets the radio global timer to 0.", + "parameters": [ + { + "name": "type", + "type": "unknown", + "required": false, + "description": ": if set to 'all', throttle ,throttle percent and session timers are reset too if set to 'session', radio session timer is reset too\n if set to 'ttimer', radio throttle timer is reset too\n if set to 'tptimer', radio throttle percent timer is reset too" + } + ], + "returns": [], + "availability": { + "since": "2.2.2", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function resetGlobalTimer([type])\n\n Resets the radio global timer to 0.\n\n@param (optional) : if set to 'all', throttle ,throttle percent and session timers are reset too\n if set to 'session', radio session timer is reset too\n if set to 'ttimer', radio throttle timer is reset too\n if set to 'tptimer', radio throttle percent timer is reset too\n\n@status current Introduced in 2.2.2, param added in 2.3", + "source_line": 2226 + }, + { + "id": "screenshot", + "doc_id": "runtime.screenshot", + "symbol": "screenshot", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "screenshot()", + "summary": "Takes a screenshot, which is saved to the SCREENSHOTS folder on the radio SD card.", + "parameters": [], + "returns": [ + { + "name": "none", + "type": "unknown", + "description": "" + } + ], + "availability": { + "since": "2.11", + "radios": [ + "all" + ] + }, + "notes": [ + "This command is currently not rate limited, so repeated frequent calls will slow down the UI and can even freeze the entire radio, so should be used with care." + ], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function screenshot()\n\nTakes a screenshot, which is saved to the SCREENSHOTS folder on the radio SD card.\n\n@retval none\n\n@notice This command is currently not rate limited, so repeated frequent calls will slow down the UI and can even freeze the entire radio, so should be used with care.\n\n@status current Introduced in 2.11\n\n// targets: BW, GS, COLOR", + "source_line": 1636 + }, + { + "id": "serialGetPower", + "doc_id": "runtime.serial-get-power", + "symbol": "serialGetPower", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "serialGetPower(port_nr)", + "summary": "", + "parameters": [ + { + "name": "port_nr", + "type": "valid", + "required": true, + "description": "values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1\n 1 - second serial port, e.g. on TX16S AUX2" + } + ], + "returns": [ + { + "name": "value", + "type": "true", + "description": "for power enabled, false for power disabled." + }, + { + "name": "", + "type": "nil", + "description": "the serial port power control not available on this radio" + } + ], + "availability": { + "since": "2.9.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function serialGetPower(port_nr)\n\n@param port_nr: valid values are only 0 and 1 on radios that have SWSERIALPOWER defined\n 0 - first serial port, e.g. on TX16S AUX1\n 1 - second serial port, e.g. on TX16S AUX2\n\n@retval value: true for power enabled, false for power disabled.\n\n@retval nil the serial port power control not available on this radio\n\n@status current Introduced in 2.9.0", + "source_line": 2394 + }, + { + "id": "serialRead", + "doc_id": "runtime.serial-read", + "symbol": "serialRead", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "serialRead([num])", + "summary": "", + "parameters": [ + { + "name": "num", + "type": "integer", + "required": false, + "description": "maximum number of bytes to read. If non-zero, serialRead will read up to num characters from the buffer.\n If 0 or left out, serialRead will read up to and including the first newline character or the end of the buffer.\n Note that the returned string may not end in a newline if this character is not present in the buffer." + } + ], + "returns": [ + { + "name": "str", + "type": "unknown", + "description": "string. Empty if no new characters were available." + } + ], + "availability": { + "since": "2.3.8", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function serialRead([num])\n@param num (optional): maximum number of bytes to read.\n If non-zero, serialRead will read up to num characters from the buffer.\n If 0 or left out, serialRead will read up to and including the first newline character or the end of the buffer.\n Note that the returned string may not end in a newline if this character is not present in the buffer.\n\n@retval str string. Empty if no new characters were available.\n\nReads characters from the serial port. The string is allowed to contain any character, including 0.\n\n@status current Introduced in 2.3.8", + "source_line": 2346 + }, + { + "id": "serialSetPower", + "doc_id": "runtime.serial-set-power", + "symbol": "serialSetPower", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "serialSetPower(port_nr, value)", + "summary": "", + "parameters": [ + { + "name": "port_nr", + "type": "valid", + "required": true, + "description": "values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1\n 1 - second serial port, e.g. on TX16S AUX2" + }, + { + "name": "value", + "type": "0", + "required": true, + "description": "- disable power 1 - enable power" + } + ], + "returns": [ + { + "name": "success", + "type": "true/false", + "description": "." + } + ], + "availability": { + "since": "2.9.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function serialSetPower(port_nr, value)\n\n@param port_nr: valid values are only 0 and 1 on radios that have SWSERIALPOWER defined\n 0 - first serial port, e.g. on TX16S AUX1\n 1 - second serial port, e.g. on TX16S AUX2\n\n@param value: 0 - disable power\n 1 - enable power\n\n@retval success: true/false.\n\n@status current Introduced in 2.9.0", + "source_line": 2431 + }, + { + "id": "serialWrite", + "doc_id": "runtime.serial-write", + "symbol": "serialWrite", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "serialWrite(str)", + "summary": "", + "parameters": [ + { + "name": "str", + "type": "string", + "required": true, + "description": "String to be written to the serial port." + } + ], + "returns": [], + "availability": { + "since": "2.3.10", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function serialWrite(str)\n@param str (string) String to be written to the serial port.\n\nWrites a string to the serial port. The string is allowed to contain any character, including 0.\n\n@status current Introduced in 2.3.10", + "source_line": 2318 + }, + { + "id": "setCFSLedColor", + "doc_id": "runtime.set-cfsled-color", + "symbol": "setCFSLedColor", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "setCFSLedColor(id, rvalue, bvalue, cvalue)", + "summary": "Overrides the LED color for a custom function switch", + "parameters": [ + { + "name": "id", + "type": "string", + "required": true, + "description": "identifying a custom function switch name" + }, + { + "name": "rvalue", + "type": "integer", + "required": true, + "description": "value of red channel" + }, + { + "name": "bvalue", + "type": "integer", + "required": true, + "description": "value of green channel" + }, + { + "name": "cvalue", + "type": "integer", + "required": true, + "description": "value of blue channel" + } + ], + "returns": [], + "availability": { + "since": "3.0.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function setCFSLedColor(id, rvalue, bvalue, cvalue)\n\nOverrides the LED color for a custom function switch\n - if passed 4 arguments (id, r, g, b) then sets override color\n - if passed 1 argument (id) then cancels override color\n\n@param id: string identifying a custom function switch name\n\n@param rvalue: interger, value of red channel\n\n@param gvalue: interger, value of green channel\n\n@param bvalue: interger, value of blue channel\n\n@retval: true if LED index is valid, false otherwise\n\n@status current. Introduced in 3.0.0", + "source_line": 2953 + }, + { + "id": "setIMU_X", + "doc_id": "runtime.set-imu-x", + "symbol": "setIMU_X", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "setIMU_X(offset, range)", + "summary": "", + "parameters": [ + { + "name": "offset", + "type": "integer", + "required": true, + "description": "offset in angular degree. -1 to offset to current X position" + }, + { + "name": "range", + "type": "integer", + "required": true, + "description": "range in angular degree. 180\u00b0 max.90 means min/max value will be reached at 45\u00b0 from offset position" + } + ], + "returns": [], + "availability": { + "since": "3.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function setIMU_X(offset, range)\n\n@param offset: integer, offset in angular degree. -1 to offset to current X position\n\n@param range: integer, range in angular degree. 180\u00b0 max.90 means min/max value will be reached at 45\u00b0 from offset position\n\n@status current Introduced in 3.0", + "source_line": 3037 + }, + { + "id": "setIMU_Y", + "doc_id": "runtime.set-imu-y", + "symbol": "setIMU_Y", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "setIMU_Y(offset, range)", + "summary": "", + "parameters": [ + { + "name": "offset", + "type": "integer", + "required": true, + "description": "offset in angular degree. -1 to offset to current Y position" + }, + { + "name": "range", + "type": "integer", + "required": true, + "description": "range in angular degree, 180\u00b0 max. 90 means min/max value will be reached at 45\u00b0 from offset position" + } + ], + "returns": [], + "availability": { + "since": "3.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function setIMU_Y(offset, range)\n\n@param offset: integer, offset in angular degree. -1 to offset to current Y position\n\n@param range: integer, range in angular degree, 180\u00b0 max. 90 means min/max value will be reached at 45\u00b0 from offset position\n\n@status current Introduced in 3.0", + "source_line": 3068 + }, + { + "id": "setRGBLedColor", + "doc_id": "runtime.set-rgbled-color", + "symbol": "setRGBLedColor", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "setRGBLedColor(id, rvalue, bvalue, cvalue)", + "summary": "", + "parameters": [ + { + "name": "id", + "type": "integer", + "required": true, + "description": "identifying a led in the led chain" + }, + { + "name": "rvalue", + "type": "integer", + "required": true, + "description": "value of red channel" + }, + { + "name": "bvalue", + "type": "integer", + "required": true, + "description": "value of green channel" + }, + { + "name": "cvalue", + "type": "integer", + "required": true, + "description": "value of blue channel" + } + ], + "returns": [], + "availability": { + "since": "2.10", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function setRGBLedColor(id, rvalue, bvalue, cvalue)\n\n@param id: integer identifying a led in the led chain\n\n@param rvalue: interger, value of red channel\n\n@param gvalue: interger, value of green channel\n\n@param bvalue: interger, value of blue channel\n\n@retval: true if LED index is valid, false otherwise\n\n@status current Introduced in 2.10", + "source_line": 2899 + }, + { + "id": "setSerialBaudrate", + "doc_id": "runtime.set-serial-baudrate", + "symbol": "setSerialBaudrate", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "setSerialBaudrate(baudrate)", + "summary": "", + "parameters": [ + { + "name": "baudrate", + "type": "unknown", + "required": true, + "description": "Desired baurate" + } + ], + "returns": [], + "availability": { + "since": "2.3.12", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function setSerialBaudrate(baudrate)\n@param baudrate Desired baurate\n\nSet baudrate for serial port(s) affected to LUA\n\n@status current Introduced in 2.3.12", + "source_line": 2299 + }, + { + "id": "setShmVar", + "doc_id": "runtime.set-shm-var", + "symbol": "setShmVar", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "setShmVar(id, value)", + "summary": "", + "parameters": [ + { + "name": "id", + "type": "integer", + "required": true, + "description": "between 1 and 16 identifying the shared memory variable." + }, + { + "name": "value", + "type": "integer", + "required": true, + "description": ". The value of the shared memory variable." + } + ], + "returns": [], + "availability": { + "since": "2.6", + "radios": [ + "color-lcd" + ] + }, + "notes": [ + "Only available on radios with color display" + ], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function setShmVar(id, value)\n\n@param id: integer between 1 and 16 identifying the shared memory variable.\n\n@param value: integer. The value of the shared memory variable.\n\nSets the value of a shared memory variable that can be used for passing data between Lua widgets and other Lua scripts.\n\n@status current Introduced in 2.6\n\n@notice Only available on radios with color display", + "source_line": 2478 + }, + { + "id": "setStickySwitch", + "doc_id": "runtime.set-sticky-switch", + "symbol": "setStickySwitch", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "setStickySwitch(id, value)", + "summary": "", + "parameters": [ + { + "name": "id", + "type": "integer", + "required": true, + "description": "identifying the sticky logical switch (zero for LS1 etc.)." + }, + { + "name": "value", + "type": "integer", + "required": true, + "description": ". The new value of the sticky logical switch." + } + ], + "returns": [ + { + "name": "bufferFull", + "type": "true/false", + "description": ". This function sends a message from Lua to the logical switch processor via a buffer with eight slots that are read 10 times per second. If the buffer is full, then a true value\nis returned and no messages was sent (i.e. the switch was not changed)." + } + ], + "availability": { + "since": "2.6", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function setStickySwitch(id, value)\n\n@param id: integer identifying the sticky logical switch (zero for LS1 etc.).\n\n@param value: true/false. The new value of the sticky logical switch.\n\n@retval bufferFull: true/false. This function sends a message from Lua to the logical switch processor\nvia a buffer with eight slots that are read 10 times per second. If the buffer is full, then a true value\nis returned and no messages was sent (i.e. the switch was not changed).\n\nSets the value of a sticky logical switch.\n\n@status current Introduced in 2.6", + "source_line": 2530 + }, + { + "id": "setTelemetryValue", + "doc_id": "runtime.set-telemetry-value", + "symbol": "setTelemetryValue", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "setTelemetryValue(id, subID, instance, value [, unit [, precision [, name]]])", + "summary": "", + "parameters": [ + { + "name": "id", + "type": "unknown", + "required": true, + "description": "Id of the sensor, valid range is from 0 to 0xFFFF" + }, + { + "name": "subID", + "type": "unknown", + "required": true, + "description": "subID of the sensor, usually 0, valid range is from 0 to 7" + }, + { + "name": "instance", + "type": "unknown", + "required": true, + "description": "instance of the sensor (SensorID), valid range is from 0 to 0xFF" + }, + { + "name": "value", + "type": "unknown", + "required": true, + "description": "fed to the sensor" + }, + { + "name": "unit", + "type": "unknown", + "required": false, + "description": "unit of the sensor, see the Units reference for the full list" + }, + { + "name": "precision", + "type": "unknown", + "required": false, + "description": "the precision of the sensor\n* `0 or not present` no decimal precision.\n * `!= 0` value is divided by 10^precision, e.g. value=1000, prec=2 => 10.00." + }, + { + "name": "name", + "type": "string", + "required": false, + "description": "Name of the sensor if it does not yet exist (4 chars).\n* `not present` Name defaults to the Id.\n * `present` Sensor takes name of the argument. Argument must have name surrounded by quotes: e.g., \"Name\"" + } + ], + "returns": [ + { + "name": "true,", + "type": "unknown", + "description": "if the sensor was just added. In this case the value is ignored (subsequent call will set the value)" + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "all" + ] + }, + "notes": [ + "All three parameters `id`, `subID` and `instance` can't be zero at the same time. At least one of them\nmust be different from zero." + ], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function setTelemetryValue(id, subID, instance, value [, unit [, precision [, name]]])\n\n@param id Id of the sensor, valid range is from 0 to 0xFFFF\n\n@param subID subID of the sensor, usually 0, valid range is from 0 to 7\n\n@param instance instance of the sensor (SensorID), valid range is from 0 to 0xFF\n\n@param value fed to the sensor\n\n@param unit unit of the sensor, see the Units reference for the full list\n\n@param precision the precision of the sensor\n * `0 or not present` no decimal precision.\n * `!= 0` value is divided by 10^precision, e.g. value=1000, prec=2 => 10.00.\n\n@param name (string) Name of the sensor if it does not yet exist (4 chars).\n * `not present` Name defaults to the Id.\n * `present` Sensor takes name of the argument. Argument must have name surrounded by quotes: e.g., \"Name\"\n\n@retval true, if the sensor was just added. In this case the value is ignored (subsequent call will set the value)\n\n@notice All three parameters `id`, `subID` and `instance` can't be zero at the same time. At least one of them\nmust be different from zero.\n\n@status current Introduced in 2.2.0", + "source_line": 1980 + }, + { + "id": "sources", + "doc_id": "runtime.sources", + "symbol": "sources", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "sources([first[, last]])", + "summary": "", + "parameters": [ + { + "name": "first", + "type": "integer", + "required": false, + "description": "first source index. If `nil` or omitted, the first available source is used." + }, + { + "name": "last", + "type": "integer", + "required": false, + "description": "last soure index. If `nil` or omitted, the last available source is used." + } + ], + "returns": [], + "availability": { + "since": "2.6", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function sources([first[, last]])\n\n@param first: the first source index. If `nil` or omitted, the first available source is used.\n\n@param last: the last soure index. If `nil` or omitted, the last available source is used.\n\nThis is an iterator function over value sources. `for sourceIndex, sourceName in sources() do ...` will iterate over all available value sources.\n\n@status current Introduced in 2.6", + "source_line": 2797 + }, + { + "id": "sportTelemetryPop", + "doc_id": "runtime.sport-telemetry-pop", + "symbol": "sportTelemetryPop", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "sportTelemetryPop()", + "summary": "Pops a received SPORT packet from the queue. Please note that only packets using a data ID within 0x5000 to 0x50FF\n(frame ID == 0x10), as well as packets with a frame ID equal 0x32 (regardless of the data ID) will be passed to\nthe LUA telemetry receive queue.", + "parameters": [], + "returns": [ + { + "name": "", + "type": "nil", + "description": "queue does not contain any (or enough) bytes to form a whole packet" + }, + { + "name": "sensor_id", + "type": "integer", + "description": "" + }, + { + "name": "frame_id", + "type": "integer", + "description": "" + }, + { + "name": "data_id", + "type": "integer", + "description": "" + }, + { + "name": "value", + "type": "integer", + "description": "" + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function sportTelemetryPop()\n\nPops a received SPORT packet from the queue. Please note that only packets using a data ID within 0x5000 to 0x50FF\n(frame ID == 0x10), as well as packets with a frame ID equal 0x32 (regardless of the data ID) will be passed to\nthe LUA telemetry receive queue.\n\n@retval nil queue does not contain any (or enough) bytes to form a whole packet\n\n@retval multiple returns 4 values:\n * sensor ID (number)\n * frame ID (number)\n * data ID (number)\n * value (number)\n\n@status current Introduced in 2.2.0", + "source_line": 912 + }, + { + "id": "sportTelemetryPush", + "doc_id": "runtime.sport-telemetry-push", + "symbol": "sportTelemetryPush", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "sportTelemetryPush()", + "summary": "This functions allows for sending SPORT telemetry data toward the receiver,\nand more generally, to anything connected SPORT bus on the receiver or transmitter.", + "parameters": [ + { + "name": "sensorId", + "type": "unknown", + "required": true, + "description": "physical sensor ID" + }, + { + "name": "frameId", + "type": "unknown", + "required": true, + "description": "frame ID" + }, + { + "name": "dataId", + "type": "unknown", + "required": true, + "description": "data ID" + }, + { + "name": "value", + "type": "unknown", + "required": true, + "description": "value" + } + ], + "returns": [ + { + "name": "", + "type": "boolean", + "description": "data queued in output buffer or not." + }, + { + "name": "", + "type": "nil", + "description": "incorrect telemetry protocol." + } + ], + "availability": { + "since": "2.2.0", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function sportTelemetryPush()\n\nThis functions allows for sending SPORT telemetry data toward the receiver,\nand more generally, to anything connected SPORT bus on the receiver or transmitter.\n\nWhen called without parameters, it will only return the status of the output buffer without sending anything.\n\n@param sensorId physical sensor ID\n\n@param frameId frame ID\n\n@param dataId data ID\n\n@param value value\n\n@retval boolean data queued in output buffer or not.\n\n@retval nil incorrect telemetry protocol.\n\n@status current Introduced in 2.2.0, retval nil added in 2.3.4", + "source_line": 960 + }, + { + "id": "switches", + "doc_id": "runtime.switches", + "symbol": "switches", + "aliases": [], + "deprecated_aliases": [], + "module": "runtime", + "kind": "function", + "syntax": "switches([first[, last]])", + "summary": "", + "parameters": [ + { + "name": "first", + "type": "integer", + "required": false, + "description": "first switch index. If `nil` or omitted, the first available switch is used." + }, + { + "name": "last", + "type": "integer", + "required": false, + "description": "last switch index. If `nil` or omitted, the last available switch is used." + } + ], + "returns": [], + "availability": { + "since": "2.6", + "radios": [ + "all" + ] + }, + "notes": [], + "source_location": "radio/src/lua/api_general.cpp", + "raw_luadoc": "@function switches([first[, last]])\n\n@param first: the first switch index. If `nil` or omitted, the first available switch is used.\n\n@param last: the last switch index. If `nil` or omitted, the last available switch is used.\n\nThis is an iterator function over switch positions. `for switchIndex, switchName in switches() do ...` will iterate over all available switch positions.\n\n@status current Introduced in 2.6", + "source_line": 2692 + } + ] +} diff --git a/docs-system/generated/golden-module-quality.json b/docs-system/generated/golden-module-quality.json new file mode 100644 index 000000000..fc6339f79 --- /dev/null +++ b/docs-system/generated/golden-module-quality.json @@ -0,0 +1,494 @@ +{ + "modules": { + "lcd": { + "items": 39, + "unknown_param_types": 7, + "unknown_return_types": 0, + "suspicious_items": [ + { + "id": "lcd.clear", + "issues": [ + "unknown_param_type" + ] + }, + { + "id": "lcd.drawBitmapPatternPie", + "issues": [ + "unknown_param_type" + ] + }, + { + "id": "lcd.drawLine", + "issues": [ + "unknown_param_type" + ] + }, + { + "id": "lcd.drawNumber", + "issues": [ + "unknown_param_type" + ] + }, + { + "id": "lcd.drawText", + "issues": [ + "unknown_param_type" + ] + }, + { + "id": "lcd.drawTimer", + "issues": [ + "unknown_param_type" + ] + } + ] + }, + "model": { + "items": 37, + "unknown_param_types": 5, + "unknown_return_types": 1, + "suspicious_items": [ + { + "id": "model.setFlightMode", + "issues": [ + "unknown_param_type" + ] + }, + { + "id": "model.setGlobalVariable", + "issues": [ + "unknown_param_type" + ] + }, + { + "id": "model.setGlobalVariableDetails", + "issues": [ + "unknown_return_type" + ] + }, + { + "id": "model.setInfo", + "issues": [ + "unknown_param_type" + ] + }, + { + "id": "model.setModule", + "issues": [ + "unknown_param_type" + ] + }, + { + "id": "model.setTimer", + "issues": [ + "unknown_param_type" + ] + } + ] + }, + "runtime": { + "items": 73, + "unknown_param_types": 19, + "unknown_return_types": 16, + "suspicious_items": [ + { + "id": "accessTelemetryPush", + "issues": [ + "unknown_param_type" + ] + }, + { + "id": "crossfireTelemetryPush", + "issues": [ + "unknown_param_type" + ] + }, + { + "id": "getRSSI", + "issues": [ + "unknown_return_type" + ] + }, + { + "id": "getSourceValue", + "issues": [ + "unknown_return_type" + ] + }, + { + "id": "ghostTelemetryPush", + "issues": [ + "unknown_param_type" + ] + }, + { + "id": "multiBuffer", + "issues": [ + "unknown_param_type" + ] + }, + { + "id": "playDuration", + "issues": [ + "unknown_return_type" + ] + }, + { + "id": "playFile", + "issues": [ + "unknown_return_type" + ] + }, + { + "id": "playNumber", + "issues": [ + "unknown_return_type" + ] + }, + { + "id": "playTone", + "issues": [ + "unknown_return_type" + ] + }, + { + "id": "popupConfirmation", + "issues": [ + "unknown_return_type" + ] + }, + { + "id": "popupInput", + "issues": [ + "unknown_return_type" + ] + }, + { + "id": "popupWarning", + "issues": [ + "unknown_return_type" + ] + }, + { + "id": "resetGlobalTimer", + "issues": [ + "unknown_param_type" + ] + }, + { + "id": "screenshot", + "issues": [ + "unknown_return_type" + ] + }, + { + "id": "serialRead", + "issues": [ + "unknown_return_type" + ] + }, + { + "id": "setSerialBaudrate", + "issues": [ + "unknown_param_type" + ] + }, + { + "id": "setTelemetryValue", + "issues": [ + "unknown_return_type", + "unknown_param_type" + ] + }, + { + "id": "sportTelemetryPush", + "issues": [ + "unknown_param_type" + ] + } + ] + } + }, + "backlog": [ + { + "id": "accessTelemetryPush", + "doc_id": "runtime.access-telemetry-push", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "crossfireTelemetryPush", + "doc_id": "runtime.crossfire-telemetry-push", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "getRSSI", + "doc_id": "runtime.get-rssi", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_return_type" + ] + }, + { + "id": "getSourceValue", + "doc_id": "runtime.get-source-value", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_return_type" + ] + }, + { + "id": "ghostTelemetryPush", + "doc_id": "runtime.ghost-telemetry-push", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "lcd.clear", + "doc_id": "lcd.clear", + "module": "lcd", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "lcd.drawBitmapPatternPie", + "doc_id": "lcd.draw-bitmap-pattern-pie", + "module": "lcd", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "lcd.drawLine", + "doc_id": "lcd.draw-line", + "module": "lcd", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "lcd.drawNumber", + "doc_id": "lcd.draw-number", + "module": "lcd", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "lcd.drawText", + "doc_id": "lcd.draw-text", + "module": "lcd", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "lcd.drawTimer", + "doc_id": "lcd.draw-timer", + "module": "lcd", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "model.setFlightMode", + "doc_id": "model.set-flight-mode", + "module": "model", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "model.setGlobalVariable", + "doc_id": "model.set-global-variable", + "module": "model", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "model.setGlobalVariableDetails", + "doc_id": "model.set-global-variable-details", + "module": "model", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_return_type" + ] + }, + { + "id": "model.setInfo", + "doc_id": "model.set-info", + "module": "model", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "model.setModule", + "doc_id": "model.set-module", + "module": "model", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "model.setTimer", + "doc_id": "model.set-timer", + "module": "model", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "multiBuffer", + "doc_id": "runtime.multi-buffer", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "playDuration", + "doc_id": "runtime.play-duration", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_return_type" + ] + }, + { + "id": "playFile", + "doc_id": "runtime.play-file", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_return_type" + ] + }, + { + "id": "playNumber", + "doc_id": "runtime.play-number", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_return_type" + ] + }, + { + "id": "playTone", + "doc_id": "runtime.play-tone", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_return_type" + ] + }, + { + "id": "popupConfirmation", + "doc_id": "runtime.popup-confirmation", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_return_type" + ] + }, + { + "id": "popupInput", + "doc_id": "runtime.popup-input", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_return_type" + ] + }, + { + "id": "popupWarning", + "doc_id": "runtime.popup-warning", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_return_type" + ] + }, + { + "id": "resetGlobalTimer", + "doc_id": "runtime.reset-global-timer", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "screenshot", + "doc_id": "runtime.screenshot", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_return_type" + ] + }, + { + "id": "serialRead", + "doc_id": "runtime.serial-read", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_return_type" + ] + }, + { + "id": "setSerialBaudrate", + "doc_id": "runtime.set-serial-baudrate", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + }, + { + "id": "setTelemetryValue", + "doc_id": "runtime.set-telemetry-value", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_return_type", + "unknown_param_type" + ] + }, + { + "id": "sportTelemetryPush", + "doc_id": "runtime.sport-telemetry-push", + "module": "runtime", + "parser_fixable": [], + "upstream_fix_likely": [ + "unknown_param_type" + ] + } + ] +} diff --git a/docs-system/generated/luals-preview/Bitmap.d.lua b/docs-system/generated/luals-preview/Bitmap.d.lua new file mode 100644 index 000000000..3eacf4734 --- /dev/null +++ b/docs-system/generated/luals-preview/Bitmap.d.lua @@ -0,0 +1,32 @@ +---@meta + +---@class Bitmap +Bitmap = {} + +--- Return width, height of a bitmap object +--- @since 2.2.0 +---@param name pointer point to a bitmap previously opened with Bitmap.open() +---@return integer width_in_pixels +---@return integer height_in_pixels +function Bitmap.getSize(name) end + +--- Loads a bitmap in memory, for later use with lcd.drawBitmap(). Bitmaps should be loaded only +once, returned object should be stored and used for drawing. If loading fails for whatever +reason the resulting bitmap object will have width and height set to zero. +--- @since 2.2.0 +---@param name string full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) +---@return object bitmap +function Bitmap.open(name) end + +--- Return a resized bitmap object +--- @since 2.8.0 +---@param bitmap pointer point to a bitmap previously opened with Bitmap.open() +---@param width integer the new bitmap width +---@param height integer the new bitmap height +function Bitmap.resize(bitmap, width, height) end + +--- Return a 8bit bitmap mask that can be used with lcd.drawBitmapPattern() +--- @since 2.8.0 +---@param bitmap pointer point to a bitmap previously opened with Bitmap.open() +---@return unknown a +function Bitmap.toMask(bitmap) end diff --git a/docs-system/generated/luals-preview/lcd.d.lua b/docs-system/generated/luals-preview/lcd.d.lua new file mode 100644 index 000000000..ac4a01f7c --- /dev/null +++ b/docs-system/generated/luals-preview/lcd.d.lua @@ -0,0 +1,12 @@ +---@meta + +---@class lcd +lcd = {} + +--- Display a previously opened bitmap at coordinates and optionally scale it. +--- @since 2.3.0 +---@param bitmap bitmapPointer Pointer returned by Bitmap.open(). +---@param x integer Top coordinate. +---@param y integer Left coordinate. +---@param scale? integer Scale percent where 100 keeps original size. +function lcd.drawBitmap(bitmap, x, y, scale) end diff --git a/docs-system/generated/luals-preview/model.d.lua b/docs-system/generated/luals-preview/model.d.lua new file mode 100644 index 000000000..a9bb8864b --- /dev/null +++ b/docs-system/generated/luals-preview/model.d.lua @@ -0,0 +1,232 @@ +---@meta + +---@class model +model = {} + +--- Set all inputs to defaults +--- @since 2.0.0 +function model.defaultInputs() end + +--- Clear all flightModes +--- @since 2.3.10 +function model.deleteFlightModes() end + +--- Delete line from specified input +--- @since 2.0.0 +---@param input integer input number (use 0 for Input1) +---@param line integer input line (use 0 for first line) +function model.deleteInput(input, line) end + +--- Delete all Inputs +--- @since 2.0.0 +function model.deleteInputs() end + +--- Delete mixer line from specified Channel +--- @since 2.0.0 +---@param channel integer channel number (use 0 for CH1) +---@param line integer mix number (use 0 for first line(mix)) +function model.deleteMix(channel, line) end + +--- Remove all mixers +--- @since 2.0.0 +function model.deleteMixes() end + +--- Get Curve parameters +--- @since 2.0.12 +---@param curve integer curve number (use 0 for Curve1) +---@return nil +---@return table +function model.getCurve(curve) end + +--- Get Custom Function parameters +--- @since 2.0.0 +---@param function integer custom function number (use 0 for CF1) +---@return nil +---@return table +function model.getCustomFunction(function) end + +--- +--- @since 2.3.10 +---@param index integer flight mode number (use 0 for FM0) +---@return nil +---@return table +function model.getFlightMode(index) end + +--- Return current global variable value +--- @since unknown +---@param index integer zero based global variable index, use 0 for GV1, 8 for GV9 +---@param flight_mode integer Flight mode number (0 = FM0, 8 = FM8) +---@return nil +---@return integer +function model.getGlobalVariable(index, flight_mode) end + +--- Get current Model information +--- @since 2.0.6 +---@return table +function model.getInfo() end + +--- Return input data for given input and line number +--- @since 2.0.0 +---@param input integer input number (use 0 for Input1) +---@param line integer input line (use 0 for first line) +---@return nil +---@return table +function model.getInput(input, line) end + +--- Return number of lines for given input +--- @since 2.0.0 +---@param input integer input number (use 0 for Input1) +---@return integer +function model.getInputsCount(input) end + +--- Get Logical Switch parameters +--- @since 2.0.0 +---@param switch integer logical switch number (use 0 for LS1) +---@return nil +---@return table +function model.getLogicalSwitch(switch) end + +--- Get configuration for specified Mix +--- @since 2.0.0 +---@param channel integer channel number (use 0 for CH1) +---@param line integer mix number (use 0 for first line(mix)) +---@return nil +---@return table +function model.getMix(channel, line) end + +--- Get the number of Mixer lines that the specified Channel has +--- @since 2.0.0 +---@param channel integer channel number (use 0 for CH1) +---@return integer +function model.getMixesCount(channel) end + +--- Get RF module parameters +--- @since 2.2.0 +---@param index integer module index (0 for internal, 1 for external) +---@return nil +---@return table +function model.getModule(index) end + +--- Get servo parameters +--- @since 2.0.0 +---@param index integer output number (use 0 for CH1) +---@return nil +---@return table +function model.getOutput(index) end + +--- Get Telemetry Sensor parameters +--- @since 2.3.0 +---@param sensor integer sensor number (use 0 for sensor 1) +---@return nil +---@return table +function model.getSensor(sensor) end + +--- Get heli swash parameters +--- @since unknown +---@return table +function model.getSwashRing() end + +--- Get warning state for a switch +--- @since 3.0.0 +---@param switch integer switch number (use 0 for SA) @param switch (string) switch name +---@return nil +function model.getSwitchWarning(switch) end + +--- Get model timer parameters +--- @since 2.0.0 +---@param timer integer timer index (0 for Timer 1) +---@return nil +---@return table +function model.getTimer(timer) end + +--- Insert an Input at specified line +--- @since 2.0.0 +---@param input integer input number (use 0 for Input1) +---@param line integer input line (use 0 for first line) +---@param value table input data, see model.getInput() +function model.insertInput(input, line, value) end + +--- Insert a mixer line into Channel +--- @since 2.0.0 +---@param channel integer channel number (use 0 for CH1) +---@param line integer mix number (use 0 for first line(mix)) +---@param value table see model.getMix() for table format +function model.insertMix(channel, line, value) end + +--- Reset Telemetry Sensor parameters +--- @since 2.3.11 +---@param sensor integer sensor number (use 0 for sensor 1) +---@return nil +function model.resetSensor(sensor) end + +--- Reset model timer to a startup value +--- @since unknown +---@param timer integer timer index (0 for Timer 1) +function model.resetTimer(timer) end + +--- Set Curve parameters +--- @since 2.2.0 +---@param curve integer curve number (use 0 for Curve1) +---@param params integer see model.getCurve return format for table format. setCurve uses standard lua array indexing and arrays start at index 1 +---@return integer 0 +function model.setCurve(curve, params) end + +--- Set Custom Function parameters +--- @since 2.0.0 +---@param function integer custom function number (use 0 for CF1) +---@param value table custom function parameters, see model.getCustomFunction() for table format +function model.setCustomFunction(function, value) end + +--- Set Flight mode parameters +--- @since 2.3.10 +---@param index integer flight mode number (use 0 for FM0) +---@param params unknown see model.getFlightMode return format for table format. +function model.setFlightMode(index, params) end + +--- Sets current global variable value. See also model.getGlobalVariable() +--- @since unknown +---@param index integer zero based global variable index, use 0 for GV1, 8 for GV9 +---@param flight_mode integer Flight mode number (0 = FM0, 8 = FM8) +---@param value unknown new value for global variable. Permitted range is from -1024 to 1024. +function model.setGlobalVariable(index, flight_mode, value) end + +--- Set the current Model information +--- @since 2.0.6 +---@param value unknown model information data, see model.getInfo() +function model.setInfo(value) end + +--- Set Logical Switch parameters +--- @since 2.0.0 +---@param switch integer logical switch number (use 0 for LS1) +---@param value table see model.getLogicalSwitch() for table format +function model.setLogicalSwitch(switch, value) end + +--- Set RF module parameters +--- @since 2.2.0 +---@param index integer module index (0 for internal, 1 for external) +---@param value unknown module parameters, see model.getModule() +function model.setModule(index, value) end + +--- Set servo parameters +--- @since 2.0.0 +---@param index integer channel number (use 0 for CH1) +---@param value table servo parameters, see model.getOutput() for table format +function model.setOutput(index, value) end + +--- Set heli swash parameters +--- @since 2.8.0 +---@param params table swash ring parameters, see model.getSwashRing() for table format +function model.setSwashRing(params) end + +--- Set warning state for a switch +--- @since 3.0.0 +---@param switch integer switch number (use 0 for SA) @param switch (string) switch name +---@param state integer state 0 = no warning 1 = switch up 2 = switch middle 3 = switch down +---@return nil +function model.setSwitchWarning(switch, state) end + +--- Set model timer parameters +--- @since 2.0.0 +---@param timer integer timer index (0 for Timer 1) +---@param value unknown timer parameters, see model.getTimer() +function model.setTimer(timer, value) end diff --git a/docs-system/generated/luals-preview/runtime.d.lua b/docs-system/generated/luals-preview/runtime.d.lua new file mode 100644 index 000000000..e186d2b58 --- /dev/null +++ b/docs-system/generated/luals-preview/runtime.d.lua @@ -0,0 +1,7 @@ +---@meta + +--- Return the firmware version and platform details. +--- @since 2.4.0 +---@return string version +---@return string radio +function getVersionInfo() end diff --git a/docs-system/generated/luals/Bitmap.d.lua b/docs-system/generated/luals/Bitmap.d.lua new file mode 100644 index 000000000..7b72a925b --- /dev/null +++ b/docs-system/generated/luals/Bitmap.d.lua @@ -0,0 +1,59 @@ +---@meta + +-- GENERATED FILE — do not hand-edit. +-- Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +-- To fix API facts: edit the upstream EdgeTX /*luadoc*/ comment, then +-- re-extract and rebuild. To add narrative content: edit +-- docs-system/overlays/.md, then rebuild. + +--- LCD line pattern selector such as SOLID or DOTTED. +---@alias pen_type integer +--- Text rendering flags used by legacy LCD number APIs. +---@alias text_flags integer +--- Packed 16-bit RGB color value for color LCD APIs. +---@alias lcd_color_RGB565 integer +--- Font size selector such as XXLSIZE, DBLSIZE, MIDSIZE, or SMLSIZE. +---@alias lcd_font_size integer +--- Bitmask of LCD text rendering flags such as INVERS, BLINK, and SHADOWED. +---@alias lcd_text_flags integer +--- Combined LCD text formatting bitmask covering font size and text flags. +---@alias lcd_text_format integer +--- Signed EdgeTX source value in the normalized range from -1024 to 1024. +---@alias source_range_1024 integer +--- Global timer selector such as all, total, session, throttle, or throttlepct. +---@alias timer_type string +--- Telemetry unit identifier from the EdgeTX unit list. +---@alias unit_type integer +--- Telemetry precision selector controlling decimal places. +---@alias prec_type integer + +---@class Bitmap +Bitmap = {} + +--- Return width, height of a bitmap object +--- @since 2.2.0 +---@param name pointer point to a bitmap previously opened with Bitmap.open() +---@return integer width_in_pixels +---@return integer height_in_pixels +function Bitmap.getSize(name) end + +--- Loads a bitmap in memory, for later use with lcd.drawBitmap(). Bitmaps should be loaded only +once, returned object should be stored and used for drawing. If loading fails for whatever +reason the resulting bitmap object will have width and height set to zero. +--- @since 2.2.0 +---@param name string full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) +---@return object bitmap +function Bitmap.open(name) end + +--- Return a resized bitmap object +--- @since 2.8.0 +---@param bitmap pointer point to a bitmap previously opened with Bitmap.open() +---@param width integer the new bitmap width +---@param height integer the new bitmap height +function Bitmap.resize(bitmap, width, height) end + +--- Return a 8bit bitmap mask that can be used with lcd.drawBitmapPattern() +--- @since 2.8.0 +---@param bitmap pointer point to a bitmap previously opened with Bitmap.open() +---@return unknown a +function Bitmap.toMask(bitmap) end diff --git a/docs-system/generated/luals/lcd.d.lua b/docs-system/generated/luals/lcd.d.lua new file mode 100644 index 000000000..d845fa01f --- /dev/null +++ b/docs-system/generated/luals/lcd.d.lua @@ -0,0 +1,353 @@ +---@meta + +-- GENERATED FILE — do not hand-edit. +-- Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +-- To fix API facts: edit the upstream EdgeTX /*luadoc*/ comment, then +-- re-extract and rebuild. To add narrative content: edit +-- docs-system/overlays/.md, then rebuild. + +--- LCD line pattern selector such as SOLID or DOTTED. +---@alias pen_type integer +--- Text rendering flags used by legacy LCD number APIs. +---@alias text_flags integer +--- Packed 16-bit RGB color value for color LCD APIs. +---@alias lcd_color_RGB565 integer +--- Font size selector such as XXLSIZE, DBLSIZE, MIDSIZE, or SMLSIZE. +---@alias lcd_font_size integer +--- Bitmask of LCD text rendering flags such as INVERS, BLINK, and SHADOWED. +---@alias lcd_text_flags integer +--- Combined LCD text formatting bitmask covering font size and text flags. +---@alias lcd_text_format integer +--- Signed EdgeTX source value in the normalized range from -1024 to 1024. +---@alias source_range_1024 integer +--- Global timer selector such as all, total, session, throttle, or throttlepct. +---@alias timer_type string +--- Telemetry unit identifier from the EdgeTX unit list. +---@alias unit_type integer +--- Telemetry precision selector controlling decimal places. +---@alias prec_type integer + +---@class lcd +lcd = {} + +--- Returns a drawing flag with RGB color code +--- @since 2.2.0 +---@param r integer a number between 0 and 255 that expresses the amount of red in the color +---@param g integer a number between 0 and 255 that expresses the amount of green in the color +---@param b integer a number between 0 and 255 that expresses the amount of blue in the color +---@param rgb integer a number between 0 and 0xFFFFFF that expresses the RGB value (0xFF000=RED, 0x00FF00=GREEN, 0x0000FF=BLUE) +---@return integer flag +function lcd.RGB(r, g, b, rgb) end + +--- Clear the LCD screen +--- @since 2.0.0 +---@param color? unknown +function lcd.clear(color) end + +--- Draw an arc +--- @since 2.4.0 +---@param x integer coordinates of the center +---@param y integer coordinates of the center +---@param r1 integer radii of the inside and outside of the annulus +---@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 the Lcd functions overview +function lcd.drawAnnulus(x, y, r1, r2, start, end, flags) end + +--- Draw an arc +--- @since 2.4.0 +---@param x integer coordinates of the center +---@param y integer coordinates of the center +---@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 the Lcd functions overview +function lcd.drawArc(x, y, r, start, end, flags) end + +--- Displays a bitmap at (x,y) +--- @since 2.2.0 +---@param bitmap pointer point to a bitmap previously opened with Bitmap.open() +---@param x integer starting coordinates +---@param y integer starting coordinates +---@param scale? integer scale in %, 50 divides size by two, 100 is unchanged, 200 doubles size. Omitting scale draws image in 1:1 scale and is faster than specifying 100 for scale. +function lcd.drawBitmap(bitmap, x, y, scale) end + +--- Displays a bitmap pattern at (x,y) +--- @since 2.8.0 +---@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 the Lcd functions overview +function lcd.drawBitmapPattern(bitmap, x, y, flags) end + +--- Displays a bitmap pattern pie at (x,y) +--- @since 2.8.0 +---@param bitmap pointer point to a bitmap previously opened with Bitmap.open() +---@param x integer starting coordinates +---@param y integer starting coordinates +---@param startangle unknown Start angle +---@param endangle unknown End angle +---@param flags? integer please see the Lcd functions overview +function lcd.drawBitmapPatternPie(bitmap, x, y, startangle, endangle, flags) end + +--- Display a telemetry value at (x,y) +--- @since 2.0.6 +---@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 the Lcd functions overview +function lcd.drawChannel(x, y, source, flags) end + +--- Draw a circle at (x, y) of specified radius +--- @since 2.4.0 +---@param x integer center position +---@param y integer center position +---@param r integer radius in pixels +---@param flags? integer please see the Lcd functions overview +function lcd.drawCircle(x, y, r, flags) end + +--- Draw a combo box +--- @since 2.0.0 +---@param x integer top left corner position +---@param y integer top left corner position +---@param w integer width of combo box in pixels +---@param list table combo box elements, each element is a string +---@param idx integer index of entry to highlight +---@param flags? integer drawing flags, the flags can not be combined: * BLINK combo box is expanded * INVERS combo box collapsed, text inversed * 0 or not present combo box collapsed, text normal +function lcd.drawCombobox(x, y, w, list, idx, flags) end + +--- Draw a filled circle at (x, y) of specified radius +--- @since 2.4.0 +---@param x integer center position +---@param y integer center position +---@param r integer radius in pixels +---@param flags? integer please see the Lcd functions overview +function lcd.drawFilledCircle(x, y, r, flags) end + +--- Draw a solid rectangle from top left corner (x,y) of specified width and height +--- @since 2.0.0 +---@param x integer top left corner position +---@param y integer top left corner position +---@param w integer width in pixels +---@param h integer height in pixels +---@param flags? integer please see the Lcd functions overview +---@param opacity? integer opacity defaults to 0 (only on radios with color display) +function lcd.drawFilledRectangle(x, y, w, h, flags, opacity) end + +--- Draw a filled triangle +--- @since 2.4.0 +---@param x1 integer coordinates of the three vertices +---@param y1 integer coordinates of the three vertices +---@param x2 integer coordinates of the three vertices +---@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 the Lcd functions overview +function lcd.drawFilledTriangle(x1, y1, x2, y2, x3, y3, flags) end + +--- Draw a simple gauge that is filled based upon fill value +--- @since 2.0.0 +---@param x integer top left corner position +---@param y integer top left corner position +---@param w integer width in pixels +---@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 the Lcd functions overview +function lcd.drawGauge(x, y, w, h, fill, maxfill, flags) end + +--- Draw a rectangle in perspective +--- @since 2.4.0 +---@param pitch integer pitch and roll to define the orientation of the rectangle +---@param roll integer pitch and roll to define the orientation of the rectangle +---@param xmin integer the limits of the rectangle +---@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 the Lcd functions overview +function lcd.drawHudRectangle(pitch, roll, xmin, xmax, ymin, ymax, flags) end + +--- Draw a straight line on LCD +--- @since 2.0.0 +---@param x1 integer starting coordinate +---@param y1 integer starting coordinate +---@param x2 integer end coordinate +---@param y2 integer end coordinate +---@param pattern unknown SOLID or DOTTED +---@param flags? integer lcdflags +function lcd.drawLine(x1, y1, x2, y2, pattern, flags) end + +--- Draw a line only inside a rectangle +--- @since 2.4.0 +---@param x1 integer coordinates of the start and end of the unclipped line +---@param y1 integer coordinates of the start and end of the unclipped line +---@param x2 integer coordinates of the start and end of the unclipped line +---@param y2 integer coordinates of the start and end of the unclipped line +---@param xmin integer the limits of the rectangle inside which the line is drawn +---@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 the Lcd functions overview +---@param flags? integer please see the Lcd functions overview +function lcd.drawLineWithClipping(x1, y1, x2, y2, xmin, xmax, ymin, ymax, pattern, flags) end + +--- Display a number at (x,y) +--- @since 2.0.0 +---@param x integer starting coordinate +---@param y integer starting coordinate +---@param value integer value to display +---@param flags? integer please see the Lcd functions overview +---@param inverscolor? unknown overrides the inverse text color for INVERS +function lcd.drawNumber(x, y, value, flags, inverscolor) end + +--- Draw a pie slice +--- @since 2.4.0 +---@param x integer coordinates of the center +---@param y integer coordinates of the center +---@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 the Lcd functions overview +function lcd.drawPie(x, y, r, start, end, flags) end + +--- Draw a bitmap at (x,y) +--- @since 2.0.0 +---@param x integer starting coordinates +---@param y integer starting coordinates +---@param name string full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) +function lcd.drawPixmap(x, y, name) end + +--- Draw a single pixel at (x,y) position +--- @since 2.0.0 +---@param x integer x position +---@param y integer y position +---@param flags? integer please see the Lcd functions overview +function lcd.drawPoint(x, y, flags) end + +--- Draw a rectangle from top left corner (x,y) of specified width and height +--- @since 2.0.0 +---@param x integer top left corner position +---@param y integer top left corner position +---@param w integer width in pixels +---@param h integer height in pixels +---@param flags? integer please see the Lcd functions overview +---@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 + +--- Draw a title bar +--- @since 2.0.0 +---@param title string text for the title +---@param page integer page number +---@param pages integer total number of pages. Only used as indicator on the right side of title bar. (i.e. idx=2, cnt=5, display 2/5) +function lcd.drawScreenTitle(title, page, pages) end + +--- Displays the name of the corresponding input as defined by the source at (x,y) +--- @since 2.0.0 +---@param x integer starting coordinate +---@param y integer starting coordinate +---@param source integer source index +---@param flags? integer please see the Lcd functions overview +function lcd.drawSource(x, y, source, flags) end + +--- Draw a text representation of switch at (x,y) +--- @since 2.0.0 +---@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 the Lcd functions overview, only SMLSIZE, BLINK and INVERS. +function lcd.drawSwitch(x, y, switch, flags) end + +--- Draw a text beginning at (x,y) +--- @since 2.0.0 +---@param x integer starting coordinate +---@param y integer starting coordinate +---@param text string text to display +---@param flags? integer please see the Lcd functions overview for drawing flags and colors, and the Appendix for available characters in each font set. +---@param inverscolor? unknown overrides the inverse text color for INVERS +function lcd.drawText(x, y, text, flags, inverscolor) end + +--- Draw text inside rectangle (x,y,w,h) with line breaks +--- @since 2.5.0 +---@param x integer starting coordinate +---@param y integer starting coordinate +---@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 the Lcd functions overview for drawing flags and colors, and the Appendix 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 + +--- Display a value formatted as time at (x,y) +--- @since 2.0.0 +---@param x integer starting coordinate +---@param y integer starting coordinate +---@param value integer time in seconds +---@param flags? integer please see the Lcd functions overview +---@param inverscolor? unknown overrides the inverse text color for INVERS +function lcd.drawTimer(x, y, value, flags, inverscolor) end + +--- Draw a triangle +--- @since 2.4.0 +---@param x1 integer coordinates of the three vertices +---@param y1 integer coordinates of the three vertices +---@param x2 integer coordinates of the three vertices +---@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 the Lcd functions overview +function lcd.drawTriangle(x1, y1, x2, y2, x3, y3, flags) end + +--- Exit full screen widget mode. +--- @since 2.5.0 +function lcd.exitFullScreen() end + +--- Get the color value from flags +--- @since 2.3.11 +---@param flags integer please see the Lcd functions overview +---@return integer color +function lcd.getColor(flags) end + +--- Returns the leftmost x position from previous drawtext or drawNumber output +--- @since 2.2.0 +---@return integer number +function lcd.getLastLeftPos() end + +--- Returns the rightmost x position from previous output +--- @since 2.0.0 +---@return integer number +function lcd.getLastPos() end + +--- Returns the rightest x position from previous drawtext or drawNumber output +--- @since 2.2.0 +---@return integer number +function lcd.getLastRightPos() end + +--- Invert a rectangle zone from top left corner (x,y) of specified width and height +--- @since 2.8.0 +---@param x integer top left corner position +---@param y integer top left corner position +---@param w integer width in pixels +---@param h integer height in pixels +---@param flags? integer please see the Lcd functions overview +function lcd.invertRect(x, y, w, h, flags) end + +--- Refresh the LCD screen +--- @since 2.2.0 +function lcd.refresh() end + +--- Reset the backlight timeout +--- @since 2.3.6 +function lcd.resetBacklightTimeout() end + +--- Change an indexed color (theme colors and CUSTOM_COLOR). Please see the Lcd functions overview for indexed color constants +--- @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 the Lcd functions overview +---@return integer w_h +function lcd.sizeText(text, flags) end diff --git a/docs-system/generated/luals/lvgl.d.lua b/docs-system/generated/luals/lvgl.d.lua new file mode 100644 index 000000000..d03f10350 --- /dev/null +++ b/docs-system/generated/luals/lvgl.d.lua @@ -0,0 +1,326 @@ +---@meta + +-- GENERATED FILE — do not hand-edit. +-- Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +-- To fix API facts: edit the upstream EdgeTX /*luadoc*/ comment, then +-- re-extract and rebuild. To add narrative content: edit +-- docs-system/overlays/.md, then rebuild. + +--- LCD line pattern selector such as SOLID or DOTTED. +---@alias pen_type integer +--- Text rendering flags used by legacy LCD number APIs. +---@alias text_flags integer +--- Packed 16-bit RGB color value for color LCD APIs. +---@alias lcd_color_RGB565 integer +--- Font size selector such as XXLSIZE, DBLSIZE, MIDSIZE, or SMLSIZE. +---@alias lcd_font_size integer +--- Bitmask of LCD text rendering flags such as INVERS, BLINK, and SHADOWED. +---@alias lcd_text_flags integer +--- Combined LCD text formatting bitmask covering font size and text flags. +---@alias lcd_text_format integer +--- Signed EdgeTX source value in the normalized range from -1024 to 1024. +---@alias source_range_1024 integer +--- Global timer selector such as all, total, session, throttle, or throttlepct. +---@alias timer_type string +--- Telemetry unit identifier from the EdgeTX unit list. +---@alias unit_type integer +--- Telemetry precision selector controlling decimal places. +---@alias prec_type integer + +---@class lvgl +lvgl = {} + +--- Display a button showing a text alignment name. Tapping it opens a popup menu to choose an alignment from, using EdgeTX styling. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * get (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected alignment, defaults to nil * set (function) called when the user taps an alignment in the popup; passed the selected alignment value, defaults to nil +---@return table +function lvgl.align(parent, params) end + +--- Display an arc. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * thickness (number) width of the arc's line, defaults to 1 * radius (number or function) radius of the arc, defaults to 0 * startAngle (number or function) starting angle in degrees (0-360), 0 is 3 o'clock, defaults to 0 * endAngle (number or function) ending angle in degrees, defaults to 360 * opacity (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 * rounded (boolean) if true the ends of the arc are rounded, defaults to false * bgColor (color or function) color of the background arc, not used by default * bgOpacity (number or function) opacity of the background arc, defaults to 0 (not visible) * bgStartAngle (number or function) starting angle of the background arc in degrees, defaults to 0 * bgEndAngle (number or function) ending angle of the background arc in degrees, defaults to 360 +---@return table +function lvgl.arc(parent, params) end + +--- Create a container for managing object layout. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * flexFlow (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default * flexPad (number) padding between rows/columns when flex layout is used; recommend using lvgl.PAD_xxx values, defaults to PAD_OUTLINE * scrollBar (boolean) enables/disables scroll bars, defaults to true * scrollDir (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the box bounds (stand alone scripts only), defaults to lvgl.SCROLL_ALL * scrolled (function) called when the box content is scrolled; passed x, y of the current scroll position, defaults to nil * scrollTo (function) overrides the box scroll position; must return x, y to scroll to, defaults to nil * align (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4); avoid combining an alignment with a scrollbar on the same axis, defaults to CENTER | VTOP * borderPad (number or table) border padding around the container edges; a single number applies to all sides, or a table {left=?, right=?, top=?, bottom=?} (added in 2.11.5), defaults to PAD_OUTLINE if flexFlow is set, otherwise 0 +---@return table +function lvgl.box(parent, params) end + +--- Build a complex UI in a single operation from a table of object definitions. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the built objects to; if omitted they attach to the top-level script window +---@param params table a table of tables, each defining one LVGL object: * type (string or type constant) mandatory, selects the kind of object to create, e.g. "rectangle" or lvgl.RECTANGLE; named type constants (e.g. lvgl.RECTANGLE) added in 2.11.4, string names work in all versions * name (string) optional name used to look up this object in the returned table, defaults to an empty string * children (table) optional nested table of the same shape, to create child objects * any other key accepted by the constructor function for the chosen type +---@return table +function lvgl.build(parent, params) end + +--- Add a text button using the EdgeTX style. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * text (string or function) text displayed in the button, defaults to an empty string * press (function) called when the user taps the button, after releasing ENTER or the screen; may optionally return a non-zero integer to display the button in the checked state, defaults to nil * longpress (function) called on a long tap; may optionally return a non-zero integer to display the button in the checked state, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * checked (boolean) sets the initial checked state; can be updated with lvgl.set(), defaults to false * color (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color * textColor (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color * cornerRadius (number) radius for the button's corners, defaults to the EdgeTX button style radius * font (font value or function) sets the font size, e.g. MIDSIZE, DBLSIZE; defaults to STDSIZE +---@return table +function lvgl.button(parent, params) end + +--- Display a button showing an option value. Tapping it opens a popup menu of options to choose from, using EdgeTX styling. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * title (string) text displayed in the popup menu's header, defaults to an empty string * values (table) simple table of option strings shown in the popup; can be changed via lvgl.set() since 2.11.6, defaults to an empty list * get (function) called on every refresh cycle to keep the displayed value in sync, to get the index of the currently selected option (1..number of values), defaults to nil * set (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * filter (function) called for each option when the popup opens, passed the option's index; return true to show it, false to hide it, defaults to nil * popupWidth (number) width of the popup window, defaults to 0 (use default width) +---@return table +function lvgl.choice(parent, params) end + +--- Display a solid or outlined circle. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * thickness (number) width of the border line, defaults to 1 * filled (boolean) if true the circle is filled with color, defaults to false * radius (number or function) radius of the circle, defaults to 0 * opacity (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 +---@return table +function lvgl.circle(parent, params) end + +--- Delete LVGL objects. +--- @since 2.11.0 +---@param parent? object optional LVGL object whose children should be deleted; if omitted, the entire script UI is deleted +---@return unknown none +function lvgl.clear(parent) end + +--- Close an LVGL object that represents a closable container or dialog. +--- @since 2.11.0 +---@param obj object LVGL object previously created by the lvgl library +---@return unknown none +function lvgl.close(obj) end + +--- Display a button showing a color swatch. Tapping it opens the color picker dialog, using EdgeTX styling. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * get (function) called once when the object is created, to get the initial color, defaults to nil * set (function) called when the user picks a color; passed the selected color value, defaults to nil +---@return table +function lvgl.color(parent, params) end + +--- Display a Yes/No confirmation dialog box. +--- @since 2.11.0 +---@param params table * title (string) text displayed in the dialog's header, defaults to an empty string * message (string) text displayed in the dialog's body, defaults to an empty string * confirm (function) called when the user taps Yes, defaults to nil * cancel (function) called when the user taps No, defaults to nil +---@return unknown none +function lvgl.confirm(params) end + +--- Display a dialog box. +--- @since 2.11.0 +---@param params table * title (string) text displayed in the dialog's header, defaults to an empty string * close (function) called when the dialog is closed, defaults to nil * flexFlow (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default * flexPad (number) padding between rows/columns when flex layout is used, defaults to PAD_OUTLINE +---@return table +function lvgl.dialog(params) end + +--- Disable interaction for an LVGL control object. +--- @since 2.11.0 +---@param obj object LVGL object previously created by the lvgl library +---@return unknown none +function lvgl.disable(obj) end + +--- Enable interaction for an LVGL control object. +--- @since 2.11.0 +---@param obj object LVGL object previously created by the lvgl library +---@return unknown none +function lvgl.enable(obj) end + +--- If the script is running in full screen mode, return it to normal mode. +--- @since 2.11.0 +---@return unknown none +function lvgl.exitFullScreen() end + +--- Display a button showing a filename. Tapping it opens a popup file picker, using EdgeTX styling. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * title (string) text displayed in the popup's header, defaults to an empty string * get (function) called when the popup is opened, and after the selection changes, to get the currently selected filename; must return a string, defaults to nil * set (function) called when the user picks a file; passed the selected filename (without path), defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * folder (string) SD card folder to browse for files, defaults to nil * extension (string) extension filter, e.g. .png or concatenated .png.bmp to match multiple, defaults to nil (no filter) * hideExtension (boolean) if true, the extension is stripped before set is called and hidden in the picker list, defaults to false * maxLen (number) maximum filename length (measured after hideExtension stripping, if set); files with longer names are not shown in the picker list, defaults to 255 +---@return table +function lvgl.file(parent, params) end + +--- Display a button showing a font name. Tapping it opens a popup menu to choose a font from, using EdgeTX styling. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * get (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected font, defaults to nil * set (function) called when the user taps a font in the popup; passed the selected font value, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil +---@return table +function lvgl.font(parent, params) end + +--- For a widget script, returns the local instance table created by (and returned from) the script's `create()` function. +--- @since 2.11.0 +---@return table +function lvgl.getContext() end + +--- Get the current scroll position of a container object. +--- @since 2.11.2 +---@param parent object LVGL container object (e.g. box, rectangle, or page) +---@return unknown number +function lvgl.getScrollPos(parent) end + +--- Hide an LVGL object. +--- @since 2.11.0 +---@param parent object LVGL object to hide +---@return unknown none +function lvgl.hide(parent) end + +--- Display a horizontal line. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * rounded (boolean) if true the line's end caps are rounded, defaults to false * opacity (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 * dashGap (number) gap size for dashed lines, defaults to 0 * dashWidth (number) dash size for dashed lines, defaults to 0; both dashGap and dashWidth must be > 0 to draw dashed lines +---@return table +function lvgl.hline(parent, params) end + +--- Display an image, centered in the frame `(x, y, w, h)`. Images can be scaled to fit entirely within the frame or to fill it completely. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * file (string) full path to the image file on the SD card, defaults to an empty string * fill (boolean) if true the image is scaled to completely fill the frame (may be cropped); if false it is scaled to fit entirely within the frame (may have empty borders), defaults to false +---@return table +function lvgl.image(parent, params) end + +--- Test if the script is running in App Mode. +--- @since 2.11.0 +---@return boolean +function lvgl.isAppMode() end + +--- Test if the script is running in full screen mode. +--- @since 2.11.0 +---@return boolean +function lvgl.isFullScreen() end + +--- Display a text label. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * text (string or function) text to display, defaults to an empty string * font (font value or function) sets the font size, e.g. MIDSIZE, DBLSIZE; defaults to STDSIZE * align (text alignment value or function) sets the text justification, e.g. RIGHT, VCENTER; defaults to LEFT. RIGHT/CENTER require w to be set. LEFT/RIGHT/CENTER align text horizontally within the label's bounding box (x,y,w,h); VCENTER/VTOP/VBOTTOM align the label's bounding box vertically within the parent object +---@return table +function lvgl.label(parent, params) end + +--- Display one or more connected line segments. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * rounded (boolean) if true the line's end caps are rounded, defaults to false * thickness (number) thickness of each line segment, defaults to 1 * opacity (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 * pts (table or function) table of points, each a {x, y} pair; at least two points are required, defaults to nil +---@return table +function lvgl.line(parent, params) end + +--- Open a popup menu with multiple options to choose from, using EdgeTX styling. +--- @since 2.11.1 +---@param params table * title (string) text displayed in the popup's header, defaults to an empty string * values (table) simple table of option strings shown in the popup, defaults to an empty list * get (function) called when the popup is opened, to get the index of the currently selected option (1..number of values), defaults to nil * set (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil +---@return unknown none +function lvgl.menu(params) end + +--- Display a message dialog box. +--- @since 2.11.0 +---@param params table * title (string) text displayed in the dialog's header, defaults to an empty string * message (string) text displayed in the dialog's body, defaults to an empty string * details (string) additional text displayed in the dialog's body, defaults to an empty string +---@return unknown none +function lvgl.message(params) end + +--- Add a momentary text button using the EdgeTX style. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * text (string or function) text displayed in the button, defaults to an empty string * press (function) called immediately when the user first taps the button or presses ENTER, defaults to nil * release (function) called when the user releases ENTER or stops touching the screen, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * color (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color * textColor (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color * cornerRadius (number) radius for the button's corners, defaults to the EdgeTX button style radius * font (font value or function) sets the font size, e.g. MIDSIZE, DBLSIZE; defaults to STDSIZE +---@return table +function lvgl.momentaryButton(parent, params) end + +--- Add a number edit box using the EdgeTX style. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * get (function) called to get the current value to display, defaults to nil * set (function) called for every change to the number while editing; passed the new value, defaults to nil * edited (function) called after the user finishes editing; passed the final value (added in 2.11.5), defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * min (number) minimum allowed value, defaults to -1024 * max (number) maximum allowed value, defaults to 1024 * display (function) overrides how the value is displayed; passed the current value, must return a string, defaults to nil +---@return table +function lvgl.numberEdit(parent, params) end + +--- Create a page layout for a One-Time script using EdgeTX styling: a header with title/sub-title lines and a back button in the top-left corner. Should be created as the top-level LVGL object, with all other objects added as its children. +--- @since 2.11.0 +---@param params table * title (string or function) title text in the header; function support added in 2.11.4, defaults to an empty string * subtitle (string or function) sub-title text in the header; function support added in 2.11.4, defaults to an empty string * icon (string) full path to a 30x30 grey-scale mask image for the back button icon (white = transparent, black = opaque); defaults to the EdgeTX logo icon * back (function) called when RTN is pressed, or when the back button is tapped -- the top-left header button if backButton is not set, otherwise a second button on the top-right, defaults to nil * menu (function) called when the top-left header button is tapped, but only if backButton is set to true -- in that case back moves to a second button on the top-right, defaults to nil * prevButton (table) adds a prev navigation button; table has a press function and optional active function (added in 2.11.4), defaults to nil * nextButton (table) adds a next navigation button; table has a press function and optional active function (added in 2.11.4), defaults to nil * flexFlow (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this page, not used by default * flexPad (number) padding between rows/columns when flex layout is used, defaults to PAD_OUTLINE * scrollBar (boolean) enables/disables scroll bars, defaults to true * scrollDir (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the page bounds (stand alone scripts only), defaults to lvgl.SCROLL_ALL * scrolled (function) called when the page content is scrolled; passed x, y of the current scroll position, defaults to nil * scrollTo (function) overrides the page scroll position; must return x, y to scroll to, defaults to nil * align (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4), defaults to CENTER | VTOP * backButton (boolean) if true, adds a second header button on the top-right calling back, and repurposes the top-left button to call menu instead (added in 2.11.4), defaults to false * borderPad (number or table) border padding around the container edges; a single number applies to all sides, or a table {left=?, right=?, top=?, bottom=?} (added in 2.11.5), defaults to PAD_OUTLINE if flexFlow is set, otherwise 0 +---@return table +function lvgl.page(params) end + +--- Display a QR code. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * data (string) URL or other content to encode, defaults to an empty string * bgColor (color) background color for the QR code image, defaults to COLOR_THEME_SECONDARY3 +---@return table +function lvgl.qrcode(parent, params) end + +--- Display a rectangle. Based on `lvgl.box`, so all `lvgl.box` settings also apply. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * thickness (number) width of the border line, defaults to 1 * filled (boolean or function) if true the rectangle is filled with color, defaults to false (function support added in 2.11.4) * rounded (number) if greater than 0, rounds the corners with this radius; must be >= thickness if set, defaults to 0 * opacity (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 +---@return table +function lvgl.rectangle(parent, params) end + +--- Update the settings of an existing LVGL object. Can also be used to change settings that have no dedicated update function (e.g. rectangle thickness). Can also be called as `parent:set(params)`. +--- @since 2.11.0 +---@param parent object LVGL object to update; unlike the constructor functions, this parameter is required, not optional +---@param params table settings to update; use the same keys documented for the object's constructor function +---@return unknown none +function lvgl.set(parent, params) end + +--- Create a container for a single row of a settings page, automatically padded for controls such as toggle/textEdit/button. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * title (string or function) text displayed on the left; function support added in 2.11.6, defaults to an empty string +---@return table +function lvgl.setting(parent, params) end + +--- Show an LVGL object. +--- @since 2.11.0 +---@param parent object LVGL object to show +---@return unknown none +function lvgl.show(parent) end + +--- Add a horizontal slider using the EdgeTX style. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * min (number) minimum value at the left end of the range, defaults to 0 * max (number) maximum value at the right end of the range, defaults to 100 * get (function) called to get the current knob value; should return a value between min and max inclusive, defaults to nil * set (function) called when the user moves the knob; passed the new value, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil +---@return table +function lvgl.slider(parent, params) end + +--- Display a button showing a source name. Tapping it opens the source-select popup, using EdgeTX styling. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * get (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected source, defaults to nil * set (function) called when the user picks a source; passed the selected source value, defaults to nil * filter (number) controls which source types the user can pick; combine lvgl.SRC_xxx constants to build a custom filter, defaults to lvgl.SRC_ALL +---@return table +function lvgl.source(parent, params) end + +--- Display a button showing a switch name. Tapping it opens the switch-select popup, using EdgeTX styling. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * get (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected switch, defaults to nil * set (function) called when the user picks a switch; passed the selected switch value, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * filter (number) controls which switch types the user can pick; combine lvgl.SW_xxx constants to build a custom filter, defaults to lvgl.SW_ALL +---@return table +function lvgl.switch(parent, params) end + +--- Add a text edit box using the EdgeTX style. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * value (string or function) text to edit; if a function, the text can be changed by both script and user, defaults to an empty string * length (number) maximum editable text length, 1 to 128, defaults to 32 * set (function) called when the user edits the text; passed the new string content, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil +---@return table +function lvgl.textEdit(parent, params) end + +--- Display a button showing a timer name. Tapping it opens a popup menu to choose a timer from, using EdgeTX styling. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * get (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected timer, defaults to nil * set (function) called when the user taps a timer in the popup; passed the selected timer value, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil +---@return table +function lvgl.timer(parent, params) end + +--- Add a toggle switch using the EdgeTX style. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * get (function) called to get the current state; must return a boolean or number (0/false = off, 1/true = on), defaults to nil * set (function) called when the user interacts with the switch; passed a single number, 0 = off, 1 = on, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil +---@return table +function lvgl.toggle(parent, params) end + +--- Display a filled triangle. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * opacity (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 * pts (table or function) table of exactly three points, each a {x, y} pair, defaults to nil +---@return table +function lvgl.triangle(parent, params) end + +--- Add a vertical slider using the EdgeTX style. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * min (number) minimum value at the bottom end of the range, defaults to 0 * max (number) maximum value at the top end of the range, defaults to 100 * get (function) called to get the current knob value; should return a value between min and max inclusive, defaults to nil * set (function) called when the user moves the knob; passed the new value, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil +---@return table +function lvgl.verticalSlider(parent, params) end + +--- Display a vertical line. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * rounded (boolean) if true the line's end caps are rounded, defaults to false * opacity (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 * dashGap (number) gap size for dashed lines, defaults to 0 * dashWidth (number) dash size for dashed lines, defaults to 0; both dashGap and dashWidth must be > 0 to draw dashed lines +---@return table +function lvgl.vline(parent, params) end diff --git a/docs-system/generated/luals/model.d.lua b/docs-system/generated/luals/model.d.lua new file mode 100644 index 000000000..7eb9437f7 --- /dev/null +++ b/docs-system/generated/luals/model.d.lua @@ -0,0 +1,259 @@ +---@meta + +-- GENERATED FILE — do not hand-edit. +-- Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +-- To fix API facts: edit the upstream EdgeTX /*luadoc*/ comment, then +-- re-extract and rebuild. To add narrative content: edit +-- docs-system/overlays/.md, then rebuild. + +--- LCD line pattern selector such as SOLID or DOTTED. +---@alias pen_type integer +--- Text rendering flags used by legacy LCD number APIs. +---@alias text_flags integer +--- Packed 16-bit RGB color value for color LCD APIs. +---@alias lcd_color_RGB565 integer +--- Font size selector such as XXLSIZE, DBLSIZE, MIDSIZE, or SMLSIZE. +---@alias lcd_font_size integer +--- Bitmask of LCD text rendering flags such as INVERS, BLINK, and SHADOWED. +---@alias lcd_text_flags integer +--- Combined LCD text formatting bitmask covering font size and text flags. +---@alias lcd_text_format integer +--- Signed EdgeTX source value in the normalized range from -1024 to 1024. +---@alias source_range_1024 integer +--- Global timer selector such as all, total, session, throttle, or throttlepct. +---@alias timer_type string +--- Telemetry unit identifier from the EdgeTX unit list. +---@alias unit_type integer +--- Telemetry precision selector controlling decimal places. +---@alias prec_type integer + +---@class model +model = {} + +--- Set all inputs to defaults +--- @since 2.0.0 +function model.defaultInputs() end + +--- Clear all flightModes +--- @since 2.3.10 +function model.deleteFlightModes() end + +--- Delete line from specified input +--- @since 2.0.0 +---@param input integer input number (use 0 for Input1) +---@param line integer input line (use 0 for first line) +function model.deleteInput(input, line) end + +--- Delete all Inputs +--- @since 2.0.0 +function model.deleteInputs() end + +--- Delete mixer line from specified Channel +--- @since 2.0.0 +---@param channel integer channel number (use 0 for CH1) +---@param line integer mix number (use 0 for first line(mix)) +function model.deleteMix(channel, line) end + +--- Remove all mixers +--- @since 2.0.0 +function model.deleteMixes() end + +--- Get Curve parameters +--- @since 2.0.12 +---@param curve integer curve number (use 0 for Curve1) +---@return nil +---@return table +function model.getCurve(curve) end + +--- Get Custom Function parameters +--- @since 2.0.0 +---@param function integer custom function number (use 0 for CF1) +---@return nil +---@return table +function model.getCustomFunction(function) end + +--- +--- @since 2.3.10 +---@param index integer flight mode number (use 0 for FM0) +---@return nil +---@return table +function model.getFlightMode(index) end + +--- Return current global variable value +--- @since unknown +---@param index integer zero based global variable index, use 0 for GV1, 8 for GV9 +---@param flight_mode integer Flight mode number (0 = FM0, 8 = FM8) +---@return nil +---@return integer +function model.getGlobalVariable(index, flight_mode) end + +--- Returns details about a Global Variable, but not values +--- @since 2.11.0 +---@param index integer zero based global variable index, use 0 for GV1, 8 for GV9 +---@return table +function model.getGlobalVariableDetails(index) end + +--- Get current Model information +--- @since 2.0.6 +---@return table +function model.getInfo() end + +--- Return input data for given input and line number +--- @since 2.0.0 +---@param input integer input number (use 0 for Input1) +---@param line integer input line (use 0 for first line) +---@return nil +---@return table +function model.getInput(input, line) end + +--- Return number of lines for given input +--- @since 2.0.0 +---@param input integer input number (use 0 for Input1) +---@return integer +function model.getInputsCount(input) end + +--- Get Logical Switch parameters +--- @since 2.0.0 +---@param switch integer logical switch number (use 0 for LS1) +---@return nil +---@return table +function model.getLogicalSwitch(switch) end + +--- Get configuration for specified Mix +--- @since 2.0.0 +---@param channel integer channel number (use 0 for CH1) +---@param line integer mix number (use 0 for first line(mix)) +---@return nil +---@return table +function model.getMix(channel, line) end + +--- Get the number of Mixer lines that the specified Channel has +--- @since 2.0.0 +---@param channel integer channel number (use 0 for CH1) +---@return integer +function model.getMixesCount(channel) end + +--- Get RF module parameters +--- @since 2.2.0 +---@param index integer module index (0 for internal, 1 for external) +---@return nil +---@return table +function model.getModule(index) end + +--- Get servo parameters +--- @since 2.0.0 +---@param index integer output number (use 0 for CH1) +---@return nil +---@return table +function model.getOutput(index) end + +--- Get Telemetry Sensor parameters +--- @since 2.3.0 +---@param sensor integer sensor number (use 0 for sensor 1) +---@return nil +---@return table +function model.getSensor(sensor) end + +--- Get heli swash parameters +--- @since 2.8.0 +---@return table +function model.getSwashRing() end + +--- Get model timer parameters +--- @since 2.0.0 +---@param timer integer timer index (0 for Timer 1) +---@return nil +---@return table +function model.getTimer(timer) end + +--- Insert an Input at specified line +--- @since 2.0.0 +---@param input integer input number (use 0 for Input1) +---@param line integer input line (use 0 for first line) +---@param value table input data, see model.getInput() +function model.insertInput(input, line, value) end + +--- Insert a mixer line into Channel +--- @since 2.0.0 +---@param channel integer channel number (use 0 for CH1) +---@param line integer mix number (use 0 for first line(mix)) +---@param value table see model.getMix() for table format +function model.insertMix(channel, line, value) end + +--- Reset Telemetry Sensor parameters +--- @since 2.3.11 +---@param sensor integer sensor number (use 0 for sensor 1) +---@return nil +function model.resetSensor(sensor) end + +--- Reset model timer to a startup value +--- @since unknown +---@param timer integer timer index (0 for Timer 1) +function model.resetTimer(timer) end + +--- Set Curve parameters +--- @since 2.2.0 +---@param curve integer curve number (use 0 for Curve1) +---@param params integer see model.getCurve return format for table format. setCurve uses standard lua array indexing and arrays start at index 1 +---@return integer 0 +function model.setCurve(curve, params) end + +--- Set Custom Function parameters +--- @since 2.0.0 +---@param function integer custom function number (use 0 for CF1) +---@param value table custom function parameters, see model.getCustomFunction() for table format +function model.setCustomFunction(function, value) end + +--- Set Flight mode parameters +--- @since 2.3.10 +---@param index integer flight mode number (use 0 for FM0) +---@param params unknown see model.getFlightMode return format for table format. +function model.setFlightMode(index, params) end + +--- Sets current global variable value. See also model.getGlobalVariable() +--- @since unknown +---@param index integer zero based global variable index, use 0 for GV1, 8 for GV9 +---@param flight_mode integer Flight mode number (0 = FM0, 8 = FM8) +---@param value unknown new value for global variable. Permitted range is from -1024 to 1024. +function model.setGlobalVariable(index, flight_mode, value) end + +--- Sets details about a Global Variable, but not values +--- @since 2.11.0 +---@param index integer zero based global variable index, use 0 for GV1, 8 for GV9 +---@param params table see model.getGlobalVariableDetails(index) return format for table format +---@return unknown none +function model.setGlobalVariableDetails(index, params) end + +--- Set the current Model information +--- @since 2.0.6 +---@param value unknown model information data, see model.getInfo() +function model.setInfo(value) end + +--- Set Logical Switch parameters +--- @since 2.0.0 +---@param switch integer logical switch number (use 0 for LS1) +---@param value table see model.getLogicalSwitch() for table format +function model.setLogicalSwitch(switch, value) end + +--- Set RF module parameters +--- @since 2.2.0 +---@param index integer module index (0 for internal, 1 for external) +---@param value unknown module parameters, see model.getModule() +function model.setModule(index, value) end + +--- Set servo parameters +--- @since 2.0.0 +---@param index integer channel number (use 0 for CH1) +---@param value table servo parameters, see model.getOutput() for table format +function model.setOutput(index, value) end + +--- Set heli swash parameters +--- @since 2.8.0 +---@param params table swash ring parameters, see model.getSwashRing() for table format +function model.setSwashRing(params) end + +--- Set model timer parameters +--- @since 2.0.0 +---@param timer integer timer index (0 for Timer 1) +---@param value unknown timer parameters, see model.getTimer() +function model.setTimer(timer, value) end diff --git a/docs-system/generated/luals/runtime.d.lua b/docs-system/generated/luals/runtime.d.lua new file mode 100644 index 000000000..0f16167c9 --- /dev/null +++ b/docs-system/generated/luals/runtime.d.lua @@ -0,0 +1,514 @@ +---@meta + +-- GENERATED FILE — do not hand-edit. +-- Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +-- To fix API facts: edit the upstream EdgeTX /*luadoc*/ comment, then +-- re-extract and rebuild. To add narrative content: edit +-- docs-system/overlays/.md, then rebuild. + +--- LCD line pattern selector such as SOLID or DOTTED. +---@alias pen_type integer +--- Text rendering flags used by legacy LCD number APIs. +---@alias text_flags integer +--- Packed 16-bit RGB color value for color LCD APIs. +---@alias lcd_color_RGB565 integer +--- Font size selector such as XXLSIZE, DBLSIZE, MIDSIZE, or SMLSIZE. +---@alias lcd_font_size integer +--- Bitmask of LCD text rendering flags such as INVERS, BLINK, and SHADOWED. +---@alias lcd_text_flags integer +--- Combined LCD text formatting bitmask covering font size and text flags. +---@alias lcd_text_format integer +--- Signed EdgeTX source value in the normalized range from -1024 to 1024. +---@alias source_range_1024 integer +--- Global timer selector such as all, total, session, throttle, or throttlepct. +---@alias timer_type string +--- Telemetry unit identifier from the EdgeTX unit list. +---@alias unit_type integer +--- Telemetry precision selector controlling decimal places. +---@alias prec_type integer + +--- Returns gray value which can be used in LCD functions +--- @since 2.0.13 +---@return integer +function GREY() end + +--- This functions allows for sending SPORT / ACCESS telemetry data toward the receiver, +and more generally, to anything connected SPORT bus on the receiver or transmitter. +--- @since 2.3 +---@param module integer module index (0 = internal, 1 = external) +---@param rxuid integer receiver index +---@param sensorid unknown physical sensor ID +---@param frameid unknown frame ID +---@param dataid unknown data ID +---@param value unknown value +---@return boolean +function accessTelemetryPush(module, rxuid, sensorid, frameid, dataid, value) end + +--- Apply RGB led colors previously defined by setRGBLedColor +--- @since 2.10 +function applyRGBLedColors() end + +--- Change the working directory +--- @since 2.3.0 +---@param directory string New working directory +function chdir(directory) end + +--- Pops a received Crossfire Telemetry packet from the queue. +--- @since 2.2.0 +---@return nil +---@return integer command +---@return table packet +function crossfireTelemetryPop() end + +--- This functions allows for sending telemetry data toward the TBS Crossfire link. +--- @since 2.2.0 +---@param command unknown command +---@param data table table of data bytes +---@return boolean +---@return nil +function crossfireTelemetryPush(command, data) end + +--- Get channel assigned to stick. See Default Channel Order in General Settings +--- @since 2.0.0 +---@param stick integer stick number (from 0 to 3) +---@return integer +---@return nil +function defaultChannel(stick) end + +--- Get stick that is assigned to a channel. See Default Channel Order in General Settings. +--- @since 2.0.0 +---@param channel integer channel number (0 means CH1) +---@return integer +function defaultStick(channel) end + +--- Returns FRESULT (e.g. 0=OK, 4=File not found, 5=Path not found, 6=Path invalid) +--- @since 2.9.0 +function del() end + +--- Return an iterator listing all the files and directories name in a directory +--- @since 2.5.0 +---@param directory string Working directory +function dir(directory) end + +--- flushes audio queue +--- @since unknown +function flushAudio() end + +--- Checks the existence of file or directory. + If not exist, return nil. + If exist, return the object information. +--- @since 2.5.0 +---@param path string path to the object +---@return table +function fstat(path) end + +--- Get available memory remaining in the Heap for Lua. +--- @since unknown +---@return integer usage +function getAvailableMemory() end + +--- Return current system date and time that is kept by the RTC unit +--- @since unknown +---@return table +function getDateTime() end + +--- Return detailed information about field (source) +--- @since 2.0.8 +---@param source string can be an index (number) (which was obtained by getFieldInfo or getSourceIndex) or a name (string) of the source. +---@return table +---@return nil +function getFieldInfo(source) end + +--- Return flight mode data. +--- @since 2.1.7 +---@param mode integer flight mode number to return (0 - 8). If mode parameter is not specified (or contains invalid value), then the current flight mode data is returned. +---@return integer current_flight_mode_number_0_8 +---@return string current_flight_mode_name +function getFlightMode(mode) end + +--- Returns (some of) the general radio settings +--- @since 2.0.6 +---@return table +function getGeneralSettings() end + +--- Returns radio timers +--- @since unknown +---@return table +function getGlobalTimer() end + +--- +--- @since 2.6 +---@param id integer identifying the logical switch (zero for LS1 etc.). +---@return true/false value +function getLogicalSwitchValue(id) end + +--- +--- @since 2.8.0 +---@param outputindex integer identifying the output channel number 0 for CH1, up to MAX_OUTPUT_CHANNELS - 1. +---@return integer +function getOutputValue(outputindex) end + +--- Return the RAS value or nil if no valid hardware found +--- @since 2.2.0 +---@return integer +function getRAS() end + +--- Get RSSI value as well as low and critical RSSI alarm levels (in dB) +--- @since 2.2.0 +---@return unknown rssi +---@return unknown alarm_low +---@return unknown alarm_crit +function getRSSI() end + +--- Return rotary encoder mode +--- @since 2.8.0 +---@return integer +function getRotEncMode() end + +--- Return rotary encoder current speed +--- @since 2.3.10 +---@return integer +function getRotEncSpeed() end + +--- Return current RTC system date as unix timstamp (in seconds since 1. Jan 1970) +--- @since unknown +---@return integer +function getRtcTime() end + +--- +--- @since 2.6 +---@param id integer between 1 and 16 identifying the shared memory variable. +---@return integer value +function getShmVar(id) end + +--- +--- @since 2.6 +---@param sourcename string naming a value source as it is shown on radio menus where you can select it. Notice that many names have special characters in them. +---@return integer sourceindex +function getSourceIndex(sourcename) end + +--- +--- @since 2.6 +---@param sourceindex integer identifying a value source as returned by getSourceIndex(sourceName) or the id field in the table returned by getFieldInfo. +---@return string sourcename +function getSourceName(sourceindex) end + +--- Returns the value of a source. Superseeds getValue. +--- @since 2.0.0 +---@param source string can be an index (number) (which was obtained by getFieldInfo or getSourceIndex) or a name (string) of the source. +---@return integer +---@return unknown iscurrent +---@return unknown isfresh +function getSourceValue(source) end + +--- +--- @since 3.0 +---@return integer +function getStickMode() end + +--- +--- @since 2.6 +---@param positionname string naming a switch position as it is shown on radio menus where you can select a switch. Notice that many names have special characters in them like arrow up/down etc. +---@return integer value +function getSwitchIndex(positionname) end + +--- +--- @since 2.12 +---@param sourceindex integer identifying a value source as returned by getSourceIndex(sourceName) or the id field in the table returned by getFieldInfo. +---@return table +function getSwitchInfo(sourceindex) end + +--- +--- @since 2.6 +---@param switchindex integer identifying a switch as returned by getSwitchIndex(positionName) or fields in the table returned by model.getLogicalSwitch(switch) identifying switches. +---@return string value +function getSwitchName(switchindex) end + +--- +--- @since 2.6 +---@param switchindex integer identifying a switch as returned by getSwitchIndex(positionName) or fields in the table returned by model.getLogicalSwitch(switch) identifying switches. +---@return integer value +function getSwitchValue(switchindex) end + +--- Return the time since the radio was started in multiple of 10ms +--- @since 2.0.0 +---@return integer +function getTime() end + +--- +--- @since 2.9.0 +---@return integer +function getTrainerStatus() end + +--- Return the internal GPS position or nil if no valid hardware found +--- @since 2.2.2 +---@return table +function getTxGPS() end + +--- Get percent of already used Lua instructions in current script execution cycle. +--- @since 2.2.1 +---@return integer usage +function getUsage() end + +--- Returns the value of a source. +--- @since 2.0.0 +---@param source string can be an index (number) (which was obtained by getFieldInfo or getSourceIndex) or a name (string) of the source. +---@return integer +---@return table +---@return table +---@return table +function getValue(source) end + +--- Return OpenTX version +--- @since 2.0.0 +---@return string +---@return string opentx_version_ie_2 +---@return string radio_type_x12s_x10_x9e_x9d_x9d_or_x7 +---@return integer major_version_ie_2_if_version_2 +---@return integer minor_version_ie_1_if_version_2 +---@return integer revision_number_ie_5_if_version_2 +---@return string os_name_i +function getVersion() end + +--- Pops a received Ghost Telemetry packet from the queue. +--- @since 2.7.0 +---@return nil +---@return integer type +---@return table packet +function ghostTelemetryPop() end + +--- This functions allows for sending telemetry data toward the Ghost link. +--- @since 2.7.0 +---@param command unknown command +---@param data table table of data bytes +---@return boolean +---@return nil +function ghostTelemetryPush(command, data) end + +--- Stops key state machine. See [Key Events](../key_events.md) for the detailed description. +--- @since 2.0.0 +---@param key integer key to be killed, can also include event type (only the key part is used) +function killEvents(key) end + +--- Load a Lua script file. This is similar to Lua's own [loadfile()](https://www.lua.org/manual/5.2/manual.html#pdf-loadfile) +API method, but it uses OpenTx's optional pre-compilation feature to save memory and time during load. +--- @since 2.2.0 +---@param file string Full path and file name of script. The file extension is optional and ignored (see mode param to control which extension will be used). However, if an extension is specified, it should be ".lua" (or ".luac"), otherwise it is treated as part of the file name and the .lua/.luac will be appended to that. +---@param mode? string (optional) Controls whether to force loading the text (.lua) or pre-compiled binary (.luac) version of the script. By default ETX will load the newest version and compile a new binary if necessary (overwriting any existing .luac version of the same script, and stripping some debug info like line numbers). You can use mode to control the loading behavior more specifically. Possible values are: * b only binary. * t only text. * T (default on simulator) prefer text but load binary if that is the only version available. * bt (default on radio) either binary or text, whichever is newer (binary preferred when timestamps are equal). * Add x to avoid automatic compilation of source file to .luac version. Eg: "tx", "bx", or "btx". * Add c to force compilation of source file to .luac version (even if existing version is newer than source file). Eg: "tc" or "btc" (forces "t", overrides "x"). * Add d to keep extra debug info in the compiled binary. Eg: "td", "btd", or "tcd" (no effect with just "b" or with "x"). +---@param env? integer See documentation for Lua function loadfile(). +---@return function|nil +---@return string|nil +function loadScript(file, mode, env) end + +--- Create a directory +--- @since 2.11.0 +---@param directory string Directory to create +function mkdir(directory) end + +--- This function reads/writes the Multi protocol buffer to interact with a protocol. +--- @since 2.3.2 +---@param address unknown to read/write in the buffer @param (optional): value to write in the buffer +---@return integer +function multiBuffer(address) end + +--- Play a time value (text to speech) +--- @since 2.1.0 +---@param duration integer number of seconds to play. Only integral part is used. +---@param hourformat? integer * 0 or not present play format: minutes and seconds. * != 0 play format: hours, minutes and seconds. * @param volume (number): - (1..5) override radio settings Wav volume for the duration of file - omitting the parameter uses radio settings Wav volume +---@return unknown none +function playDuration(duration, hourformat) end + +--- Play a file from the SD card +--- @since 2.0.0 +---@param filename string full path to wav file (i.e. "/SOUNDS/en/system/tada.wav") Introduced in 2.1.0: If you use a relative path, the current language is prepended to the path (example: for English language: /SOUNDS/en is prepended) +---@param volume? integer - (1..5) override radio settings Wav volume for the duration of file - omitting the parameter uses radio settings Wav volume +---@return unknown none +function playFile(filename, volume) end + +--- Generate haptic feedback +--- @since 2.2.0 +---@param duration integer length of the haptic feedback in milliseconds +---@param pause integer length of the silence after haptic feedback in milliseconds +---@param flags? integer * 0 or not present play with normal priority * PLAY_NOW play immediately +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, see the Units reference for the full list +---@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) +---@param volume? integer - (1..5) override radio settings Wav volume for the duration of file - omitting the parameter uses radio settings Wav volume +---@return unknown none +function playNumber(value, unit, attributes, volume) end + +--- Play a tone +--- @since 2.1.0 +---@param frequency integer tone frequency in Hz (from 150 to 15000) +---@param duration integer length of the tone in milliseconds +---@param pause integer length of the silence after the tone in milliseconds +---@param flags? integer * 0 or not present play with normal priority. * PLAY_BACKGROUND play in background (built in vario function uses this context) * PLAY_NOW play immediately +---@param freqincr? integer positive number increases the tone pitch (frequency with time), negative number decreases it. The frequency changes every 10 milliseconds, the change is freqIncr * 10Hz. The valid range is from -127 to 127. +---@param volume? integer - (1..5) override radio settings Beep volume for the duration of file - omitting the parameter uses radio settings Beep volume +---@return unknown none +function playTone(frequency, duration, pause, flags, freqincr, volume) end + +--- Raises a pop-up on screen that asks for confirmation +--- @since 2.2.0 +---@param title string title to display +---@param message string text to display +---@param event integer the event variable that is passed in from the Run function (key pressed) +---@return unknown cancel +function popupConfirmation(title, message, event) end + +--- Raises a pop-up on screen that allows uses input +--- @since 2.0.0 +---@param title string text to display +---@param event integer the event variable that is passed in from the Run function (key pressed) +---@param input integer value that can be adjusted by the +/- keys +---@param min integer min value that input can reach (by pressing the - key) +---@param max integer max value that input can reach +---@return integer +---@return unknown ok +---@return unknown cancel +function popupInput(title, event, input, min, max) end + +--- Raises a pop-up on screen that shows a warning +--- @since 2.2.0 +---@param title string text to display +---@param event integer the event variable that is passed in from the Run function (key pressed) +---@return unknown cancel +function popupWarning(title, event) end + +--- Rename a file or directory + If the file or directory is being moved to a new parent directory, then the new parent + directory must already exist. +--- @since 2.11.0 +---@param from_path string Current path to rename @param to_path (string) Path to rename to +function rename(from_path) end + +--- Resets the radio global timer to 0. +--- @since 2.2.2 +---@param type? unknown : if set to 'all', throttle ,throttle percent and session timers are reset too if set to 'session', radio session timer is reset too if set to 'ttimer', radio throttle timer is reset too if set to 'tptimer', radio throttle percent timer is reset too +function resetGlobalTimer(type) end + +--- Takes a screenshot, which is saved to the SCREENSHOTS folder on the radio SD card. +--- @since 2.11 +---@return unknown none +function screenshot() end + +--- +--- @since 2.9.0 +---@param port_nr valid values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1 1 - second serial port, e.g. on TX16S AUX2 +---@return true value +---@return nil +function serialGetPower(port_nr) end + +--- +--- @since 2.3.8 +---@param num? integer maximum number of bytes to read. If non-zero, serialRead will read up to num characters from the buffer. If 0 or left out, serialRead will read up to and including the first newline character or the end of the buffer. Note that the returned string may not end in a newline if this character is not present in the buffer. +---@return unknown str +function serialRead(num) end + +--- +--- @since 2.9.0 +---@param port_nr valid values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1 1 - second serial port, e.g. on TX16S AUX2 +---@param value 0 - disable power 1 - enable power +---@return true/false success +function serialSetPower(port_nr, value) end + +--- +--- @since 2.3.10 +---@param str string String to be written to the serial port. +function serialWrite(str) end + +--- Overrides the LED color for a custom function switch +--- @since 3.0.0 +---@param id string identifying a custom function switch name +---@param rvalue integer value of red channel +---@param bvalue integer value of green channel +---@param cvalue integer value of blue channel +function setCFSLedColor(id, rvalue, bvalue, cvalue) end + +--- +--- @since 3.0 +---@param offset integer offset in angular degree. -1 to offset to current X position +---@param range integer range in angular degree. 180° max.90 means min/max value will be reached at 45° from offset position +function setIMU_X(offset, range) end + +--- +--- @since 3.0 +---@param offset integer offset in angular degree. -1 to offset to current Y position +---@param range integer range in angular degree, 180° max. 90 means min/max value will be reached at 45° from offset position +function setIMU_Y(offset, range) end + +--- +--- @since 2.10 +---@param id integer identifying a led in the led chain +---@param rvalue integer value of red channel +---@param bvalue integer value of green channel +---@param cvalue integer value of blue channel +function setRGBLedColor(id, rvalue, bvalue, cvalue) end + +--- +--- @since 2.3.12 +---@param baudrate unknown Desired baurate +function setSerialBaudrate(baudrate) end + +--- +--- @since 2.6 +---@param id integer between 1 and 16 identifying the shared memory variable. +---@param value integer . The value of the shared memory variable. +function setShmVar(id, value) end + +--- +--- @since 2.6 +---@param id integer identifying the sticky logical switch (zero for LS1 etc.). +---@param value integer . The new value of the sticky logical switch. +---@return true/false bufferfull +function setStickySwitch(id, value) end + +--- +--- @since 2.2.0 +---@param id unknown Id of the sensor, valid range is from 0 to 0xFFFF +---@param subid unknown subID of the sensor, usually 0, valid range is from 0 to 7 +---@param instance unknown instance of the sensor (SensorID), valid range is from 0 to 0xFF +---@param value unknown fed to the sensor +---@param unit? unknown unit of the sensor, see the Units reference for the full list +---@param precision? unknown 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 unknown true +function setTelemetryValue(id, subid, instance, value, unit, precision, name) end + +--- +--- @since 2.6 +---@param first? integer first source index. If nil or omitted, the first available source is used. +---@param last? integer last soure index. If nil or omitted, the last available source is used. +function sources(first, last) end + +--- Pops a received SPORT packet from the queue. Please note that only packets using a data ID within 0x5000 to 0x50FF +(frame ID == 0x10), as well as packets with a frame ID equal 0x32 (regardless of the data ID) will be passed to +the LUA telemetry receive queue. +--- @since 2.2.0 +---@return nil +---@return integer sensor_id +---@return integer frame_id +---@return integer data_id +---@return integer value +function sportTelemetryPop() end + +--- This functions allows for sending SPORT telemetry data toward the receiver, +and more generally, to anything connected SPORT bus on the receiver or transmitter. +--- @since 2.2.0 +---@param sensorid unknown physical sensor ID +---@param frameid unknown frame ID +---@param dataid unknown data ID +---@param value unknown value +---@return boolean +---@return nil +function sportTelemetryPush(sensorid, frameid, dataid, value) end + +--- +--- @since 2.6 +---@param first? integer first switch index. If nil or omitted, the first available switch is used. +---@param last? integer last switch index. If nil or omitted, the last available switch is used. +function switches(first, last) end diff --git a/docs-system/generated/review-decisions.json b/docs-system/generated/review-decisions.json new file mode 100644 index 000000000..a4c7ee5bb --- /dev/null +++ b/docs-system/generated/review-decisions.json @@ -0,0 +1,207 @@ +{ + "crossfireTelemetryPush": { + "params": { + "command": "integer" + }, + "returns": {}, + "updated_at": "2026-03-23T10:02:19.598966Z" + }, + "getRSSI": { + "params": {}, + "returns": { + "rssi": "integer", + "alarm_low": "integer", + "alarm_crit": "integer" + }, + "updated_at": "2026-03-23T11:54:46.884698Z" + }, + "getSourceValue": { + "params": { + "source": "string" + }, + "returns": { + "-": "integer", + "isCurrent": "boolean", + "isFresh": "boolean" + }, + "updated_at": "2026-03-23T11:55:03.700845Z" + }, + "getStickMode": { + "params": {}, + "returns": { + "-": "integer" + }, + "updated_at": "2026-03-23T10:58:18.012896Z" + }, + "ghostTelemetryPush": { + "params": { + "command": "integer" + }, + "returns": {}, + "updated_at": "2026-03-23T10:05:01.958812Z" + }, + "lcd.clear": { + "params": { + "color": "lcd_color_RGB565" + }, + "returns": {}, + "updated_at": "2026-03-23T10:58:31.883283Z" + }, + "lcd.drawBitmapPatternPie": { + "params": { + "startAngle": "number", + "endAngle": "number" + }, + "returns": {}, + "updated_at": "2026-03-23T10:14:09.212270Z" + }, + "lcd.drawLine": { + "params": { + "pattern": "pen_type" + }, + "returns": {}, + "updated_at": "2026-03-23T10:18:24.247064Z" + }, + "lcd.drawNumber": { + "params": { + "inversColor": "text_flags" + }, + "returns": {}, + "updated_at": "2026-03-23T10:22:58.185744Z" + }, + "lcd.drawText": { + "params": { + "inversColor": "lcd_text_flags" + }, + "returns": {}, + "updated_at": "2026-03-23T10:35:56.488913Z" + }, + "lcd.drawTimer": { + "params": { + "inversColor": "lcd_text_flags" + }, + "returns": {}, + "updated_at": "2026-03-23T10:37:02.496078Z" + }, + "model.setFlightMode": { + "params": { + "params": "table|nil" + }, + "returns": {}, + "updated_at": "2026-03-23T10:37:50.476973Z" + }, + "model.setGlobalVariable": { + "params": { + "value": "source_range_1024" + }, + "returns": {}, + "updated_at": "2026-03-23T10:39:17.241194Z" + }, + "model.setInfo": { + "params": { + "value": "table" + }, + "returns": {}, + "updated_at": "2026-03-23T10:40:07.014503Z" + }, + "model.setModule": { + "params": { + "index": "integer", + "value": "table" + }, + "returns": {}, + "updated_at": "2026-03-23T11:55:17.006779Z" + }, + "model.setTimer": { + "params": { + "value": "table" + }, + "returns": {}, + "updated_at": "2026-03-23T10:41:44.156685Z" + }, + "playDuration": { + "params": {}, + "returns": { + "none": "nil" + }, + "updated_at": "2026-03-23T10:43:10.209312Z" + }, + "playFile": { + "params": {}, + "returns": { + "none": "nil" + }, + "updated_at": "2026-03-23T10:43:27.421213Z" + }, + "playNumber": { + "params": {}, + "returns": { + "none": "nil" + }, + "updated_at": "2026-03-23T10:43:56.140304Z" + }, + "playTone": { + "params": {}, + "returns": { + "none": "nil" + }, + "updated_at": "2026-03-23T10:44:10.001111Z" + }, + "popupConfirmation": { + "params": {}, + "returns": { + "\"CANCEL\"": "string" + }, + "updated_at": "2026-03-23T10:45:15.847558Z" + }, + "popupInput": { + "params": {}, + "returns": { + "\"OK\"": "string", + "\"CANCEL\"": "string" + }, + "updated_at": "2026-03-23T10:58:41.158564Z" + }, + "popupWarning": { + "params": {}, + "returns": { + "\"CANCEL\"": "string" + }, + "updated_at": "2026-03-23T10:58:47.706841Z" + }, + "resetGlobalTimer": { + "params": { + "type": "timer_type" + }, + "returns": {}, + "updated_at": "2026-03-23T10:58:56.856594Z" + }, + "serialRead": { + "params": {}, + "returns": { + "str": "string" + }, + "updated_at": "2026-03-23T10:47:32.219058Z" + }, + "setSerialBaudrate": { + "params": { + "baudrate": "integer" + }, + "returns": {}, + "updated_at": "2026-03-23T10:48:10.606542Z" + }, + "setTelemetryValue": { + "params": { + "id": "integer", + "subID": "integer", + "instance": "number", + "value": "number", + "unit": "unit_type", + "precision": "prec_type" + }, + "returns": { + "true,": "boolean" + }, + "updated_at": "2026-03-23T10:50:17.174214Z" + } +} diff --git a/docs-system/generated/site-preview/Bitmap.getSize.md b/docs-system/generated/site-preview/Bitmap.getSize.md new file mode 100644 index 000000000..df5539f2d --- /dev/null +++ b/docs-system/generated/site-preview/Bitmap.getSize.md @@ -0,0 +1,31 @@ +# Bitmap.getSize + +`Bitmap.getSize(name)` + +Return width, height of a bitmap object + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `name` | yes | `pointer` | point to a bitmap previously opened with Bitmap.open() | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `width_in_pixels` | `integer` | width in pixels | +| `height_in_pixels` | `integer` | height in pixels | + +## Availability + +- Since: `2.2.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/Bitmap.open.md b/docs-system/generated/site-preview/Bitmap.open.md new file mode 100644 index 000000000..50f6ea4f1 --- /dev/null +++ b/docs-system/generated/site-preview/Bitmap.open.md @@ -0,0 +1,36 @@ +# Bitmap.open + +`Bitmap.open(name)` + +Loads a bitmap in memory, for later use with lcd.drawBitmap(). Bitmaps should be loaded only +once, returned object should be stored and used for drawing. If loading fails for whatever +reason the resulting bitmap object will have width and height set to zero. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `name` | yes | `string` | full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `bitmap` | `object` | a bitmap object that can be used with other bitmap functions | + +## Availability + +- Since: `2.2.0` +- Radio support: `color-lcd` + +## Notes + +- Bitmap loading can fail if: + * File is not found or contains invalid image + * System is low on memory + * Combined memory usage of all Lua script bitmaps exceeds certain value +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/Bitmap.resize.md b/docs-system/generated/site-preview/Bitmap.resize.md new file mode 100644 index 000000000..7e016a62b --- /dev/null +++ b/docs-system/generated/site-preview/Bitmap.resize.md @@ -0,0 +1,30 @@ +# Bitmap.resize + +`Bitmap.resize(bitmap, width, height)` + +Return a resized bitmap object + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `bitmap` | yes | `pointer` | point to a bitmap previously opened with Bitmap.open() | +| `width` | yes | `integer` | the new bitmap width | +| `height` | yes | `integer` | the new bitmap height | + +## Returns + +None. + +## Availability + +- Since: `2.8.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/Bitmap.toMask.md b/docs-system/generated/site-preview/Bitmap.toMask.md new file mode 100644 index 000000000..40c2499c6 --- /dev/null +++ b/docs-system/generated/site-preview/Bitmap.toMask.md @@ -0,0 +1,30 @@ +# Bitmap.toMask + +`Bitmap.toMask(bitmap)` + +Return a 8bit bitmap mask that can be used with lcd.drawBitmapPattern() + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `bitmap` | yes | `pointer` | point to a bitmap previously opened with Bitmap.open() | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `a` | `unknown` | bitmap mask | + +## Availability + +- Since: `2.8.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/GREY.md b/docs-system/generated/site-preview/GREY.md new file mode 100644 index 000000000..f9c326d67 --- /dev/null +++ b/docs-system/generated/site-preview/GREY.md @@ -0,0 +1,28 @@ +# GREY + +`GREY()` + +Returns gray value which can be used in LCD functions + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | a value that represents amount of *greyness* (from 0 to 15) | + +## Availability + +- Since: `2.0.13` +- Radio support: `all` + +## Notes + +- Only available on Taranis + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/accessTelemetryPush.md b/docs-system/generated/site-preview/accessTelemetryPush.md new file mode 100644 index 000000000..f4f48297e --- /dev/null +++ b/docs-system/generated/site-preview/accessTelemetryPush.md @@ -0,0 +1,36 @@ +# accessTelemetryPush + +`accessTelemetryPush()` + +This functions allows for sending SPORT / ACCESS telemetry data toward the receiver, +and more generally, to anything connected SPORT bus on the receiver or transmitter. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `module` | yes | `integer` | module index (0 = internal, 1 = external) | +| `rxUid` | yes | `integer` | receiver index | +| `sensorId` | yes | `unknown` | physical sensor ID | +| `frameId` | yes | `unknown` | frame ID | +| `dataId` | yes | `unknown` | data ID | +| `value` | yes | `unknown` | value | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `boolean` | data queued in output buffer or not. | + +## Availability + +- Since: `2.3` +- Radio support: `all` + +## Notes + +- When called without parameters, it will only return the status of the output buffer without sending anything. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/applyRGBLedColors.md b/docs-system/generated/site-preview/applyRGBLedColors.md new file mode 100644 index 000000000..7e70acc39 --- /dev/null +++ b/docs-system/generated/site-preview/applyRGBLedColors.md @@ -0,0 +1,22 @@ +# applyRGBLedColors + +`applyRGBLedColors()` + +Apply RGB led colors previously defined by setRGBLedColor + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.10` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/chdir.md b/docs-system/generated/site-preview/chdir.md new file mode 100644 index 000000000..e211fc610 --- /dev/null +++ b/docs-system/generated/site-preview/chdir.md @@ -0,0 +1,24 @@ +# chdir + +`chdir(directory)` + +Change the working directory + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `directory` | yes | `string` | New working directory | + +## Returns + +None. + +## Availability + +- Since: `2.3.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_filesystem.cpp` diff --git a/docs-system/generated/site-preview/crossfireTelemetryPop.md b/docs-system/generated/site-preview/crossfireTelemetryPop.md new file mode 100644 index 000000000..51b7f1b37 --- /dev/null +++ b/docs-system/generated/site-preview/crossfireTelemetryPop.md @@ -0,0 +1,26 @@ +# crossfireTelemetryPop + +`crossfireTelemetryPop()` + +Pops a received Crossfire Telemetry packet from the queue. + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | queue does not contain any (or enough) bytes to form a whole packet | +| `command` | `integer` | | +| `packet` | `table` | data bytes | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/crossfireTelemetryPush.md b/docs-system/generated/site-preview/crossfireTelemetryPush.md new file mode 100644 index 000000000..07ae6579e --- /dev/null +++ b/docs-system/generated/site-preview/crossfireTelemetryPush.md @@ -0,0 +1,32 @@ +# crossfireTelemetryPush + +`crossfireTelemetryPush()` + +This functions allows for sending telemetry data toward the TBS Crossfire link. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `command` | yes | `unknown` | command | +| `data` | yes | `table` | table of data bytes | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `boolean` | data queued in output buffer or not. | +| `-` | `nil` | incorrect telemetry protocol. | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Notes + +- When called without parameters, it will only return the status of the output buffer without sending anything. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/defaultChannel.md b/docs-system/generated/site-preview/defaultChannel.md new file mode 100644 index 000000000..83efccd87 --- /dev/null +++ b/docs-system/generated/site-preview/defaultChannel.md @@ -0,0 +1,27 @@ +# defaultChannel + +`defaultChannel(stick)` + +Get channel assigned to stick. See Default Channel Order in General Settings + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `stick` | yes | `integer` | stick number (from 0 to 3) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | channel assigned to this stick (from 0 to 3) | +| `-` | `nil` | stick not found | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/defaultStick.md b/docs-system/generated/site-preview/defaultStick.md new file mode 100644 index 000000000..8edd38845 --- /dev/null +++ b/docs-system/generated/site-preview/defaultStick.md @@ -0,0 +1,26 @@ +# defaultStick + +`defaultStick(channel)` + +Get stick that is assigned to a channel. See Default Channel Order in General Settings. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `channel` | yes | `integer` | channel number (0 means CH1) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | Stick assigned to this channel (from 0 to 3) | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/del.md b/docs-system/generated/site-preview/del.md new file mode 100644 index 000000000..83ccc3135 --- /dev/null +++ b/docs-system/generated/site-preview/del.md @@ -0,0 +1,22 @@ +# del + +`del(file or directory)` + +Returns FRESULT (e.g. 0=OK, 4=File not found, 5=Path not found, 6=Path invalid) + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.9.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_filesystem.cpp` diff --git a/docs-system/generated/site-preview/dir.md b/docs-system/generated/site-preview/dir.md new file mode 100644 index 000000000..a1ac88b1b --- /dev/null +++ b/docs-system/generated/site-preview/dir.md @@ -0,0 +1,24 @@ +# dir + +`dir(directory)` + +Return an iterator listing all the files and directories name in a directory + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `directory` | yes | `string` | Working directory | + +## Returns + +None. + +## Availability + +- Since: `2.5.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_filesystem.cpp` diff --git a/docs-system/generated/site-preview/flushAudio.md b/docs-system/generated/site-preview/flushAudio.md new file mode 100644 index 000000000..a0953ad38 --- /dev/null +++ b/docs-system/generated/site-preview/flushAudio.md @@ -0,0 +1,22 @@ +# flushAudio + +`flushAudio()` + +flushes audio queue + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/fstat.md b/docs-system/generated/site-preview/fstat.md new file mode 100644 index 000000000..9808f87d4 --- /dev/null +++ b/docs-system/generated/site-preview/fstat.md @@ -0,0 +1,28 @@ +# fstat + +`fstat(path)` + +Checks the existence of file or directory. + If not exist, return nil. + If exist, return the object information. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `path` | yes | `string` | path to the object | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | object info, table elements: * 'size' (number) file size * 'attrib' (number) file attribute flags * 'time' (table) table with last time modified date and times, table elements: * `year` (number) year * `mon` (number) month * `day` (number) day of month * `hour` (number) hours * `hour12` (number) hours in US format * `min` (number) minutes * `sec` (number) seconds * `suffix` (text) am or pm | + +## Availability + +- Since: `2.5.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_filesystem.cpp` diff --git a/docs-system/generated/site-preview/getAvailableMemory.md b/docs-system/generated/site-preview/getAvailableMemory.md new file mode 100644 index 000000000..382fe2ac4 --- /dev/null +++ b/docs-system/generated/site-preview/getAvailableMemory.md @@ -0,0 +1,24 @@ +# getAvailableMemory + +`getAvailableMemory()` + +Get available memory remaining in the Heap for Lua. + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `usage` | `integer` | a value returned in b | + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getDateTime.md b/docs-system/generated/site-preview/getDateTime.md new file mode 100644 index 000000000..988742d46 --- /dev/null +++ b/docs-system/generated/site-preview/getDateTime.md @@ -0,0 +1,24 @@ +# getDateTime + +`getDateTime()` + +Return current system date and time that is kept by the RTC unit + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | current date and time, table elements: * `year` (number) year * `mon` (number) month * `day` (number) day of month * `hour` (number) hours * `hour12` (number) hours in US format * `min` (number) minutes * `sec` (number) seconds * `suffix` (text) am or pm | + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getFieldInfo.md b/docs-system/generated/site-preview/getFieldInfo.md new file mode 100644 index 000000000..8faa1e9b3 --- /dev/null +++ b/docs-system/generated/site-preview/getFieldInfo.md @@ -0,0 +1,38 @@ +# getFieldInfo + +`getFieldInfo(source)` + +Return detailed information about field (source) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `source` | yes | `string` | can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source. | + +## Returns + +| 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) | +| `-` | `nil` | the requested field was not found | + +## Availability + +- Since: `2.0.8` +- Radio support: `all` + +## Notes + +- The list of valid sources is available: + +| OpenTX Version | Radio | +|----------------|-------| +| 2.0 | [all](http://downloads-20.open-tx.org/firmware/lua_fields.txt) | +| 2.1 | [X9D and X9D+](http://downloads-21.open-tx.org/firmware/lua_fields_taranis.txt), [X9E](http://downloads-21.open-tx.org/firmware/lua_fields_taranis_x9e.txt) | +| 2.2 | [X9D and X9D+](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9e.txt), [Horus](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x12s.txt) | +| 2.3 | [X9D and X9D+](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9e.txt), [X7](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x7.txt), [Horus](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x12s.txt) | + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getFlightMode.md b/docs-system/generated/site-preview/getFlightMode.md new file mode 100644 index 000000000..966beb4f9 --- /dev/null +++ b/docs-system/generated/site-preview/getFlightMode.md @@ -0,0 +1,27 @@ +# getFlightMode + +`getFlightMode(mode)` + +Return flight mode data. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `mode` | yes | `integer` | flight mode number to return (0 - 8). If mode parameter is not specified (or contains invalid value), then the current flight mode data is returned. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `current_flight_mode_number_0_8` | `integer` | (current) flight mode number (0 - 8) | +| `current_flight_mode_name` | `string` | (current) flight mode name | + +## Availability + +- Since: `2.1.7` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getGeneralSettings.md b/docs-system/generated/site-preview/getGeneralSettings.md new file mode 100644 index 000000000..cb94e7f6c --- /dev/null +++ b/docs-system/generated/site-preview/getGeneralSettings.md @@ -0,0 +1,24 @@ +# getGeneralSettings + +`getGeneralSettings()` + +Returns (some of) the general radio settings + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | with elements: * `battWarn` (number) radio battery range - warning value * `battMin` (number) radio battery range - minimum value * `battMax` (number) radio battery range - maximum value * `imperial` (number) set to a value different from 0 if the radio is set to the IMPERIAL units * `language` (string) radio language (used for menus) * `voice` (string) voice language (used for speech) * `gtimer` (number) radio global timer in seconds (does not include current session) | + +## Availability + +- Since: `2.0.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getGlobalTimer.md b/docs-system/generated/site-preview/getGlobalTimer.md new file mode 100644 index 000000000..6937b6112 --- /dev/null +++ b/docs-system/generated/site-preview/getGlobalTimer.md @@ -0,0 +1,24 @@ +# getGlobalTimer + +`getGlobalTimer()` + +Returns radio timers + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | with elements: * `gtimer` (number) radio global timer in seconds * `session` (number) radio session in seconds * `ttimer` (number) radio throttle timer in seconds * `tptimer` (number) radio throttle percent timer in seconds | + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getLogicalSwitchValue.md b/docs-system/generated/site-preview/getLogicalSwitchValue.md new file mode 100644 index 000000000..78337ead4 --- /dev/null +++ b/docs-system/generated/site-preview/getLogicalSwitchValue.md @@ -0,0 +1,26 @@ +# getLogicalSwitchValue + +`getLogicalSwitchValue(id)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `integer` | identifying the logical switch (zero for LS1 etc.). | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `true/false` | . | + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getOutputValue.md b/docs-system/generated/site-preview/getOutputValue.md new file mode 100644 index 000000000..12118f1b7 --- /dev/null +++ b/docs-system/generated/site-preview/getOutputValue.md @@ -0,0 +1,26 @@ +# getOutputValue + +`getOutputValue(outputIndex)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `outputIndex` | yes | `integer` | identifying the output channel number 0 for CH1, up to MAX_OUTPUT_CHANNELS - 1. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | current output value (number). Zero is returned for: * non-existing outputs | + +## Availability + +- Since: `2.8.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getRAS.md b/docs-system/generated/site-preview/getRAS.md new file mode 100644 index 000000000..cf02cec92 --- /dev/null +++ b/docs-system/generated/site-preview/getRAS.md @@ -0,0 +1,28 @@ +# getRAS + +`getRAS()` + +Return the RAS value or nil if no valid hardware found + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | representing RAS value. Value bellow 0x33 (51 decimal) are all ok, value above 0x33 indicate a hardware antenna issue. This is just a hardware pass/fail measure and does not represent the quality of the radio link | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Notes + +- RAS was called SWR in the past + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getRSSI.md b/docs-system/generated/site-preview/getRSSI.md new file mode 100644 index 000000000..f2e0348b8 --- /dev/null +++ b/docs-system/generated/site-preview/getRSSI.md @@ -0,0 +1,26 @@ +# getRSSI + +`getRSSI()` + +Get RSSI value as well as low and critical RSSI alarm levels (in dB) + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `rssi` | `unknown` | RSSI value (0 if no link) | +| `alarm_low` | `unknown` | Configured low RSSI alarm level | +| `alarm_crit` | `unknown` | Configured critical RSSI alarm level | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getRotEncMode.md b/docs-system/generated/site-preview/getRotEncMode.md new file mode 100644 index 000000000..ad7f43732 --- /dev/null +++ b/docs-system/generated/site-preview/getRotEncMode.md @@ -0,0 +1,24 @@ +# getRotEncMode + +`getRotEncMode()` + +Return rotary encoder mode + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | in list: Normal = 0, Both V and H inverted = 1, V-N = 2, V-A = 3 return 0 on radio without rotary encoder | + +## Availability + +- Since: `2.8.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getRotEncSpeed.md b/docs-system/generated/site-preview/getRotEncSpeed.md new file mode 100644 index 000000000..99954bdf9 --- /dev/null +++ b/docs-system/generated/site-preview/getRotEncSpeed.md @@ -0,0 +1,24 @@ +# getRotEncSpeed + +`getRotEncSpeed()` + +Return rotary encoder current speed + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | in list: ROTENC_LOWSPEED, ROTENC_MIDSPEED, ROTENC_HIGHSPEED returns ROTENC_LOWSPEED on radio without rotary encoder | + +## Availability + +- Since: `2.3.10` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getRtcTime.md b/docs-system/generated/site-preview/getRtcTime.md new file mode 100644 index 000000000..6d484a9a8 --- /dev/null +++ b/docs-system/generated/site-preview/getRtcTime.md @@ -0,0 +1,29 @@ +# getRtcTime + +`getRtcTime()` + +Return current RTC system date as unix timstamp (in seconds since 1. Jan 1970) + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | Number of seconds elapsed since 1. Jan 1970 | + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Notes + +- Please note the RTC timestamp is kept internally as a 32bit integer, which will overflow +in 2038. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getShmVar.md b/docs-system/generated/site-preview/getShmVar.md new file mode 100644 index 000000000..e33a67e16 --- /dev/null +++ b/docs-system/generated/site-preview/getShmVar.md @@ -0,0 +1,30 @@ +# getShmVar + +`getShmVar(id)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `integer` | between 1 and 16 identifying the shared memory variable. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `integer` | . The value of the shared memory variable. | + +## Availability + +- Since: `2.6` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getSourceIndex.md b/docs-system/generated/site-preview/getSourceIndex.md new file mode 100644 index 000000000..9a989cdcb --- /dev/null +++ b/docs-system/generated/site-preview/getSourceIndex.md @@ -0,0 +1,31 @@ +# getSourceIndex + +`getSourceIndex(sourceName)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sourceName` | yes | `string` | naming a value source as it is shown on radio menus where you can select it. Notice that many names have special characters in them. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `sourceIndex` | `integer` | . The source index, which can be used as input for `getSourceName(sourceIndex)`, `getValue(sourceIndex)`, and `getFieldInfo(sourceIndex)`. | + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Notes + +- the source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so `getValue(index)` will work with the indices obtained here. +This function is rather time consuming, and should not be used repeatedly in a script, if it can be avoided. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getSourceName.md b/docs-system/generated/site-preview/getSourceName.md new file mode 100644 index 000000000..59c76ee0f --- /dev/null +++ b/docs-system/generated/site-preview/getSourceName.md @@ -0,0 +1,30 @@ +# getSourceName + +`getSourceName(sourceIndex)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sourceIndex` | yes | `integer` | identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `sourceName` | `string` | naming the value source as it is shown on radio menus where a source can be chosen. | + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Notes + +- the source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so `getValue(index)` will work with the indices used here. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getSourceValue.md b/docs-system/generated/site-preview/getSourceValue.md new file mode 100644 index 000000000..97c42e9a6 --- /dev/null +++ b/docs-system/generated/site-preview/getSourceValue.md @@ -0,0 +1,48 @@ +# getSourceValue + +`getSourceValue(source)` + +Returns the value of a source. Superseeds getValue. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `source` | yes | `string` | can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | current source value (number), or last known telemetry item value. | +| `isCurrent` | `unknown` | is true for telemetry sources that are within the "Sensor Lost" duration and telemetry is streaming . Always true for non-telemetry items. | +| `isFresh` | `unknown` | is true for telemetry sources which have been recently updated and telemetry is streaming. Always true for non-telemetry items. | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Notes + +- The list of fixed sources: + +| OpenTX Version | Radio | +|----------------|-------| +| 2.0 | [all](http://downloads-20.open-tx.org/firmware/lua_fields.txt) | +| 2.1 | [X9D and X9D+](http://downloads-21.open-tx.org/firmware/lua_fields_taranis.txt), [X9E](http://downloads-21.open-tx.org/firmware/lua_fields_taranis_x9e.txt) | +| 2.2 | [X9D and X9D+](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9e.txt), [Horus](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x12s.txt) | +| 2.3 | [X9D and X9D+](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9e.txt), [X7](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x7.txt), [Horus](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x12s.txt) | + +In OpenTX 2.1.x the telemetry sources no longer have a predefined name. +To get a telemetry value simply use it's sensor name. For example: + * Altitude sensor has a name "Alt" + * to get the current altitude use the source "Alt" + * to get the minimum altitude use the source "Alt-", to get the maximum use "Alt+" +- Getting a value by its numerical identifier is much faster than by its name. +While `Cels` sensor returns current values of all cells in a table, a `Cels+` or +`Cels-` will return a single value - the maximum or minimum Cels value. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getStickMode.md b/docs-system/generated/site-preview/getStickMode.md new file mode 100644 index 000000000..46dfe82cb --- /dev/null +++ b/docs-system/generated/site-preview/getStickMode.md @@ -0,0 +1,24 @@ +# getStickMode + +`getStickMode()` + + + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `unknown` | integer, a 1 to 4 value corresponding to radio stick mode | + +## Availability + +- Since: `3.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getSwitchIndex.md b/docs-system/generated/site-preview/getSwitchIndex.md new file mode 100644 index 000000000..e2eb6d7be --- /dev/null +++ b/docs-system/generated/site-preview/getSwitchIndex.md @@ -0,0 +1,26 @@ +# getSwitchIndex + +`getSwitchIndex(positionName)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `positionName` | yes | `string` | naming a switch position as it is shown on radio menus where you can select a switch. Notice that many names have special characters in them like arrow up/down etc. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `integer` | . The switchIndex, which can be used as input for `getSwitchName(switchIndex)` and `getSwitchValue(switchIndex)`. Also corresponds to the fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches. | + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getSwitchInfo.md b/docs-system/generated/site-preview/getSwitchInfo.md new file mode 100644 index 000000000..fe54f271d --- /dev/null +++ b/docs-system/generated/site-preview/getSwitchInfo.md @@ -0,0 +1,26 @@ +# getSwitchInfo + +`getSwitchInfo(sourceIndex)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sourceIndex` | yes | `integer` | identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | information about requested field, table elements: * `type` (number) field identifier 0 = SWITCH_NONE 1 = SWITCH_TOGGLE 2 = SWITCH_2POS 3 = SWITCH_3POS | + +## Availability + +- Since: `2.12` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getSwitchName.md b/docs-system/generated/site-preview/getSwitchName.md new file mode 100644 index 000000000..8e240aeb0 --- /dev/null +++ b/docs-system/generated/site-preview/getSwitchName.md @@ -0,0 +1,26 @@ +# getSwitchName + +`getSwitchName(switchIndex)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `switchIndex` | yes | `integer` | identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `string` | naming the switch position as it is shown on radio menus where a switch can be chosen. | + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getSwitchValue.md b/docs-system/generated/site-preview/getSwitchValue.md new file mode 100644 index 000000000..0c22aacfe --- /dev/null +++ b/docs-system/generated/site-preview/getSwitchValue.md @@ -0,0 +1,26 @@ +# getSwitchValue + +`getSwitchValue(switchIndex)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `switchIndex` | yes | `integer` | identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `true/false` | . The value of the switch. | + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getTime.md b/docs-system/generated/site-preview/getTime.md new file mode 100644 index 000000000..50d79c935 --- /dev/null +++ b/docs-system/generated/site-preview/getTime.md @@ -0,0 +1,24 @@ +# getTime + +`getTime()` + +Return the time since the radio was started in multiple of 10ms + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | Number of 10ms ticks since the radio was started Example: run time: 12.54 seconds, return value: 1254 | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getTrainerStatus.md b/docs-system/generated/site-preview/getTrainerStatus.md new file mode 100644 index 000000000..53c2df504 --- /dev/null +++ b/docs-system/generated/site-preview/getTrainerStatus.md @@ -0,0 +1,24 @@ +# getTrainerStatus + +`getTrainerStatus()` + + + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | current output value (number). 0 - Not Connected 1 - Connected 2 - Disconnected 3 - Reconnected | + +## Availability + +- Since: `2.9.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getTxGPS.md b/docs-system/generated/site-preview/getTxGPS.md new file mode 100644 index 000000000..c3b3e8e3d --- /dev/null +++ b/docs-system/generated/site-preview/getTxGPS.md @@ -0,0 +1,24 @@ +# getTxGPS + +`getTxGPS()` + +Return the internal GPS position or nil if no valid hardware found + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | representing the current radio position * `lat` (number) internal GPS latitude, positive is North * `lon` (number) internal GPS longitude, positive is East * `numsat` (number) current number of sats locked in by the GPS sensor * `fix` (boolean) fix status * `alt` (number) internal GPS altitude in 0.1m * `speed` (number) internal GPSspeed in 0.1m/s * `heading` (number) internal GPS ground course estimation in degrees * 10 * `hdop` (number) internal GPS horizontal dilution of precision | + +## Availability + +- Since: `2.2.2` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getUsage.md b/docs-system/generated/site-preview/getUsage.md new file mode 100644 index 000000000..502e7091b --- /dev/null +++ b/docs-system/generated/site-preview/getUsage.md @@ -0,0 +1,24 @@ +# getUsage + +`getUsage()` + +Get percent of already used Lua instructions in current script execution cycle. + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `usage` | `integer` | a value from 0 to 100 (percent) | + +## Availability + +- Since: `2.2.1` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getValue.md b/docs-system/generated/site-preview/getValue.md new file mode 100644 index 000000000..41f94d5d8 --- /dev/null +++ b/docs-system/generated/site-preview/getValue.md @@ -0,0 +1,49 @@ +# getValue + +`getValue(source)` + +Returns the value of a source. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `source` | yes | `string` | can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | current source value (number). Zero is returned for: * non-existing sources * for all telemetry source when the telemetry stream is not received * far all non allowed sensors while FAI MODE is active | +| `-` | `table` | GPS position is returned in a table: * `lat` (number) latitude, positive is North * `lon` (number) longitude, positive is East * `pilot-lat` (number) pilot latitude, positive is North * `pilot-lon` (number) pilot longitude, positive is East | +| `-` | `table` | GPS date/time, see getDateTime() | +| `-` | `table` | Cells are returned in a table (except where no cells were detected in which case the returned value is 0): * table has one item for each detected cell: * key (number) cell number (1 to number of cells) * value (number) current cell voltage | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Notes + +- The list of fixed sources: + +| OpenTX Version | Radio | +|----------------|-------| +| 2.0 | [all](http://downloads-20.open-tx.org/firmware/lua_fields.txt) | +| 2.1 | [X9D and X9D+](http://downloads-21.open-tx.org/firmware/lua_fields_taranis.txt), [X9E](http://downloads-21.open-tx.org/firmware/lua_fields_taranis_x9e.txt) | +| 2.2 | [X9D and X9D+](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9e.txt), [Horus](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x12s.txt) | +| 2.3 | [X9D and X9D+](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9e.txt), [X7](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x7.txt), [Horus](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x12s.txt) | + +In OpenTX 2.1.x the telemetry sources no longer have a predefined name. +To get a telemetry value simply use it's sensor name. For example: + * Altitude sensor has a name "Alt" + * to get the current altitude use the source "Alt" + * to get the minimum altitude use the source "Alt-", to get the maximum use "Alt+" +- Getting a value by its numerical identifier is faster then by its name. +While `Cels` sensor returns current values of all cells in a table, a `Cels+` or +`Cels-` will return a single value - the maximum or minimum Cels value. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/getVersion.md b/docs-system/generated/site-preview/getVersion.md new file mode 100644 index 000000000..25038dbb8 --- /dev/null +++ b/docs-system/generated/site-preview/getVersion.md @@ -0,0 +1,30 @@ +# getVersion + +`getVersion()` + +Return OpenTX version + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `string` | OpenTX version (ie "2.1.5") | +| `opentx_version_ie_2` | `string` | OpenTX version (ie "2.1.5") | +| `radio_type_x12s_x10_x9e_x9d_x9d_or_x7` | `string` | radio type: `x12s`, `x10`, `x9e`, `x9d+`, `x9d` or `x7`. | +| `major_version_ie_2_if_version_2` | `integer` | major version (ie 2 if version 2.1.5) | +| `minor_version_ie_1_if_version_2` | `integer` | minor version (ie 1 if version 2.1.5) | +| `revision_number_ie_5_if_version_2` | `integer` | revision number (ie 5 if version 2.1.5) | +| `os_name_i` | `string` | OS name (i.e. EdgeTX or nil if OpenTX) | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/ghostTelemetryPop.md b/docs-system/generated/site-preview/ghostTelemetryPop.md new file mode 100644 index 000000000..956c9d895 --- /dev/null +++ b/docs-system/generated/site-preview/ghostTelemetryPop.md @@ -0,0 +1,26 @@ +# ghostTelemetryPop + +`ghostTelemetryPop()` + +Pops a received Ghost Telemetry packet from the queue. + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | queue does not contain any (or enough) bytes to form a whole packet | +| `type` | `integer` | | +| `packet` | `table` | data bytes | + +## Availability + +- Since: `2.7.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/ghostTelemetryPush.md b/docs-system/generated/site-preview/ghostTelemetryPush.md new file mode 100644 index 000000000..ff3609c62 --- /dev/null +++ b/docs-system/generated/site-preview/ghostTelemetryPush.md @@ -0,0 +1,32 @@ +# ghostTelemetryPush + +`ghostTelemetryPush()` + +This functions allows for sending telemetry data toward the Ghost link. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `command` | yes | `unknown` | command | +| `data` | yes | `table` | table of data bytes | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `boolean` | data queued in output buffer or not. | +| `-` | `nil` | incorrect telemetry protocol. | + +## Availability + +- Since: `2.7.0` +- Radio support: `all` + +## Notes + +- When called without parameters, it will only return the status of the output buffer without sending anything. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/index.md b/docs-system/generated/site-preview/index.md new file mode 100644 index 000000000..6970df1ad --- /dev/null +++ b/docs-system/generated/site-preview/index.md @@ -0,0 +1,15 @@ +# Generated API Reference + +This section is generated from the normalized API model and grouped by module for browsing. + +Start with the [API Review Dashboard](review.md) if you want to review gaps, suspicious items, and likely upstream annotation fixes first. + +## [lcd](module-lcd.md) + +- `1` APIs +- Open the [lcd module page](module-lcd.md) for the review grid. + +## [runtime](module-runtime.md) + +- `1` APIs +- Open the [runtime module page](module-runtime.md) for the review grid. diff --git a/docs-system/generated/site-preview/killEvents.md b/docs-system/generated/site-preview/killEvents.md new file mode 100644 index 000000000..e6e215761 --- /dev/null +++ b/docs-system/generated/site-preview/killEvents.md @@ -0,0 +1,24 @@ +# killEvents + +`killEvents(key)` + +Stops key state machine. See [Key Events](../key_events.md) for the detailed description. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `key` | yes | `integer` | key to be killed, can also include event type (only the key part is used) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/lcd.RGB.md b/docs-system/generated/site-preview/lcd.RGB.md new file mode 100644 index 000000000..c4fb694cc --- /dev/null +++ b/docs-system/generated/site-preview/lcd.RGB.md @@ -0,0 +1,33 @@ +# lcd.RGB + +`lcd.RGB(r, g, b | rgb)` + +Returns a drawing flag with RGB color code + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `r` | yes | `integer` | a number between 0 and 255 that expresses the amount of red in the color | +| `g` | yes | `integer` | a number between 0 and 255 that expresses the amount of green in the color | +| `b` | yes | `integer` | a number between 0 and 255 that expresses the amount of blue in the color | +| `rgb` | yes | `integer` | a number between 0 and 0xFFFFFF that expresses the RGB value (0xFF000=RED, 0x00FF00=GREEN, 0x0000FF=BLUE) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `flag` | `integer` | with RGB565 color | + +## Availability + +- Since: `2.2.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display. Use *either* lcd.RGB(r,g,b) *or* lcd.RGB(rgb) + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.clear.md b/docs-system/generated/site-preview/lcd.clear.md new file mode 100644 index 000000000..e8558f20d --- /dev/null +++ b/docs-system/generated/site-preview/lcd.clear.md @@ -0,0 +1,29 @@ +# lcd.clear + +`lcd.clear([color])` + +Clear the LCD screen + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `color` | no | `unknown` | | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Notes + +- This function only works in stand-alone and telemetry scripts. + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.draw-bitmap.md b/docs-system/generated/site-preview/lcd.draw-bitmap.md new file mode 100644 index 000000000..e3b1ee07b --- /dev/null +++ b/docs-system/generated/site-preview/lcd.draw-bitmap.md @@ -0,0 +1,53 @@ +# lcd.drawBitmap + +`lcd.drawBitmap(bitmap, x, y [, scale])` + +Display a previously opened bitmap at coordinates and optionally scale it. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `bitmap` | yes | `bitmapPointer` | Pointer returned by Bitmap.open(). | +| `x` | yes | `integer` | Top coordinate. | +| `y` | yes | `integer` | Left coordinate. | +| `scale` | no | `integer` | Scale percent where 100 keeps original size. | + +## Returns + +None. + +## Availability + +- Since: `2.3.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display. + +## Source + +`radio/src/lua/api_colorlcd.cpp` + +## Enrichment + +The sections below are authored outside the firmware source so examples, compatibility notes, and learning material can evolve without bloating C++ API comments. + +## Extended Description + +`lcd.drawBitmap` is a good example of the split between generated API truth and richer authored guidance. The syntax, parameter list, and availability belong in upstream source annotations. Practical usage notes and examples can stay here in an overlay file. + +## Examples + +```lua +local bmp = Bitmap.open("/IMAGES/logo.png") +if bmp then + lcd.drawBitmap(bmp, 10, 12, 100) +end +``` + +## Related Topics + +- `Bitmap.open` +- `Bitmap.getSize` diff --git a/docs-system/generated/site-preview/lcd.drawAnnulus.md b/docs-system/generated/site-preview/lcd.drawAnnulus.md new file mode 100644 index 000000000..bb4e807a2 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawAnnulus.md @@ -0,0 +1,34 @@ +# lcd.drawAnnulus + +`lcd.drawAnnulus(x, y, r1, r2, start, end [, flags])` + +Draw an arc + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | coordinates of the center | +| `y` | yes | `integer` | coordinates of the center | +| `r1` | yes | `integer` | radii of the inside and outside of the annulus | +| `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) | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawArc.md b/docs-system/generated/site-preview/lcd.drawArc.md new file mode 100644 index 000000000..e94b9de6c --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawArc.md @@ -0,0 +1,33 @@ +# lcd.drawArc + +`lcd.drawArc(x, y, r, start, end [, flags])` + +Draw an arc + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | coordinates of the center | +| `y` | yes | `integer` | coordinates of the center | +| `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) | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawBitmap.md b/docs-system/generated/site-preview/lcd.drawBitmap.md new file mode 100644 index 000000000..e3b1ee07b --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawBitmap.md @@ -0,0 +1,53 @@ +# lcd.drawBitmap + +`lcd.drawBitmap(bitmap, x, y [, scale])` + +Display a previously opened bitmap at coordinates and optionally scale it. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `bitmap` | yes | `bitmapPointer` | Pointer returned by Bitmap.open(). | +| `x` | yes | `integer` | Top coordinate. | +| `y` | yes | `integer` | Left coordinate. | +| `scale` | no | `integer` | Scale percent where 100 keeps original size. | + +## Returns + +None. + +## Availability + +- Since: `2.3.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display. + +## Source + +`radio/src/lua/api_colorlcd.cpp` + +## Enrichment + +The sections below are authored outside the firmware source so examples, compatibility notes, and learning material can evolve without bloating C++ API comments. + +## Extended Description + +`lcd.drawBitmap` is a good example of the split between generated API truth and richer authored guidance. The syntax, parameter list, and availability belong in upstream source annotations. Practical usage notes and examples can stay here in an overlay file. + +## Examples + +```lua +local bmp = Bitmap.open("/IMAGES/logo.png") +if bmp then + lcd.drawBitmap(bmp, 10, 12, 100) +end +``` + +## Related Topics + +- `Bitmap.open` +- `Bitmap.getSize` diff --git a/docs-system/generated/site-preview/lcd.drawBitmapPattern.md b/docs-system/generated/site-preview/lcd.drawBitmapPattern.md new file mode 100644 index 000000000..0b66dbffa --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawBitmapPattern.md @@ -0,0 +1,31 @@ +# lcd.drawBitmapPattern + +`lcd.drawBitmapPattern(bitmap, x, y [, flags])` + +Displays a bitmap pattern at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `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) | + +## Returns + +None. + +## Availability + +- Since: `2.8.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawBitmapPatternPie.md b/docs-system/generated/site-preview/lcd.drawBitmapPatternPie.md new file mode 100644 index 000000000..7a1ee2076 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawBitmapPatternPie.md @@ -0,0 +1,33 @@ +# lcd.drawBitmapPatternPie + +`lcd.drawBitmapPatternPie(bitmap, x, y, startAngle, endAngle [, flags])` + +Displays a bitmap pattern pie at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `bitmap` | yes | `pointer` | point to a bitmap previously opened with Bitmap.open() | +| `x` | yes | `integer` | starting coordinates | +| `y` | yes | `integer` | starting coordinates | +| `startAngle` | yes | `unknown` | Start angle | +| `endAngle` | yes | `unknown` | End angle | +| `flags` | no | `integer` | please see [Lcd functions overview](../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) | + +## Returns + +None. + +## Availability + +- Since: `2.8.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawChannel.md b/docs-system/generated/site-preview/lcd.drawChannel.md new file mode 100644 index 000000000..2296ab393 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawChannel.md @@ -0,0 +1,28 @@ +# lcd.drawChannel + +`lcd.drawChannel(x, y, source, flags)` + +Display a telemetry value at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `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) | + +## Returns + +None. + +## Availability + +- Since: `2.0.6` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawCircle.md b/docs-system/generated/site-preview/lcd.drawCircle.md new file mode 100644 index 000000000..1d7c4b129 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawCircle.md @@ -0,0 +1,31 @@ +# lcd.drawCircle + +`lcd.drawCircle(x, y, r [, flags])` + +Draw a circle at (x, y) of specified radius + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `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) | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawCombobox.md b/docs-system/generated/site-preview/lcd.drawCombobox.md new file mode 100644 index 000000000..16db26be3 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawCombobox.md @@ -0,0 +1,33 @@ +# lcd.drawCombobox + +`lcd.drawCombobox(x, y, w, list, idx [, flags])` + +Draw a combo box + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | top left corner position | +| `y` | yes | `integer` | top left corner position | +| `w` | yes | `integer` | width of combo box in pixels | +| `list` | yes | `table` | combo box elements, each element is a string | +| `idx` | yes | `integer` | index of entry to highlight | +| `flags` | no | `integer` | drawing flags, the flags can not be combined: * `BLINK` combo box is expanded * `INVERS` combo box collapsed, text inversed * `0 or not present` combo box collapsed, text normal | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` + +## Notes + +- Only available on Taranis + +## Source + +`radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawFilledCircle.md b/docs-system/generated/site-preview/lcd.drawFilledCircle.md new file mode 100644 index 000000000..90145922a --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawFilledCircle.md @@ -0,0 +1,31 @@ +# lcd.drawFilledCircle + +`lcd.drawFilledCircle(x, y, r [, flags])` + +Draw a filled circle at (x, y) of specified radius + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `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) | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawFilledRectangle.md b/docs-system/generated/site-preview/lcd.drawFilledRectangle.md new file mode 100644 index 000000000..1634cb223 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawFilledRectangle.md @@ -0,0 +1,30 @@ +# lcd.drawFilledRectangle + +`lcd.drawFilledRectangle(x, y, w, h [, flags [, opacity]])` + +Draw a solid rectangle from top left corner (x,y) of specified width and height + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | top left corner position | +| `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) | +| `opacity` | no | `integer` | opacity defaults to 0 (only on radios with color display) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawFilledTriangle.md b/docs-system/generated/site-preview/lcd.drawFilledTriangle.md new file mode 100644 index 000000000..0e99408f5 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawFilledTriangle.md @@ -0,0 +1,34 @@ +# lcd.drawFilledTriangle + +`lcd.drawFilledTriangle(x1, y1, x2, y2, x3, y3 [, flags])` + +Draw a filled triangle + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x1` | yes | `integer` | coordinates of the three vertices | +| `y1` | yes | `integer` | coordinates of the three vertices | +| `x2` | yes | `integer` | coordinates of the three vertices | +| `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) | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawGauge.md b/docs-system/generated/site-preview/lcd.drawGauge.md new file mode 100644 index 000000000..ab4b77bd1 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawGauge.md @@ -0,0 +1,31 @@ +# lcd.drawGauge + +`lcd.drawGauge(x, y, w, h, fill, maxfill [, flags])` + +Draw a simple gauge that is filled based upon fill value + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | top left corner position | +| `y` | yes | `integer` | top left corner position | +| `w` | yes | `integer` | width in pixels | +| `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) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawHudRectangle.md b/docs-system/generated/site-preview/lcd.drawHudRectangle.md new file mode 100644 index 000000000..0a08bf5d3 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawHudRectangle.md @@ -0,0 +1,34 @@ +# lcd.drawHudRectangle + +`lcd.drawHudRectangle(pitch, roll, xmin, xmax, ymin, ymax [, flags])` + +Draw a rectangle in perspective + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `pitch` | yes | `integer` | pitch and roll to define the orientation of the rectangle | +| `roll` | yes | `integer` | pitch and roll to define the orientation of the rectangle | +| `xmin` | yes | `integer` | the limits of the rectangle | +| `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) | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawLine.md b/docs-system/generated/site-preview/lcd.drawLine.md new file mode 100644 index 000000000..1aec41527 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawLine.md @@ -0,0 +1,35 @@ +# lcd.drawLine + +`lcd.drawLine(x1, y1, x2, y2, pattern, [flags])` + +Draw a straight line on LCD + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x1` | yes | `integer` | starting coordinate | +| `y1` | yes | `integer` | starting coordinate | +| `x2` | yes | `integer` | end coordinate | +| `y2` | yes | `integer` | end coordinate | +| `pattern` | yes | `unknown` | SOLID or DOTTED | +| `flags` | no | `integer` | lcdflags | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Notes + +- If the start or the end of the line is outside the LCD dimensions, then the +whole line will not be drawn (starting from OpenTX 2.1.5) + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawLineWithClipping.md b/docs-system/generated/site-preview/lcd.drawLineWithClipping.md new file mode 100644 index 000000000..70f5f9105 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawLineWithClipping.md @@ -0,0 +1,37 @@ +# lcd.drawLineWithClipping + +`lcd.drawLineWithClipping(x1, y1, x2, y2, xmin, xmax, ymin, ymax, pattern [, flags])` + +Draw a line only inside a rectangle + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x1` | yes | `integer` | coordinates of the start and end of the unclipped line | +| `y1` | yes | `integer` | coordinates of the start and end of the unclipped line | +| `x2` | yes | `integer` | coordinates of the start and end of the unclipped line | +| `y2` | yes | `integer` | coordinates of the start and end of the unclipped line | +| `xmin` | yes | `integer` | the limits of the rectangle inside which the line is drawn | +| `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,-ERASE,-DOTTED` | 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) | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawNumber.md b/docs-system/generated/site-preview/lcd.drawNumber.md new file mode 100644 index 000000000..052508e01 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawNumber.md @@ -0,0 +1,29 @@ +# lcd.drawNumber + +`lcd.drawNumber(x, y, value [, flags [, inversColor]])` + +Display a number at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `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) | +| `inversColor` | no | `unknown` | overrides the inverse text color for INVERS | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawPie.md b/docs-system/generated/site-preview/lcd.drawPie.md new file mode 100644 index 000000000..0440c3eea --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawPie.md @@ -0,0 +1,33 @@ +# lcd.drawPie + +`lcd.drawPie(x, y, r, start, end [, flags])` + +Draw a pie slice + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | coordinates of the center | +| `y` | yes | `integer` | coordinates of the center | +| `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) | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawPixmap.md b/docs-system/generated/site-preview/lcd.drawPixmap.md new file mode 100644 index 000000000..153655556 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawPixmap.md @@ -0,0 +1,30 @@ +# lcd.drawPixmap + +`lcd.drawPixmap(x, y, name)` + +Draw a bitmap at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | starting coordinates | +| `y` | yes | `integer` | starting coordinates | +| `name` | yes | `string` | full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` + +## Notes + +- Maximum image size is [display width / 2] x [display height] pixels. + +## Source + +`radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawPoint.md b/docs-system/generated/site-preview/lcd.drawPoint.md new file mode 100644 index 000000000..8070ce136 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawPoint.md @@ -0,0 +1,33 @@ +# lcd.drawPoint + +`lcd.drawPoint(x, y, [flags])` + +Draw a single pixel at (x,y) position + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `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) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Notes + +- Taranis has an LCD display width of 212 pixels and height of 64 pixels. +Position (0,0) is at top left. Y axis is negative, top line is 0, +bottom line is 63. Drawing on an existing black pixel produces white pixel (TODO check this!) + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawRectangle.md b/docs-system/generated/site-preview/lcd.drawRectangle.md new file mode 100644 index 000000000..310823fef --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawRectangle.md @@ -0,0 +1,31 @@ +# lcd.drawRectangle + +`lcd.drawRectangle(x, y, w, h [, flags [, t [, opacity]]])` + +Draw a rectangle from top left corner (x,y) of specified width and height + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | top left corner position | +| `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) | +| `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) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawScreenTitle.md b/docs-system/generated/site-preview/lcd.drawScreenTitle.md new file mode 100644 index 000000000..23f0f527e --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawScreenTitle.md @@ -0,0 +1,30 @@ +# lcd.drawScreenTitle + +`lcd.drawScreenTitle(title, page, pages)` + +Draw a title bar + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `title` | yes | `string` | text for the title | +| `page` | yes | `integer` | page number | +| `pages` | yes | `integer` | total number of pages. Only used as indicator on the right side of title bar. (i.e. idx=2, cnt=5, display `2/5`) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` + +## Notes + +- Only available on Taranis + +## Source + +`radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawSource.md b/docs-system/generated/site-preview/lcd.drawSource.md new file mode 100644 index 000000000..fc00cb104 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawSource.md @@ -0,0 +1,28 @@ +# lcd.drawSource + +`lcd.drawSource(x, y, source [, flags])` + +Displays the name of the corresponding input as defined by the source at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `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) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawSwitch.md b/docs-system/generated/site-preview/lcd.drawSwitch.md new file mode 100644 index 000000000..fdf5a71a8 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawSwitch.md @@ -0,0 +1,28 @@ +# lcd.drawSwitch + +`lcd.drawSwitch(x, y, switch, flags)` + +Draw a text representation of switch at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `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. | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawText.md b/docs-system/generated/site-preview/lcd.drawText.md new file mode 100644 index 000000000..2a6f7f81b --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawText.md @@ -0,0 +1,29 @@ +# lcd.drawText + +`lcd.drawText(x, y, text [, flags [, inversColor]])` + +Draw a text beginning at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `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. | +| `inversColor` | no | `unknown` | overrides the inverse text color for INVERS | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawTextLines.md b/docs-system/generated/site-preview/lcd.drawTextLines.md new file mode 100644 index 000000000..480fb29a1 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawTextLines.md @@ -0,0 +1,35 @@ +# lcd.drawTextLines + +`lcd.drawTextLines(x, y, w, h, text [, flags])` + +Draw text inside rectangle (x,y,w,h) with line breaks + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | starting coordinate | +| `y` | yes | `integer` | starting coordinate | +| `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. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `x,y` | `integer` | point where text drawing ended | + +## Availability + +- Since: `2.5.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawTimer.md b/docs-system/generated/site-preview/lcd.drawTimer.md new file mode 100644 index 000000000..66f3030fa --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawTimer.md @@ -0,0 +1,29 @@ +# lcd.drawTimer + +`lcd.drawTimer(x, y, value [, flags [, inversColor]])` + +Display a value formatted as time at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `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) | +| `inversColor` | no | `unknown` | overrides the inverse text color for INVERS | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.drawTriangle.md b/docs-system/generated/site-preview/lcd.drawTriangle.md new file mode 100644 index 000000000..a2fda4db0 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.drawTriangle.md @@ -0,0 +1,34 @@ +# lcd.drawTriangle + +`lcd.drawTriangle(x1, y1, x2, y2, x3, y3 [, flags])` + +Draw a triangle + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x1` | yes | `integer` | coordinates of the three vertices | +| `y1` | yes | `integer` | coordinates of the three vertices | +| `x2` | yes | `integer` | coordinates of the three vertices | +| `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) | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.exitFullScreen.md b/docs-system/generated/site-preview/lcd.exitFullScreen.md new file mode 100644 index 000000000..27a5e444b --- /dev/null +++ b/docs-system/generated/site-preview/lcd.exitFullScreen.md @@ -0,0 +1,26 @@ +# lcd.exitFullScreen + +`lcd.exitFullScreen()` + +Exit full screen widget mode. + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.5.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.getColor.md b/docs-system/generated/site-preview/lcd.getColor.md new file mode 100644 index 000000000..e54cbaa6f --- /dev/null +++ b/docs-system/generated/site-preview/lcd.getColor.md @@ -0,0 +1,30 @@ +# lcd.getColor + +`lcd.getColor(flags)` + +Get the color value from flags + +## Parameters + +| 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) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `color` | `flag` | only the RGB565 color value of the input | + +## Availability + +- Since: `2.3.11` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.getLastLeftPos.md b/docs-system/generated/site-preview/lcd.getLastLeftPos.md new file mode 100644 index 000000000..8886b14df --- /dev/null +++ b/docs-system/generated/site-preview/lcd.getLastLeftPos.md @@ -0,0 +1,28 @@ +# lcd.getLastLeftPos + +`lcd.getLastLeftPos()` + +Returns the leftmost x position from previous drawtext or drawNumber output + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `number` | `integer` | x position | + +## Availability + +- Since: `2.2.0` +- Radio support: `bw-lcd` + +## Notes + +- Only available on Taranis + +## Source + +`radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.getLastPos.md b/docs-system/generated/site-preview/lcd.getLastPos.md new file mode 100644 index 000000000..588eb8569 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.getLastPos.md @@ -0,0 +1,29 @@ +# lcd.getLastPos + +`lcd.getLastPos()` + +Returns the rightmost x position from previous output + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `number` | `integer` | x position | + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` + +## Notes + +- Only available on Taranis +- For added clarity, it is recommended to use lcd.getLastRightPos() + +## Source + +`radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.getLastRightPos.md b/docs-system/generated/site-preview/lcd.getLastRightPos.md new file mode 100644 index 000000000..3c6a8bc5d --- /dev/null +++ b/docs-system/generated/site-preview/lcd.getLastRightPos.md @@ -0,0 +1,29 @@ +# lcd.getLastRightPos + +`lcd.getLastRightPos()` + +Returns the rightest x position from previous drawtext or drawNumber output + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `number` | `integer` | x position | + +## Availability + +- Since: `2.2.0` +- Radio support: `bw-lcd` + +## Notes + +- Only available on Taranis +- This is strictly equivalent to former lcd.getLastPos() + +## Source + +`radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.invertRect.md b/docs-system/generated/site-preview/lcd.invertRect.md new file mode 100644 index 000000000..07f76e816 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.invertRect.md @@ -0,0 +1,32 @@ +# lcd.invertRect + +`lcd.invertRect(x, y, w, h [, flags])` + +Invert a rectangle zone from top left corner (x,y) of specified width and height + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | top left corner position | +| `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) | + +## Returns + +None. + +## Availability + +- Since: `2.8.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.refresh.md b/docs-system/generated/site-preview/lcd.refresh.md new file mode 100644 index 000000000..890d6d5a8 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.refresh.md @@ -0,0 +1,29 @@ +# lcd.refresh + +`lcd.refresh()` + +Refresh the LCD screen + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.2.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Notes + +- From 2.4.0 on color LCDs, this is done automatically when the screen +needs to be refreshed (on events and depending on refresh period). +- This function only works in stand-alone and telemetry scripts. + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.resetBacklightTimeout.md b/docs-system/generated/site-preview/lcd.resetBacklightTimeout.md new file mode 100644 index 000000000..3808e587c --- /dev/null +++ b/docs-system/generated/site-preview/lcd.resetBacklightTimeout.md @@ -0,0 +1,23 @@ +# lcd.resetBacklightTimeout + +`lcd.resetBacklightTimeout()` + +Reset the backlight timeout + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.3.6` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.setColor.md b/docs-system/generated/site-preview/lcd.setColor.md new file mode 100644 index 000000000..1417587e4 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.setColor.md @@ -0,0 +1,27 @@ +# lcd.setColor + +`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) + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.2.0` +- Radio support: `color-lcd` + +## Notes + +- Please notice that changing theme colors affects not only other Lua widgets, but the entire radio interface. +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/lcd.sizeText.md b/docs-system/generated/site-preview/lcd.sizeText.md new file mode 100644 index 000000000..be73a23f7 --- /dev/null +++ b/docs-system/generated/site-preview/lcd.sizeText.md @@ -0,0 +1,31 @@ +# lcd.sizeText + +`lcd.sizeText(text [, flags])` + +Get the width and height of a text string drawn with flags + +## Parameters + +| 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) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `w,h` | `integer` | width and height of the text | + +## Availability + +- Since: `2.5.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/docs-system/generated/site-preview/loadScript.md b/docs-system/generated/site-preview/loadScript.md new file mode 100644 index 000000000..d36208dbe --- /dev/null +++ b/docs-system/generated/site-preview/loadScript.md @@ -0,0 +1,48 @@ +# loadScript + +`loadScript(path [, mode [, env]])` + +Load and compile a Lua script from the SD card. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `path` | yes | `string` | Script file path. | +| `mode` | no | `string` | Compilation mode. | +| `env` | no | `table` | Custom environment table. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `chunk` | `function|nil` | Compiled Lua chunk when loading succeeds. | +| `errmsg` | `string|nil` | Error message when loading fails. | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` + +## Enrichment + +The sections below are authored outside the firmware source so examples, compatibility notes, and learning material can evolve without bloating C++ API comments. + +## Extended Description + +`loadScript` should eventually include examples showing how to load reusable Lua modules and how to handle `nil, errmsg` error returns cleanly. + +## Examples + +```lua +local chunk, errmsg = loadScript("/SCRIPTS/TOOLS/demo.lua") +if not chunk then + return errmsg +end + +local mod = chunk() +``` diff --git a/docs-system/generated/site-preview/mkdir.md b/docs-system/generated/site-preview/mkdir.md new file mode 100644 index 000000000..ac124df73 --- /dev/null +++ b/docs-system/generated/site-preview/mkdir.md @@ -0,0 +1,24 @@ +# mkdir + +`mkdir(directory)` + +Create a directory + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `directory` | yes | `string` | Directory to create | + +## Returns + +None. + +## Availability + +- Since: `2.11.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_filesystem.cpp` diff --git a/docs-system/generated/site-preview/model.defaultInputs.md b/docs-system/generated/site-preview/model.defaultInputs.md new file mode 100644 index 000000000..9aceb3d39 --- /dev/null +++ b/docs-system/generated/site-preview/model.defaultInputs.md @@ -0,0 +1,22 @@ +# model.defaultInputs + +`model.defaultInputs()` + +Set all inputs to defaults + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.deleteFlightModes.md b/docs-system/generated/site-preview/model.deleteFlightModes.md new file mode 100644 index 000000000..8ae06b603 --- /dev/null +++ b/docs-system/generated/site-preview/model.deleteFlightModes.md @@ -0,0 +1,22 @@ +# model.deleteFlightModes + +`model.deleteFlightModes()` + +Clear all flightModes + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.3.10` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.deleteInput.md b/docs-system/generated/site-preview/model.deleteInput.md new file mode 100644 index 000000000..13ffb8455 --- /dev/null +++ b/docs-system/generated/site-preview/model.deleteInput.md @@ -0,0 +1,25 @@ +# model.deleteInput + +`model.deleteInput(input, line)` + +Delete line from specified input + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `input` | yes | `integer` | input number (use 0 for Input1) | +| `line` | yes | `integer` | input line (use 0 for first line) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.deleteInputs.md b/docs-system/generated/site-preview/model.deleteInputs.md new file mode 100644 index 000000000..894df773a --- /dev/null +++ b/docs-system/generated/site-preview/model.deleteInputs.md @@ -0,0 +1,22 @@ +# model.deleteInputs + +`model.deleteInputs()` + +Delete all Inputs + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.deleteMix.md b/docs-system/generated/site-preview/model.deleteMix.md new file mode 100644 index 000000000..787b9e60e --- /dev/null +++ b/docs-system/generated/site-preview/model.deleteMix.md @@ -0,0 +1,25 @@ +# model.deleteMix + +`model.deleteMix(channel, line)` + +Delete mixer line from specified Channel + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `channel` | yes | `integer` | channel number (use 0 for CH1) | +| `line` | yes | `integer` | mix number (use 0 for first line(mix)) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.deleteMixes.md b/docs-system/generated/site-preview/model.deleteMixes.md new file mode 100644 index 000000000..2abefb2ec --- /dev/null +++ b/docs-system/generated/site-preview/model.deleteMixes.md @@ -0,0 +1,22 @@ +# model.deleteMixes + +`model.deleteMixes()` + +Remove all mixers + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.getCurve.md b/docs-system/generated/site-preview/model.getCurve.md new file mode 100644 index 000000000..33efc898e --- /dev/null +++ b/docs-system/generated/site-preview/model.getCurve.md @@ -0,0 +1,27 @@ +# model.getCurve + +`model.getCurve(curve)` + +Get Curve parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `curve` | yes | `integer` | curve number (use 0 for Curve1) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested curve does not exist | +| `-` | `table` | curve data: * `name` (string) name * `type` (number) type * `smooth` (boolean) smooth * `points` (number) number of points * `y` (table) table of Y values: * `key` is point number (zero based) * `value` is y value * `x` (table) **only included for custom curve type**: * `key` is point number (zero based) * `value` is x value | + +## Availability + +- Since: `2.0.12` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.getCustomFunction.md b/docs-system/generated/site-preview/model.getCustomFunction.md new file mode 100644 index 000000000..d8a020f8f --- /dev/null +++ b/docs-system/generated/site-preview/model.getCustomFunction.md @@ -0,0 +1,27 @@ +# model.getCustomFunction + +`model.getCustomFunction(function)` + +Get Custom Function parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `function` | yes | `integer` | custom function number (use 0 for CF1) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested custom function does not exist | +| `-` | `table` | custom function data: * `switch` (number) switch index * `func` (number) function index * `name` (string) Name of track to play (only returned only returned if action is play track, sound or script) * `value` (number) value (only returned only returned if action is **not** play track, sound or script) * `mode` (number) mode (only returned only returned if action is **not** play track, sound or script) * `param` (number) parameter (only returned only returned if action is **not** play track, sound or script) * `active` (number) 0 = disabled, 1 = enabled * `repetition` (number) -1 to 60, range and meaning depend on function | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.getFlightMode.md b/docs-system/generated/site-preview/model.getFlightMode.md new file mode 100644 index 000000000..9b2b3148e --- /dev/null +++ b/docs-system/generated/site-preview/model.getFlightMode.md @@ -0,0 +1,27 @@ +# model.getFlightMode + +`model.getFlightMode(index)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | flight mode number (use 0 for FM0) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested input or line does not exist | +| `-` | `table` | input data: * `name` (string) input line name * `switch` (number) input switch index * `fadeIn` (number) fade in value (in 0.1s) * `fadeOut` (number) fade out value (in 0.1s) * `trimsValues` (table) table of trim values: * `key` is trim number (zero based) * `value` is trim value * `trimsModes` (table) table of trim mode: * `key` is trim number (zero based) * `value` is trim mode | + +## Availability + +- Since: `2.3.10` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.getGlobalVariable.md b/docs-system/generated/site-preview/model.getGlobalVariable.md new file mode 100644 index 000000000..61fa1af30 --- /dev/null +++ b/docs-system/generated/site-preview/model.getGlobalVariable.md @@ -0,0 +1,32 @@ +# model.getGlobalVariable + +`model.getGlobalVariable(index, flight_mode)` + +Return current global variable value + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | zero based global variable index, use 0 for GV1, 8 for GV9 | +| `flight_mode` | yes | `integer` | Flight mode number (0 = FM0, 8 = FM8) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested global variable does not exist | +| `-` | `integer` | current value of global variable | + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Notes + +- a simple warning or notice + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.getInfo.md b/docs-system/generated/site-preview/model.getInfo.md new file mode 100644 index 000000000..2dc84acd6 --- /dev/null +++ b/docs-system/generated/site-preview/model.getInfo.md @@ -0,0 +1,24 @@ +# model.getInfo + +`model.getInfo()` + +Get current Model information + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | model information: * `name` (string) model name * `extendedLimits` (boolean) extended limits enabled * `jitterFilter` (number) model level ADC filter * `bitmap` (string) bitmap name (not present on X7) * `filename` (string) model filename | + +## Availability + +- Since: `2.0.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.getInput.md b/docs-system/generated/site-preview/model.getInput.md new file mode 100644 index 000000000..8cd551f09 --- /dev/null +++ b/docs-system/generated/site-preview/model.getInput.md @@ -0,0 +1,28 @@ +# model.getInput + +`model.getInput(input, line)` + +Return input data for given input and line number + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `input` | yes | `integer` | input number (use 0 for Input1) | +| `line` | yes | `integer` | input line (use 0 for first line) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested input or line does not exist | +| `-` | `table` | input data: * `name` (string) input line name * `inputName` (string) input input name * `source` (number) input source index * `scale` (number) input scaling (for telemetry) * `weight` (number) input weight * `offset` (number) input offset * `switch` (number) input switch index * `curveType` (number) curve type (function, expo, custom curve) * `curveValue` (number) curve index * `carryTrim` deprecated, please use trimSource instead. WARNING: carryTrim was getting negative values (carryTrim = - trimSource) * 'trimSource' (number) a positive number representing trim source * 'side' (number) input side (positive, negative or all) * 'flightModes' (number) bit-mask of active flight modes | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.getInputsCount.md b/docs-system/generated/site-preview/model.getInputsCount.md new file mode 100644 index 000000000..f8fe52b27 --- /dev/null +++ b/docs-system/generated/site-preview/model.getInputsCount.md @@ -0,0 +1,26 @@ +# model.getInputsCount + +`model.getInputsCount(input)` + +Return number of lines for given input + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `input` | yes | `integer` | input number (use 0 for Input1) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | number of configured lines for given input | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.getLogicalSwitch.md b/docs-system/generated/site-preview/model.getLogicalSwitch.md new file mode 100644 index 000000000..cd2e907a5 --- /dev/null +++ b/docs-system/generated/site-preview/model.getLogicalSwitch.md @@ -0,0 +1,27 @@ +# model.getLogicalSwitch + +`model.getLogicalSwitch(switch)` + +Get Logical Switch parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `switch` | yes | `integer` | logical switch number (use 0 for LS1) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested logical switch does not exist | +| `-` | `table` | logical switch data: * `func` (number) function index * `v1` (number) V1 value (index) * `v2` (number) V2 value (index or value) * `v3` (number) V3 value (index or value) * `and` (number) AND switch index * `delay` (number) delay (time in 1/10 s) * `duration` (number) duration (time in 1/10 s) * `state` (boolean) current state of the logical switch * `persistent` (boolean) if true then the state is persistent across reboot of the radio | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.getMix.md b/docs-system/generated/site-preview/model.getMix.md new file mode 100644 index 000000000..26a02db20 --- /dev/null +++ b/docs-system/generated/site-preview/model.getMix.md @@ -0,0 +1,28 @@ +# model.getMix + +`model.getMix(channel, line)` + +Get configuration for specified Mix + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `channel` | yes | `integer` | channel number (use 0 for CH1) | +| `line` | yes | `integer` | mix number (use 0 for first line(mix)) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested channel or line does not exist | +| `-` | `table` | mix data: * `name` (string) mix line name * `source` (number) source index * `weight` (number) weight value (-512 to 511) or source (>= 1024 or <= -1024) * `offset` (number) offset value (-512 to 511) or source (>= 1024 or <= -1024) * `switch` (number) switch index * `multiplex` (number) multiplex (0 = ADD, 1 = MULTIPLY, 2 = REPLACE) * `curveType` (number) curve type (function, expo, custom curve) * `curveValue` (number) curve index * `flightModes` (number) bit-mask of active flight modes * `carryTrim` (boolean) carry trim * `mixWarn` (number) warning (0 = off, 1 = 1 beep, .. 3 = 3 beeps) * `delayPrec` precision of delay up/down (1 or 10) * `delayUp` (number) delay up (time in 1/10 s) * `delayDown` (number) delay down * `speedPrec` precision of speed up/down (1 or 10) * `speedUp` (number) speed up * `speedDown` (number) speed down | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.getMixesCount.md b/docs-system/generated/site-preview/model.getMixesCount.md new file mode 100644 index 000000000..aeb249446 --- /dev/null +++ b/docs-system/generated/site-preview/model.getMixesCount.md @@ -0,0 +1,26 @@ +# model.getMixesCount + +`model.getMixesCount(channel)` + +Get the number of Mixer lines that the specified Channel has + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `channel` | yes | `integer` | channel number (use 0 for CH1) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | number of mixes for requested channel | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.getModule.md b/docs-system/generated/site-preview/model.getModule.md new file mode 100644 index 000000000..7e3f28011 --- /dev/null +++ b/docs-system/generated/site-preview/model.getModule.md @@ -0,0 +1,55 @@ +# model.getModule + +`model.getModule(index)` + +Get RF module parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | module index (0 for internal, 1 for external) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested module does not exist | +| `-` | `table` | module parameters: * `subType` (number) protocol index * `modelId` (number) receiver number * `firstChannel` (number) start channel (0 is CH1) * `channelsCount` (number) number of channels sent to module * `Type` (number) module type * if the module type is Multi additional information are available * `protocol` (number) protocol number (Multi only) * `subProtocol` (number) sub-protocol number (Multi only) * `channelsOrder` (number) first 4 channels expected order (Multi only) * if the module type is LemonDSMP additional info is available * `channelsOrder` (number) first 4 channels expected order (DSMP only) | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Notes + +- `Type` values: + * 0 NONE + * 1 PPM + * 2 XJT_PXX1 + * 3 ISRM_PXX2 + * 4 DSM2 + * 5 CROSSFIRE + * 6 MULTIMODULE + * 7 R9M_PXX1 + * 8 R9M_PXX2 + * 9 R9M_LITE_PXX1 + * 10 R9M_LITE_PXX2 + * 11 R9M_LITE_PRO_PXX1 + * 12 R9M_LITE_PRO_PXX2 + * 13 SBUS + * 14 XJT_LITE_PXX2 + * 15 MODULE_TYPE_FLYSKY_AFHDS3, + * 16 ?? + * 17 MODULE_TYPE_LEMON_DSMP + +`subType` values for XJT_PXX1: + * -1 OFF + * 0 D16 + * 1 D8 + * 2 LR12 + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.getOutput.md b/docs-system/generated/site-preview/model.getOutput.md new file mode 100644 index 000000000..3e49319e6 --- /dev/null +++ b/docs-system/generated/site-preview/model.getOutput.md @@ -0,0 +1,27 @@ +# model.getOutput + +`model.getOutput(index)` + +Get servo parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | output number (use 0 for CH1) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested output does not exist | +| `-` | `table` | output parameters: * `name` (string) name * `min` (number) Minimum % * 10 * `max` (number) Maximum % * 10 * `offset` (number) Subtrim * 10 * `ppmCenter` (number) offset from PPM Center. 0 = 1500 * `symetrical` (number) linear Subtrim 0 = Off, 1 = On * `revert` (number) irection 0 = ­­­---, 1 = INV * `curve` * (number) Curve number (0 for Curve1) * or `nil` if no curve set | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.getSensor.md b/docs-system/generated/site-preview/model.getSensor.md new file mode 100644 index 000000000..9f27d4b7b --- /dev/null +++ b/docs-system/generated/site-preview/model.getSensor.md @@ -0,0 +1,27 @@ +# model.getSensor + +`model.getSensor(sensor)` + +Get Telemetry Sensor parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sensor` | yes | `integer` | sensor number (use 0 for sensor 1) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested sensor does not exist | +| `-` | `table` | with sensor data: * `type` (number) 0 = custom, 1 = calculated * `name` (string) Name * `unit` (number) See list of units in the appendix of the OpenTX Lua Reference Guide * `prec` (number) Number of decimals * `id` (number) Only custom sensors * `instance` (number) Only custom sensors * `formula` (number) Only calculated sensors. 0 = Add etc. see list of formula choices in Companion popup | + +## Availability + +- Since: `2.3.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.getSwashRing.md b/docs-system/generated/site-preview/model.getSwashRing.md new file mode 100644 index 000000000..772c73946 --- /dev/null +++ b/docs-system/generated/site-preview/model.getSwashRing.md @@ -0,0 +1,24 @@ +# model.getSwashRing + +`model.getSwashRing()` + +Get heli swash parameters + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | with heli swash parameters: * `type` (number) 0=---, 1=120, 2=120X, 3=140, 4=90 * `value` (number) swash ring value (normally 0) * 'collectiveSource' (number) source index * 'aileronSource' (number) source index * 'elevatorSource' (number) source index * 'collectiveWeight'(value) -100 to 100 * 'aileronWeight' (value) -100 to 100 * 'elevatorWeight' (value) -100 to 100 | + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.getSwitchWarning.md b/docs-system/generated/site-preview/model.getSwitchWarning.md new file mode 100644 index 000000000..a59ef7d85 --- /dev/null +++ b/docs-system/generated/site-preview/model.getSwitchWarning.md @@ -0,0 +1,26 @@ +# model.getSwitchWarning + +`model.getSwitchWarning(switch)` + +Get warning state for a switch + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `switch` | yes | `integer` | switch number (use 0 for SA) @param switch (string) switch name | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | when switch is a toggle or does not exist @retval number 0 = no warning 1 = switch up 2 = switch middle 3 = switch down | + +## Availability + +- Since: `3.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.getTimer.md b/docs-system/generated/site-preview/model.getTimer.md new file mode 100644 index 000000000..c0de21654 --- /dev/null +++ b/docs-system/generated/site-preview/model.getTimer.md @@ -0,0 +1,27 @@ +# model.getTimer + +`model.getTimer(timer)` + +Get model timer parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `timer` | yes | `integer` | timer index (0 for Timer 1) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested timer does not exist | +| `-` | `table` | timer parameters: * `mode` (number) timer trigger source: off, abs, stk, stk%, sw/!sw, !m_sw/!m_sw * `start` (number) start value [seconds], 0 for up timer, 0> down timer * `value` (number) current value [seconds] * `countdownBeep` (number) countdown beep (0­ = silent, 1 =­ beeps, 2­ = voice) * `minuteBeep` (boolean) minute beep * `persistent` (number) persistent timer * `name` (string) timer name * `showElapsed` (boolean) show elapsed | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.insertInput.md b/docs-system/generated/site-preview/model.insertInput.md new file mode 100644 index 000000000..be68bbd6b --- /dev/null +++ b/docs-system/generated/site-preview/model.insertInput.md @@ -0,0 +1,26 @@ +# model.insertInput + +`model.insertInput(input, line, value)` + +Insert an Input at specified line + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `input` | yes | `integer` | input number (use 0 for Input1) | +| `line` | yes | `integer` | input line (use 0 for first line) | +| `value` | yes | `table` | input data, see model.getInput() | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.insertMix.md b/docs-system/generated/site-preview/model.insertMix.md new file mode 100644 index 000000000..16713339d --- /dev/null +++ b/docs-system/generated/site-preview/model.insertMix.md @@ -0,0 +1,26 @@ +# model.insertMix + +`model.insertMix(channel, line, value)` + +Insert a mixer line into Channel + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `channel` | yes | `integer` | channel number (use 0 for CH1) | +| `line` | yes | `integer` | mix number (use 0 for first line(mix)) | +| `value` | yes | `table` | see model.getMix() for table format | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.resetSensor.md b/docs-system/generated/site-preview/model.resetSensor.md new file mode 100644 index 000000000..2e287cc93 --- /dev/null +++ b/docs-system/generated/site-preview/model.resetSensor.md @@ -0,0 +1,26 @@ +# model.resetSensor + +`model.resetSensor(sensor)` + +Reset Telemetry Sensor parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sensor` | yes | `integer` | sensor number (use 0 for sensor 1) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | | + +## Availability + +- Since: `2.3.11` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.resetTimer.md b/docs-system/generated/site-preview/model.resetTimer.md new file mode 100644 index 000000000..2d2254fab --- /dev/null +++ b/docs-system/generated/site-preview/model.resetTimer.md @@ -0,0 +1,24 @@ +# model.resetTimer + +`model.resetTimer(timer)` + +Reset model timer to a startup value + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `timer` | yes | `integer` | timer index (0 for Timer 1) | + +## Returns + +None. + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.setCurve.md b/docs-system/generated/site-preview/model.setCurve.md new file mode 100644 index 000000000..38df572bc --- /dev/null +++ b/docs-system/generated/site-preview/model.setCurve.md @@ -0,0 +1,27 @@ +# model.setCurve + +`model.setCurve(curve, params)` + +Set Curve parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `curve` | yes | `integer` | curve number (use 0 for Curve1) | +| `params` | yes | `integer` | see model.getCurve return format for table format. setCurve uses standard lua array indexing and arrays start at index 1 | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `0` | `integer` | - Everything okay 1 - Wrong number of points 2 - Invalid Curve number 3 - Cuve does not fit anymore 4 - point of out of index 5 - x value not monotonically increasing 6 - y value not in range [-100;100] 7 - extra values for y are set 8 - extra values for x are set | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.setCustomFunction.md b/docs-system/generated/site-preview/model.setCustomFunction.md new file mode 100644 index 000000000..566ab423b --- /dev/null +++ b/docs-system/generated/site-preview/model.setCustomFunction.md @@ -0,0 +1,30 @@ +# model.setCustomFunction + +`model.setCustomFunction(function, value)` + +Set Custom Function parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `function` | yes | `integer` | custom function number (use 0 for CF1) | +| `value` | yes | `table` | custom function parameters, see model.getCustomFunction() for table format | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.setFlightMode.md b/docs-system/generated/site-preview/model.setFlightMode.md new file mode 100644 index 000000000..ae05b7fde --- /dev/null +++ b/docs-system/generated/site-preview/model.setFlightMode.md @@ -0,0 +1,25 @@ +# model.setFlightMode + +`model.setFlightMode(index, params)` + +Set Flight mode parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | flight mode number (use 0 for FM0) | +| `params` | yes | `unknown` | see model.getFlightMode return format for table format. | + +## Returns + +None. + +## Availability + +- Since: `2.3.10` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.setGlobalVariable.md b/docs-system/generated/site-preview/model.setGlobalVariable.md new file mode 100644 index 000000000..97a213f60 --- /dev/null +++ b/docs-system/generated/site-preview/model.setGlobalVariable.md @@ -0,0 +1,32 @@ +# model.setGlobalVariable + +`model.setGlobalVariable(index, flight_mode, value)` + +Sets current global variable value. See also model.getGlobalVariable() + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | zero based global variable index, use 0 for GV1, 8 for GV9 | +| `flight_mode` | yes | `integer` | Flight mode number (0 = FM0, 8 = FM8) | +| `value` | yes | `unknown` | new value for global variable. Permitted range is from -1024 to 1024. | + +## Returns + +None. + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Notes + +- Global variable can only store integer values, +any floating point value is converted into integer value +by truncating everything behind a floating point. + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.setInfo.md b/docs-system/generated/site-preview/model.setInfo.md new file mode 100644 index 000000000..9e10f1332 --- /dev/null +++ b/docs-system/generated/site-preview/model.setInfo.md @@ -0,0 +1,29 @@ +# model.setInfo + +`model.setInfo(value)` + +Set the current Model information + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `value` | yes | `unknown` | model information data, see model.getInfo() | + +## Returns + +None. + +## Availability + +- Since: `2.0.6` +- Radio support: `all` + +## Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.setLogicalSwitch.md b/docs-system/generated/site-preview/model.setLogicalSwitch.md new file mode 100644 index 000000000..a9779023e --- /dev/null +++ b/docs-system/generated/site-preview/model.setLogicalSwitch.md @@ -0,0 +1,32 @@ +# model.setLogicalSwitch + +`model.setLogicalSwitch(switch, value)` + +Set Logical Switch parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `switch` | yes | `integer` | logical switch number (use 0 for LS1) | +| `value` | yes | `table` | see model.getLogicalSwitch() for table format | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. +- To set the `and` member (which is Lua keyword) +use the following syntax: `model.setLogicalSwitch(30, {func=4,v1=1,v2=-99, ["and"]=24})` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.setModule.md b/docs-system/generated/site-preview/model.setModule.md new file mode 100644 index 000000000..6c4fa2e2f --- /dev/null +++ b/docs-system/generated/site-preview/model.setModule.md @@ -0,0 +1,30 @@ +# model.setModule + +`model.setModule(index, value)` + +Set RF module parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | module index (0 for internal, 1 for external) | +| `value` | yes | `unknown` | module parameters, see model.getModule() | + +## Returns + +None. + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.setOutput.md b/docs-system/generated/site-preview/model.setOutput.md new file mode 100644 index 000000000..ba5ea3f38 --- /dev/null +++ b/docs-system/generated/site-preview/model.setOutput.md @@ -0,0 +1,30 @@ +# model.setOutput + +`model.setOutput(index, value)` + +Set servo parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | channel number (use 0 for CH1) | +| `value` | yes | `table` | servo parameters, see model.getOutput() for table format | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.setSwashRing.md b/docs-system/generated/site-preview/model.setSwashRing.md new file mode 100644 index 000000000..ae62447c7 --- /dev/null +++ b/docs-system/generated/site-preview/model.setSwashRing.md @@ -0,0 +1,28 @@ +# model.setSwashRing + +`model.setSwashRing(params)` + +Set heli swash parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `params` | yes | `table` | swash ring parameters, see model.getSwashRing() for table format | + +## Returns + +None. + +## Availability + +- Since: `2.8.0` +- Radio support: `all` + +## Notes + +- If a parameter is missing, then that parameter remains unchanged. + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.setSwitchWarning.md b/docs-system/generated/site-preview/model.setSwitchWarning.md new file mode 100644 index 000000000..d64858eb1 --- /dev/null +++ b/docs-system/generated/site-preview/model.setSwitchWarning.md @@ -0,0 +1,27 @@ +# model.setSwitchWarning + +`model.setSwitchWarning(switch, state)` + +Set warning state for a switch + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `switch` | yes | `integer` | switch number (use 0 for SA) @param switch (string) switch name | +| `state` | yes | `integer` | state 0 = no warning 1 = switch up 2 = switch middle 3 = switch down | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | when switch is a toggle or does not exist | + +## Availability + +- Since: `3.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/model.setTimer.md b/docs-system/generated/site-preview/model.setTimer.md new file mode 100644 index 000000000..6110757bb --- /dev/null +++ b/docs-system/generated/site-preview/model.setTimer.md @@ -0,0 +1,30 @@ +# model.setTimer + +`model.setTimer(timer, value)` + +Set model timer parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `timer` | yes | `integer` | timer index (0 for Timer 1) | +| `value` | yes | `unknown` | timer parameters, see model.getTimer() | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/docs-system/generated/site-preview/module-lcd.md b/docs-system/generated/site-preview/module-lcd.md new file mode 100644 index 000000000..4fed3cc19 --- /dev/null +++ b/docs-system/generated/site-preview/module-lcd.md @@ -0,0 +1,12 @@ +# lcd + +`1` APIs in this module. + +[Back to API overview](index.md) | [Open review dashboard](review.md) + + diff --git a/docs-system/generated/site-preview/module-runtime.md b/docs-system/generated/site-preview/module-runtime.md new file mode 100644 index 000000000..4f1260bab --- /dev/null +++ b/docs-system/generated/site-preview/module-runtime.md @@ -0,0 +1,12 @@ +# runtime + +`1` APIs in this module. + +[Back to API overview](index.md) | [Open review dashboard](review.md) + + diff --git a/docs-system/generated/site-preview/multiBuffer.md b/docs-system/generated/site-preview/multiBuffer.md new file mode 100644 index 000000000..c698b2735 --- /dev/null +++ b/docs-system/generated/site-preview/multiBuffer.md @@ -0,0 +1,26 @@ +# multiBuffer + +`multiBuffer(address[,value])` + +This function reads/writes the Multi protocol buffer to interact with a protocol. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `address` | yes | `unknown` | to read/write in the buffer @param (optional): value to write in the buffer | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `buffer` | value (number) | + +## Availability + +- Since: `2.3.2` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/playDuration.md b/docs-system/generated/site-preview/playDuration.md new file mode 100644 index 000000000..be9d96b0f --- /dev/null +++ b/docs-system/generated/site-preview/playDuration.md @@ -0,0 +1,27 @@ +# playDuration + +`playDuration(duration [, hourFormat [, volume]])` + +Play a time value (text to speech) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `duration` | yes | `integer` | number of seconds to play. Only integral part is used. | +| `hourFormat` | no | `integer` | : * `0 or not present` play format: minutes and seconds. * `!= 0` play format: hours, minutes and seconds. * @param volume (number): - (1..5) override radio settings Wav volume for the duration of file - omitting the parameter uses radio settings Wav volume | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.1.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/playFile.md b/docs-system/generated/site-preview/playFile.md new file mode 100644 index 000000000..10cf159f3 --- /dev/null +++ b/docs-system/generated/site-preview/playFile.md @@ -0,0 +1,27 @@ +# playFile + +`playFile(filename [, volume])` + +Play a file from the SD card + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `filename` | yes | `string` | full path to wav file (i.e. "/SOUNDS/en/system/tada.wav") Introduced in 2.1.0: If you use a relative path, the current language is appended to the path (example: for English language: `/SOUNDS/en` is appended) | +| `volume` | no | `integer` | : - (1..5) override radio settings Wav volume for the duration of file - omitting the parameter uses radio settings Wav volume | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/playHaptic.md b/docs-system/generated/site-preview/playHaptic.md new file mode 100644 index 000000000..127c26ba6 --- /dev/null +++ b/docs-system/generated/site-preview/playHaptic.md @@ -0,0 +1,26 @@ +# playHaptic + +`playHaptic(duration, pause [, flags])` + +Generate haptic feedback + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `duration` | yes | `integer` | length of the haptic feedback in milliseconds | +| `pause` | yes | `integer` | length of the silence after haptic feedback in milliseconds | +| `flags` | no | `integer` | : * `0 or not present` play with normal priority * `PLAY_NOW` play immediately | + +## Returns + +None. + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/playNumber.md b/docs-system/generated/site-preview/playNumber.md new file mode 100644 index 000000000..72f909499 --- /dev/null +++ b/docs-system/generated/site-preview/playNumber.md @@ -0,0 +1,28 @@ +# playNumber + +`playNumber(value, unit [, attributes [, volume]])` + +Play a numerical value (text to speech) + +## Parameters + +| 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)) | +| `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 + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/playTone.md b/docs-system/generated/site-preview/playTone.md new file mode 100644 index 000000000..dae0006a5 --- /dev/null +++ b/docs-system/generated/site-preview/playTone.md @@ -0,0 +1,31 @@ +# playTone + +`playTone(frequency, duration, pause [, flags [, freqIncr [, volume]]])` + +Play a tone + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `frequency` | yes | `integer` | tone frequency in Hz (from 150 to 15000) | +| `duration` | yes | `integer` | length of the tone in milliseconds | +| `pause` | yes | `integer` | length of the silence after the tone in milliseconds | +| `flags` | no | `integer` | : * `0 or not present` play with normal priority. * `PLAY_BACKGROUND` play in background (built in vario function uses this context) * `PLAY_NOW` play immediately | +| `freqIncr` | no | `integer` | positive number increases the tone pitch (frequency with time), negative number decreases it. The frequency changes every 10 milliseconds, the change is `freqIncr * 10Hz`. The valid range is from -127 to 127. | +| `volume` | no | `integer` | : - (1..5) override radio settings Beep volume for the duration of file - omitting the parameter uses radio settings Beep volume | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.1.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/popupConfirmation.md b/docs-system/generated/site-preview/popupConfirmation.md new file mode 100644 index 000000000..ea88a6176 --- /dev/null +++ b/docs-system/generated/site-preview/popupConfirmation.md @@ -0,0 +1,32 @@ +# popupConfirmation + +`popupConfirmation(title, event)` + +Raises a pop-up on screen that asks for confirmation + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `title` | yes | `string` | title to display | +| `message` | yes | `string` | text to display | +| `event` | yes | `integer` | the event variable that is passed in from the Run function (key pressed) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `"CANCEL"` | `unknown` | user pushed EXIT key | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Notes + +- Use only from stand-alone and telemetry scripts. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/popupInput.md b/docs-system/generated/site-preview/popupInput.md new file mode 100644 index 000000000..f6cf72abb --- /dev/null +++ b/docs-system/generated/site-preview/popupInput.md @@ -0,0 +1,36 @@ +# popupInput + +`popupInput(title, event, input, min, max)` + +Raises a pop-up on screen that allows uses input + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `title` | yes | `string` | text to display | +| `event` | yes | `integer` | the event variable that is passed in from the Run function (key pressed) | +| `input` | yes | `integer` | value that can be adjusted by the +/- keys | +| `min` | yes | `integer` | min value that input can reach (by pressing the - key) | +| `max` | yes | `integer` | max value that input can reach | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | result of the input adjustment | +| `"OK"` | `unknown` | user pushed ENT key | +| `"CANCEL"` | `unknown` | user pushed EXIT key | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Notes + +- Use only from stand-alone and telemetry scripts. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/popupWarning.md b/docs-system/generated/site-preview/popupWarning.md new file mode 100644 index 000000000..fafc746e3 --- /dev/null +++ b/docs-system/generated/site-preview/popupWarning.md @@ -0,0 +1,31 @@ +# popupWarning + +`popupWarning(title, event)` + +Raises a pop-up on screen that shows a warning + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `title` | yes | `string` | text to display | +| `event` | yes | `integer` | the event variable that is passed in from the Run function (key pressed) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `"CANCEL"` | `unknown` | user pushed EXIT key | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Notes + +- Use only from stand-alone and telemetry scripts. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/rename.md b/docs-system/generated/site-preview/rename.md new file mode 100644 index 000000000..b88fc9905 --- /dev/null +++ b/docs-system/generated/site-preview/rename.md @@ -0,0 +1,26 @@ +# rename + +`rename(from_path, to_path)` + +Rename a file or directory + If the file or directory is being moved to a new parent directory, then the new parent + directory must already exist. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `from_path` | yes | `string` | Current path to rename @param to_path (string) Path to rename to | + +## Returns + +None. + +## Availability + +- Since: `2.11.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_filesystem.cpp` diff --git a/docs-system/generated/site-preview/resetGlobalTimer.md b/docs-system/generated/site-preview/resetGlobalTimer.md new file mode 100644 index 000000000..44b7271dc --- /dev/null +++ b/docs-system/generated/site-preview/resetGlobalTimer.md @@ -0,0 +1,24 @@ +# resetGlobalTimer + +`resetGlobalTimer([type])` + +Resets the radio global timer to 0. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `type` | no | `unknown` | : if set to 'all', throttle ,throttle percent and session timers are reset too if set to 'session', radio session timer is reset too if set to 'ttimer', radio throttle timer is reset too if set to 'tptimer', radio throttle percent timer is reset too | + +## Returns + +None. + +## Availability + +- Since: `2.2.2` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/review.md b/docs-system/generated/site-preview/review.md new file mode 100644 index 000000000..02e233827 --- /dev/null +++ b/docs-system/generated/site-preview/review.md @@ -0,0 +1,27 @@ +# API Review Dashboard + +This page is generated from the extracted API model and is meant to speed up review of the real source-derived docs. + +## Snapshot + +- Docs version: `2.12` +- Upstream ref: `edgetx-2.12` +- Generated at: `2026-03-23T00:00:00Z` +- Total items: `2` +- Review backlog entries: `0` + +## Module Health + +| Module | Items | Unknown Param Types | Unknown Return Types | +| --- | ---: | ---: | ---: | +| `lcd` | 1 | 0 | 0 | +| `runtime` | 1 | 0 | 0 | + +## Review Backlog + +No backlog items. + +## Suspicious Items By Module + +## Suggested Spot Checks + diff --git a/docs-system/generated/site-preview/runtime.get-version.md b/docs-system/generated/site-preview/runtime.get-version.md new file mode 100644 index 000000000..115b79eaa --- /dev/null +++ b/docs-system/generated/site-preview/runtime.get-version.md @@ -0,0 +1,71 @@ +# getVersionInfo + +`getVersionInfo()` + +Return the firmware version and platform details. + +## Aliases + +- `getVersion` (deprecated alias) + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `version` | `string` | Version string. | +| `radio` | `string` | Radio or simulator identifier. | + +## Availability + +- Since: `2.4.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` + +## Enrichment + +The sections below are authored outside the firmware source so examples, compatibility notes, and learning material can evolve without bloating C++ API comments. + +## Extended Description + +`runtime.get-version` keeps one docs page even if the preferred callable name changes over time. The generated API truth shows the current symbol, while older names remain documented here as compatibility guidance. + +## Examples + +This example also runs in OpenTX versions where the function returned only one value: + +```lua +local function run(event) + local ver, radio, maj, minor, rev, osname = getVersion() + print("version: "..ver) + if radio then print("radio: "..radio) end + if maj then print("maj: "..maj) end + if minor then print("minor: "..minor) end + if rev then print("rev: "..rev) end + if osname then print("osname: "..osname) end + return 1 +end + +return { run=run } +``` + +Output of the above script in simulator: + +```text +version: 2.4.0 +radio: tx16s-simu +maj: 2 +minor: 4 +rev: 0 +osname: EdgeTX +``` + +## Compatibility Notes + +During a rename window, keep the current preferred symbol in generated API metadata and list older callable names as deprecated aliases. This lets the page stay stable while users still find the old name. diff --git a/docs-system/generated/site-preview/serialGetPower.md b/docs-system/generated/site-preview/serialGetPower.md new file mode 100644 index 000000000..70add6464 --- /dev/null +++ b/docs-system/generated/site-preview/serialGetPower.md @@ -0,0 +1,27 @@ +# serialGetPower + +`serialGetPower(port_nr)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `port_nr` | yes | `valid` | values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1 1 - second serial port, e.g. on TX16S AUX2 | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `true` | for power enabled, false for power disabled. | +| `-` | `nil` | the serial port power control not available on this radio | + +## Availability + +- Since: `2.9.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/serialRead.md b/docs-system/generated/site-preview/serialRead.md new file mode 100644 index 000000000..99703ca39 --- /dev/null +++ b/docs-system/generated/site-preview/serialRead.md @@ -0,0 +1,26 @@ +# serialRead + +`serialRead([num])` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `num` | no | `integer` | : maximum number of bytes to read. If non-zero, serialRead will read up to num characters from the buffer. If 0 or left out, serialRead will read up to and including the first newline character or the end of the buffer. Note that the returned string may not end in a newline if this character is not present in the buffer. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `str` | `unknown` | string. Empty if no new characters were available. | + +## Availability + +- Since: `2.3.8` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/serialSetPower.md b/docs-system/generated/site-preview/serialSetPower.md new file mode 100644 index 000000000..e67f37a40 --- /dev/null +++ b/docs-system/generated/site-preview/serialSetPower.md @@ -0,0 +1,27 @@ +# serialSetPower + +`serialSetPower(port_nr, value)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `port_nr` | yes | `valid` | values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1 1 - second serial port, e.g. on TX16S AUX2 | +| `value` | yes | `0` | - disable power 1 - enable power | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `success` | `true/false` | . | + +## Availability + +- Since: `2.9.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/serialWrite.md b/docs-system/generated/site-preview/serialWrite.md new file mode 100644 index 000000000..cc9bf35b9 --- /dev/null +++ b/docs-system/generated/site-preview/serialWrite.md @@ -0,0 +1,24 @@ +# serialWrite + +`serialWrite(str)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `str` | yes | `string` | String to be written to the serial port. | + +## Returns + +None. + +## Availability + +- Since: `2.3.10` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/setCFSLedColor.md b/docs-system/generated/site-preview/setCFSLedColor.md new file mode 100644 index 000000000..22cd653ed --- /dev/null +++ b/docs-system/generated/site-preview/setCFSLedColor.md @@ -0,0 +1,32 @@ +# setCFSLedColor + +`setCFSLedColor(id, rvalue, bvalue, cvalue)` + +Overrides the LED color for a custom function switch + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `string` | identifying a custom function switch name | +| `rvalue` | yes | `interger` | , value of red channel | +| `bvalue` | yes | `interger` | , value of green channel | +| `cvalue` | yes | `interger` | , value of blue channel | + +## Returns + +None. + +## Availability + +- Since: `3.0.0` +- Radio support: `all` + +## Notes + +- - if passed 4 arguments (id, r, g, b) then sets override color + - if passed 1 argument (id) then cancels override color + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/setIMU_X.md b/docs-system/generated/site-preview/setIMU_X.md new file mode 100644 index 000000000..8713e0ed3 --- /dev/null +++ b/docs-system/generated/site-preview/setIMU_X.md @@ -0,0 +1,25 @@ +# setIMU_X + +`setIMU_X(offset, range)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `offset` | yes | `integer` | , offset in angular degree. -1 to offset to current X position | +| `range` | yes | `integer` | , range in angular degree. 180° max.90 means min/max value will be reached at 45° from offset position | + +## Returns + +None. + +## Availability + +- Since: `3.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/setIMU_Y.md b/docs-system/generated/site-preview/setIMU_Y.md new file mode 100644 index 000000000..3ed5daf95 --- /dev/null +++ b/docs-system/generated/site-preview/setIMU_Y.md @@ -0,0 +1,25 @@ +# setIMU_Y + +`setIMU_Y(offset, range)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `offset` | yes | `integer` | , offset in angular degree. -1 to offset to current Y position | +| `range` | yes | `integer` | , range in angular degree, 180° max. 90 means min/max value will be reached at 45° from offset position | + +## Returns + +None. + +## Availability + +- Since: `3.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/setRGBLedColor.md b/docs-system/generated/site-preview/setRGBLedColor.md new file mode 100644 index 000000000..a999004a9 --- /dev/null +++ b/docs-system/generated/site-preview/setRGBLedColor.md @@ -0,0 +1,27 @@ +# setRGBLedColor + +`setRGBLedColor(id, rvalue, bvalue, cvalue)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `integer` | identifying a led in the led chain | +| `rvalue` | yes | `interger` | , value of red channel | +| `bvalue` | yes | `interger` | , value of green channel | +| `cvalue` | yes | `interger` | , value of blue channel | + +## Returns + +None. + +## Availability + +- Since: `2.10` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/setSerialBaudrate.md b/docs-system/generated/site-preview/setSerialBaudrate.md new file mode 100644 index 000000000..51ac5a07a --- /dev/null +++ b/docs-system/generated/site-preview/setSerialBaudrate.md @@ -0,0 +1,24 @@ +# setSerialBaudrate + +`setSerialBaudrate(baudrate)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `baudrate` | yes | `unknown` | Desired baurate | + +## Returns + +None. + +## Availability + +- Since: `2.3.12` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/setShmVar.md b/docs-system/generated/site-preview/setShmVar.md new file mode 100644 index 000000000..204f9ab2b --- /dev/null +++ b/docs-system/generated/site-preview/setShmVar.md @@ -0,0 +1,29 @@ +# setShmVar + +`setShmVar(id, value)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `integer` | between 1 and 16 identifying the shared memory variable. | +| `value` | yes | `integer` | . The value of the shared memory variable. | + +## Returns + +None. + +## Availability + +- Since: `2.6` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/setStickySwitch.md b/docs-system/generated/site-preview/setStickySwitch.md new file mode 100644 index 000000000..50a40119d --- /dev/null +++ b/docs-system/generated/site-preview/setStickySwitch.md @@ -0,0 +1,27 @@ +# setStickySwitch + +`setStickySwitch(id, value)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `integer` | identifying the sticky logical switch (zero for LS1 etc.). | +| `value` | yes | `true/false` | . The new value of the sticky logical switch. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `bufferFull` | `true/false` | . This function sends a message from Lua to the logical switch processor via a buffer with eight slots that are read 10 times per second. If the buffer is full, then a true value is returned and no messages was sent (i.e. the switch was not changed). | + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/setTelemetryValue.md b/docs-system/generated/site-preview/setTelemetryValue.md new file mode 100644 index 000000000..dfbd1fdbc --- /dev/null +++ b/docs-system/generated/site-preview/setTelemetryValue.md @@ -0,0 +1,37 @@ +# setTelemetryValue + +`setTelemetryValue(id, subID, instance, value [, unit [, precision [, name]]])` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `unknown` | Id of the sensor, valid range is from 0 to 0xFFFF | +| `subID` | yes | `unknown` | subID of the sensor, usually 0, valid range is from 0 to 7 | +| `instance` | yes | `unknown` | instance of the sensor (SensorID), valid range is from 0 to 0xFF | +| `value` | yes | `unknown` | fed to the sensor | +| `unit` | no | `unknown` | unit of the sensor [Full list](../../appendix/units.html) | +| `precision` | no | `unknown` | 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" | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `true,` | `unknown` | if the sensor was just added. In this case the value is ignored (subsequent call will set the value) | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Notes + +- All three parameters `id`, `subID` and `instance` can't be zero at the same time. At least one of them +must be different from zero. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/sources.md b/docs-system/generated/site-preview/sources.md new file mode 100644 index 000000000..4cdba8540 --- /dev/null +++ b/docs-system/generated/site-preview/sources.md @@ -0,0 +1,25 @@ +# sources + +`sources([first[, last]])` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `first` | no | `the` | first source index. If `nil` or omitted, the first available source is used. | +| `last` | no | `the` | last soure index. If `nil` or omitted, the last available source is used. | + +## Returns + +None. + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/sportTelemetryPop.md b/docs-system/generated/site-preview/sportTelemetryPop.md new file mode 100644 index 000000000..2faa2acf9 --- /dev/null +++ b/docs-system/generated/site-preview/sportTelemetryPop.md @@ -0,0 +1,30 @@ +# sportTelemetryPop + +`sportTelemetryPop()` + +Pops a received SPORT packet from the queue. Please note that only packets using a data ID within 0x5000 to 0x50FF +(frame ID == 0x10), as well as packets with a frame ID equal 0x32 (regardless of the data ID) will be passed to +the LUA telemetry receive queue. + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | queue does not contain any (or enough) bytes to form a whole packet | +| `sensor_id` | `integer` | | +| `frame_id` | `integer` | | +| `data_id` | `integer` | | +| `value` | `integer` | | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/sportTelemetryPush.md b/docs-system/generated/site-preview/sportTelemetryPush.md new file mode 100644 index 000000000..00d8db957 --- /dev/null +++ b/docs-system/generated/site-preview/sportTelemetryPush.md @@ -0,0 +1,35 @@ +# sportTelemetryPush + +`sportTelemetryPush()` + +This functions allows for sending SPORT telemetry data toward the receiver, +and more generally, to anything connected SPORT bus on the receiver or transmitter. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sensorId` | yes | `unknown` | physical sensor ID | +| `frameId` | yes | `unknown` | frame ID | +| `dataId` | yes | `unknown` | data ID | +| `value` | yes | `unknown` | value | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `boolean` | data queued in output buffer or not. | +| `-` | `nil` | incorrect telemetry protocol. | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Notes + +- When called without parameters, it will only return the status of the output buffer without sending anything. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/generated/site-preview/switches.md b/docs-system/generated/site-preview/switches.md new file mode 100644 index 000000000..e4af40db0 --- /dev/null +++ b/docs-system/generated/site-preview/switches.md @@ -0,0 +1,25 @@ +# switches + +`switches([first[, last]])` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `first` | no | `the` | first switch index. If `nil` or omitted, the first available switch is used. | +| `last` | no | `the` | last switch index. If `nil` or omitted, the last available switch is used. | + +## Returns + +None. + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/docs-system/overlays/getVersion.md b/docs-system/overlays/getVersion.md new file mode 100644 index 000000000..43e028c53 --- /dev/null +++ b/docs-system/overlays/getVersion.md @@ -0,0 +1,41 @@ +## Extended Description + +`getVersion` is a good example of the split between source-owned API truth and docs-owned enrichment. The function signature, return values, and availability belong in upstream source annotations. Cross-version guidance and worked examples belong here. + +## Examples + +This example shows the multi-value form used in modern EdgeTX releases such as `2.4.0`: + +```lua +local function run(event) + local ver, radio, maj, minor, rev, osname = getVersion() + print("version: "..ver) + if radio then print("radio: "..radio) end + if maj then print("maj: "..maj) end + if minor then print("minor: "..minor) end + if rev then print("rev: "..rev) end + if osname then print("osname: "..osname) end + return 1 +end + +return { run=run } +``` + +Output of the above script in simulator: + +```text +version: 2.4.0 +radio: tx16s-simu +maj: 2 +minor: 4 +rev: 0 +osname: EdgeTX +``` + +## Compatibility Notes + +Use the overlay for return-shape clarification and examples without expanding the firmware source comment. + +## Additional Learning + +Teaching videos, simulator captures, or short migration walkthroughs for `getVersion` should live here rather than in the firmware source tree. diff --git a/docs-system/overlays/lcd.drawBitmap.md b/docs-system/overlays/lcd.drawBitmap.md new file mode 100644 index 000000000..507930771 --- /dev/null +++ b/docs-system/overlays/lcd.drawBitmap.md @@ -0,0 +1,17 @@ +## Extended Description + +`lcd.drawBitmap` is a good example of the split between generated API truth and richer authored guidance. The syntax, parameter list, and availability belong in upstream source annotations. Practical usage notes and examples can stay here in an overlay file. + +## Examples + +```lua +local bmp = Bitmap.open("/IMAGES/logo.png") +if bmp then + lcd.drawBitmap(bmp, 10, 12, 100) +end +``` + +## Related Topics + +- `Bitmap.open` +- `Bitmap.getSize` diff --git a/docs-system/overlays/loadScript.md b/docs-system/overlays/loadScript.md new file mode 100644 index 000000000..2d7076c89 --- /dev/null +++ b/docs-system/overlays/loadScript.md @@ -0,0 +1,22 @@ +## Extended Description + +`loadScript` fills a similar role to Lua's `loadfile()`, but it adds EdgeTX-specific handling for `.lua` and `.luac` files. On radio targets, that usually means better load-time performance and lower runtime overhead when a compiled version is available. + +Use the short summary from source annotations as the API-level definition. Keep the deeper usage guidance here, where it can evolve without expanding the firmware-source comment block. + +Typical reasons to use `loadScript` directly: + +- load reusable helper modules from the SD card +- control whether text or precompiled bytecode is preferred +- handle `nil, errmsg` returns explicitly when a script is missing or invalid + +## Examples + +```lua +local chunk, errmsg = loadScript("/SCRIPTS/TOOLS/demo.lua") +if not chunk then + return errmsg +end + +local mod = chunk() +``` diff --git a/docs-system/overlays/runtime.get-version.md b/docs-system/overlays/runtime.get-version.md new file mode 100644 index 000000000..67e8e0474 --- /dev/null +++ b/docs-system/overlays/runtime.get-version.md @@ -0,0 +1,37 @@ +## Extended Description + +`runtime.get-version` keeps one docs page even if the preferred callable name changes over time. The generated API truth shows the current symbol, while older names remain documented here as compatibility guidance. + +## Examples + +This example shows the multi-value form used in modern EdgeTX releases such as `2.4.0`: + +```lua +local function run(event) + local ver, radio, maj, minor, rev, osname = getVersion() + print("version: "..ver) + if radio then print("radio: "..radio) end + if maj then print("maj: "..maj) end + if minor then print("minor: "..minor) end + if rev then print("rev: "..rev) end + if osname then print("osname: "..osname) end + return 1 +end + +return { run=run } +``` + +Output of the above script in simulator: + +```text +version: 2.4.0 +radio: tx16s-simu +maj: 2 +minor: 4 +rev: 0 +osname: EdgeTX +``` + +## Compatibility Notes + +Keep the preferred callable name in generated API metadata and use this page for return-shape clarification and examples. diff --git a/docs-system/review-type-options.json b/docs-system/review-type-options.json new file mode 100644 index 000000000..6bf00d489 --- /dev/null +++ b/docs-system/review-type-options.json @@ -0,0 +1,29 @@ +{ + "common_types": [ + "TODO", + "integer", + "number", + "string", + "boolean", + "table", + "function", + "pointer", + "nil", + "integer|string", + "table|nil", + "function|nil", + "string|nil" + ], + "custom_types": [ + "pen_type", + "text_flags", + "lcd_font_size", + "lcd_text_flags", + "lcd_text_format", + "lcd_color_RGB565", + "source_range_1024", + "timer_type", + "unit_type", + "prec_type" + ] +} diff --git a/docs-system/schema/api-model-v1.schema.json b/docs-system/schema/api-model-v1.schema.json new file mode 100644 index 000000000..8e30fc0e4 --- /dev/null +++ b/docs-system/schema/api-model-v1.schema.json @@ -0,0 +1,103 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "title": "EdgeTX Lua API Model v1", + "type": "object", + "required": ["docs_version", "upstream_ref", "generated_at", "items"], + "properties": { + "docs_version": { + "type": "string" + }, + "upstream_ref": { + "type": "string" + }, + "generated_at": { + "type": "string" + }, + "items": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "doc_id", + "symbol", + "module", + "kind", + "syntax", + "summary", + "parameters", + "returns", + "availability", + "notes", + "source_location" + ], + "properties": { + "id": { "type": "string" }, + "doc_id": { "type": "string" }, + "symbol": { "type": "string" }, + "aliases": { + "type": "array", + "items": { "type": "string" } + }, + "deprecated_aliases": { + "type": "array", + "items": { "type": "string" } + }, + "module": { "type": "string" }, + "kind": { "type": "string" }, + "syntax": { "type": "string" }, + "summary": { "type": "string" }, + "parameters": { + "type": "array", + "items": { + "type": "object", + "required": ["name", "type", "required", "description"], + "properties": { + "name": { "type": "string" }, + "type": { "type": "string" }, + "required": { "type": "boolean" }, + "description": { "type": "string" } + } + } + }, + "returns": { + "type": "array", + "items": { + "type": "object", + "required": ["type", "description"], + "properties": { + "name": { "type": "string" }, + "type": { "type": "string" }, + "description": { "type": "string" } + } + } + }, + "availability": { + "type": "object", + "required": ["since"], + "properties": { + "since": { "type": "string" }, + "radios": { + "type": "array", + "items": { "type": "string" } + } + } + }, + "notes": { + "type": "array", + "items": { "type": "string" } + }, + "source_location": { + "type": "string" + }, + "raw_luadoc": { + "type": "string" + }, + "source_line": { + "type": ["integer", "null"] + } + } + } + } + } +} diff --git a/docs-system/type-definitions.json b/docs-system/type-definitions.json new file mode 100644 index 000000000..ba7c6797c --- /dev/null +++ b/docs-system/type-definitions.json @@ -0,0 +1,52 @@ +{ + "pen_type": { + "luals_alias_of": "integer", + "description": "LCD line pattern selector such as SOLID or DOTTED." + }, + "text_flags": { + "luals_alias_of": "integer", + "description": "Text rendering flags used by legacy LCD number APIs." + }, + "lcd_color_RGB565": { + "luals_alias_of": "integer", + "description": "Packed 16-bit RGB color value for color LCD APIs." + }, + "lcd_font_size": { + "luals_alias_of": "integer", + "description": "Font size selector such as XXLSIZE, DBLSIZE, MIDSIZE, or SMLSIZE." + }, + "lcd_text_flags": { + "luals_alias_of": "integer", + "description": "Bitmask of LCD text rendering flags such as INVERS, BLINK, and SHADOWED.", + "examples": [ + "INVERS", + "BLINK", + "SHADOWED" + ] + }, + "lcd_text_format": { + "luals_alias_of": "integer", + "description": "Combined LCD text formatting bitmask covering font size and text flags.", + "examples": [ + "MIDSIZE", + "INVERS + BLINK", + "DBLSIZE + SHADOWED" + ] + }, + "source_range_1024": { + "luals_alias_of": "integer", + "description": "Signed EdgeTX source value in the normalized range from -1024 to 1024." + }, + "timer_type": { + "luals_alias_of": "string", + "description": "Global timer selector such as all, total, session, throttle, or throttlepct." + }, + "unit_type": { + "luals_alias_of": "integer", + "description": "Telemetry unit identifier from the EdgeTX unit list." + }, + "prec_type": { + "luals_alias_of": "integer", + "description": "Telemetry precision selector controlling decimal places." + } +} diff --git a/general/GREY.md b/general/GREY.md deleted file mode 100644 index 96e86d2e7..000000000 --- a/general/GREY.md +++ /dev/null @@ -1,25 +0,0 @@ - - -## GREY() - - - -Returns gray value which can be used in LCD functions - -@status current Introduced in 2.0.13 - - -#### Parameters - -none - -#### Return value - -* `(number)` a value that represents amount of *greyness* (from 0 to 15) - - - -##### Notice -Only available on Taranis - - diff --git a/general/README.md b/general/README.md deleted file mode 100644 index 71f482de1..000000000 --- a/general/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# general - diff --git a/general/accessTelemetryPush.md b/general/accessTelemetryPush.md deleted file mode 100644 index c7216b72c..000000000 --- a/general/accessTelemetryPush.md +++ /dev/null @@ -1,37 +0,0 @@ - - -## accessTelemetryPush() - - - -This functions allows for sending SPORT / ACCESS telemetry data toward the receiver, -and more generally, to anything connected SPORT bus on the receiver or transmitter. - -When called without parameters, it will only return the status of the output buffer without sending anything. - -@status current Introduced in 2.3 - - - -#### Parameters - -* `module` module index (0 = internal, 1 = external) - -* `rxUid` receiver index - -* `sensorId` physical sensor ID - -* `frameId` frame ID - -* `dataId` data ID - -* `value` value - - - -#### Return value - -* `boolean` data queued in output buffer or not. - - - diff --git a/general/chdir.md b/general/chdir.md deleted file mode 100644 index a862d09f8..000000000 --- a/general/chdir.md +++ /dev/null @@ -1,22 +0,0 @@ - - -## chdir(directory) - - - - Change the working directory - -@status current Introduced in 2.3.0 - - - -#### Parameters - -* `directory` (string) New working directory - - - -#### Return value - -none - diff --git a/general/crossfireTelemetryPop.md b/general/crossfireTelemetryPop.md deleted file mode 100644 index 4232a538c..000000000 --- a/general/crossfireTelemetryPop.md +++ /dev/null @@ -1,25 +0,0 @@ - - -## crossfireTelemetryPop() - - - -Pops a received Crossfire Telemetry packet from the queue. - -@status current Introduced in 2.2.0 - - -#### Parameters - -none - -#### Return value - -* `nil` queue does not contain any (or enough) bytes to form a whole packet - -* `multiple` returns 2 values: - * command (number) - * packet (table) data bytes - - - diff --git a/general/crossfireTelemetryPush.md b/general/crossfireTelemetryPush.md deleted file mode 100644 index 8e33ea003..000000000 --- a/general/crossfireTelemetryPush.md +++ /dev/null @@ -1,29 +0,0 @@ - - -## crossfireTelemetryPush() - - - -This functions allows for sending telemetry data toward the TBS Crossfire link. - -When called without parameters, it will only return the status of the output buffer without sending anything. - -@status current Introduced in 2.2.0, retval nil added in 2.3.4 - - -#### Parameters - -* `command` command - -* `data` table of data bytes - - - -#### Return value - -* `boolean` data queued in output buffer or not. - -* `nil` incorrect telemetry protocol. - - - diff --git a/general/defaultChannel.md b/general/defaultChannel.md deleted file mode 100644 index 19aebeaf1..000000000 --- a/general/defaultChannel.md +++ /dev/null @@ -1,25 +0,0 @@ - - -## defaultChannel(stick) - - - -Get channel assigned to stick. See Default Channel Order in General Settings - -@status current Introduced in 2.0.0 - - -#### Parameters - -* `stick` (number) stick number (from 0 to 3) - - - -#### Return value - -* `number` channel assigned to this stick (from 0 to 3) - -* `nil` stick not found - - - diff --git a/general/defaultStick.md b/general/defaultStick.md deleted file mode 100644 index f88b51f4b..000000000 --- a/general/defaultStick.md +++ /dev/null @@ -1,23 +0,0 @@ - - -## defaultStick(channel) - - - -Get stick that is assigned to a channel. See Default Channel Order in General Settings. - -@status current Introduced in 2.0.0 - - -#### Parameters - -* `channel` (number) channel number (0 means CH1) - - - -#### Return value - -* `number` Stick assigned to this channel (from 0 to 3) - - - diff --git a/general/getAvailableMemory.md b/general/getAvailableMemory.md deleted file mode 100644 index 13353f54a..000000000 --- a/general/getAvailableMemory.md +++ /dev/null @@ -1,19 +0,0 @@ - - -## getAvailableMemory() - - - -Get available memory remaining in the Heap for Lua. - - -#### Parameters - -none - -#### Return value - -* `usage` (number) a value returned in b - - - diff --git a/general/getDateTime.md b/general/getDateTime.md deleted file mode 100644 index 3902b43dd..000000000 --- a/general/getDateTime.md +++ /dev/null @@ -1,27 +0,0 @@ - - -## getDateTime() - - - -Return current system date and time that is kept by the RTC unit - - -#### Parameters - -none - -#### Return value - -* `table` current date and time, table elements: - * `year` (number) year - * `mon` (number) month - * `day` (number) day of month - * `hour` (number) hours - * `hour12` (number) hours in US format - * `min` (number) minutes - * `sec` (number) seconds - * `suffix` (text) am or pm - - - diff --git a/general/getFieldInfo.md b/general/getFieldInfo.md deleted file mode 100644 index 3ed99bfbd..000000000 --- a/general/getFieldInfo.md +++ /dev/null @@ -1,38 +0,0 @@ - - -## getFieldInfo(name) - - - -Return detailed information about field (source) - -The list of valid sources is available: - -| OpenTX Version | Radio | -|----------------|-------| -| 2.0 | [all](http://downloads-20.open-tx.org/firmware/lua_fields.txt) | -| 2.1 | [X9D and X9D+](http://downloads-21.open-tx.org/firmware/lua_fields_taranis.txt), [X9E](http://downloads-21.open-tx.org/firmware/lua_fields_taranis_x9e.txt) | -| 2.2 | [X9D and X9D+](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9e.txt), [Horus](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x12s.txt) | -| 2.3 | [X9D and X9D+](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9e.txt), [X7](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x7.txt), [Horus](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x12s.txt) | - -@status current Introduced in 2.0.8, 'unit' field added in 2.2.0 - - -#### Parameters - -* `name` (string) name of the field - - - -#### Return value - -* `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) - -* `nil` the requested field was not found - - - diff --git a/general/getFlightMode.md b/general/getFlightMode.md deleted file mode 100644 index 26ad4b223..000000000 --- a/general/getFlightMode.md +++ /dev/null @@ -1,26 +0,0 @@ - - -## getFlightMode(mode) - - - -Return flight mode data. - -@status current Introduced in 2.1.7 - - -#### Parameters - -* `mode` (number) flight mode number to return (0 - 8). If mode parameter -is not specified (or contains invalid value), then the current flight mode data is returned. - - - -#### Return value - -* `multiple` returns 2 values: - * (number) (current) flight mode number (0 - 8) - * (string) (current) flight mode name - - - diff --git a/general/getGeneralSettings.md b/general/getGeneralSettings.md deleted file mode 100644 index a752ff5e9..000000000 --- a/general/getGeneralSettings.md +++ /dev/null @@ -1,31 +0,0 @@ - - -## getGeneralSettings() - - - -Returns (some of) the general radio settings - -@status current Introduced in 2.0.6, `imperial` added in TODO, -`language` and `voice` added in 2.2.0, gtimer added in 2.2.2. - - - -#### Parameters - -none - -#### Return value - -* `table` with elements: - * `battWarn` (number) radio battery range - warning value - * `battMin` (number) radio battery range - minimum value - * `battMax` (number) radio battery range - maximum value - * `imperial` (number) set to a value different from 0 if the radio is set to the - IMPERIAL units - * `language` (string) radio language (used for menus) - * `voice` (string) voice language (used for speech) - * `gtimer` (number) radio global timer in seconds (does not include current session) - - - diff --git a/general/getGlobalTimer.md b/general/getGlobalTimer.md deleted file mode 100644 index 245d214e3..000000000 --- a/general/getGlobalTimer.md +++ /dev/null @@ -1,26 +0,0 @@ - - -## getGlobalTimer() - - - -Returns radio timers - -@status current Introduced added in 2.3.0. - - - -#### Parameters - -none - -#### Return value - -* `table` with elements: -* `gtimer` (number) radio global timer in seconds -* `session` (number) radio session in seconds -* `ttimer` (number) radio throttle timer in seconds -* `tptimer` (number) radio throttle percent timer in seconds - - - diff --git a/general/getRAS.md b/general/getRAS.md deleted file mode 100644 index 783243586..000000000 --- a/general/getRAS.md +++ /dev/null @@ -1,26 +0,0 @@ - - -## getRAS() - - - -Return the RAS value or nil if no valid hardware found - -@status current Introduced in 2.2.0 - - -#### Parameters - -none - -#### Return value - -* `number` representing RAS value. Value bellow 0x33 (51 decimal) are all ok, value above 0x33 indicate a hardware antenna issue. -This is just a hardware pass/fail measure and does not represent the quality of the radio link - - - -##### Notice -RAS was called SWR in the past - - diff --git a/general/getRSSI.md b/general/getRSSI.md deleted file mode 100644 index deee9abc5..000000000 --- a/general/getRSSI.md +++ /dev/null @@ -1,25 +0,0 @@ - - -## getRSSI() - - - -Get RSSI value as well as low and critical RSSI alarm levels (in dB) - -@status current Introduced in 2.2.0 - - -#### Parameters - -none - -#### Return value - -* `rssi` RSSI value (0 if no link) - -* `alarm_low` Configured low RSSI alarm level - -* `alarm_crit` Configured critical RSSI alarm level - - - diff --git a/general/getRotEncSpeed.md b/general/getRotEncSpeed.md deleted file mode 100644 index 4d47fa7d7..000000000 --- a/general/getRotEncSpeed.md +++ /dev/null @@ -1,22 +0,0 @@ - - -## getRotEncSpeed() - - - -Return rotary encoder current speed - -@status current Introduced in 2.3.10 - - -#### Parameters - -none - -#### Return value - -* `number` in list: ROTENC_LOWSPEED, ROTENC_MIDSPEED, ROTENC_HIGHSPEED - return 0 on radio without rotary encoder - - - diff --git a/general/getRtcTime.md b/general/getRtcTime.md deleted file mode 100644 index 4fdf0e3f1..000000000 --- a/general/getRtcTime.md +++ /dev/null @@ -1,22 +0,0 @@ - - -## getRtcTime() - - - -Return current RTC system date as unix timstamp (in seconds since 1. Jan 1970) - -Please note the RTC timestamp is kept internally as a 32bit integer, which will overflow -in 2038. - - -#### Parameters - -none - -#### Return value - -* `number` Number of seconds elapsed since 1. Jan 1970 - - - diff --git a/general/getTime.md b/general/getTime.md deleted file mode 100644 index 817dc5473..000000000 --- a/general/getTime.md +++ /dev/null @@ -1,25 +0,0 @@ - - -## getTime() - - - -Return the time since the radio was started in multiple of 10ms - -The timer internally uses a 32-bit counter which is enough for 497 days so -overflows will not happen. - -@status current Introduced in 2.0.0 - - -#### Parameters - -none - -#### Return value - -* `number` Number of 10ms ticks since the radio was started Example: -run time: 12.54 seconds, return value: 1254 - - - diff --git a/general/getTxGPS.md b/general/getTxGPS.md deleted file mode 100644 index 5ffcd51ee..000000000 --- a/general/getTxGPS.md +++ /dev/null @@ -1,29 +0,0 @@ - - -## getTxGPS() - - - -Return the internal GPS position or nil if no valid hardware found - -@status current Introduced in 2.2.2 - - -#### Parameters - -none - -#### Return value - -* `table` representing the current radio position - * `lat` (number) internal GPS latitude, positive is North - * `lon` (number) internal GPS longitude, positive is East - * 'numsat' (number) current number of sats locked in by the GPS sensor - * 'fix' (boolean) fix status - * 'alt' (number) internal GPS altitude in 0.1m - * 'speed' (number) internal GPSspeed in 0.1m/s - * 'heading' (number) internal GPS ground course estimation in degrees * 10 - * 'hdop' (number) internal GPS horizontal dilution of precision - - - diff --git a/general/getUsage.md b/general/getUsage.md deleted file mode 100644 index c686cb11a..000000000 --- a/general/getUsage.md +++ /dev/null @@ -1,21 +0,0 @@ - - -## getUsage() - - - -Get percent of already used Lua instructions in current script execution cycle. - -@status current Introduced in 2.2.1 - - -#### Parameters - -none - -#### Return value - -* `usage` (number) a value from 0 to 100 (percent) - - - diff --git a/general/getValue.md b/general/getValue.md deleted file mode 100644 index 5e3200893..000000000 --- a/general/getValue.md +++ /dev/null @@ -1,64 +0,0 @@ - - -## getValue(source) - - - -Returns the value of a source. - -The list of fixed sources: - -| OpenTX Version | Radio | -|----------------|-------| -| 2.0 | [all](http://downloads-20.open-tx.org/firmware/lua_fields.txt) | -| 2.1 | [X9D and X9D+](http://downloads-21.open-tx.org/firmware/lua_fields_taranis.txt), [X9E](http://downloads-21.open-tx.org/firmware/lua_fields_taranis_x9e.txt) | -| 2.2 | [X9D and X9D+](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9e.txt), [Horus](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x12s.txt) | -| 2.3 | [X9D and X9D+](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9e.txt), [X7](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x7.txt), [Horus](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x12s.txt) | - -In OpenTX 2.1.x the telemetry sources no longer have a predefined name. -To get a telemetry value simply use it's sensor name. For example: - * Altitude sensor has a name "Alt" - * to get the current altitude use the source "Alt" - * to get the minimum altitude use the source "Alt-", to get the maximum use "Alt+" - -@status current Introduced in 2.0.0, changed in 2.1.0, `Cels+` and -`Cels-` added in 2.1.9 - - -#### Parameters - -* `source` can be an identifier (number) (which was obtained by the getFieldInfo()) -or a name (string) of the source. - - - -#### Return value - -* `value` current source value (number). Zero is returned for: - * non-existing sources - * for all telemetry source when the telemetry stream is not received - * far all non allowed sensors while FAI MODE is active - -* `table` GPS position is returned in a table: - * `lat` (number) latitude, positive is North - * `lon` (number) longitude, positive is East - * `pilot-lat` (number) pilot latitude, positive is North - * `pilot-lon` (number) pilot longitude, positive is East - -* `table` GPS date/time, see getDateTime() - -* `table` Cells are returned in a table -(except where no cells were detected in which -case the returned value is 0): - * table has one item for each detected cell: - * key (number) cell number (1 to number of cells) - * value (number) current cell voltage - - - -##### Notice -Getting a value by its numerical identifier is faster then by its name. -While `Cels` sensor returns current values of all cells in a table, a `Cels+` or -`Cels-` will return a single value - the maximum or minimum Cels value. - - diff --git a/general/getVersion.md b/general/getVersion.md deleted file mode 100644 index d60a3ed74..000000000 --- a/general/getVersion.md +++ /dev/null @@ -1,59 +0,0 @@ - - -## getVersion() - - - -Return OpenTX version - -@status current Introduced in 2.0.0, expanded in 2.1.7, radio type strings changed in 2.2.0, os name added in EdgeTX 2.4.0 - -### Example - -This example also runs in OpenTX versions where the function returned only one value: - -```lua -local function run(event) - local ver, radio, maj, minor, rev, osname = getVersion() - print("version: "..ver) - if radio then print ("radio: "..radio) end - if maj then print ("maj: "..maj) end - if minor then print ("minor: "..minor) end - if rev then print ("rev: "..rev) end - if osname then print ("osname: "..osname) end - return 1 -end - -return { run=run } -``` -Output of the above script in simulator: -``` -version: 2.4.0 -radio: tx16s-simu -maj: 2 -minor: 4 -rev: 0 -osname: EdgeTX -``` - - -#### Parameters - -none - -#### Return value - -* `string` OpenTX version (ie "2.1.5") - -* `multiple` values (available since 2.1.7): - * (string) OpenTX version (ie "2.1.5") - * (string) radio type: `x12s`, `x10`, `x9e`, `x9d+`, `x9d` or `x7`. -If running in simulator the "-simu" is added - * (number) major version (ie 2 if version 2.1.5) - * (number) minor version (ie 1 if version 2.1.5) - * (number) revision number (ie 5 if version 2.1.5) -Since EdgeTX 2.4.0, sixth value added - * (string) OS name (i.e. EdgeTX or nil if OpenTX) - - - diff --git a/general/killEvents.md b/general/killEvents.md deleted file mode 100644 index 970713053..000000000 --- a/general/killEvents.md +++ /dev/null @@ -1,22 +0,0 @@ - - -## killEvents(key) - - - -Stops key state machine. See [Key Events](../key_events.md) for the detailed description. - -@status current Introduced in 2.0.0 - - - -#### Parameters - -* `key` (number) key to be killed, can also include event type (only the key part is used) - - - -#### Return value - -none - diff --git a/general/loadScript.md b/general/loadScript.md deleted file mode 100644 index 1de9ad7aa..000000000 --- a/general/loadScript.md +++ /dev/null @@ -1,65 +0,0 @@ - - -## loadScript(file [, mode], [,env]) - - - -Load a Lua script file. This is similar to Lua's own [loadfile()](https://www.lua.org/manual/5.2/manual.html#pdf-loadfile) -API method, but it uses OpenTx's optional pre-compilation feature to save memory and time during load. - -Return values are same as from Lua API loadfile() method: If the script was loaded w/out errors -then the loaded script (or "chunk") is returned as a function. Otherwise, returns nil plus the error message. - -@status current Introduced in 2.2.0 - -### Example - -```lua - fun, err = loadScript("/SCRIPTS/FUNCTIONS/print.lua") - if (fun ~= nil) then - fun("Hello from loadScript()") - else - print(err) - end -``` - - - -#### Parameters - -* `file` (string) Full path and file name of script. The file extension is optional and ignored (see `mode` param to control - which extension will be used). However, if an extension is specified, it should be ".lua" (or ".luac"), otherwise it is treated - as part of the file name and the .lua/.luac will be appended to that. - -* `mode` (string) (optional) Controls whether to force loading the text (.lua) or pre-compiled binary (.luac) - version of the script. By default OTx will load the newest version and compile a new binary if necessary (overwriting any - existing .luac version of the same script, and stripping some debug info like line numbers). - You can use `mode` to control the loading behavior more specifically. Possible values are: - * `b` only binary. - * `t` only text. - * `T` (default on simulator) prefer text but load binary if that is the only version available. - * `bt` (default on radio) either binary or text, whichever is newer (binary preferred when timestamps are equal). - * Add `x` to avoid automatic compilation of source file to .luac version. - Eg: "tx", "bx", or "btx". - * Add `c` to force compilation of source file to .luac version (even if existing version is newer than source file). - Eg: "tc" or "btc" (forces "t", overrides "x"). - * Add `d` to keep extra debug info in the compiled binary. - Eg: "td", "btd", or "tcd" (no effect with just "b" or with "x"). - -* `env` (integer) See documentation for Lua function loadfile(). - - - -#### Return value - -* `function` The loaded script, or `nil` if there was an error (e.g. file not found or syntax error). - -* `string` Error message(s), if any. Blank if no error occurred. - - - -##### Notice - Note that you will get an error if you specify `mode` as "b" or "t" and that specific version of the file does not exist (eg. no .luac file when "b" is used). - Also note that `mode` is NOT passed on to Lua's loader function, so unlike with loadfile() the actual file content is not checked (as if no mode or "bt" were passed to loadfile()). - - diff --git a/general/multiBuffer.md b/general/multiBuffer.md deleted file mode 100644 index 1fa5ae72e..000000000 --- a/general/multiBuffer.md +++ /dev/null @@ -1,24 +0,0 @@ - - -## multiBuffer(address[,value]) - - - -This function reads/writes the Multi protocol buffer to interact with a protocol². - -@status current Introduced in 2.3.2 - - -#### Parameters - -* `address` to read/write in the buffer -@param (optional): value to write in the buffer - - - -#### Return value - -* `buffer` value (number) - - - diff --git a/general/playDuration.md b/general/playDuration.md deleted file mode 100644 index 60e92b5d4..000000000 --- a/general/playDuration.md +++ /dev/null @@ -1,25 +0,0 @@ - - -## playDuration(duration [, hourFormat]) - - - -Play a time value (text to speech) - -@status current Introduced in 2.1.0 - - -#### Parameters - -* `duration` (number) number of seconds to play. Only integral part is used. - -* `hourFormat` (number): - * `0 or not present` play format: minutes and seconds. - * `!= 0` play format: hours, minutes and seconds. - - - -#### Return value - -none - diff --git a/general/playFile.md b/general/playFile.md deleted file mode 100644 index 80253f697..000000000 --- a/general/playFile.md +++ /dev/null @@ -1,23 +0,0 @@ - - -## playFile(name) - - - -Play a file from the SD card - -@status current Introduced in 2.0.0, changed in 2.1.0 - - -#### Parameters - -* `path` (string) full path to wav file (i.e. “/SOUNDS/en/system/tada.wav”) -Introduced in 2.1.0: If you use a relative path, the current language is appended -to the path (example: for English language: `/SOUNDS/en` is appended) - - - -#### Return value - -none - diff --git a/general/playHaptic.md b/general/playHaptic.md deleted file mode 100644 index 959c7f8b5..000000000 --- a/general/playHaptic.md +++ /dev/null @@ -1,27 +0,0 @@ - - -## playHaptic(duration, pause [, flags]) - - - -Generate haptic feedback - -@status current Introduced in 2.2.0 - - -#### Parameters - -* `duration` (number) length of the haptic feedback in milliseconds - -* `pause` (number) length of the silence after haptic feedback in milliseconds - -* `flags` (number): - * `0 or not present` play with normal priority - * `PLAY_NOW` play immediately - - - -#### Return value - -none - diff --git a/general/playNumber.md b/general/playNumber.md deleted file mode 100644 index 8d0bf10c4..000000000 --- a/general/playNumber.md +++ /dev/null @@ -1,29 +0,0 @@ - - -## playNumber(value, unit [, attributes]) - - - -Play a numerical value (text to speech) - -@status current Introduced in 2.0.0 - - - -#### Parameters - -* `value` (number) number to play. Value is interpreted as integer. - -* `unit` (number) unit identifier [Full list]((../appendix/units.html)) - -* `attributes` (unsigned number) 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 value - -none - diff --git a/general/playTone.md b/general/playTone.md deleted file mode 100644 index 5881a8805..000000000 --- a/general/playTone.md +++ /dev/null @@ -1,34 +0,0 @@ - - -## playTone(frequency, duration, pause [, flags [, freqIncr]]) - - - -Play a tone - -@status current Introduced in 2.1.0 - - -#### Parameters - -* `frequency` (number) tone frequency in Hz (from 150 to 15000) - -* `duration` (number) length of the tone in milliseconds - -* `pause` (number) length of the silence after the tone in milliseconds - -* `flags` (number): - * `0 or not present` play with normal priority. - * `PLAY_BACKGROUND` play in background (built in vario function uses this context) - * `PLAY_NOW` play immediately - -* `freqIncr` (number) positive number increases the tone pitch (frequency with time), -negative number decreases it. The frequency changes every 10 milliseconds, the change is `freqIncr * 10Hz`. -The valid range is from -127 to 127. - - - -#### Return value - -none - diff --git a/general/popupConfirmation.md b/general/popupConfirmation.md deleted file mode 100644 index 309f6758a..000000000 --- a/general/popupConfirmation.md +++ /dev/null @@ -1,33 +0,0 @@ - - -## popupConfirmation(title, event) deprecated, please replace by -@function popupConfirmation(title, message, event) - - - -Raises a pop-up on screen that asks for confirmation - -@status current Introduced in 2.2.0, changed to (title, message, event) in 2.3.8 - - -#### Parameters - -* `title` (string) title to display - -* `message` (string) text to display - -* `event` (number) the event variable that is passed in from the -Run function (key pressed) - - - -#### Return value - -* `"CANCEL"` user pushed EXIT key - - - -##### Notice -Use only from stand-alone and telemetry scripts. - - diff --git a/general/popupInput.md b/general/popupInput.md deleted file mode 100644 index b2e5c8fff..000000000 --- a/general/popupInput.md +++ /dev/null @@ -1,40 +0,0 @@ - - -## popupInput(title, event, input, min, max) - - - -Raises a pop-up on screen that allows uses input - -@status current Introduced in 2.0.0 - - -#### Parameters - -* `title` (string) text to display - -* `event` (number) the event variable that is passed in from the -Run function (key pressed) - -* `input` (number) value that can be adjusted by the +/­- keys - -* `min` (number) min value that input can reach (by pressing the -­ key) - -* `max` (number) max value that input can reach - - - -#### Return value - -* `number` result of the input adjustment - -* `"OK"` user pushed ENT key - -* `"CANCEL"` user pushed EXIT key - - - -##### Notice -Use only from stand-alone and telemetry scripts. - - diff --git a/general/popupWarning.md b/general/popupWarning.md deleted file mode 100644 index 234735058..000000000 --- a/general/popupWarning.md +++ /dev/null @@ -1,30 +0,0 @@ - - -## popupWarning(title, event) - - - -Raises a pop-up on screen that shows a warning - -@status current Introduced in 2.2.0 - - -#### Parameters - -* `title` (string) text to display - -* `event` (number) the event variable that is passed in from the -Run function (key pressed) - - - -#### Return value - -* `"CANCEL"` user pushed EXIT key - - - -##### Notice -Use only from stand-alone and telemetry scripts. - - diff --git a/general/resetGlobalTimer.md b/general/resetGlobalTimer.md deleted file mode 100644 index f78daee9c..000000000 --- a/general/resetGlobalTimer.md +++ /dev/null @@ -1,24 +0,0 @@ - - -## resetGlobalTimer([type]) - - - - Resets the radio global timer to 0. - -@status current Introduced in 2.2.2, param added in 2.3 - - -#### Parameters - -* `(optional)` : if set to 'all', throttle ,throttle percent and session timers are reset too - if set to 'session', radio session timer is reset too - if set to 'ttimer', radio throttle timer is reset too - if set to 'tptimer', radio throttle percent timer is reset too - - - -#### Return value - -none - diff --git a/general/serialRead.md b/general/serialRead.md deleted file mode 100644 index 38f17b76e..000000000 --- a/general/serialRead.md +++ /dev/null @@ -1,25 +0,0 @@ - - -## serialRead([num]) -@param num (optional): maximum number of bytes to read. - If non-zero, serialRead will read up to num characters from the buffer. - If 0 or left out, serialRead will read up to and including the first newline character or the end of the buffer. - Note that the returned string may not end in a newline if this character is not present in the buffer. - - - -Reads characters from the serial port. The string is allowed to contain any character, including 0. - -@status current Introduced in 2.3.8 - - -#### Parameters - -none - -#### Return value - -* `str` string. Empty if no new characters were available. - - - diff --git a/general/serialWrite.md b/general/serialWrite.md deleted file mode 100644 index dfde516c5..000000000 --- a/general/serialWrite.md +++ /dev/null @@ -1,20 +0,0 @@ - - -## serialWrite(str) -@param str (string) String to be written to the serial port. - - - -Writes a string to the serial port. The string is allowed to contain any character, including 0. - -@status current Introduced in 2.3.10 - - -#### Parameters - -none - -#### Return value - -none - diff --git a/general/setSerialBaudrate.md b/general/setSerialBaudrate.md deleted file mode 100644 index f5983d73d..000000000 --- a/general/setSerialBaudrate.md +++ /dev/null @@ -1,20 +0,0 @@ - - -## setSerialBaudrate(baudrate) -@param baudrate Desired baurate - - - -Set baudrate for serial port(s) affected to LUA - -@status current Introduced in 2.3.12 - - -#### Parameters - -none - -#### Return value - -none - diff --git a/general/setTelemetryValue.md b/general/setTelemetryValue.md deleted file mode 100644 index d99c3281f..000000000 --- a/general/setTelemetryValue.md +++ /dev/null @@ -1,42 +0,0 @@ - - -## setTelemetryValue(id, subID, instance, value [, unit [, precision [, name]]]) - - - -@status current Introduced in 2.2.0 - - -#### Parameters - -* `id` Id of the sensor, valid range is from 0 to 0xFFFF - -* `subID` subID of the sensor, usually 0, valid range is from 0 to 7 - -* `instance` instance of the sensor (SensorID), valid range is from 0 to 0xFF - -* `value` fed to the sensor - -* `unit` unit of the sensor [Full list](../appendix/units.html) - -* `precision` 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` (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 value - -* `true,` if the sensor was just added. In this case the value is ignored (subsequent call will set the value) - - - -##### Notice -All three parameters `id`, `subID` and `instance` can't be zero at the same time. At least one of them -must be different from zero. - - diff --git a/general/sportTelemetryPop.md b/general/sportTelemetryPop.md deleted file mode 100644 index d1788f83d..000000000 --- a/general/sportTelemetryPop.md +++ /dev/null @@ -1,29 +0,0 @@ - - -## sportTelemetryPop() - - - -Pops a received SPORT packet from the queue. Please note that only packets using a data ID within 0x5000 to 0x50FF -(frame ID == 0x10), as well as packets with a frame ID equal 0x32 (regardless of the data ID) will be passed to -the LUA telemetry receive queue. - -@status current Introduced in 2.2.0 - - -#### Parameters - -none - -#### Return value - -* `nil` queue does not contain any (or enough) bytes to form a whole packet - -* `multiple` returns 4 values: - * sensor ID (number) - * frame ID (number) - * data ID (number) - * value (number) - - - diff --git a/general/sportTelemetryPush.md b/general/sportTelemetryPush.md deleted file mode 100644 index 8ee05d831..000000000 --- a/general/sportTelemetryPush.md +++ /dev/null @@ -1,34 +0,0 @@ - - -## sportTelemetryPush() - - - -This functions allows for sending SPORT telemetry data toward the receiver, -and more generally, to anything connected SPORT bus on the receiver or transmitter. - -When called without parameters, it will only return the status of the output buffer without sending anything. - -@status current Introduced in 2.2.0, retval nil added in 2.3.4 - - -#### Parameters - -* `sensorId` physical sensor ID - -* `frameId` frame ID - -* `dataId` data ID - -* `value` value - - - -#### Return value - -* `boolean` data queued in output buffer or not. - -* `nil` incorrect telemetry protocol. - - - diff --git a/lua-api-programming/README.md b/lua-api-programming/README.md deleted file mode 100644 index fe02f20eb..000000000 --- a/lua-api-programming/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Part II - EdgeTX Lua API Programming Guide - -This section provides more specifics on the EdgeTX Lua implementation. Here you will find syntax rules for interface tables and functions. - diff --git a/lua-api-programming/init-function-syntax.md b/lua-api-programming/init-function-syntax.md deleted file mode 100644 index 31776c0a8..000000000 --- a/lua-api-programming/init-function-syntax.md +++ /dev/null @@ -1,18 +0,0 @@ -# Init Function Syntax - -If defined, _init_ function is called right after the script is loaded from SD card and begins execution. Init is called only once before the run function is called for the first time. - -```lua -local function () - -- code here runs only once when the model is loaded -end -``` - -* **Input Parameters:** - - none - -* **Return values:** - - none - diff --git a/lua-api-programming/input-table-syntax.md b/lua-api-programming/input-table-syntax.md deleted file mode 100644 index 794aefa74..000000000 --- a/lua-api-programming/input-table-syntax.md +++ /dev/null @@ -1,51 +0,0 @@ -# Input Table Syntax - -## Overview - -The input table defines what values are available as input\(s\) to [mix scripts](../part_i_-_script_type_overview/mix.md). There are two forms of input table entries. - -* **SOURCE syntax** - - ```lua - { "", SOURCE } - ``` - - SOURCE inputs provide the current value of a selected OpenTX variable. The source must set by the user when the mix script is configured. Source can be any value OpenTX knows about \(inputs, channels, telemetry values, switches, custom functions,...\). - _Note:_ typical range is -1024 thru +1024. Simply divide the input value by 10.24 to interpret as a percentage from -100% to +100%. - -* **VALUE syntax** - - ```lua - { "", VALUE, , , } - ``` - - VALUE inputs provide a constant value that is set by the user when the mix script is configured. - - * _name_ - maximum length of 8 characters - * _min_ - minimum value of -128 - * _max_ - maximum value of 127 - * _default_ - must be within the valid range specified - -* **Maximum of 6 inputs per script \(warning : was 8 in 2.1\)** - -## Example using a SOURCE and a VALUE - -```lua -local input = - { - { "Strength", SOURCE}, -- user selects source (typically slider or knob) - { "Interval", VALUE, 0, 100, 0 } -- interval value, default = 0. - } - -local function run(strength, interval) - -- variable strength will contain the current slider value - -- variable interval is set by the user and constant through script lifetime - - -- this script has no return value but may use playFile() to alert user - - return -end - -return {input=input, run=run} -``` - diff --git a/lua-api-programming/loading-code-modules-dynamically.md b/lua-api-programming/loading-code-modules-dynamically.md deleted file mode 100644 index 9b54dd573..000000000 --- a/lua-api-programming/loading-code-modules-dynamically.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -description: >- - Lua makes it easy to load and unload code modules on the fly, to save memory - or to provide program extensions. ---- - -# Loading Code Modules Dynamically - -The [`loadScript()`](../lua_api_reference/general-functions-less-than-greater-than-luadoc-begin-general/loadscript.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 -local c = ... - -local function f(x) - return x + c -end - -return f -``` - -You can load and use the above file with the following code: - -```lua -local chunk = loadScript("/SCRIPTS/TestScript.lua") - -local f1 = chunk(1) -local y = f1(5) --- y = 5 + 1 - -local f2 = chunk(3) -local z = f2(5) --- z = 5 + 3 -``` - -So here we put together what we learned in the previous section. The body of the script is an anonymous function returned by `loadScript` and stored in the variable `chunk`. It returns the function `f` when it is called. The local variable `c` in the script is assigned to the first _vararg_ passed to the call. Since a new closure is created every time we call `chunk`, `f1` and `f2` have different closures with different values of `c`. - diff --git a/lua-api-programming/output-table-syntax.md b/lua-api-programming/output-table-syntax.md deleted file mode 100644 index 7d0f2b953..000000000 --- a/lua-api-programming/output-table-syntax.md +++ /dev/null @@ -1,34 +0,0 @@ -# Output Table Syntax - -## Overview - -Outputs are only used in mix scripts. The output table defines only name(s), the actual values are determined by the script's [run function](run-function-syntax.md). - -```lua -{ "", "" } -``` - -Example: - -```lua -local output { "Val1", "Val2" } - -local function run() - return 0, -1024 -- these values will be available in OpenTX as Val1 and Val2 -end - -return {output=output, run=run} -``` - -## Notes: - -* Output name is limited to four characters. -* A maximum of 6 outputs are supported -* Number Format Outputs are 16 bit signed integers when they leave Lua script and are then divided by 10.24 to produce output value in percent: - -| Script Return Value | Mix Value in OpenTX | -| ------------------- | ------------------- | -| 0 | 0% | -| 996 | 97.2% | -| 1024 | 100% | -| -1024 | -100% | diff --git a/lua-api-programming/return-statement-syntax.md b/lua-api-programming/return-statement-syntax.md deleted file mode 100644 index 5ca4e2b06..000000000 --- a/lua-api-programming/return-statement-syntax.md +++ /dev/null @@ -1,22 +0,0 @@ -# Return Statement Syntax - -The return statment is the last statement in an OpenTX Lua script. It defines the input/output table values and functions used to run the script. - -Parameters _init_, _input_ and _output_ are optional. If a script doesn't use them, they can be omitted from return statement. - -Example without _init_ and _output_: - -```lua -local inputs = { { "Aileron", SOURCE }, { "Ail. ratio", VALUE, -100, 100, 0 } } - -local function run_func(ail, ratio) - -- do some stuff - if (ail > 50) and ( ratio < 40) then - playFile("foo.wav") - end -end - --- script that only uses input and run -return { run=run_func, input=inputs } -``` - diff --git a/lua-api-programming/run-function-syntax.md b/lua-api-programming/run-function-syntax.md deleted file mode 100644 index 9daf3137b..000000000 --- a/lua-api-programming/run-function-syntax.md +++ /dev/null @@ -1,43 +0,0 @@ -# Run Function Syntax - -The run function is the function that is periodically called for the lifetime of script execution. Syntax of the run function is different between [mix scripts](../part\_i\_-\_script\_type\_overview/mix.md) and [telemetry scripts](../part\_i\_-\_script\_type\_overview/telemetry.md). - -## Run Function for Mix Scripts - -```lua -local function ([first input, [second input], …]) - - -- if mix has no return values - return - - -- if mix has two return values - return value1, value2 - -end -``` - -* **Input parameters:** - - zero or more input values, their names are arbitrary, their meaning and order is defined by the input table. (see [Input Table Syntax](run-function-syntax.md)) -* **Return values:** - * none - if output table is empty (i.e. script has no output) - - values - - * or - - * comma separated list of output values, their order and meaning is defined by the output table. (see [Output Table Syntax](run-function-syntax.md)) - -## Run Function for Telemetry Scripts - -```lua -local function (key-event) - return 0 -- values other than zero will halt the script -end -``` - -* **Input parameters:** - - The _key-event_ parameter indicates which transmitter button has been pressed (see [Key Events](broken-reference)) -* **Return values:** - - A non-zero return value will halt the script diff --git a/lua-api-reference/README.md b/lua-api-reference/README.md deleted file mode 100644 index 38b3c70ce..000000000 --- a/lua-api-reference/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Part III - EdgeTX Lua API Reference - -This section describes the Lua libraries, functions and constants that are provided by EdgeTX. - diff --git a/lua-api-reference/audio-sound/README.md b/lua-api-reference/audio-sound/README.md deleted file mode 100644 index 52002aafa..000000000 --- a/lua-api-reference/audio-sound/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Audio-Sound - diff --git a/lua-api-reference/audio-sound/flushaudio.md b/lua-api-reference/audio-sound/flushaudio.md deleted file mode 100644 index f2ee847a5..000000000 --- a/lua-api-reference/audio-sound/flushaudio.md +++ /dev/null @@ -1,13 +0,0 @@ -# flushAudio() - -Flushes audio queue - -@status experimental, Introduced in 2.8.0 - -**Parameters** - -none - -**Return value** - -none diff --git a/lua-api-reference/audio-sound/playduration.md b/lua-api-reference/audio-sound/playduration.md deleted file mode 100644 index 8b5665f39..000000000 --- a/lua-api-reference/audio-sound/playduration.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -description: Play a time value (text to speech) ---- - -# playDuration(duration \[, hourFormat \[, volume]]) - -**Supported Targets:** BW, COLOR - -**Status:** current Introduced in 2.1.0, changed in 2.10 - -## Parameters - -* `duration` (number) number of seconds to play. Only integral part is used. -* `hourFormat` (number): - * `0 or not present` play format: minutes and seconds. - * `!= 0` play format: hours, minutes and seconds. - -## Return value - -none - -## Examples - -```lua -playDuration(101, 0, 5) -- play duration 101s, seconds format, use Wav volume 5 -playDuration(101, 0, 1) -- play duration 101s, seconds format, use Wav volume 1 -playDuration(101, 1) -- play duration 101s, hour format, use radio settings Wav volume -``` diff --git a/lua-api-reference/audio-sound/playfile.md b/lua-api-reference/audio-sound/playfile.md deleted file mode 100644 index be2f7481a..000000000 --- a/lua-api-reference/audio-sound/playfile.md +++ /dev/null @@ -1,31 +0,0 @@ ---- -description: Play a file from the SD card ---- - -# playFile(filename \[, volume]) - -**Supported targets:** BW, COLOR - -**Status:** current Introduced in 2.0.0, changed in 2.1.0, changed in 2.10\ - - -## Parameters - -* `filename` (string) full path to wav file (i.e. “/SOUNDS/en/system/tada.wav”) - - Introduced in 2.1.0: If you use a relative path, the current language is appended - - to the path (example: for English language: `/SOUNDS/en` is appended) -* `volume` (number): (1..5) override radio settings Wav volume for the duration of file. Omitting the parameter uses radio settings Wav volume - -## Return value - -none - -## Examples - -```lua -playFile("armed.wav", 5) -- play file armed.wav, use Wav volume 2 -playFile("armed.wav", 1) -- play file armed.wav, use Wav volume 1 -playFile("armed.wav") -- play file armed.wav, use radio settings Wav volume -``` diff --git a/lua-api-reference/audio-sound/playhaptic.md b/lua-api-reference/audio-sound/playhaptic.md deleted file mode 100644 index 57c1f75b8..000000000 --- a/lua-api-reference/audio-sound/playhaptic.md +++ /dev/null @@ -1,18 +0,0 @@ -# playHaptic\(duration, pause \[, flags\]\) - -Generate haptic feedback - -@status current Introduced in 2.2.0 - -## Parameters - -* `duration` \(number\) length of the haptic feedback in milliseconds -* `pause` \(number\) length of the silence after haptic feedback in milliseconds -* `flags` \(number\): - * `0 or not present` play with normal priority - * `PLAY_NOW` play immediately - -## Return value - -none - diff --git a/lua-api-reference/audio-sound/playnumber.md b/lua-api-reference/audio-sound/playnumber.md deleted file mode 100644 index 63363a712..000000000 --- a/lua-api-reference/audio-sound/playnumber.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -description: Play a numerical value (text to speech) ---- - -# playNumber(value, unit \[, attributes \[, volume]]) - -**Supported Targets:** BW, COLOR - -**Status:** current Introduced in 2.0.0, changed in 2.10 - -## Parameters - -* `value` (number) number to play. Value is interpreted as integer. -* `unit` (number) unit identifier \[Full list]\((../appendix/units.html)) -* `attributes` (unsigned number) 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) -* `volume` (number): (1..5) override radio settings Wav volume for the duration of file. Omitting the parameter uses radio settings Wav volume - -## Return value - -none - - - -## Examples - -```lua -playNumber(123, 3, 0, 5) -- play number 123, unit mAh, use Wav volume 5 -playNumber(123, 3, 0, 1) -- play number 123, unit mAh, use Wav volume 1 -playNumber(123, 3, 0) -- play number 123, unit mAh, use radio settings Wav volume -``` diff --git a/lua-api-reference/audio-sound/playtone.md b/lua-api-reference/audio-sound/playtone.md deleted file mode 100644 index fa70504d3..000000000 --- a/lua-api-reference/audio-sound/playtone.md +++ /dev/null @@ -1,33 +0,0 @@ ---- -description: Play a tone ---- - -# playTone(frequency, duration, pause \[, flags \[, freqIncr \[, volume]]]) - -**Supported targets:** BW, COLOR - -**Status:** current Introduced in 2.1.0, changed in 2.10 - -## Parameters - -* `frequency` (number) tone frequency in Hz (from 150 to 15000) -* `duration` (number) length of the tone in milliseconds -* `pause` (number) length of the silence after the tone in milliseconds -* `flags` (number): - * `0 or not present` play with normal priority. - * `PLAY_BACKGROUND` play in background (built in vario function uses this context) - * `PLAY_NOW` play immediately -* `freqIncr` (number) positive number increases the tone pitch (frequency with time), negative number decreases it. The frequency changes every 10 milliseconds, the change is `freqIncr * 10Hz`. The valid range is from -127 to 127. -* `volume` (number): (1..5) override radio settings Beep volume for the duration of file. Omitting the parameter uses radio settings Beep volume - -## Return value - -none - -## Examples - -```lua -playTone(2550, 160, 20, 3, -10, 5) -- play tone, use Beep volume 5 -playTone(2550, 160, 20, 3, -10, 1) -- play tone, use Beep volume 1 -playTone(2550, 160, 20, 3, -10) -- play tone, use radio settings Beep volume -``` diff --git a/lua-api-reference/bitmap/README.md b/lua-api-reference/bitmap/README.md deleted file mode 100644 index 751cdaae0..000000000 --- a/lua-api-reference/bitmap/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Bitmap Functions - diff --git a/lua-api-reference/bitmap/bitmap.resize.md b/lua-api-reference/bitmap/bitmap.resize.md deleted file mode 100644 index e81f8ca72..000000000 --- a/lua-api-reference/bitmap/bitmap.resize.md +++ /dev/null @@ -1,19 +0,0 @@ -# Bitmap.resize(bitmap, width, height) - -Return a resized bitmap object - -@status current Introduced in 2.8.0 - -**Parameters** - -* `bitmap` (pointer) point to a bitmap previously opened with Bitmap.open() -* `width` (number) the new bitmap width -* `height` (number) the new bitmap height - -**Return value** - -none - -**Notice** - -Only available on Horus diff --git a/lua-api-reference/bitmap/bitmap.tomask.md b/lua-api-reference/bitmap/bitmap.tomask.md deleted file mode 100644 index 72e9104a4..000000000 --- a/lua-api-reference/bitmap/bitmap.tomask.md +++ /dev/null @@ -1,17 +0,0 @@ -# Bitmap.toMask(bitmap) - -Return a 8bit bitmap mask that can be used with lcd.drawBitmapPattern() - -@status current Introduced in 2.8.0 - -**Parameters** - -* `bitmap` (pointer) point to a bitmap previously opened with Bitmap.open() - -**Return value** - -* `a` bitmap mask - -**Notice** - -Only available on Horus diff --git a/lua-api-reference/bitmap/getsize.md b/lua-api-reference/bitmap/getsize.md deleted file mode 100644 index 347282bfa..000000000 --- a/lua-api-reference/bitmap/getsize.md +++ /dev/null @@ -1,29 +0,0 @@ - - -## Bitmap.getSize(name) - - - -Return width, height of a bitmap object - -@status current Introduced in 2.2.0 - - -#### Parameters - -* `bitmap` (pointer) point to a bitmap previously opened with Bitmap.open() - - - -#### Return value - -* `multiple` returns 2 values: - * (number) width in pixels - * (number) height in pixels - - - -##### Notice -Only available on Horus - - diff --git a/lua-api-reference/bitmap/open.md b/lua-api-reference/bitmap/open.md deleted file mode 100644 index 45a6c8c3a..000000000 --- a/lua-api-reference/bitmap/open.md +++ /dev/null @@ -1,34 +0,0 @@ - - -## Bitmap.open(name) - - - -Loads a bitmap in memory, for later use with lcd.drawBitmap(). Bitmaps should be loaded only -once, returned object should be stored and used for drawing. If loading fails for whatever -reason the resulting bitmap object will have width and height set to zero. - -Bitmap loading can fail if: - * File is not found or contains invalid image - * System is low on memory - * Combined memory usage of all Lua script bitmaps exceeds certain value - -@status current Introduced in 2.2.0 - - -#### Parameters - -* `name` (string) full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) - - - -#### Return value - -* `bitmap` (object) a bitmap object that can be used with other bitmap functions - - - -##### Notice -Only available on Horus - - diff --git a/lua-api-reference/constants/README.md b/lua-api-reference/constants/README.md deleted file mode 100644 index 3f8ef68f3..000000000 --- a/lua-api-reference/constants/README.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -description: This section describes various constants that are provided for Lua by EdgeTX. ---- - -# Constants - -* [Key Events](broken-reference) -* [Touch Events](touch-event-constants.md) -* [Flags and Patterns](flags-and-pattern-constants.md) -* [Colors](color-constants.md) -* [Screen size](screen-constants.md) diff --git a/lua-api-reference/constants/color-constants.md b/lua-api-reference/constants/color-constants.md deleted file mode 100644 index 4e6558926..000000000 --- a/lua-api-reference/constants/color-constants.md +++ /dev/null @@ -1,82 +0,0 @@ ---- -description: >- - On radios with color display, a color may be added to the flags described - above. ---- - -# Color Constants - -There are two types of color constants: one that is an index into a table holding a palette of theme colors, and one that is just a color. - -## Indexed colors - -These are the theme colors plus CUSTOM\_COLOR, and they can be changed with the function lcd.setColor\(color\_index, color\). **Please note: if an indexed color is changed, then it changes everywhere that it is used. For the theme colors, this is not only in other widgets, but everywhere throughout the radio's user interface!** - -* COLOR\_THEME\_PRIMARY1 -* COLOR\_THEME\_PRIMARY2 -* COLOR\_THEME\_PRIMARY3 -* COLOR\_THEME\_SECONDARY1 -* COLOR\_THEME\_SECONDARY2 -* COLOR\_THEME\_SECONDARY3 -* COLOR\_THEME\_FOCUS -* COLOR\_THEME\_EDIT -* COLOR\_THEME\_ACTIVE -* COLOR\_THEME\_WARNING -* COLOR\_THEME\_DISABLED -* CUSTOM\_COLOR - -## Literal colors - -These color constants cannot be changed: - -* BLACK -* WHITE -* LIGHTWHITE -* YELLOW -* BLUE -* DARKBLUE -* GREY -* DARKGREY -* LIGHTGREY -* RED -* DARKRED -* GREEN -* DARKGREEN -* LIGHTBROWN -* DARKBROWN -* BRIGHTGREEN -* ORANGE - -## Deprecated color constants - -These should no longer be used, but they are included for backwards compatibility. The old OpenTX API had a large number of indexed theme colors, and these have been mapped to the new theme colors as follows: - -* ALARM\_COLOR -> COLOR\_THEME\_WARNING -* BARGRAPH\_BGCOLOR -> COLOR\_THEME\_SECONDARY3 -* BARGRAPH1\_COLOR -> COLOR\_THEME\_SECONDARY1 -* BARGRAPH2\_COLOR -> COLOR\_THEME\_SECONDARY2 -* CURVE\_AXIS\_COLOR -> COLOR\_THEME\_SECONDARY2 -* CURVE\_COLOR -> COLOR\_THEME\_SECONDARY1 -* CURVE\_CURSOR\_COLOR -> COLOR\_THEME\_WARNING -* HEADER\_BGCOLOR -> COLOR\_THEME\_FOCUS -* HEADER\_COLOR -> COLOR\_THEME\_SECONDARY1 -* HEADER\_CURRENT\_BGCOLOR -> COLOR\_THEME\_FOCUS -* HEADER\_ICON\_BGCOLOR -> COLOR\_THEME\_SECONDARY1 -* LINE\_COLOR -> COLOR\_THEME\_PRIMARY3 -* MAINVIEW\_GRAPHICS\_COLOR -> COLOR\_THEME\_SECONDARY1 -* MAINVIEW\_PANES\_COLOR -> COLOR\_THEME\_PRIMARY2 -* MENU\_TITLE\_BGCOLOR -> COLOR\_THEME\_SECONDARY1 -* MENU\_TITLE\_COLOR -> COLOR\_THEME\_PRIMARY2 -* MENU\_TITLE\_DISABLE\_COLOR -> COLOR\_THEME\_PRIMARY3 -* OVERLAY\_COLOR -> COLOR\_THEME\_PRIMARY1 -* SCROLLBOX\_COLOR -> COLOR\_THEME\_SECONDARY3 -* TEXT\_BGCOLOR -> COLOR\_THEME\_SECONDARY3 -* TEXT\_COLOR -> COLOR\_THEME\_SECONDARY1 -* TEXT\_DISABLE\_COLOR -> COLOR\_THEME\_DISABLED -* TEXT\_INVERTED\_BGCOLOR -> COLOR\_THEME\_FOCUS -* TEXT\_INVERTED\_COLOR -> COLOR\_THEME\_PRIMARY2 -* TITLE\_BGCOLOR -> COLOR\_THEME\_SECONDARY1 -* TRIM\_BGCOLOR -> COLOR\_THEME\_FOCUS -* TRIM\_SHADOW\_COLOR -> COLOR\_THEME\_PRIMARY1 -* WARNING\_COLOR -> COLOR\_THEME\_WARNING - diff --git a/lua-api-reference/constants/flags-and-pattern-constants.md b/lua-api-reference/constants/flags-and-pattern-constants.md deleted file mode 100644 index 206015671..000000000 --- a/lua-api-reference/constants/flags-and-pattern-constants.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -description: >- - Many of the lcd functions accept parameters named flags and patterns. The - names and their meanings are described below. ---- - -# Flags and Pattern Constants - -## lcd.drawText Flags - -
    NameDescriptionEdgeTX verNotes
    0normal font, default precision for numeric2.3
    XXLSIZEjumbo font2.3
    DBLSIZEdouble size font2.3
    MIDSIZEmid sized font2.3
    SMLSIZEsmall font2.3
    BOLDbold font2.3Only color displays. This is a font size on its own - cannot be combined with other font size flags.
    SHADOWEDshadow font2.3Only color displays
    INVERSinverted display2.3
    BLINKblinking text2.3
    LEFTleft justify2.3Default for most functions not related to bitmaps
    RIGHTright justify2.3
    CENTERcenter justify2.3Only color displays
    VCENTERcenter vertically2.5.0Only color displays
    PREC1single decimal place2.3display with one decimal place (number 386 is displayed as 38.6)
    PREC2two decimal places2.3display with one decimal place (number 386 is displayed as 3.86)
    GREY_DEFAULTgrey fill2.3
    TIMEHOURdisplay hours2.3Only for lcd/drawTimer
    - -## lcd drawing functions flags on B\&W LCD radios - -
    NameDescriptionEdgeTX verNotes
    FORCEpixels will be black2.3
    ERASEpixels will be white2.3
    - -## lcd.drawLine function patterns - -
    NameDescriptionEdgeTX verNotes
    SOLIDlines will appear soild2.3
    DOTTEDlines will appear dotted2.3
    diff --git a/lua-api-reference/constants/key-event-constants.md b/lua-api-reference/constants/key-event-constants.md deleted file mode 100644 index 194db2098..000000000 --- a/lua-api-reference/constants/key-event-constants.md +++ /dev/null @@ -1,2 +0,0 @@ -# Key Event Constants - diff --git a/lua-api-reference/constants/logical-switch-function-constants.md b/lua-api-reference/constants/logical-switch-function-constants.md deleted file mode 100644 index 94f4cb6f5..000000000 --- a/lua-api-reference/constants/logical-switch-function-constants.md +++ /dev/null @@ -1,29 +0,0 @@ ---- -description: These constants are used with logical switch functions. ---- - -# Logical Switch Function Constants - -| Constant name | Logical switch function | -| ----------------------- | ----------------------- | -| LS\_FUNC\_NONE | - | -| LS\_FUNC\_VEQUAL | a = x | -| LS\_FUNC\_VALMOSTEQUAL | a \~ x | -| LS\_FUNC\_VPOS | a > x | -| LS\_FUNC\_VNEG | a < x | -| LS\_FUNC\_RANGE | | -| LS\_FUNC\_APOS | a > \|x\| | -| LS\_FUNC\_ANEG | a < \|x\| | -| LS\_FUNC\_AND | AND | -| LS\_FUNC\_OR | OR | -| LS\_FUNC\_XOR | XOR | -| LS\_FUNC\_EDGE | Edge | -| LS\_FUNC\_EQUAL | a = b | -| LS\_FUNC\_GREATER | a > b | -| LS\_FUNC\_LESS | a < b | -| LS\_FUNC\_DIFFEGREATER | ∆ ≥ x | -| LS\_FUNC\_ADIFFEGREATER | \|∆\| ≥ x | -| LS\_FUNC\_TIMER | Timer | -| LS\_FUNC\_STICKY | Sticky | - -For detailed function explanation see [Logiacal Switches functions](https://edgetx.gitbook.io/edgetx-user-manual/edgetx-user-manual/user-manual-for-color-screen-radios/model-settings/logical-switches#logical\_switches\_judgment\_conditions\_and\_logical\_expressions) in EdgeTX manual. diff --git a/lua-api-reference/constants/screen-constants.md b/lua-api-reference/constants/screen-constants.md deleted file mode 100644 index 7f4e9872a..000000000 --- a/lua-api-reference/constants/screen-constants.md +++ /dev/null @@ -1,7 +0,0 @@ -# Screen Constants - -| Name | Description | -| :--- | :--- | -| LCD\_W | width in pixels | -| LCD\_H | height in pixels | - diff --git a/lua-api-reference/constants/special-character-constants.md b/lua-api-reference/constants/special-character-constants.md deleted file mode 100644 index f6eeae327..000000000 --- a/lua-api-reference/constants/special-character-constants.md +++ /dev/null @@ -1,23 +0,0 @@ ---- -description: The radio's special characters can be used with the following text constants. ---- - -# Special Character Constants - -* CHAR\_RIGHT -* CHAR\_LEFT -* CHAR\_UP -* CHAR\_DOWN -* CHAR\_DELTA -* CHAR\_STICK -* CHAR\_POT -* CHAR\_SLIDER -* CHAR\_SWITCH -* CHAR\_TRIM -* CHAR\_INPUT -* CHAR\_FUNCTION -* CHAR\_CYC -* CHAR\_TRAINER -* CHAR\_CHANNEL -* CHAR\_TELEMETRY -* CHAR\_LUA diff --git a/lua-api-reference/constants/special-function-constants.md b/lua-api-reference/constants/special-function-constants.md deleted file mode 100644 index cddc4220a..000000000 --- a/lua-api-reference/constants/special-function-constants.md +++ /dev/null @@ -1,30 +0,0 @@ ---- -description: These constants determine the type of a Special Function ---- - -# Special Function Constants - -* FUNC\_OVERRIDE\_CHANNEL -* FUNC\_TRAINER -* FUNC\_INSTANT\_TRIM -* FUNC\_RESET -* FUNC\_SET\_TIMER -* FUNC\_ADJUST\_GVAR -* FUNC\_VOLUME -* FUNC\_SET\_FAILSAFE -* FUNC\_RANGECHECK -* FUNC\_BIND -* FUNC\_PLAY\_SOUND -* FUNC\_PLAY\_TRACK -* FUNC\_PLAY\_VALUE -* FUNC\_PLAY\_SCRIPT -* FUNC\_RESERVE5 -* FUNC\_BACKGND\_MUSIC -* FUNC\_BACKGND\_MUSIC\_PAUSE -* FUNC\_VARIO -* FUNC\_HAPTIC -* FUNC\_LOGS -* FUNC\_BACKLIGHT -* FUNC\_SCREENSHOT -* FUNC\_RACING\_MODE -* FUNC\_DISABLE\_TOUCH diff --git a/lua-api-reference/constants/touch-event-constants.md b/lua-api-reference/constants/touch-event-constants.md deleted file mode 100644 index 6e5b6003a..000000000 --- a/lua-api-reference/constants/touch-event-constants.md +++ /dev/null @@ -1,37 +0,0 @@ ---- -description: >- - In addition to the key events described in the previous section, radios with a - color touch screen also provide touch events to the widget scripts. ---- - -# Touch Event Constants - -The following touch events are passed in the `event` argument to the widget script `refresh` function \(when in full screen mode\), just like the key events. The following touch events are provided: - -| Touch Event Name | Description | -| :---: | :---: | -| EVT\_TOUCH\_FIRST | When the finger touches down on the screen | -| EVT\_TOUCH\_TAP | If the finger leaves the screen after a quick tap | -| EVT\_TOUCH\_BREAK | If the finger leaves the screen without tap or slide | -| EVT\_TOUCH\_SLIDE | Repeats while the finger is sliding on the screen | - -In addition to the above touch events a `touchState` table is passed to `refresh` with the following addional data fields: - -| touchState fields | Description | -| :---: | :---: | -| x, y | Current touch point | -| startX, startY | Point where slide started | -| slideX, SlideY | Movement since previous SLIDE event \(or start of slide\) | -| swipeUp / swipeDown / swipeLeft / swipeRight | The field is present and equal to `true` if a swipe event occurred in that direction | -| tapCount | Counts the number of consecutive taps | - -## Notes: - -* `touchState` is `nil` if `event` is not a touch event. This can be used to test if we have a touch event or a key event. - * Since Lua evaluates a `nil` value to `false` and everything else to `true`: - * `if touchState then` we have a touch event. -* `x, y` are present for all touch events. -* `startX, startY, slideX, slideY` are only present with `EVT_TOUCH_SLIDE`. -* `swipeUp` / `swipeDown` / `swipeLeft` / `swipeRight` _may_ be present only with`EVT_TOUCH_SLIDE`. -* `tapCount` is zero for anything but `EVT_TOUCH_TAP`. - diff --git a/lua-api-reference/constants/units.md b/lua-api-reference/constants/units.md deleted file mode 100644 index 8a732d476..000000000 --- a/lua-api-reference/constants/units.md +++ /dev/null @@ -1,38 +0,0 @@ -# Units - -| Index | Unit | Defined as | -| :--- | :--- | :--- | -| 0 | Raw unit \(no unit\) | UNIT\_RAW | -| 1 | Volts | UNIT\_VOLTS | -| 2 | Amps | UNIT\_AMPS | -| 3 | Milliamps | UNIT\_MILLIAMPS | -| 4 | Knots | UNIT\_KTS | -| 5 | Meters per Second | UNIT\_METERS\_PER\_SECOND | -| 6 | Feet per Second | UNIT\_FEET\_PER\_SECOND | -| 7 | Kilometers per Hour | UNIT\_KMH | -| 8 | Miles per Hour | UNIT\_MPH | -| 9 | Meters | UNIT\_METERS | -| 10 | Feet | UNIT\_FEET | -| 11 | Degrees Celsius | UNIT\_CELSIUS | -| 12 | Degrees Fahrenheit | UNIT\_FAHRENHEIT | -| 13 | Percent | UNIT\_PERCENT | -| 14 | Milliamp Hour | UNIT\_MAH | -| 15 | Watts | UNIT\_WATTS | -| 16 | Milliwatts | UNIT\_MILLIWATTS | -| 17 | dB | UNIT\_DB | -| 18 | RPM | UNIT\_RPMS | -| 19 | G | UNIT\_G | -| 20 | Degrees | UNIT\_DEGREE | -| 21 | Radians | UNIT\_RADIANS | -| 22 | Milliliters | UNIT\_MILLILITERS | -| 23 | Fluid Ounces | UNIT\_FLOZ | -| 24 | Ml per minute | UNIT\_MILLILITERS\_PER\_MINUTE | -| 35 | Hours | UNIT\_HOURS | -| 36 | Minutes | UNIT\_MINUTES | -| 37 | Seconds | UNIT\_SECONDS | -| 38 | Virtual unit | UNIT\_CELLS | -| 39 | Virtual unit | UNIT\_DATETIME | -| 40 | Virtual unit | UNIT\_GPS | -| 41 | Virtual unit | UNIT\_BITFIELD | -| 42 | Virtual unit | UNIT\_TEXT | - diff --git a/lua-api-reference/constants/widget-options.md b/lua-api-reference/constants/widget-options.md deleted file mode 100644 index d374e4b5e..000000000 --- a/lua-api-reference/constants/widget-options.md +++ /dev/null @@ -1,31 +0,0 @@ -# Widget Options Constants - -There are several option types that can be specified in the widget options table, which are exposed to the user via the Widget Settings menu. - -
    TypeDescription
    COLORDisplays a color picker, returns a color flag value
    BOOLDisplays a toggle/checkbox, value toggles between 0 and 1
    STRINGText input option, limited to 8 characters
    TIMERChoice option, lets you pick from available timers
    SOURCEChoice option, lets you pick from available sources (i.e. sticks, switches, LS)
    VALUENumerical input option, can specify default, min and max value
    TEXT_SIZEChoice option, lets you pick from the available text sizes (i.e. small, large)
    ALIGNMENTChoice option, lets you pick from available alignment options (i.e. left, center, right)
    - -{% hint style="warning" %} -Maximum five `options` are allowed. -{% endhint %} - -{% hint style="warning" %} -Option variable name's lenght **must be 10 characters or less and no spaces.** -{% endhint %} - -## Example - -```lua --- Create a table with default options --- Options can be changed by the user from the Widget Settings menu --- Notice that each line is a table inside { } -local options = { - { "Source", SOURCE, 1 }, - -- BOOL is actually not a boolean, but toggles between 0 and 1 - { "Boolean", BOOL, 1 }, - { "Value", VALUE, 1, 0, 10}, - { "Color", COLOR, ORANGE }, - { "Text", STRING, "Max8chrs" } -} - -``` - diff --git a/lua-api-reference/display-lcd/README.md b/lua-api-reference/display-lcd/README.md deleted file mode 100644 index 7dcb769ba..000000000 --- a/lua-api-reference/display-lcd/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Lcd Functions - diff --git a/lua-api-reference/display-lcd/RGB.md b/lua-api-reference/display-lcd/RGB.md deleted file mode 100644 index 6df3b4343..000000000 --- a/lua-api-reference/display-lcd/RGB.md +++ /dev/null @@ -1,56 +0,0 @@ -# lcd.RGB - -Returns colorFlag in RGB565 format that can be used with lcd draw functions. - -### Syntax - -#### **lcd.RGB( r, g, b | rgb )** - -### Parameters - -
    NameReqTypeDescription
    rtrueintegernumber between 0 (0x00) and 255 (0xFF) that expresses te amount of red in the color
    gtrueinterernumber between (0x00) and 255 (0xFF) that expresses te amount of green in the color
    btrueintegernumber between (0x00) and 255 (0xFF)that expresses te amount of blue in the color
    - -or - -
    NameReqTypeDescription
    rgbtrueintegernumber between 0 (0x00) and 16777215 (0xFFFFFF) that expresses the RGB value (0xFF0000=RED, 0x00FF00=GREEN, 0x0000FF=BLUE)
    - -### Returns - -* `color_flag`. See [Drawing Flags](../../lua-api-programming/drawing-flags-and-colors.md) - -### Notes - -### Available on - -* [ ] [B\&W LCD radios](../../overview/radios/#radios-with-b-and-w-lcd-screen) -* [ ] [Grayscale LCD radios](../../overview/radios/#radios-with-grayscale-lcd-screen) -* [x] [Color LCD radios](../../overview/radios/#radios-with-color-lcd-screen) - -### API status - -
    EdgeTX versionAction
    2.3.0Introduced
    - -### Examples - -{% tabs %} -{% tab title="Example 1" %} -```lua --- RGB numeric parameters -local darkred = lcd.RGB(20,0,0) -- create color_flag for color -lcd.drawText(0,0,"Very dark red text", darkred) -``` -{% endtab %} - -{% tab title="Example 2" %} -```lua --- RGB hex parameter -local mygrey = lcd.RGB(0xAEAEAE) -- create color_flag for color -lcd.drawText(0,20,"My grey color", mygrey) -``` -{% endtab %} -{% endtabs %} - -### Related topics - -* [Drawing flag](../../lua-api-programming/drawing-flags-and-colors.md) -* [Color constants](../constants/color-constants.md) diff --git a/lua-api-reference/display-lcd/clear.md b/lua-api-reference/display-lcd/clear.md deleted file mode 100644 index cff63c717..000000000 --- a/lua-api-reference/display-lcd/clear.md +++ /dev/null @@ -1,55 +0,0 @@ -# lcd.clear - -Clears the LCD screen optionaly filling it with selected color - -### Syntax - -#### lcd.clear( \[color] ) - -### Parameters - -
    NameReqTypeDescription
    colorfalseinteger (colorFlag)see Drawing Flags
    - - - -### Returns - -none - -### Notes - -This function works only in stand-alone and telemetry & widget scripts. See [script types](../../overview/script-types/). - -### Available on - -* [x] [B\&W LCD radios](../../overview/radios/#radios-with-b-and-w-lcd-screen) -* [x] [Grayscale LCD radios](../../overview/radios/#radios-with-grayscale-lcd-screen) -* [x] [Color LCD radios](../../overview/radios/#radios-with-color-lcd-screen) - -### API status - -
    EdgeTX versionAction
    2.3.0Introduced
    - -### Examples - -{% tabs %} -{% tab title="Example 1" %} -```lua --- clearing lcd with system default color -lcd.clear() -``` -{% endtab %} - -{% tab title="Example 2" %} -```lua --- clearing lcd screen to dark red -local darkred = lcd.RGB(20,0,0) -- create color_flag for color -lcd.clear(darkred) -``` -{% endtab %} -{% endtabs %} - -### Related topics - -* [Drawing flag](../../lua-api-programming/drawing-flags-and-colors.md) -* [Color constants](../constants/color-constants.md) diff --git a/lua-api-reference/display-lcd/drawBitmap.md b/lua-api-reference/display-lcd/drawBitmap.md deleted file mode 100644 index da57c37b1..000000000 --- a/lua-api-reference/display-lcd/drawBitmap.md +++ /dev/null @@ -1,58 +0,0 @@ -# lcd.drawBitmap - -Displays prevoiusly loaded bitmap at (x,y) and optionally scales it. - -### Syntax - -#### lcd.drawBitmap( bitmap, x, y \[, scale] ) - -### Parameters - -
    NameReqTypeDescription
    bitmaptruebitmapPointerstored in variable pointer to a bitmap previously opened with Bitmap.open
    xtrueintegertop coordinate
    ytrueintegerleft coordinate
    scalefalseinteger (0-100)scale in percent ie. 50 divides size by two, 100 displays bitmap in original size, 200 doubles size.
    - -### Returns - -none - -### Notes - -{% hint style="info" %} -Omitting scale draws image in 1:1 scale and is faster than specifying 100 for scale parameter. -{% endhint %} - -### Available on - -* [ ] [B\&W LCD radios](../../overview/radios/#radios-with-b-and-w-lcd-screen) -* [ ] [Grayscale LCD radios](../../overview/radios/#radios-with-grayscale-lcd-screen) -* [x] [Color LCD radios](../../overview/radios/#radios-with-color-lcd-screen) - -### API status - -
    EdgeTX versionAction
    2.3.0Introduced
    - -### Examples - -{% tabs %} -{% tab title="Example 1" %} -```lua --- drawing bitmap stored on sd card root folder with original size -local myLogo = Bitmap.open("/logo.png") -lcd.drawBitmap(myLogo,10,10) -``` -{% endtab %} - -{% tab title="Example 2" %} -```lua --- drawing bitmap stored on sd card root folder doubling its size -local myLogo = Bitmap.open("/logo.png") -lcd.drawBitmap(myLogo,10,10,200) -``` -{% endtab %} -{% endtabs %} - -### Related topics - -* [Drawing flag](../../lua-api-programming/drawing-flags-and-colors.md) -* [Color constants](../constants/color-constants.md) -* [Bitmap.open](../bitmap/open.md) - diff --git a/lua-api-reference/display-lcd/drawChannel.md b/lua-api-reference/display-lcd/drawChannel.md deleted file mode 100644 index d0f779f44..000000000 --- a/lua-api-reference/display-lcd/drawChannel.md +++ /dev/null @@ -1,43 +0,0 @@ -# lcd.drawChannel - -Draws channel value defined in source variable at (x,y) - -### Syntax - -#### lcd.drawChannel(x, y, source \[, flags]) - -### Parameters - -
    NameReqTypeDescription
    xtrueintegertop coordinate
    ytrueintegerleft coordinate
    sourcetruesourceName (string), sourceListID (integer) can be a source identifier (number) or a source name (string). See getValue()
    flagsfalsedrawingFlag (integer)See Drawing Flags
    - -### Returns - -none - -### Notes - -### Available on - -* [x] [B\&W LCD radios](../../overview/radios/#radios-with-b-and-w-lcd-screen) -* [x] [Grayscale LCD radios](../../overview/radios/#radios-with-grayscale-lcd-screen) -* [x] [Color LCD radios](../../overview/radios/#radios-with-color-lcd-screen) - -### API status - -
    EdgeTX versionAction
    2.3.0Introduced
    - -### Examples - -{% tabs %} -{% tab title="Example 1" %} -```lua --- example -``` -{% endtab %} - -{% tab title="Example 2" %} -```lua --- example -``` -{% endtab %} -{% endtabs %} diff --git a/lua-api-reference/display-lcd/drawCombobox.md b/lua-api-reference/display-lcd/drawCombobox.md deleted file mode 100644 index 2c8814a50..000000000 --- a/lua-api-reference/display-lcd/drawCombobox.md +++ /dev/null @@ -1,36 +0,0 @@ - - -## lcd.drawCombobox(x, y, w, list, idx [, flags]) - - - -Draw a combo box - -@status current Introduced in 2.0.0 - - -#### Parameters - -* `x,y` (positive numbers) top left corner position - -* `w` (number) width of combo box in pixels - -* `list` (table) combo box elements, each element is a string - -* `idx` (integer) index of entry to highlight - -* `flags` (unsigned number) drawing flags, the flags can not be combined: - * `BLINK` combo box is expanded - * `INVERS` combo box collapsed, text inversed - * `0 or not present` combo box collapsed, text normal - - - -#### Return value - -none - -##### Notice -Only available on Taranis - - diff --git a/lua-api-reference/display-lcd/drawFilledRectangle.md b/lua-api-reference/display-lcd/drawFilledRectangle.md deleted file mode 100644 index 977bcdbf4..000000000 --- a/lua-api-reference/display-lcd/drawFilledRectangle.md +++ /dev/null @@ -1,27 +0,0 @@ - - -## lcd.drawFilledRectangle(x, y, w, h [, flags]) - - - -Draw a solid rectangle from top left corner (x,y) of specified width and height - -@status current Introduced in 2.0.0 - - -#### Parameters - -* `x,y` (positive numbers) top left corner position - -* `w` (number) width in pixels - -* `h` (number) height in pixels - -* `flags` (unsigned number) drawing flags - - - -#### Return value - -none - diff --git a/lua-api-reference/display-lcd/drawGauge.md b/lua-api-reference/display-lcd/drawGauge.md deleted file mode 100644 index 30c15eb5d..000000000 --- a/lua-api-reference/display-lcd/drawGauge.md +++ /dev/null @@ -1,31 +0,0 @@ - - -## lcd.drawGauge(x, y, w, h, fill, maxfill [, flags]) - - - -Draw a simple gauge that is filled based upon fill value - -@status current Introduced in 2.0.0, changed in 2.2.0 - - -#### Parameters - -* `x,y` (positive numbers) top left corner position - -* `w` (number) width in pixels - -* `h` (number) height in pixels - -* `fill` (number) amount of fill to apply - -* `maxfill` (number) total value of fill - -* `flags` (unsigned number) drawing flags - - - -#### Return value - -none - diff --git a/lua-api-reference/display-lcd/drawLine.md b/lua-api-reference/display-lcd/drawLine.md deleted file mode 100644 index 389f83d33..000000000 --- a/lua-api-reference/display-lcd/drawLine.md +++ /dev/null @@ -1,32 +0,0 @@ - - -## lcd.drawLine(x1, y1, x2, y2, pattern, flags) - - - -Draw a straight line on LCD - -@status current Introduced in 2.0.0, flags introduced in 2.3.6 - - -#### Parameters - -* `x1,y1` (positive numbers) starting coordinate - -* `x2,y2` (positive numbers) end coordinate - -* `pattern` SOLID or DOTTED - -* `flags` lcdflags - - - -#### Return value - -none - -##### Notice -If the start or the end of the line is outside the LCD dimensions, then the -whole line will not be drawn (starting from OpenTX 2.1.5) - - diff --git a/lua-api-reference/display-lcd/drawNumber.md b/lua-api-reference/display-lcd/drawNumber.md deleted file mode 100644 index 39e3a31cf..000000000 --- a/lua-api-reference/display-lcd/drawNumber.md +++ /dev/null @@ -1,20 +0,0 @@ -# lcd.drawNumber(x, y, value \[, flags]) - -Display a number at (x,y) - -@status current Introduced in 2.0.0, `SHADOWED` introduced in 2.2.1 - -### Parameters - -* `x,y` (positive numbers) starting coordinate -* `value` (number) value to display -* `flags` (unsigned number) drawing [flags](../constants/flags-and-pattern-constants.md): - * `0 or not specified` display with no decimal (like abs()) - * `PREC1` display with one decimal place (number 386 is displayed as 38.6) - * `PREC2` display with tow decimal places (number 386 is displayed as 3.86) - * other general LCD [flags](../constants/flags-and-pattern-constants.md) also apply\ - - -### Return value - -none diff --git a/lua-api-reference/display-lcd/drawPixmap.md b/lua-api-reference/display-lcd/drawPixmap.md deleted file mode 100644 index 93ee19e35..000000000 --- a/lua-api-reference/display-lcd/drawPixmap.md +++ /dev/null @@ -1,27 +0,0 @@ - - -## lcd.drawPixmap(x, y, name) - - - -Draw a bitmap at (x,y) - -@status current Introduced in 2.0.0 - - -#### Parameters - -* `x,y` (positive numbers) starting coordinates - -* `name` (string) full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) - - - -#### Return value - -none - -##### Notice -Maximum image size is [display width / 2] x [display height] pixels. - - diff --git a/lua-api-reference/display-lcd/drawPoint.md b/lua-api-reference/display-lcd/drawPoint.md deleted file mode 100644 index 2ca9d40e8..000000000 --- a/lua-api-reference/display-lcd/drawPoint.md +++ /dev/null @@ -1,31 +0,0 @@ - - -## lcd.drawPoint(x, y) - - - -Draw a single pixel at (x,y) position - -@status current Introduced in 2.0.0 - - -#### Parameters - -* `x` (positive number) x position - -* `y` (positive number) y position - -* `flags` (optional) lcdflags - - - -#### Return value - -none - -##### Notice -Taranis has an LCD display width of 212 pixels and height of 64 pixels. -Position (0,0) is at top left. Y axis is negative, top line is 0, -bottom line is 63. Drawing on an existing black pixel produces white pixel (TODO check this!) - - diff --git a/lua-api-reference/display-lcd/drawRectangle.md b/lua-api-reference/display-lcd/drawRectangle.md deleted file mode 100644 index cfe87402a..000000000 --- a/lua-api-reference/display-lcd/drawRectangle.md +++ /dev/null @@ -1,29 +0,0 @@ - - -## lcd.drawRectangle(x, y, w, h [, flags [, t]]) - - - -Draw a rectangle from top left corner (x,y) of specified width and height - -@status current Introduced in 2.0.0, changed in 2.2.0 - - -#### Parameters - -* `x,y` (positive numbers) top left corner position - -* `w` (number) width in pixels - -* `h` (number) height in pixels - -* `flags` (unsigned number) drawing flags - -* `t` (number) thickness in pixels, defaults to 1 (only on Horus) - - - -#### Return value - -none - diff --git a/lua-api-reference/display-lcd/drawScreenTitle.md b/lua-api-reference/display-lcd/drawScreenTitle.md deleted file mode 100644 index b54e39a8a..000000000 --- a/lua-api-reference/display-lcd/drawScreenTitle.md +++ /dev/null @@ -1,30 +0,0 @@ - - -## lcd.drawScreenTitle(title, page, pages) - - - -Draw a title bar - -@status current Introduced in 2.0.0 - - -#### Parameters - -* `title` (string) text for the title - -* `page` (number) page number - -* `pages` (number) total number of pages. Only used as indicator on -the right side of title bar. (i.e. idx=2, cnt=5, display `2/5`) - - - -#### Return value - -none - -##### Notice -Only available on Taranis - - diff --git a/lua-api-reference/display-lcd/drawSource.md b/lua-api-reference/display-lcd/drawSource.md deleted file mode 100644 index 6b5ad53d7..000000000 --- a/lua-api-reference/display-lcd/drawSource.md +++ /dev/null @@ -1,25 +0,0 @@ - - -## lcd.drawSource(x, y, source [, flags]) - - - -Displays the name of the corresponding input as defined by the source at (x,y) - -@status current Introduced in 2.0.0 - - -#### Parameters - -* `x,y` (positive numbers) starting coordinate - -* `source` (number) source index - -* `flags` (unsigned number) drawing flags - - - -#### Return value - -none - diff --git a/lua-api-reference/display-lcd/drawSwitch.md b/lua-api-reference/display-lcd/drawSwitch.md deleted file mode 100644 index 83582fac4..000000000 --- a/lua-api-reference/display-lcd/drawSwitch.md +++ /dev/null @@ -1,26 +0,0 @@ - - -## lcd.drawSwitch(x, y, switch, flags) - - - -Draw a text representation of switch at (x,y) - -@status current Introduced in 2.0.0 - - -#### Parameters - -* `x,y` (positive numbers) starting coordinate - -* `switch` (number) number of switch to display, negative number -displays negated switch - -* `flags` (unsigned number) drawing flags, only SMLSIZE, BLINK and INVERS. - - - -#### Return value - -none - diff --git a/lua-api-reference/display-lcd/drawText.md b/lua-api-reference/display-lcd/drawText.md deleted file mode 100644 index 22b7e3cc5..000000000 --- a/lua-api-reference/display-lcd/drawText.md +++ /dev/null @@ -1,23 +0,0 @@ -# lcd.drawText(x, y, text \[, flags]) - -Draw a text beginning at (x,y) - -@status current Introduced in 2.0.0, `SHADOWED` introduced in 2.2.1 - -### Parameters - -* `x,y` (positive numbers) starting coordinate -* `text` (string) text to display -* `flags` (unsigned number) drawing flags. All values can be combined together using the + character. ie BLINK + DBLSIZE. See the [Appendix](../../lua\_api\_reference/appendix/fonts.md) for available characters in each font set. -* `0 or not specified` normal font -* `XXLSIZE` jumbo sized font -* `DBLSIZE` double size font -* `MIDSIZE` mid sized font -* `SMLSIZE` small font -* `INVERS` inverted display -* `BLINK` blinking text -* `SHADOWED` Horus only, apply a shadow effect - -### Return value - -none diff --git a/lua-api-reference/display-lcd/drawTimer.md b/lua-api-reference/display-lcd/drawTimer.md deleted file mode 100644 index a416208b6..000000000 --- a/lua-api-reference/display-lcd/drawTimer.md +++ /dev/null @@ -1,29 +0,0 @@ - - -## lcd.drawTimer(x, y, value [, flags]) - - - -Display a value formatted as time at (x,y) - -@status current Introduced in 2.0.0, `SHADOWED` introduced in 2.2.1 - - -#### Parameters - -* `x,y` (positive numbers) starting coordinate - -* `value` (number) time in seconds - -* `flags` (unsigned number) drawing flags: - * `0 or not specified` normal representation (minutes and seconds) - * `TIMEHOUR` display hours - * other general LCD flag also apply - * `SHADOWED` Horus only, apply a shadow effect - - - -#### Return value - -none - diff --git a/lua-api-reference/display-lcd/drawannulus.md b/lua-api-reference/display-lcd/drawannulus.md deleted file mode 100644 index 2e50483fe..000000000 --- a/lua-api-reference/display-lcd/drawannulus.md +++ /dev/null @@ -1,17 +0,0 @@ -# lcd.drawAnnulus\(x, y, r1, r2, start, end \[, flags\]\) - -Draw an arc - -@status current Introduced in 2.4.0 - -## Parameters - -* `x,y` \(positive numbers\) coordinates of the center -* `r1,r2` \(positive numbers\) radii of the inside and outside of the annulus -* `start,end` \(positive numbers\) start and end of the annulus -* `flags` \(optional\) please see [flags](../constants/flags-and-pattern-constants.md) and [color](../constants/color-constants.md) constants - -## Return value - -none - diff --git a/lua-api-reference/display-lcd/drawarc.md b/lua-api-reference/display-lcd/drawarc.md deleted file mode 100644 index 95399131e..000000000 --- a/lua-api-reference/display-lcd/drawarc.md +++ /dev/null @@ -1,17 +0,0 @@ -# lcd.drawArc\(x, y, r, start, end \[, flags\]\) - -Draw an arc - -@status current Introduced in 2.4.0 - -## Parameters - -* `x,y` \(positive numbers\) coordinates of the center -* `r` \(positive number\) radius -* `start,end` \(positive numbers\) start and end of the arc -* `flags` \(optional\) please see [flags](../constants/flags-and-pattern-constants.md) and [color](../constants/color-constants.md) constants - -## Return value - -none - diff --git a/lua-api-reference/display-lcd/drawcircle.md b/lua-api-reference/display-lcd/drawcircle.md deleted file mode 100644 index ab24dc68e..000000000 --- a/lua-api-reference/display-lcd/drawcircle.md +++ /dev/null @@ -1,16 +0,0 @@ -# lcd.drawCircle\(x, y, r \[, flags\]\) - -Draw a circle at \(x, y\) of specified radius - -@status current Introduced in 2.4.0 - -## Parameters - -* `x,y` \(positive numbers\) center position -* `r` \(number\) radius in pixels -* `flags` \(optional\) please see [flags](../constants/flags-and-pattern-constants.md) and [color](../constants/color-constants.md) constants - -## Return value - -none - diff --git a/lua-api-reference/display-lcd/drawfilledcircle.md b/lua-api-reference/display-lcd/drawfilledcircle.md deleted file mode 100644 index 7eb094bab..000000000 --- a/lua-api-reference/display-lcd/drawfilledcircle.md +++ /dev/null @@ -1,16 +0,0 @@ -# lcd.drawFilledCircle\(x, y, r \[, flags\]\) - -Draw a filled circle at \(x, y\) of specified radius - -@status current Introduced in 2.4.0 - -## Parameters - -* `x,y` \(positive numbers\) center position -* `r` \(number\) radius in pixels -* `flags` \(optional\) please see [flags](../constants/flags-and-pattern-constants.md) and [color](../constants/color-constants.md) constants - -## Return value - -none - diff --git a/lua-api-reference/display-lcd/drawfilledtriangle.md b/lua-api-reference/display-lcd/drawfilledtriangle.md deleted file mode 100644 index 2fe02ed65..000000000 --- a/lua-api-reference/display-lcd/drawfilledtriangle.md +++ /dev/null @@ -1,15 +0,0 @@ -# lcd.drawFilledTriangle\(x1, y1, x2, y2, x3, y3 \[, flags\]\) - -Draw a filled triangle - -@status current Introduced in 2.4.0 - -## Parameters - -* `x1,y1,x2,y2,x3,y3` \(positive numbers\) coordinates of the three vertices -* `flags` \(optional\) please see [flags](../constants/flags-and-pattern-constants.md) and [color](../constants/color-constants.md) constants - -## Return value - -none - diff --git a/lua-api-reference/display-lcd/drawhudrectangle.md b/lua-api-reference/display-lcd/drawhudrectangle.md deleted file mode 100644 index 6b70599fb..000000000 --- a/lua-api-reference/display-lcd/drawhudrectangle.md +++ /dev/null @@ -1,16 +0,0 @@ -# lcd.drawHudRectangle\(pitch, roll, xmin, xmax, ymin, ymax \[, flags\]\) - -Draw a rectangle in perspective - -@status current Introduced in 2.4.0 - -## Parameters - -* `pitch,roll` \(positive numbers\) pitch and roll to define the orientation of the rectangle -* `xmin,xmax,ymin,ymax` \(positive numbers\) the limits of the rectangle -* `flags` \(optional\) please see [flags](../constants/flags-and-pattern-constants.md) and [color](../constants/color-constants.md) constants - -## Return value - -none - diff --git a/lua-api-reference/display-lcd/drawlinewithclipping.md b/lua-api-reference/display-lcd/drawlinewithclipping.md deleted file mode 100644 index 209b80c71..000000000 --- a/lua-api-reference/display-lcd/drawlinewithclipping.md +++ /dev/null @@ -1,17 +0,0 @@ -# lcd.drawLineWithClipping\(x1, y1, x2, y2, xmin, xmax, ymin, ymax, pattern \[, flags\]\) - -Draw a line only inside a rectangle - -@status current Introduced in 2.4.0 - -## Parameters - -* `x1,y1,x2,y1` \(positive numbers\) coordinates of the start and end of the unclipped line -* `xmin,xmax,ymin,ymax` \(positive numbers\) the limits of the rectangle inside which the line is drawn -* `pattern` \(FORCE, ERASE, DOTTED\) please see [Lcd functions overview](https://github.com/EdgeTX/lua-reference-guide/tree/2c4596e02006c8ac7d351fcd785fdfc7a93ce548/lua_api_reference/lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html) -* `flags` \(optional\) please see [flags](../constants/flags-and-pattern-constants.md) and [color](../constants/color-constants.md) constants - -## Return value - -none - diff --git a/lua-api-reference/display-lcd/drawpie.md b/lua-api-reference/display-lcd/drawpie.md deleted file mode 100644 index 2b29efb06..000000000 --- a/lua-api-reference/display-lcd/drawpie.md +++ /dev/null @@ -1,17 +0,0 @@ -# lcd.drawPie\(x, y, r, start, end \[, flags\]\) - -Draw a pie slice - -@status current Introduced in 2.4.0 - -## Parameters - -* `x,y` \(positive numbers\) coordinates of the center -* `r` \(positive number\) radius -* `start,end` \(positive numbers\) start and end of the pie slice -* `flags` \(optional\) please see [flags](../constants/flags-and-pattern-constants.md) and [color](../constants/color-constants.md) constants - -## Return value - -none - diff --git a/lua-api-reference/display-lcd/drawtriangle.md b/lua-api-reference/display-lcd/drawtriangle.md deleted file mode 100644 index 5f4b6e6e4..000000000 --- a/lua-api-reference/display-lcd/drawtriangle.md +++ /dev/null @@ -1,15 +0,0 @@ -# lcd.drawTriangle\(x1, y1, x2, y2, x3, y3 \[, flags\]\) - -Draw a triangle - -@status current Introduced in 2.4.0 - -## Parameters - -* `x1,y1,x2,y2,x3,y3` \(positive numbers\) coordinates of the three vertices -* `flags` \(optional\) please see [flags](../constants/flags-and-pattern-constants.md) and [color](../constants/color-constants.md) constants - -## Return value - -none - diff --git a/lua-api-reference/display-lcd/getColor.md b/lua-api-reference/display-lcd/getColor.md deleted file mode 100644 index 245dec4d6..000000000 --- a/lua-api-reference/display-lcd/getColor.md +++ /dev/null @@ -1,23 +0,0 @@ - - -## lcd.getColor(area) - - - -Get the color for specific area : see lcd.setColor for area list - -@status current Introduced in 2.3.11 - - -#### Parameters - -none - -#### Return value - -none - -##### Notice -Only available on Colorlcd radios - - diff --git a/lua-api-reference/display-lcd/getLastLeftPos.md b/lua-api-reference/display-lcd/getLastLeftPos.md deleted file mode 100644 index ca0180784..000000000 --- a/lua-api-reference/display-lcd/getLastLeftPos.md +++ /dev/null @@ -1,25 +0,0 @@ - - -## lcd.getLastLeftPos() - - - -Returns the leftmost x position from previous drawtext or drawNumber output - -@status current Introduced in 2.2.0 - - -#### Parameters - -none - -#### Return value - -* `number` (integer) x position - - - -##### Notice -Only available on Taranis - - diff --git a/lua-api-reference/display-lcd/getLastPos.md b/lua-api-reference/display-lcd/getLastPos.md deleted file mode 100644 index c816c8c08..000000000 --- a/lua-api-reference/display-lcd/getLastPos.md +++ /dev/null @@ -1,28 +0,0 @@ - - -## lcd.getLastPos() - - - -Returns the rightmost x position from previous output - -@status current Introduced in 2.0.0 - - -#### Parameters - -none - -#### Return value - -* `number` (integer) x position - - - -##### Notice -Only available on Taranis - - -For added clarity, it is recommended to use lcd.getLastRightPos() - - diff --git a/lua-api-reference/display-lcd/getLastRightPos.md b/lua-api-reference/display-lcd/getLastRightPos.md deleted file mode 100644 index 8394eddbb..000000000 --- a/lua-api-reference/display-lcd/getLastRightPos.md +++ /dev/null @@ -1,28 +0,0 @@ - - -## lcd.getLastRightPos() - - - -Returns the rightest x position from previous drawtext or drawNumber output - -@status current Introduced in 2.2.0 - - -#### Parameters - -none - -#### Return value - -* `number` (integer) x position - - - -##### Notice -Only available on Taranis - - -This is strictly equivalent to former lcd.getLastPos() - - diff --git a/lua-api-reference/display-lcd/grey.md b/lua-api-reference/display-lcd/grey.md deleted file mode 100644 index 936ac3f37..000000000 --- a/lua-api-reference/display-lcd/grey.md +++ /dev/null @@ -1,18 +0,0 @@ -# GREY\(\) - -Returns gray value which can be used in LCD functions - -@status current Introduced in 2.0.13 - -## Parameters - -none - -## Return value - -* `(number)` a value that represents amount of _greyness_ \(from 0 to 15\) - -### Notice - -Only available on Taranis - diff --git a/lua-api-reference/display-lcd/lcd-functions-overview.md b/lua-api-reference/display-lcd/lcd-functions-overview.md deleted file mode 100644 index b8e329d39..000000000 --- a/lua-api-reference/display-lcd/lcd-functions-overview.md +++ /dev/null @@ -1,57 +0,0 @@ -# Lcd Functions Overview - -##### Description - -Lcd functions allow scripts to interact with the transmitter display. This access is limited to the 'run' functions of One-Time and Telemetry scripts. Widget scripts on the Horus (X10 and X12S) can make use of the lcd functions as well. - -##### Notes: - -The run function is periodically called when the screen is visible. In OpenTX 2.0 each invocation starts with a blank screen (unless lcd.lock() is used). Under OpenTX 2.1 screen state is always persisted across calls to the run function. **Many scripts originally written for OpenTX 2.0 require a call to lcd.clear() at the beginning of their run function in order to display properly under 2.1 and 2.2.** - -Many of the lcd functions accept parameters named *flags* and *patterns*. The names and their meanings are described below. - -#### Flags Constants - -|Name|Description|Version|Notes| -|---|---|---|---| -|0|normal font, default precision for numeric||| -|DBLSIZE|double size font||| -|MIDSIZE|mid sized font||| -|SMLSIZE|small font||| -|INVERS|inverted display||| -|BLINK|blinking text||| -|XXLSIZE|jumbo font|2.0.6|| -|LEFT|left justify|2.0.6| Default for most functions not related to bitmaps| -|RIGHT|right justify||| -|PREC1|single decimal place||| -|PREC2|two decimal places||| -|GREY_DEFAULT|grey fill||| -|TIMEHOUR|dislay hours||Only for drawTimer| - -#### Patterns Constants - -|Name|Description| -|---|---| -|FORCE|pixels will be black| -|ERASE|pixels will be white| -|DOTTED|lines will appear dotted| - -#### Screen Constants - -|Name|Description| -|---|---| -|LCD_W|width in pixels| -|LCD_H|height in pixels| - -#### Screen Information - -| Radio | LCD_W | LCD_H | Colours | -| --- | --- | --- | --- | -| X7 | 128 | 64 | 1 bit | -| X9D | 212 | 64 | 4 bit | -| X9D+ | 212 | 64 | 4 bit | -| X9E | 212 | 64 | 4 bit | -| X10 | 480 | 272 | RGB565 | -| X12S | 480 | 272 | RGB565 | - - diff --git a/lua-api-reference/display-lcd/lcd.drawbitmappattern.md b/lua-api-reference/display-lcd/lcd.drawbitmappattern.md deleted file mode 100644 index 4521c37ce..000000000 --- a/lua-api-reference/display-lcd/lcd.drawbitmappattern.md +++ /dev/null @@ -1,19 +0,0 @@ -# lcd.drawBitmapPattern(bitmap, x, y \[, flags]) - -Displays a bitmap pattern at (x,y) - -@status current Introduced in 2.8.0 - -**Parameters** - -* `bitmap` (pointer) point to a bitmap previously opened with Bitmap.open() -* `x,y` (positive numbers) starting coordinates -* `flags` (optional) please see Lcd functions overview - -**Return value** - -none - -**Notice** - -Only available on Horus diff --git a/lua-api-reference/display-lcd/lcd.drawbitmappatternpie.md b/lua-api-reference/display-lcd/lcd.drawbitmappatternpie.md deleted file mode 100644 index ef9fcc396..000000000 --- a/lua-api-reference/display-lcd/lcd.drawbitmappatternpie.md +++ /dev/null @@ -1,21 +0,0 @@ -# lcd.drawBitmapPatternPie(bitmap, x, y, startAngle, endAngle \[, flags]) - -Displays a bitmap pattern pie at (x,y) - -@status current Introduced in 2.8.0 - -**Parameters** - -* `bitmap` (pointer) point to a bitmap previously opened with Bitmap.open() -* `x,y` (positive numbers) starting coordinates -* `startAngle` Start angle -* `endAngle` End angle -* `flags` (optional) please see Lcd functions overview - -**Return value** - -none - -**Notice** - -Only available on Horus diff --git a/lua-api-reference/display-lcd/lcd.drawtextlines.md b/lua-api-reference/display-lcd/lcd.drawtextlines.md deleted file mode 100644 index 7f5d13b8c..000000000 --- a/lua-api-reference/display-lcd/lcd.drawtextlines.md +++ /dev/null @@ -1,20 +0,0 @@ -# lcd.drawTextLines(x, y, w, h, text \[, flags]) - -Draw text inside rectangle (x,y,w,h) with line breaks - -@status current Introduced in 2.5.0 - -## Parameters - -* `x,y` (positive numbers) starting coordinate -* `w,h` (positive numbers) width and height of bounding rectangle -* `text` (string) text to display -* `flags` (optional) please see [Lcd functions overview](../../lua\_api\_reference/lcd/lcd\_functions-overview.html) for drawing flags and colors, and [Appendix](../../appendix/fonts.md) for available characters in each font set. RIGHT, CENTER and VCENTER are not implemented. - -## Return value - -none - -## Notes - -* Color radios only. diff --git a/lua-api-reference/display-lcd/lcd.exitfullscreen.md b/lua-api-reference/display-lcd/lcd.exitfullscreen.md deleted file mode 100644 index 0b4343f2d..000000000 --- a/lua-api-reference/display-lcd/lcd.exitfullscreen.md +++ /dev/null @@ -1,10 +0,0 @@ -# lcd.exitFullScreen\(\) - -Exit full screen widget mode. - -@status current Introduced in 2.5.0 - -### Notice - -Only available on radios with color display - diff --git a/lua-api-reference/display-lcd/lcd.invertrect.md b/lua-api-reference/display-lcd/lcd.invertrect.md deleted file mode 100644 index 3b0ee5ef5..000000000 --- a/lua-api-reference/display-lcd/lcd.invertrect.md +++ /dev/null @@ -1,16 +0,0 @@ -# lcd.invertRect(x, y, w, h \[, flags]) - -Invert a rectangle zone from top left corner (x,y) of specified width and height - -@status current Introduced in 2.8.0 - -**Parameters** - -* `x,y` (positive numbers) top left corner position -* `w` (number) width in pixels -* `h` (number) height in pixels -* `flags` (optional) please see Lcd functions overview - -**Return value** - -none diff --git a/lua-api-reference/display-lcd/popupconfirmation.md b/lua-api-reference/display-lcd/popupconfirmation.md deleted file mode 100644 index 9ab3ef8bb..000000000 --- a/lua-api-reference/display-lcd/popupconfirmation.md +++ /dev/null @@ -1,20 +0,0 @@ -# popupConfirmation\(title, message, event\) - -Raises a pop-up on screen that asks for confirmation - -@status current Introduced in 2.2.0, changed from \(title, event\) to \(title, message, event\) in 2.3.8 - -## Parameters - -* `title` \(string\) title to display -* `message` \(string\) text to display -* `event` \(number\) the event variable that is passed in from the Run function \(key pressed\) - -## Return value - -* `"CANCEL"` user pushed EXIT key - -### Notice - -Use only from stand-alone and telemetry scripts. - diff --git a/lua-api-reference/display-lcd/popupinput.md b/lua-api-reference/display-lcd/popupinput.md deleted file mode 100644 index f0de646be..000000000 --- a/lua-api-reference/display-lcd/popupinput.md +++ /dev/null @@ -1,24 +0,0 @@ -# popupInput\(title, event, input, min, max\) - -Raises a pop-up on screen that allows uses input - -@status current Introduced in 2.0.0 - -## Parameters - -* `title` \(string\) text to display -* `event` \(number\) the event variable that is passed in from the Run function \(key pressed\) -* `input` \(number\) value that can be adjusted by the +/­- keys -* `min` \(number\) min value that input can reach \(by pressing the -­ key\) -* `max` \(number\) max value that input can reach - -## Return value - -* `number` result of the input adjustment -* `"OK"` user pushed ENT key -* `"CANCEL"` user pushed EXIT key - -### Notice - -Use only from stand-alone and telemetry scripts. - diff --git a/lua-api-reference/display-lcd/popupwarning.md b/lua-api-reference/display-lcd/popupwarning.md deleted file mode 100644 index 8b8860248..000000000 --- a/lua-api-reference/display-lcd/popupwarning.md +++ /dev/null @@ -1,19 +0,0 @@ -# popupWarning\(title, event\) - -Raises a pop-up on screen that shows a warning - -@status current Introduced in 2.2.0 - -## Parameters - -* `title` \(string\) text to display -* `event` \(number\) the event variable that is passed in from the Run function \(key pressed\) - -## Return value - -* `"CANCEL"` user pushed EXIT key - -### Notice - -Use only from stand-alone and telemetry scripts. - diff --git a/lua-api-reference/display-lcd/refresh.md b/lua-api-reference/display-lcd/refresh.md deleted file mode 100644 index 11364125d..000000000 --- a/lua-api-reference/display-lcd/refresh.md +++ /dev/null @@ -1,23 +0,0 @@ - - -## lcd.refresh() - - - -Refresh the LCD screen - -@status current Introduced in 2.2.0 - - -#### Parameters - -none - -#### Return value - -none - -##### Notice -This function only works in stand-alone and telemetry scripts. - - diff --git a/lua-api-reference/display-lcd/resetBacklightTimeout.md b/lua-api-reference/display-lcd/resetBacklightTimeout.md deleted file mode 100644 index 391393c79..000000000 --- a/lua-api-reference/display-lcd/resetBacklightTimeout.md +++ /dev/null @@ -1,19 +0,0 @@ - - -## lcd.resetBacklightTimeout() - - - -Reset the backlight timeout - -@status current Introduced in 2.3.6 - - -#### Parameters - -none - -#### Return value - -none - diff --git a/lua-api-reference/display-lcd/setColor.md b/lua-api-reference/display-lcd/setColor.md deleted file mode 100644 index 4359303f6..000000000 --- a/lua-api-reference/display-lcd/setColor.md +++ /dev/null @@ -1,68 +0,0 @@ - - -## lcd.setColor(area, color) - - - -Set a color for specific area - -@status current Introduced in 2.2.0 - - -#### Parameters - -* `area` (unsigned number) specific screen area in the list bellow - * `CUSTOM_COLOR` - * `DEFAULT_COLOR` - * `DEFAULT_BGCOLOR` - * `FOCUS_COLOR` - * `FOCUS_BGCOLOR` - * `LINE_COLOR` - * `CHECKBOX_COLOR` - * `MENU_BGCOLOR` - * `MENU_COLOR` - * `MENU_TITLE_DISABLE_COLOR` - * `HEADER_COLOR` - * `ALARM_COLOR` - * `HIGHLIGHT_COLOR` - * `TEXT_DISABLE_COLOR` - * `HEADER_COLOR` - * `DISABLE_COLOR` - * `CURVE_CURSOR_COLOR` - * `TITLE_BGCOLOR` - * `TRIM_BGCOLOR` - * `TRIM_SHADOW_COLOR` - * `MAINVIEW_PANES_COLOR` - * `MAINVIEW_GRAPHICS_COLOR` - * `MENU_BGCOLOR` - * `HEADER_ICON_BGCOLOR` - * `HEADER_CURRENT_BGCOLOR` - * `MAINVIEW_PANES_COLOR` - * `MAINVIEW_GRAPHICS_COLOR` - * `OVERLAY_COLOR` - * `BARGRAPH1_COLOR` - * `BARGRAPH2_COLOR` - * `BARGRAPH_BGCOLOR` - * `CUSTOM_COLOR` - -* `color` (number) color in 5/6/5 rgb format. The following prefined colors are available - * `WHITE` - * `GREY` - * `LIGHTGREY` - * `DARKGREY` - * `BLACK` - * `YELLOW` - * `BLUE` - * `RED` - * `DARKRED` - - - -#### Return value - -none - -##### Notice -Only available on Colorlcd radios - - diff --git a/lua-api-reference/display-lcd/sizetext.md b/lua-api-reference/display-lcd/sizetext.md deleted file mode 100644 index 35937fc85..000000000 --- a/lua-api-reference/display-lcd/sizetext.md +++ /dev/null @@ -1,15 +0,0 @@ -# lcd.sizeText\(text \[, flags\]\) - -Get the width and height of a text string drawn with flags - -@status current Introduced in 2.5.0 - -## Parameters - -* `text` \(string\) -* `flags` \(optional\) please see [flags](../constants/flags-and-pattern-constants.md) and [color](../constants/color-constants.md) constants - -## Return value - -* `w,h` \(integers\) width and height of the text - diff --git a/lua-api-reference/filesystem/README.md b/lua-api-reference/filesystem/README.md deleted file mode 100644 index 7a2370799..000000000 --- a/lua-api-reference/filesystem/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Filesystem - diff --git a/lua-api-reference/filesystem/chdir.md b/lua-api-reference/filesystem/chdir.md deleted file mode 100644 index ecb58c5db..000000000 --- a/lua-api-reference/filesystem/chdir.md +++ /dev/null @@ -1,14 +0,0 @@ -# chdir\(directory\) - -Change the working directory - -@status current Introduced in 2.3.0 - -## Parameters - -* `directory` \(string\) New working directory - -## Return value - -none - diff --git a/lua-api-reference/filesystem/del.md b/lua-api-reference/filesystem/del.md deleted file mode 100644 index 2a021fc24..000000000 --- a/lua-api-reference/filesystem/del.md +++ /dev/null @@ -1,21 +0,0 @@ -# del(file or directory) - -@status current Introduced in 2.9.0 - -## Example - -```lua - if del("/SCRIPTS/TOOLS/deleteme.txt") == 0 then - -- successfully deleted file - else - -- failed to delete file - end -``` - -### Parameters - -Path to file or directory to be deleted - -### Return value - -Returns FRESULT (e.g. 0=OK, 4=File not found, 5=Path not found, 6=Path invalid) diff --git a/lua-api-reference/filesystem/dir.md b/lua-api-reference/filesystem/dir.md deleted file mode 100644 index 57c36e2d5..000000000 --- a/lua-api-reference/filesystem/dir.md +++ /dev/null @@ -1,24 +0,0 @@ -# dir\(directory\) - -Return an iterator listing all the files and directories name in a directory - -@status current Introduced in 2.5.0 - -**Parameters** - -* `directory` \(string\) Working directory - -**Return value** - -none - -#### Example - -```lua - local var y = 40 - for fname in dir("/SCRIPTS") do - lcd.drawText(5,y, fname, TEXT_COLOR) - y = y + 20 - end -``` - diff --git a/lua-api-reference/filesystem/fstat.md b/lua-api-reference/filesystem/fstat.md deleted file mode 100644 index 6ad5aa528..000000000 --- a/lua-api-reference/filesystem/fstat.md +++ /dev/null @@ -1,41 +0,0 @@ -# fstat\(path\) - -Checks the existence of file or directory. -If not exist, return nil. -If exist, return the object information. - -@status current Introduced in 2.5.0 - -**Parameters** - -* `path` \(string\) path to the object - -**Return value** - -* `table` object info, table elements: -* `size` \(number\) file size -* `attrib` \(number\) file attribute flags -* `time` \(table\) table with last time modified date and times, table elements: - * `year` \(number\) year - * `mon` \(number\) month - * `day` \(number\) day of month - * `hour` \(number\) hours - * `hour12` \(number\) hours in US format - * `min` \(number\) minutes - * `sec` \(number\) seconds - * `suffix` \(text\) am or pm - -#### Example - -```lua - info = fstat("radio") - if info ~= nil then - if (info.attrib == AM_DIR) then - print("is a directory") - end - - size = info.size - time = info.time - end -``` - diff --git a/lua-api-reference/gps/README.md b/lua-api-reference/gps/README.md deleted file mode 100644 index 577230547..000000000 --- a/lua-api-reference/gps/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# GPS - diff --git a/lua-api-reference/gps/gettxgps.md b/lua-api-reference/gps/gettxgps.md deleted file mode 100644 index 001fdae0a..000000000 --- a/lua-api-reference/gps/gettxgps.md +++ /dev/null @@ -1,22 +0,0 @@ -# getTxGPS\(\) - -Return the internal GPS position or nil if no valid hardware found - -@status current Introduced in 2.2.2 - -## Parameters - -none - -## Return value - -* `table` representing the current radio position - * `lat` \(number\) internal GPS latitude, positive is North - * `lon` \(number\) internal GPS longitude, positive is East - * 'numsat' \(number\) current number of sats locked in by the GPS sensor - * 'fix' \(boolean\) fix status - * 'alt' \(number\) internal GPS altitude in 0.1m - * 'speed' \(number\) internal GPSspeed in 0.1m/s - * 'heading' \(number\) internal GPS ground course estimation in degrees \* 10 - * 'hdop' \(number\) internal GPS horizontal dilution of precision - diff --git a/lua-api-reference/key-inputs/README.md b/lua-api-reference/key-inputs/README.md deleted file mode 100644 index e57d99adc..000000000 --- a/lua-api-reference/key-inputs/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Key Inputs - diff --git a/lua-api-reference/key-inputs/getrotencmode.md b/lua-api-reference/key-inputs/getrotencmode.md deleted file mode 100644 index d3bebe4f7..000000000 --- a/lua-api-reference/key-inputs/getrotencmode.md +++ /dev/null @@ -1,14 +0,0 @@ -# getRotEncMode() - -Return rotary encoder mode - -@status current Introduced in 2.8.0 - -**Parameters** - -none - -**Return value** - -* `number` in list: Normal = 0, Both V and H inverted = 1, V-N = 2, V-A = 3 -* `return 0` on radio without rotary encoder diff --git a/lua-api-reference/key-inputs/getrotencspeed.md b/lua-api-reference/key-inputs/getrotencspeed.md deleted file mode 100644 index 5638024b6..000000000 --- a/lua-api-reference/key-inputs/getrotencspeed.md +++ /dev/null @@ -1,14 +0,0 @@ -# getRotEncSpeed() - -Return rotary encoder current speed - -@status current Introduced in 2.3.10 - -## Parameters - -none - -## Return value - -* `number` in list: ROTENC\_LOWSPEED, ROTENC\_MIDSPEED, ROTENC\_HIGHSPEED -* `return 0` on radio without rotary encoder diff --git a/lua-api-reference/key-inputs/killevents.md b/lua-api-reference/key-inputs/killevents.md deleted file mode 100644 index dee03c43a..000000000 --- a/lua-api-reference/key-inputs/killevents.md +++ /dev/null @@ -1,14 +0,0 @@ -# killEvents\(key\) - -Stops key state machine. See [Key Events](https://github.com/EdgeTX/lua-reference-guide/tree/fe42fe461fcccd828fba5d218da01336e4f7b0cd/lua_api_reference/key_events.md) for the detailed description. - -@status current Introduced in 2.0.0 - -## Parameters - -* `key` \(number\) key to be killed, can also include event type \(only the key part is used\) - -## Return value - -none - diff --git a/lua-api-reference/lua-scripts/README.md b/lua-api-reference/lua-scripts/README.md deleted file mode 100644 index 5d57d5429..000000000 --- a/lua-api-reference/lua-scripts/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# LUA Scripts - diff --git a/lua-api-reference/lua-scripts/getavailablememory.md b/lua-api-reference/lua-scripts/getavailablememory.md deleted file mode 100644 index eabeda44a..000000000 --- a/lua-api-reference/lua-scripts/getavailablememory.md +++ /dev/null @@ -1,12 +0,0 @@ -# getAvailableMemory\(\) - -Get available memory remaining in the Heap for Lua. - -## Parameters - -none - -## Return value - -* `usage` \(number\) a value returned in b - diff --git a/lua-api-reference/lua-scripts/getusage.md b/lua-api-reference/lua-scripts/getusage.md deleted file mode 100644 index d7d7018ea..000000000 --- a/lua-api-reference/lua-scripts/getusage.md +++ /dev/null @@ -1,14 +0,0 @@ -# getUsage\(\) - -Get percent of already used Lua instructions in current script execution cycle. - -@status current Introduced in 2.2.1 - -## Parameters - -none - -## Return value - -* `usage` \(number\) a value from 0 to 100 \(percent\) - diff --git a/lua-api-reference/lua-scripts/loadscript.md b/lua-api-reference/lua-scripts/loadscript.md deleted file mode 100644 index c36f755c0..000000000 --- a/lua-api-reference/lua-scripts/loadscript.md +++ /dev/null @@ -1,49 +0,0 @@ -# loadScript\(file \[, mode\], \[,env\]\) - -Load a Lua script file. This is similar to Lua's own [loadfile\(\)](https://www.lua.org/manual/5.2/manual.html#pdf-loadfile) API method, but it uses OpenTx's optional pre-compilation feature to save memory and time during load. - -Return values are same as from Lua API loadfile\(\) method: If the script was loaded w/out errors then the loaded script \(or "chunk"\) is returned as a function. Otherwise, returns nil plus the error message. - -@status current Introduced in 2.2.0 - -## Example - -```lua - fun, err = loadScript("/SCRIPTS/FUNCTIONS/print.lua") - if (fun ~= nil) then - fun("Hello from loadScript()") - else - print(err) - end -``` - -### Parameters - -* `file` \(string\) Full path and file name of script. The file extension is optional and ignored \(see `mode` param to control which extension will be used\). However, if an extension is specified, it should be ".lua" \(or ".luac"\), otherwise it is treated as part of the file name and the .lua/.luac will be appended to that. -* `mode` \(string\) \(optional\) Controls whether to force loading the text \(.lua\) or pre-compiled binary \(.luac\) version of the script. By default OTx will load the newest version and compile a new binary if necessary \(overwriting any existing .luac version of the same script, and stripping some debug info like line numbers\). You can use `mode` to control the loading behavior more specifically. Possible values are: - * `b` only binary. - * `t` only text. - * `T` \(default on simulator\) prefer text but load binary if that is the only version available. - * `bt` \(default on radio\) either binary or text, whichever is newer \(binary preferred when timestamps are equal\). - * Add `x` to avoid automatic compilation of source file to .luac version. - - Eg: "tx", "bx", or "btx". - - * Add `c` to force compilation of source file to .luac version \(even if existing version is newer than source file\). - - Eg: "tc" or "btc" \(forces "t", overrides "x"\). - - * Add `d` to keep extra debug info in the compiled binary. - - Eg: "td", "btd", or "tcd" \(no effect with just "b" or with "x"\). -* `env` \(integer\) See documentation for Lua function loadfile\(\). - -### Return value - -* `function` The loaded script, or `nil` if there was an error \(e.g. file not found or syntax error\). -* `string` Error message\(s\), if any. Blank if no error occurred. - -#### Notice - -Note that you will get an error if you specify `mode` as "b" or "t" and that specific version of the file does not exist \(eg. no .luac file when "b" is used\). Also note that `mode` is NOT passed on to Lua's loader function, so unlike with loadfile\(\) the actual file content is not checked \(as if no mode or "bt" were passed to loadfile\(\)\). - diff --git a/lua-api-reference/model/README.md b/lua-api-reference/model/README.md deleted file mode 100644 index d92fe826b..000000000 --- a/lua-api-reference/model/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Model Functions - diff --git a/lua-api-reference/model/defaultinputs.md b/lua-api-reference/model/defaultinputs.md deleted file mode 100644 index 60266ecc9..000000000 --- a/lua-api-reference/model/defaultinputs.md +++ /dev/null @@ -1,31 +0,0 @@ -# model.defaultInputs - -Set all currently selected Inputs to defaults - -## Syntax - -model.defaultInputs() - -## Parameters - -none - -## Return values - -none - -## API Status - -
    AvailStatusComment
    BW radiostrueactive
    Color radiostrueactive
    - -## Change log - -
    EdgeTX versionChange
    2.4.0Introduced
    - -## Examples - -Resetting models Inputs - -```lua --- sample script -``` diff --git a/lua-api-reference/model/deleteflightmodes.md b/lua-api-reference/model/deleteflightmodes.md deleted file mode 100644 index 3ebbd1107..000000000 --- a/lua-api-reference/model/deleteflightmodes.md +++ /dev/null @@ -1,31 +0,0 @@ -# model.deleteFlightModes - -Clears all Flight Modes - -## Syntax - -model.deleteFlightModes() - -## Parameters - -none - -## Return values - -none - -## API Status - -
    AvailStatusComment
    BW radiostrueactive
    Color radiostrueactive
    - -## Change log - -
    EdgeTX versionChange
    2.4.0Introduced
    - -## Examples - -Example description - -```lua --- sample script -``` diff --git a/lua-api-reference/model/deleteinput.md b/lua-api-reference/model/deleteinput.md deleted file mode 100644 index 8f74b50de..000000000 --- a/lua-api-reference/model/deleteinput.md +++ /dev/null @@ -1,31 +0,0 @@ -# model.deleteInput - -Delete line from specified Input of curently selected model. - -## Syntax - -model.deleteFlightModes( inputID, lineID ) - -## Parameters - -
    NameTypeReqDescription
    inputIDnumbertrueinput ID number. Zero based. Use 0 for Input 1, 7 for Input 8 etc.
    lineIDnumbertrueline ID number. Zero based. Use 0 for line 1, 1 for line 2 etc.
    - -## Return values - -none - -## API Status - -
    AvailStatusComment
    BW radiostrueactive
    Color radiostrueactive
    - -## Change log - -
    EdgeTX versionChange
    2.4.0Introduced
    - -## Examples - -Example description - -```lua --- sample script -``` diff --git a/lua-api-reference/model/deleteinputs.md b/lua-api-reference/model/deleteinputs.md deleted file mode 100644 index 7be6be166..000000000 --- a/lua-api-reference/model/deleteinputs.md +++ /dev/null @@ -1,31 +0,0 @@ -# model.deleteInputs - -Delete all Inputs in current selected model - -## Syntax - -model.deleteInputs() - -## Parameters - -none - -## Return values - -none - -## API Status - -
    AvailStatusComment
    BW radiostrueactive
    Color radiostrueactive
    - -## Change log - -
    EdgeTX versionChange
    2.4.0Introduced
    - -## Examples - -Example description - -```lua --- sample script -``` diff --git a/lua-api-reference/model/deletemix.md b/lua-api-reference/model/deletemix.md deleted file mode 100644 index cb2a0d142..000000000 --- a/lua-api-reference/model/deletemix.md +++ /dev/null @@ -1,33 +0,0 @@ -# model.deleteMix - -Delete line from specified Mixes channel - - - -## Syntax - -model.deleteFlightModes( chID, lineID ) - -## Parameters - -
    NameTypeReqDescription
    chIDnumbertruechannel ID number. Zero based. Use 0 for Mix channel 1, 7 for Mix channel 8 etc.
    lineIDnumbertrueline ID number. Zero based. Use 0 for line 1, 1 for line 2 etc.
    - -## Return values - -none - -## API Status - -
    AvailStatusComment
    BW radiostrueactive
    Color radiostrueactive
    - -## Change log - -
    EdgeTX versionChange
    2.4.0Introduced
    - -## Examples - -Example description - -```lua --- sample script -``` diff --git a/lua-api-reference/model/deletemixes.md b/lua-api-reference/model/deletemixes.md deleted file mode 100644 index 3ab6c889f..000000000 --- a/lua-api-reference/model/deletemixes.md +++ /dev/null @@ -1,31 +0,0 @@ -# model.deleteMixes - -Removes all mixers - -## Syntax - -model.deleteMixes() - -## Parameters - -none - -## Return values - -none - -## API Status - -
    AvailStatusComment
    BW radiostrueactive
    Color radiostrueactive
    - -## Change log - -
    EdgeTX versionChange
    2.4.0Introduced
    - -## Examples - -Example description - -```lua --- sample script -``` diff --git a/lua-api-reference/model/getcurve.md b/lua-api-reference/model/getcurve.md deleted file mode 100644 index e5c6fac8e..000000000 --- a/lua-api-reference/model/getcurve.md +++ /dev/null @@ -1,34 +0,0 @@ -# model.getCurve - -Deletes line from specified Input of curently selected model. - -## Syntax - -model.getCurve( curveID ) - -## Parameters - -
    NameTypeReqDescription
    curveIDnumbertrueCurve ID number. Normal Lua index.
    Use 1 for curve 1, 8 for Input 8 etc.
    - -## Return values - -* `nil` requested curve does not exist -* `table` containing model information with following fields: - -
    FieldTypeDecription
    namestringCurve name
    typenumberCurve type ID number
    0 - ???
    1 - ???
    2 - ???
    smoothbooleantrue if curve is smoothed, otherwise false
    pointsnumbernumber of curve's points
    ytabletable of points y coordinates values
    table key (number, zero based) - point number
    table value (signed number) - point's y coordonate value
    xtabletable of points x coordinates values
    table key (number, zero based) - point number
    table value (signed number) - point's x coordonate value
    - -## API Status - -
    AvailStatusComment
    BW radiostrue
    Color radiostrue
    - -## Change log - -
    EdgeTX versionChange
    2.4.0Introduced
    2.9.0 changed curveID index from zero based to normal LUA (starts from 1)
    - -## Examples - -Example description - -```lua --- sample script -``` diff --git a/lua-api-reference/model/getcustomfunction.md b/lua-api-reference/model/getcustomfunction.md deleted file mode 100644 index e6bda79b3..000000000 --- a/lua-api-reference/model/getcustomfunction.md +++ /dev/null @@ -1,22 +0,0 @@ -# model.getCustomFunction\(function\) - -Get Custom Function parameters - -@status current Introduced in 2.0.0, TODO rename function - -## Parameters - -* `function` \(unsigned number\) custom function number \(use 0 for CF1\) - -## Return value - -* `nil` requested custom function does not exist -* `table` custom function data: - * `switch` \(number\) switch index - * `func` \(number\) function index - * `name` \(string\) Name of track to play \(only returned only returned if action is play track, sound or script\) - * `value` \(number\) value \(only returned only returned if action is **not** play track, sound or script\) - * `mode` \(number\) mode \(only returned only returned if action is **not** play track, sound or script\) - * `param` \(number\) parameter \(only returned only returned if action is **not** play track, sound or script\) - * `active` \(number\) 0 = disabled, 1 = enabled - diff --git a/lua-api-reference/model/getflightmode.md b/lua-api-reference/model/getflightmode.md deleted file mode 100644 index b8c77c014..000000000 --- a/lua-api-reference/model/getflightmode.md +++ /dev/null @@ -1,25 +0,0 @@ -# model.getFlightMode\(index\) - -Return input data for given input and line number - -@status current Introduced in 2.3.10 - -## Parameters - -* `index` \(unsigned number\) flight mode number \(use 0 for FM0\) - -## Return value - -* `nil` requested input or line does not exist -* `table` input data: - * `name` \(string\) input line name - * `switch` \(number\) input switch index - * `fadeIn` \(number\) fade in value \(in 0.1s\) - * `fadeOut` \(number\) fade out value \(in 0.1s\) - * `trimsValues` \(table\) table of trim values: - * `key` is trim number \(zero based\) - * `value` is trim value - * `trimsModes` \(table\) table of trim mode: - * `key` is trim number \(zero based\) - * `value` is trim mode - diff --git a/lua-api-reference/model/getglobalvariable.md b/lua-api-reference/model/getglobalvariable.md deleted file mode 100644 index 5f77a525c..000000000 --- a/lua-api-reference/model/getglobalvariable.md +++ /dev/null @@ -1,25 +0,0 @@ -# model.getGlobalVariable\(index, flight\_mode\) - -Return current global variable value - -Example: - -```lua - -- get GV3 (index = 2) from Flight mode 0 (FM0) - val = model.getGlobalVariable(2, 0) -``` - -## Parameters - -* `index` zero based global variable index, use 0 for GV1, 8 for GV9 -* `flight_mode` Flight mode number \(0 = FM0, 8 = FM8\) - -## Return value - -* `nil` requested global variable does not exist -* `number` current value of global variable - -### Notice - -a simple warning or notice - diff --git a/lua-api-reference/model/getinfo.md b/lua-api-reference/model/getinfo.md deleted file mode 100644 index 310f3c975..000000000 --- a/lua-api-reference/model/getinfo.md +++ /dev/null @@ -1,76 +0,0 @@ -# model.getInfo - -Gets currently selected Model's information - -## Syntax - -model.getInfo() - -## Parameters - -none - -## Return values - -`table` containing model information with following fields: - -
    FieldTypeDecription
    namestringModel's name set.
    filenamestringName of <???>
    bitmapstringName of model's picture file located on SD Card in /IMAGES/ folder
    extendedLimitsbooleantrue if extended limits are enabled otherwise false
    jitterFilternumbermodel level ADC filter
    - -{% hint style="warning" %} -**bitmap** field is not available on BW radios -{% endhint %} - -## API Status - -
    AvailStatusComment
    BW radiostrueactive
    Color radiostrueactive
    - -## Change log - -
    EdgeTX versionChange
    2.4.0Introduced
    2.6.0added filename to return value table.
    2.8.0added extendedLimits , jitterFilter, labels to return value table.
    - -## Examples - -Displaying model's name - -```lua -local modelInfo -- declare variable available to all functions - -local function my_init() { - modelInfo = model.getInfo() -- read model's info table -} - -local function my_run(event) { - lcd.clear() - lcd.drawText(0, 0, modelInfo.name) -- display model's name - return 0 -} - -return { run = my_run, init = my_init } -``` - -Displaying model's all information - -```lua -local modelInfo -- declare variable available to all functions -local lineHeight = 8 -- for color radios change to 16 - -local function my_init() { - modelInfo = model.getInfo() -- read model's info table -} - -local function my_run(event) { - lcd.clear() - local y = 0 - for fieldName, fieldValue in pairs(modelInfo) do - lcd.drawText( 0, y, fieldName .. ": " .. tostring(fieldValue) ) -- display model's name - y = y + lineHeight - end - return 0 -} - -return { run = my_run, init = my_init } -``` - -[^1]: Name of what? - -[^2]: What values are allowed? diff --git a/lua-api-reference/model/getinput.md b/lua-api-reference/model/getinput.md deleted file mode 100644 index 48b6070fa..000000000 --- a/lua-api-reference/model/getinput.md +++ /dev/null @@ -1,26 +0,0 @@ -# model.getInput\(input, line\) - -Return input data for given input and line number - -@status current Introduced in 2.0.0, curveType/curveValue/carryTrim added in 2.3, inputName added 2.3.10, flighmode reworked in 2.3.11 - -## Parameters - -* `input` \(unsigned number\) input number \(use 0 for Input1\) -* `line` \(unsigned number\) input line \(use 0 for first line\) - -## Return value - -* `nil` requested input or line does not exist -* `table` input data: - * `name` \(string\) input line name - * `inputName` \(string\) input input name - * `source` \(number\) input source index - * `weight` \(number\) input weight - * `offset` \(number\) input offset - * `switch` \(number\) input switch index - * `curveType` \(number\) curve type \(function, expo, custom curve\) - * `curveValue` \(number\) curve index - * `carryTrim` \(boolean\) input trims applied - * 'flightModes' \(number\) bit-mask of active flight modes - diff --git a/lua-api-reference/model/getinputscount.md b/lua-api-reference/model/getinputscount.md deleted file mode 100644 index 0b693e427..000000000 --- a/lua-api-reference/model/getinputscount.md +++ /dev/null @@ -1,14 +0,0 @@ -# model.getInputsCount\(input\) - -Return number of lines for given input - -@status current Introduced in 2.0.0 - -## Parameters - -* `input` \(unsigned number\) input number \(use 0 for Input1\) - -## Return value - -* `number` number of configured lines for given input - diff --git a/lua-api-reference/model/getlogicalswitch.md b/lua-api-reference/model/getlogicalswitch.md deleted file mode 100644 index 00f8928ce..000000000 --- a/lua-api-reference/model/getlogicalswitch.md +++ /dev/null @@ -1,21 +0,0 @@ -# model.getLogicalSwitch(switch) - -Get Logical Switch parameters - -@status current Introduced in 2.0.0 - -## Parameters - -* `switch` (unsigned number) logical switch number (use 0 for LS1) - -## Return value - -* `nil` requested logical switch does not exist -* `table` logical switch data: - * `func` (number) function index, see [Logical Switch Function Constants](../constants/logical-switch-function-constants.md). - * `v1` (number) V1 value (index) - * `v2` (number) V2 value (index or value) - * `v3` (number) V3 value (index or value) - * `and` (number) AND switch index - * `delay` (number) delay (time in 1/10 s) - * `duration` (number) duration (time in 1/10 s) diff --git a/lua-api-reference/model/getmix.md b/lua-api-reference/model/getmix.md deleted file mode 100644 index 7a774e9cd..000000000 --- a/lua-api-reference/model/getmix.md +++ /dev/null @@ -1,31 +0,0 @@ -# model.getMix\(channel, line\) - -Get configuration for specified Mix - -@status current Introduced in 2.0.0, parameters below `multiplex` added in 2.0.13 - -## Parameters - -* `channel` \(unsigned number\) channel number \(use 0 for CH1\) -* `line` \(unsigned number\) mix number \(use 0 for first line\(mix\)\) - -## Return value - -* `nil` requested channel or line does not exist -* `table` mix data: - * `name` \(string\) mix line name - * `source` \(number\) source index - * `weight` \(number\) weight \(1024 == 100%\) value or GVAR1..9 = 4096..4011, -GVAR1..9 = 4095..4087 - * `offset` \(number\) offset value or GVAR1..9 = 4096..4011, -GVAR1..9 = 4095..4087 - * `switch` \(number\) switch index - * `multiplex` \(number\) multiplex \(0 = ADD, 1 = MULTIPLY, 2 = REPLACE\) - * `curveType` \(number\) curve type \(function, expo, custom curve\) - * `curveValue` \(number\) curve index - * `flightModes` \(number\) bit-mask of active flight modes - * `carryTrim` \(boolean\) carry trim - * `mixWarn` \(number\) warning \(0 = off, 1 = 1 beep, .. 3 = 3 beeps\) - * `delayUp` \(number\) delay up \(time in 1/10 s\) - * `delayDown` \(number\) delay down - * `speedUp` \(number\) speed up - * `speedDown` \(number\) speed down - diff --git a/lua-api-reference/model/getmixescount.md b/lua-api-reference/model/getmixescount.md deleted file mode 100644 index 9a894652f..000000000 --- a/lua-api-reference/model/getmixescount.md +++ /dev/null @@ -1,14 +0,0 @@ -# model.getMixesCount\(channel\) - -Get the number of Mixer lines that the specified Channel has - -@status current Introduced in 2.0.0 - -## Parameters - -* `channel` \(unsigned number\) channel number \(use 0 for CH1\) - -## Return value - -* `number` number of mixes for requested channel - diff --git a/lua-api-reference/model/getmodule.md b/lua-api-reference/model/getmodule.md deleted file mode 100644 index df8290060..000000000 --- a/lua-api-reference/model/getmodule.md +++ /dev/null @@ -1,49 +0,0 @@ -# model.getModule\(index\) - -Get RF module parameters - -`Type` values: - -* 0 NONE -* 1 PPM -* 2 XJT\_PXX1 -* 3 ISRM\_PXX2 -* 4 DSM2 -* 5 CROSSFIRE -* 6 MULTIMODULE -* 7 R9M\_PXX1 -* 8 R9M\_PXX2 -* 9 R9M\_LITE\_PXX1 -* 10 R9M\_LITE\_PXX2 -* 11 R9M\_LITE\_PRO\_PXX1 -* 12 R9M\_LITE\_PRO\_PXX2 -* 13 SBUS -* 14 XJT\_LITE\_PXX2 - -`subType` values for XJT\_PXX1: - -* -1 OFF -* 0 D16 -* 1 D8 -* 2 LR12 - -@status current Introduced in 2.2.0 - -## Parameters - -* `index` \(number\) module index \(0 for internal, 1 for external\) - -## Return value - -* `nil` requested module does not exist -* `table` module parameters: - * `subType` \(number\) protocol index - * `modelId` \(number\) receiver number - * `firstChannel` \(number\) start channel \(0 is CH1\) - * `channelsCount` \(number\) number of channels sent to module - * `Type` \(number\) module type - * if the module type is Multi additional information are available - * `protocol` \(number\) protocol number \(Multi only\) - * `subProtocol` \(number\) sub-protocol number \(Multi only\) - * `channelsOrder` \(number\) first 4 channels expected order \(Multi only\) - diff --git a/lua-api-reference/model/getoutput.md b/lua-api-reference/model/getoutput.md deleted file mode 100644 index 72a4c9a8b..000000000 --- a/lua-api-reference/model/getoutput.md +++ /dev/null @@ -1,25 +0,0 @@ -# model.getOutput\(index\) - -Get servo parameters - -@status current Introduced in 2.0.0 - -## Parameters - -* `index` \(unsigned number\) output number \(use 0 for CH1\) - -## Return value - -* `nil` requested output does not exist -* `table` output parameters: - * `name` \(string\) name - * `min` \(number\) Minimum % \* 10 - * `max` \(number\) Maximum % \* 10 - * `offset` \(number\) Subtrim \* 10 - * `ppmCenter` \(number\) offset from PPM Center. 0 = 1500 - * `symetrical` \(number\) linear Subtrim 0 = Off, 1 = On - * `revert` \(number\) irection 0 = ­­­---, 1 = INV - * `curve` - * \(number\) Curve number \(0 for Curve1\) - * or `nil` if no curve set - diff --git a/lua-api-reference/model/getsensor.md b/lua-api-reference/model/getsensor.md deleted file mode 100644 index fd883b21e..000000000 --- a/lua-api-reference/model/getsensor.md +++ /dev/null @@ -1,22 +0,0 @@ -# model.getSensor\(sensor\) - -Get Telemetry Sensor parameters - -@status current Introduced in 2.3.0 - -## Parameters - -* `sensor` \(unsigned number\) sensor number \(use 0 for sensor 1\) - -## Return value - -* `nil` requested sensor does not exist -* `table` with sensor data: - * `type` \(number\) 0 = custom, 1 = calculated - * `name` \(string\) Name - * `unit` \(number\) See list of units in the appendix of the OpenTX Lua Reference Guide - * `prec` \(number\) Number of decimals - * `id` \(number\) Only custom sensors - * `instance` \(number\) Only custom sensors - * `formula` \(number\) Only calculated sensors. 0 = Add etc. see list of formula choices in Companion popup - diff --git a/lua-api-reference/model/gettimer.md b/lua-api-reference/model/gettimer.md deleted file mode 100644 index 58cf40299..000000000 --- a/lua-api-reference/model/gettimer.md +++ /dev/null @@ -1,22 +0,0 @@ -# model.getTimer\(timer\) - -Get model timer parameters - -@status current Introduced in 2.0.0, name added in 2.3.6 - -## Parameters - -* `timer` \(number\) timer index \(0 for Timer 1\) - -## Return value - -* `nil` requested timer does not exist -* `table` timer parameters: - * `mode` \(number\) timer trigger source: off, abs, stk, stk%, sw/!sw, !m\_sw/!m\_sw - * `start` \(number\) start value \[seconds\], 0 for up timer, 0> down timer - * `value` \(number\) current value \[seconds\] - * `countdownBeep` \(number\) countdown beep \(0­ = silent, 1 =­ beeps, 2­ = voice\) - * `minuteBeep` \(boolean\) minute beep - * `persistent` \(number\) persistent timer - * `name` \(string\) timer name - diff --git a/lua-api-reference/model/insertinput.md b/lua-api-reference/model/insertinput.md deleted file mode 100644 index 0f39d66ea..000000000 --- a/lua-api-reference/model/insertinput.md +++ /dev/null @@ -1,16 +0,0 @@ -# model.insertInput\(input, line, value\) - -Insert an Input at specified line - -@status current Introduced in 2.0.0, curveType/curveValue/carryTrim added in 2.3, inputName added 2.3.10 - -## Parameters - -* `input` \(unsigned number\) input number \(use 0 for Input1\) -* `line` \(unsigned number\) input line \(use 0 for first line\) -* `value` \(table\) input data, see model.getInput\(\) - -## Return value - -none - diff --git a/lua-api-reference/model/insertmix.md b/lua-api-reference/model/insertmix.md deleted file mode 100644 index c9871f641..000000000 --- a/lua-api-reference/model/insertmix.md +++ /dev/null @@ -1,16 +0,0 @@ -# model.insertMix\(channel, line, value\) - -Insert a mixer line into Channel - -@status current Introduced in 2.0.0, parameters below `multiplex` added in 2.0.13 - -## Parameters - -* `channel` \(unsigned number\) channel number \(use 0 for CH1\) -* `line` \(unsigned number\) mix number \(use 0 for first line\(mix\)\) -* `value` \(table\) see model.getMix\(\) for table format - -## Return value - -none - diff --git a/lua-api-reference/model/model.getswashring.md b/lua-api-reference/model/model.getswashring.md deleted file mode 100644 index ecaeed4cb..000000000 --- a/lua-api-reference/model/model.getswashring.md +++ /dev/null @@ -1,21 +0,0 @@ -# model.getSwashRing() - -Get heli swash parameters - -@status current Introduced in 2.8.0 - -**Parameters** - -none - -**Return value** - -* `table` with heli swash parameters: -* `type` (number) 0=---, 1=120, 2=120X, 3=140, 4=90 -* `value` (number) swash ring value (normally 0) -* 'collectiveSource' (number) source index -* 'aileronSource' (number) source index -* 'elevatorSource' (number) source index -* 'collectiveWeight'(value) -100 to 100 -* 'aileronWeight' (value) -100 to 100 -* 'elevatorWeight' (value) -100 to 100 diff --git a/lua-api-reference/model/model.setswashring-params.md b/lua-api-reference/model/model.setswashring-params.md deleted file mode 100644 index 7d807055d..000000000 --- a/lua-api-reference/model/model.setswashring-params.md +++ /dev/null @@ -1,17 +0,0 @@ -# model.setSwashRing(params) - -Set heli swash parameters - -@status current Introduced in 2.8.0 - -**Parameters** - -* `value` (table) swash ring parameters, see [model.getSwashRing()](model.getswashring.md) for table format - -**Return value** - -none - -**Notice** - -If a parameter is missing, then that parameter remains unchanged. diff --git a/lua-api-reference/model/resetsensor.md b/lua-api-reference/model/resetsensor.md deleted file mode 100644 index 599d033ea..000000000 --- a/lua-api-reference/model/resetsensor.md +++ /dev/null @@ -1,14 +0,0 @@ -# model.resetSensor\(sensor\) - -Reset Telemetry Sensor parameters - -@status current Introduced in 2.3.11 - -## Parameters - -* `sensor` \(unsigned number\) sensor number \(use 0 for sensor 1\) - -## Return value - -* `nil` - diff --git a/lua-api-reference/model/resettimer.md b/lua-api-reference/model/resettimer.md deleted file mode 100644 index c2d7c30b9..000000000 --- a/lua-api-reference/model/resettimer.md +++ /dev/null @@ -1,14 +0,0 @@ -# model.resetTimer\(timer\) - -Reset model timer to a startup value - -@status current Introduced in TODO - -## Parameters - -* `timer` \(number\) timer index \(0 for Timer 1\) - -## Return value - -none - diff --git a/lua-api-reference/model/setcurve.md b/lua-api-reference/model/setcurve.md deleted file mode 100644 index c6b0eec0d..000000000 --- a/lua-api-reference/model/setcurve.md +++ /dev/null @@ -1,44 +0,0 @@ -# model.setCurve(curve, params) - -Set Curve parameters - -The first and last x value must -100 and 100 and x values must be monotonically increasing - -@status current Introduced in 2.2.0 - -Example setting a 4-point custom curve: - -```lua - params = {} - params["x"] = {-100, -34, 77, 100} - params["y"] = {-70, 20, -89, -100} - params["smooth"] = true - params["type"] = 1 - val = model.setCurve(2, params) -``` - -setting a 6-point standard smoothed curve - -```lua - val = model.setCurve(3, {smooth=true, y={-100, -50, 0, 50, 100, 80}}) -``` - -## Parameters - -* `curve` (unsigned number) curve number (use 0 for Curve1) -* `params` see [model.getCurve](getcurve.md) return format for table format. setCurve uses standard lua array indexing and arrays start at index 1 - -## Return value - -* \`\` 0 - Everything okay - - ``` - 1 - Wrong number of points - 2 - Invalid Curve number - 3 - Cuve does not fit anymore - 4 - point of out of index - 5 - x value not monotonically increasing - 6 - y value not in range [-100;100] - 7 - extra values for y are set - 8 - extra values for x are set - ``` diff --git a/lua-api-reference/model/setcustomfunction.md b/lua-api-reference/model/setcustomfunction.md deleted file mode 100644 index d763b0223..000000000 --- a/lua-api-reference/model/setcustomfunction.md +++ /dev/null @@ -1,18 +0,0 @@ -# model.setCustomFunction(function, value) - -Set Custom Function parameters - -@status current Introduced in 2.0.0, TODO rename function - -## Parameters - -* `function` (unsigned number) custom function number, see [Special Function Constants](../constants/special-function-constants.md). -* `value` (table) custom function parameters, see [model.getCustomFunction()](getcustomfunction.md) for table format - -## Return value - -none - -### Notice - -If a parameter is missing from the value, then that parameter remains unchanged. diff --git a/lua-api-reference/model/setflightmode.md b/lua-api-reference/model/setflightmode.md deleted file mode 100644 index 4f745f615..000000000 --- a/lua-api-reference/model/setflightmode.md +++ /dev/null @@ -1,14 +0,0 @@ -# model.setFlightMode(index, params) - -Set Flight mode parameters - -@status current Introduced in 2.3.10 - -## Parameters - -* `index` (unsigned number) flight mode number (use 0 for FM0) -* `params` see [model.getFlightMode()](getflightmode.md) return format for table format. - -## Return value - -none diff --git a/lua-api-reference/model/setglobalvariable.md b/lua-api-reference/model/setglobalvariable.md deleted file mode 100644 index 9062b67e0..000000000 --- a/lua-api-reference/model/setglobalvariable.md +++ /dev/null @@ -1,17 +0,0 @@ -# model.setGlobalVariable(index, flight\_mode, value) - -Sets current global variable value. See also [model.getGlobalVariable()](getglobalvariable.md) - -## Parameters - -* `index` zero based global variable index, use 0 for GV1, 8 for GV9 -* `flight_mode` Flight mode number (0 = FM0, 8 = FM8) -* `value` new value for global variable. Permitted range is from -1024 to 1024. - -## Return value - -none - -### Notice - -Global variable can only store integer values, any floating point value is converted into integer value by truncating everything behind a floating point. diff --git a/lua-api-reference/model/setinfo.md b/lua-api-reference/model/setinfo.md deleted file mode 100644 index 401214c09..000000000 --- a/lua-api-reference/model/setinfo.md +++ /dev/null @@ -1,17 +0,0 @@ -# model.setInfo(value) - -Set the current Model information - -@status current Introduced in 2.0.6, changed in TODO - -## Parameters - -* `value` model information data, see [model.getInfo()](getinfo.md) - -## Return value - -none - -### Notice - -If a parameter is missing from the value, then that parameter remains unchanged. diff --git a/lua-api-reference/model/setlogicalswitch.md b/lua-api-reference/model/setlogicalswitch.md deleted file mode 100644 index 86c13754b..000000000 --- a/lua-api-reference/model/setlogicalswitch.md +++ /dev/null @@ -1,20 +0,0 @@ -# model.setLogicalSwitch(switch, value) - -Set Logical Switch parameters - -@status current Introduced in 2.0.0 - -## Parameters - -* `switch` (unsigned number) logical switch number (use 0 for LS1) -* `value` (table) see [model.getLogicalSwitch()](getlogicalswitch.md) for table format - -## Return value - -none - -### Notice - -If a parameter is missing from the value, then that parameter remains unchanged. - -To set the `and` member (which is Lua keyword) use the following syntax: `model.setLogicalSwitch(30, {func=4,v1=1,v2=-99, ["and"]=24})` diff --git a/lua-api-reference/model/setmodule.md b/lua-api-reference/model/setmodule.md deleted file mode 100644 index fa9f5beab..000000000 --- a/lua-api-reference/model/setmodule.md +++ /dev/null @@ -1,18 +0,0 @@ -# model.setModule(index, value) - -Set RF module parameters - -@status current Introduced in 2.2.0, modified in 2.3.12 (proto/subproto) - -## Parameters - -* `index` (number) module index (0 for internal, 1 for external) -* `value` module parameters, see [model.getModule()](getmodule.md) - -## Return value - -none - -### Notice - -If a parameter is missing from the value, then that parameter remains unchanged. diff --git a/lua-api-reference/model/setoutput.md b/lua-api-reference/model/setoutput.md deleted file mode 100644 index 6aa18f126..000000000 --- a/lua-api-reference/model/setoutput.md +++ /dev/null @@ -1,18 +0,0 @@ -# model.setOutput(index, value) - -Set servo parameters - -@status current Introduced in 2.0.0 - -## Parameters - -* `index` (unsigned number) channel number (use 0 for CH1) -* `value` (table) servo parameters, see [model.getOutput()](getoutput.md) for table format - -## Return value - -none - -### Notice - -If a parameter is missing from the value, then that parameter remains unchanged. diff --git a/lua-api-reference/model/settimer.md b/lua-api-reference/model/settimer.md deleted file mode 100644 index 66eeabe28..000000000 --- a/lua-api-reference/model/settimer.md +++ /dev/null @@ -1,18 +0,0 @@ -# model.setTimer(timer, value) - -Set model timer parameters - -@status current Introduced in 2.0.0, name added in 2.3.6 - -## Parameters - -* `timer` (number) timer index (0 for Timer 1) -* `value` timer parameters, see [model.getTimer()](gettimer.md) - -## Return value - -none - -### Notice - -If a parameter is missing from the value, then that parameter remains unchanged. diff --git a/lua-api-reference/rf-module/README.md b/lua-api-reference/rf-module/README.md deleted file mode 100644 index a33fcc7f5..000000000 --- a/lua-api-reference/rf-module/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# RF module - diff --git a/lua-api-reference/rf-module/accesstelemetrypush.md b/lua-api-reference/rf-module/accesstelemetrypush.md deleted file mode 100644 index bf180de75..000000000 --- a/lua-api-reference/rf-module/accesstelemetrypush.md +++ /dev/null @@ -1,21 +0,0 @@ -# accessTelemetryPush\(\) - -This functions allows for sending SPORT / ACCESS telemetry data toward the receiver, and more generally, to anything connected SPORT bus on the receiver or transmitter. - -When called without parameters, it will only return the status of the output buffer without sending anything. - -@status current Introduced in 2.3 - -## Parameters - -* `module` module index \(0 = internal, 1 = external\) -* `rxUid` receiver index -* `sensorId` physical sensor ID -* `frameId` frame ID -* `dataId` data ID -* `value` value - -## Return value - -* `boolean` data queued in output buffer or not. - diff --git a/lua-api-reference/rf-module/crossfiretelemetrypop.md b/lua-api-reference/rf-module/crossfiretelemetrypop.md deleted file mode 100644 index 75e7b25eb..000000000 --- a/lua-api-reference/rf-module/crossfiretelemetrypop.md +++ /dev/null @@ -1,17 +0,0 @@ -# crossfireTelemetryPop\(\) - -Pops a received Crossfire Telemetry packet from the queue. - -@status current Introduced in 2.2.0 - -## Parameters - -none - -## Return value - -* `nil` queue does not contain any \(or enough\) bytes to form a whole packet -* `multiple` returns 2 values: - * command \(number\) - * packet \(table\) data bytes - diff --git a/lua-api-reference/rf-module/crossfiretelemetrypush.md b/lua-api-reference/rf-module/crossfiretelemetrypush.md deleted file mode 100644 index ad1c146a7..000000000 --- a/lua-api-reference/rf-module/crossfiretelemetrypush.md +++ /dev/null @@ -1,18 +0,0 @@ -# crossfireTelemetryPush\(\) - -This functions allows for sending telemetry data toward the TBS Crossfire link. - -When called without parameters, it will only return the status of the output buffer without sending anything. - -@status current Introduced in 2.2.0, retval nil added in 2.3.4 - -## Parameters - -* `command` command -* `data` table of data bytes - -## Return value - -* `boolean` data queued in output buffer or not. -* `nil` incorrect telemetry protocol. - diff --git a/lua-api-reference/rf-module/getras.md b/lua-api-reference/rf-module/getras.md deleted file mode 100644 index 1745a36fd..000000000 --- a/lua-api-reference/rf-module/getras.md +++ /dev/null @@ -1,2 +0,0 @@ -# getRAS() - diff --git a/lua-api-reference/rf-module/ghosttelemetrypop.md b/lua-api-reference/rf-module/ghosttelemetrypop.md deleted file mode 100644 index ee64aef86..000000000 --- a/lua-api-reference/rf-module/ghosttelemetrypop.md +++ /dev/null @@ -1,16 +0,0 @@ -# ghostTelemetryPop() - -Pops a received Ghost Telemetry packet from the queue. - -@status current Introduced in 2.7.0 - -**Parameters** - -none - -**Return value** - -* `nil` queue does not contain any (or enough) bytes to form a whole packet -* `multiple` returns 2 values: -* type (number) -* packet (table) data bytes diff --git a/lua-api-reference/rf-module/ghosttelemetrypush.md b/lua-api-reference/rf-module/ghosttelemetrypush.md deleted file mode 100644 index 56fcbcec9..000000000 --- a/lua-api-reference/rf-module/ghosttelemetrypush.md +++ /dev/null @@ -1,17 +0,0 @@ -# ghostTelemetryPush() - -This functions allows for sending telemetry data toward the Ghost link. - -When called without parameters, it will only return the status of the output buffer without sending anything. - -@status current Introduced in 2.7.0 - -**Parameters** - -* `command` command -* `data` table of data bytes - -**Return value** - -* `boolean` data queued in output buffer or not. -* `nil` incorrect telemetry protocol. diff --git a/lua-api-reference/rf-module/multibuffer-address-value.md b/lua-api-reference/rf-module/multibuffer-address-value.md deleted file mode 100644 index 5be4c020e..000000000 --- a/lua-api-reference/rf-module/multibuffer-address-value.md +++ /dev/null @@ -1,2 +0,0 @@ -# multiBuffer(address\[,value]) - diff --git a/lua-api-reference/rf-module/multibuffer.md b/lua-api-reference/rf-module/multibuffer.md deleted file mode 100644 index 6f911ebd3..000000000 --- a/lua-api-reference/rf-module/multibuffer.md +++ /dev/null @@ -1,16 +0,0 @@ -# multiBuffer\(address\[,value\]\) - -This function reads/writes the Multi protocol buffer to interact with a protocol². - -@status current Introduced in 2.3.2 - -## Parameters - -* `address` to read/write in the buffer - - @param \(optional\): value to write in the buffer - -## Return value - -* `buffer` value \(number\) - diff --git a/lua-api-reference/rf-module/sporttelemetrypop.md b/lua-api-reference/rf-module/sporttelemetrypop.md deleted file mode 100644 index a112e66cb..000000000 --- a/lua-api-reference/rf-module/sporttelemetrypop.md +++ /dev/null @@ -1,19 +0,0 @@ -# sportTelemetryPop\(\) - -Pops a received SPORT packet from the queue. Please note that only packets using a data ID within 0x5000 to 0x50FF \(frame ID == 0x10\), as well as packets with a frame ID equal 0x32 \(regardless of the data ID\) will be passed to the LUA telemetry receive queue. - -@status current Introduced in 2.2.0 - -## Parameters - -none - -## Return value - -* `nil` queue does not contain any \(or enough\) bytes to form a whole packet -* `multiple` returns 4 values: - * sensor ID \(number\) - * frame ID \(number\) - * data ID \(number\) - * value \(number\) - diff --git a/lua-api-reference/rf-module/sporttelemetrypush.md b/lua-api-reference/rf-module/sporttelemetrypush.md deleted file mode 100644 index 07c718a17..000000000 --- a/lua-api-reference/rf-module/sporttelemetrypush.md +++ /dev/null @@ -1,20 +0,0 @@ -# sportTelemetryPush\(\) - -This functions allows for sending SPORT telemetry data toward the receiver, and more generally, to anything connected SPORT bus on the receiver or transmitter. - -When called without parameters, it will only return the status of the output buffer without sending anything. - -@status current Introduced in 2.2.0, retval nil added in 2.3.4 - -## Parameters - -* `sensorId` physical sensor ID -* `frameId` frame ID -* `dataId` data ID -* `value` value - -## Return value - -* `boolean` data queued in output buffer or not. -* `nil` incorrect telemetry protocol. - diff --git a/lua-api-reference/serial-ports/README.md b/lua-api-reference/serial-ports/README.md deleted file mode 100644 index 3f94014f5..000000000 --- a/lua-api-reference/serial-ports/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Serial Ports - diff --git a/lua-api-reference/serial-ports/serialgetpower.md b/lua-api-reference/serial-ports/serialgetpower.md deleted file mode 100644 index 8745856c2..000000000 --- a/lua-api-reference/serial-ports/serialgetpower.md +++ /dev/null @@ -1,14 +0,0 @@ -# serialGetPower(port\_nr) - -@status current Introduced in 2.9.0 - -### Parameters - -* `port_nr:` valid values are only 0 and 1 on radios that have SWSERIALPOWER defined - * 0 - first serial port, e.g. on TX16S AUX1 - * 1 - second serial port, e.g. on TX16S AUX2 - -### Return value - -* `value:` true for power enabled, false for power disabled. -* `nil` serial port power control not available diff --git a/lua-api-reference/serial-ports/serialread.md b/lua-api-reference/serial-ports/serialread.md deleted file mode 100644 index 49b30da95..000000000 --- a/lua-api-reference/serial-ports/serialread.md +++ /dev/null @@ -1,16 +0,0 @@ -# serialRead\(\[num\]\) - -@param num \(optional\): maximum number of bytes to read. If non-zero, serialRead will read up to num characters from the buffer. If 0 or left out, serialRead will read up to and including the first newline character or the end of the buffer. Note that the returned string may not end in a newline if this character is not present in the buffer. - -Reads characters from the serial port. The string is allowed to contain any character, including 0. - -@status current Introduced in 2.3.8 - -## Parameters - -none - -## Return value - -* `str` string. Empty if no new characters were available. - diff --git a/lua-api-reference/serial-ports/serialsetpower.md b/lua-api-reference/serial-ports/serialsetpower.md deleted file mode 100644 index 6af712a3d..000000000 --- a/lua-api-reference/serial-ports/serialsetpower.md +++ /dev/null @@ -1,16 +0,0 @@ -# serialSetPower(port\_nr, value) - -@status current Introduced in 2.9.0 - -### Parameters - -* `port_nr:` valid values are only 0 and 1 on radios that have SWSERIALPOWER defined - * 0 - first serial port, e.g. on TX16S AUX1 - * 1 - second serial port, e.g. on TX16S AUX2 -* `value:` - * 0 - disable power - * 1 - enable power - -### Return value - -* `success:` true/false diff --git a/lua-api-reference/serial-ports/serialwrite.md b/lua-api-reference/serial-ports/serialwrite.md deleted file mode 100644 index 134105022..000000000 --- a/lua-api-reference/serial-ports/serialwrite.md +++ /dev/null @@ -1,16 +0,0 @@ -# serialWrite\(str\) - -@param str \(string\) String to be written to the serial port. - -Writes a string to the serial port. The string is allowed to contain any character, including 0. - -@status current Introduced in 2.3.10 - -## Parameters - -none - -## Return value - -none - diff --git a/lua-api-reference/serial-ports/setserialbaudrate.md b/lua-api-reference/serial-ports/setserialbaudrate.md deleted file mode 100644 index 4f0835542..000000000 --- a/lua-api-reference/serial-ports/setserialbaudrate.md +++ /dev/null @@ -1,14 +0,0 @@ -# setSerialBaudrate\(baudrate\) - -Set baudrate for serial port\(s\) affected to LUA - -@status current Introduced in 2.3.12 - -## Parameters - -`baudrate` Desired baudrate - -## Return value - -none - diff --git a/lua-api-reference/system/README.md b/lua-api-reference/system/README.md deleted file mode 100644 index 036fa78f9..000000000 --- a/lua-api-reference/system/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# System - diff --git a/lua-api-reference/system/defaultchannel.md b/lua-api-reference/system/defaultchannel.md deleted file mode 100644 index 8b0668905..000000000 --- a/lua-api-reference/system/defaultchannel.md +++ /dev/null @@ -1,15 +0,0 @@ -# defaultChannel\(stick\) - -Get channel assigned to stick. See Default Channel Order in General Settings - -@status current Introduced in 2.0.0 - -## Parameters - -* `stick` \(number\) stick number \(from 0 to 3\) - -## Return value - -* `number` channel assigned to this stick \(from 0 to 3\) -* `nil` stick not found - diff --git a/lua-api-reference/system/defaultstick.md b/lua-api-reference/system/defaultstick.md deleted file mode 100644 index 8a81314b9..000000000 --- a/lua-api-reference/system/defaultstick.md +++ /dev/null @@ -1,14 +0,0 @@ -# defaultStick\(channel\) - -Get stick that is assigned to a channel. See Default Channel Order in General Settings. - -@status current Introduced in 2.0.0 - -## Parameters - -* `channel` \(number\) channel number \(0 means CH1\) - -## Return value - -* `number` Stick assigned to this channel \(from 0 to 3\) - diff --git a/lua-api-reference/system/getgeneralsettings.md b/lua-api-reference/system/getgeneralsettings.md deleted file mode 100644 index 9a00e30b3..000000000 --- a/lua-api-reference/system/getgeneralsettings.md +++ /dev/null @@ -1,24 +0,0 @@ -# getGeneralSettings\(\) - -Returns \(some of\) the general radio settings - -@status current Introduced in 2.0.6, `imperial` added in TODO, `language` and `voice` added in 2.2.0, gtimer added in 2.2.2. - -## Parameters - -none - -## Return value - -* `table` with elements: - * `battWarn` \(number\) radio battery range - warning value - * `battMin` \(number\) radio battery range - minimum value - * `battMax` \(number\) radio battery range - maximum value - * `imperial` \(number\) set to a value different from 0 if the radio is set to the - - IMPERIAL units - - * `language` \(string\) radio language \(used for menus\) - * `voice` \(string\) voice language \(used for speech\) - * `gtimer` \(number\) radio global timer in seconds \(does not include current session\) - diff --git a/lua-api-reference/system/getversion.md b/lua-api-reference/system/getversion.md deleted file mode 100644 index f4ad0d1c9..000000000 --- a/lua-api-reference/system/getversion.md +++ /dev/null @@ -1,57 +0,0 @@ -# getVersion\(\) - -Return OpenTX version - -@status current Introduced in 2.0.0, expanded in 2.1.7, radio type strings changed in 2.2.0, os name added in EdgeTX 2.4.0 - -## Example - -This example also runs in OpenTX versions where the function returned only one value: - -```lua -local function run(event) - local ver, radio, maj, minor, rev, osname = getVersion() - print("version: "..ver) - if radio then print ("radio: "..radio) end - if maj then print ("maj: "..maj) end - if minor then print ("minor: "..minor) end - if rev then print ("rev: "..rev) end - if osname then print ("osname: "..osname) end - return 1 -end - -return { run=run } -``` - -Output of the above script in simulator: - -```text -version: 2.4.0 -radio: tx16s-simu -maj: 2 -minor: 4 -rev: 0 -osname: EdgeTX -``` - -### Parameters - -none - -### Return value - -* `string` OpenTX version \(ie "2.1.5"\) -* `multiple` values \(available since 2.1.7\): - * \(string\) OpenTX version \(ie "2.1.5"\) - * \(string\) radio type: `x12s`, `x10`, `x9e`, `x9d+`, `x9d` or `x7`. - - If running in simulator the "-simu" is added - - * \(number\) major version \(ie 2 if version 2.1.5\) - * \(number\) minor version \(ie 1 if version 2.1.5\) - * \(number\) revision number \(ie 5 if version 2.1.5\) - - Since EdgeTX 2.4.0, sixth value added - - * \(string\) OS name \(i.e. EdgeTX or nil if OpenTX\) - diff --git a/lua-api-reference/telemetry/README.md b/lua-api-reference/telemetry/README.md deleted file mode 100644 index 1a5e6d0a2..000000000 --- a/lua-api-reference/telemetry/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Telemetry - diff --git a/lua-api-reference/telemetry/getrssi.md b/lua-api-reference/telemetry/getrssi.md deleted file mode 100644 index e6febf3ab..000000000 --- a/lua-api-reference/telemetry/getrssi.md +++ /dev/null @@ -1,2 +0,0 @@ -# getRSSI() - diff --git a/lua-api-reference/telemetry/settelemetryvalue.md b/lua-api-reference/telemetry/settelemetryvalue.md deleted file mode 100644 index 36c99f27e..000000000 --- a/lua-api-reference/telemetry/settelemetryvalue.md +++ /dev/null @@ -1,25 +0,0 @@ -# setTelemetryValue(id, subID, instance, value \[, unit \[, precision \[, name]]]) - -@status current Introduced in 2.2.0 - -## Parameters - -* `id` Id of the sensor, valid range is from 0 to 0xFFFF -* `subID` subID of the sensor, usually 0, valid range is from 0 to 7 -* `instance` instance of the sensor (SensorID), valid range is from 0 to 0xFF -* `value` fed to the sensor -* `unit` unit of the sensor [Full list](https://luadoc.edgetx.org/appendix/units.html) -* `precision` 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` (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 value - -* `true,` if the sensor was just added. In this case the value is ignored (subsequent call will set the value) - -### Notice - -All three parameters `id`, `subID` and `instance` can't be zero at the same time. At least one of them must be different from zero. diff --git a/lua-api-reference/time/README.md b/lua-api-reference/time/README.md deleted file mode 100644 index 4fabcd9b4..000000000 --- a/lua-api-reference/time/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Time - diff --git a/lua-api-reference/time/getdatetime.md b/lua-api-reference/time/getdatetime.md deleted file mode 100644 index 65be5d530..000000000 --- a/lua-api-reference/time/getdatetime.md +++ /dev/null @@ -1,20 +0,0 @@ -# getDateTime\(\) - -Return current system date and time that is kept by the RTC unit - -## Parameters - -none - -## Return value - -* `table` current date and time, table elements: - * `year` \(number\) year - * `mon` \(number\) month - * `day` \(number\) day of month - * `hour` \(number\) hours - * `hour12` \(number\) hours in US format - * `min` \(number\) minutes - * `sec` \(number\) seconds - * `suffix` \(text\) am or pm - diff --git a/lua-api-reference/time/getglobaltimer.md b/lua-api-reference/time/getglobaltimer.md deleted file mode 100644 index 13f810dae..000000000 --- a/lua-api-reference/time/getglobaltimer.md +++ /dev/null @@ -1,18 +0,0 @@ -# getGlobalTimer\(\) - -Returns radio timers - -@status current Introduced added in 2.3.0. - -## Parameters - -none - -## Return value - -* `table` with elements: -* `gtimer` \(number\) radio global timer in seconds -* `session` \(number\) radio session in seconds -* `ttimer` \(number\) radio throttle timer in seconds -* `tptimer` \(number\) radio throttle percent timer in seconds - diff --git a/lua-api-reference/time/getrtctime.md b/lua-api-reference/time/getrtctime.md deleted file mode 100644 index dc0f24e7d..000000000 --- a/lua-api-reference/time/getrtctime.md +++ /dev/null @@ -1,14 +0,0 @@ -# getRtcTime\(\) - -Return current RTC system date as unix timstamp \(in seconds since 1. Jan 1970\) - -Please note the RTC timestamp is kept internally as a 32bit integer, which will overflow in 2038. - -## Parameters - -none - -## Return value - -* `number` Number of seconds elapsed since 1. Jan 1970 - diff --git a/lua-api-reference/time/gettime.md b/lua-api-reference/time/gettime.md deleted file mode 100644 index ea7c33af9..000000000 --- a/lua-api-reference/time/gettime.md +++ /dev/null @@ -1,2 +0,0 @@ -# getTime() - diff --git a/lua-api-reference/time/resetglobaltimer.md b/lua-api-reference/time/resetglobaltimer.md deleted file mode 100644 index ebc6802fc..000000000 --- a/lua-api-reference/time/resetglobaltimer.md +++ /dev/null @@ -1,20 +0,0 @@ -# resetGlobalTimer\(\[type\]\) - -Resets the radio global timer to 0. - -@status current Introduced in 2.2.2, param added in 2.3 - -## Parameters - -* `(optional)` : if set to 'all', throttle ,throttle percent and session timers are reset too - - ```text - if set to 'session', radio session timer is reset too - if set to 'ttimer', radio throttle timer is reset too - if set to 'tptimer', radio throttle percent timer is reset too - ``` - -## Return value - -none - diff --git a/lua-api-reference/variables/README.md b/lua-api-reference/variables/README.md deleted file mode 100644 index 5df2cd1bd..000000000 --- a/lua-api-reference/variables/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Variables - diff --git a/lua-api-reference/variables/getfieldinfo.md b/lua-api-reference/variables/getfieldinfo.md deleted file mode 100644 index fdff705e1..000000000 --- a/lua-api-reference/variables/getfieldinfo.md +++ /dev/null @@ -1,27 +0,0 @@ -# getFieldInfo(source) - -Return detailed information about field (source) - -The list of valid sources is available: - -| OpenTX Version | Radio | -| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| 2.0 | [all](http://downloads-20.open-tx.org/firmware/lua\_fields.txt) | -| 2.1 | [X9D and X9D+](http://downloads-21.open-tx.org/firmware/lua\_fields\_taranis.txt), [X9E](http://downloads-21.open-tx.org/firmware/lua\_fields\_taranis\_x9e.txt) | -| 2.2 | [X9D and X9D+](http://downloads.open-tx.org/2.2/release/firmware/lua\_fields\_x9d.txt), [X9E](http://downloads.open-tx.org/2.2/release/firmware/lua\_fields\_x9e.txt), [Horus](http://downloads.open-tx.org/2.2/release/firmware/lua\_fields\_x12s.txt) | -| 2.3 | [X9D and X9D+](http://downloads.open-tx.org/2.3/release/firmware/lua\_fields\_x9d.txt), [X9E](http://downloads.open-tx.org/2.3/release/firmware/lua\_fields\_x9e.txt), [X7](http://downloads.open-tx.org/2.3/release/firmware/lua\_fields\_x7.txt), [Horus](http://downloads.open-tx.org/2.3/release/firmware/lua\_fields\_x12s.txt) | - -@status current Introduced in 2.0.8, 'unit' field added in 2.2.0 - -## Parameters - -* `source` can be an identifier (number) or a name (string) of the source. - -## Return value - -* `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.md) -* `nil` the requested field was not found diff --git a/lua-api-reference/variables/getflightmode.md b/lua-api-reference/variables/getflightmode.md deleted file mode 100644 index 3f64688fa..000000000 --- a/lua-api-reference/variables/getflightmode.md +++ /dev/null @@ -1,18 +0,0 @@ -# getFlightMode\(mode\) - -Return flight mode data. - -@status current Introduced in 2.1.7 - -## Parameters - -* `mode` \(number\) flight mode number to return \(0 - 8\). If mode parameter - - is not specified \(or contains invalid value\), then the current flight mode data is returned. - -## Return value - -* `multiple` returns 2 values: - * \(number\) \(current\) flight mode number \(0 - 8\) - * \(string\) \(current\) flight mode name - diff --git a/lua-api-reference/variables/getlogicalswitchvalue.md b/lua-api-reference/variables/getlogicalswitchvalue.md deleted file mode 100644 index 17bfcab2a..000000000 --- a/lua-api-reference/variables/getlogicalswitchvalue.md +++ /dev/null @@ -1,13 +0,0 @@ -# getLogicalSwitchValue(id) - -Reads the value of a logical switch. - -@status current Introduced in 2.6 - -## Parameter - -* `id`: integer identifying the logical switch (zero for L01 etc.). - -## Return value - -* `value`: true/false. diff --git a/lua-api-reference/variables/getoutputvalue.md b/lua-api-reference/variables/getoutputvalue.md deleted file mode 100644 index a6f42cd96..000000000 --- a/lua-api-reference/variables/getoutputvalue.md +++ /dev/null @@ -1,12 +0,0 @@ -# getOutputValue(outputIndex) - -@status current Introduced in 2.8.0 - -**Parameters** - -* `outputIndex:` integer identifying the output channel number 0 for CH1, up to MAX\_OUTPUT\_CHANNELS - 1. - -**Return value** - -* `value` current output value (number). Zero is returned for: -* non-existing outputs diff --git a/lua-api-reference/variables/getshmvar.md b/lua-api-reference/variables/getshmvar.md deleted file mode 100644 index 078b07183..000000000 --- a/lua-api-reference/variables/getshmvar.md +++ /dev/null @@ -1,17 +0,0 @@ -# getShmVar(id) - -Gets the value of a shared memory variable that can be used for passing data between Lua widgets and other Lua scripts. - -@status current Introduced in 2.6 - -**Parameters** - -* `id:` integer between 1 and 16 identifying the shared memory variable. - -**Return value** - -* `value:` integer. The value of the shared memory variable. - -**Notice** - -Only available on radios with color display diff --git a/lua-api-reference/variables/getsourceindex.md b/lua-api-reference/variables/getsourceindex.md deleted file mode 100644 index 2301309e2..000000000 --- a/lua-api-reference/variables/getsourceindex.md +++ /dev/null @@ -1,19 +0,0 @@ -# getSourceIndex(sourceName) - -#### Parameters - -* `sourceName`: string naming a value source as it is shown on radio menus where you can select it. Notice that many names have [special characters](../constants/special-character-constants.md) in them. - -Return value - -* `sourceIndex`: integer. The source index, which can be used as input for `getSourceName(sourceIndex)`, `getValue(sourceIndex)`, and `getFieldInfo(sourceIndex)`. - -#### Notice - -The source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so e.g. `getValue(index)` will work with the indices obtained here. - -This function is rather time consuming, and should not be used repeatedly in a script, if it can be avoided. - -#### Status - -Current Introduced in 2.6 diff --git a/lua-api-reference/variables/getsourcename.md b/lua-api-reference/variables/getsourcename.md deleted file mode 100644 index 7e8ef040a..000000000 --- a/lua-api-reference/variables/getsourcename.md +++ /dev/null @@ -1,17 +0,0 @@ -# getSourceName(sourceIndex) - -#### Parameters - -* `sourceIndex`: integer identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`. - -#### Return value - -* `sourceName`: string naming the value source as it is shown on radio menus where a source can be chosen. - -#### Notice - -The source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so e.g. `getValue(index)` will work with the indices used here. - -#### Status - -Current Introduced in 2.6 diff --git a/lua-api-reference/variables/getsourcevalue.md b/lua-api-reference/variables/getsourcevalue.md deleted file mode 100644 index 551a95d5a..000000000 --- a/lua-api-reference/variables/getsourcevalue.md +++ /dev/null @@ -1,51 +0,0 @@ -# getSourceValue(source) - -Returns the value of a source. Supersedes `getValue`. - -The list of fixed sources: - -| OpenTX Version | Radio | -| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| 2.0 | [all](http://downloads-20.open-tx.org/firmware/lua\_fields.txt) | -| 2.1 | [X9D and X9D+](http://downloads-21.open-tx.org/firmware/lua\_fields\_taranis.txt), [X9E](http://downloads-21.open-tx.org/firmware/lua\_fields\_taranis\_x9e.txt) | -| 2.2 | [X9D and X9D+](http://downloads.open-tx.org/2.2/release/firmware/lua\_fields\_x9d.txt), [X9E](http://downloads.open-tx.org/2.2/release/firmware/lua\_fields\_x9e.txt), [Horus](http://downloads.open-tx.org/2.2/release/firmware/lua\_fields\_x12s.txt) | -| 2.3 | [X9D and X9D+](http://downloads.open-tx.org/2.3/release/firmware/lua\_fields\_x9d.txt), [X9E](http://downloads.open-tx.org/2.3/release/firmware/lua\_fields\_x9e.txt), [X7](http://downloads.open-tx.org/2.3/release/firmware/lua\_fields\_x7.txt), [Horus](http://downloads.open-tx.org/2.3/release/firmware/lua\_fields\_x12s.txt) | - -In OpenTX 2.1.x the telemetry sources no longer have a predefined name. To get a telemetry value simply use it's sensor name. For example: - -* Altitude sensor has a name "Alt" -* to get the current altitude use the source "Alt" -* to get the minimum altitude use the source "Alt-", to get the maximum use "Alt+" - -value is nil for non-existing sources. all non-allowed sensors while FAI MODE is active, or if a telemetry item value has never been received - -value is a table for GPS position: - -* `lat` (number) latitude, positive is North -* `lon` (number) longitude, positive is East -* `pilot-lat` (number) pilot latitude, positive is North -* `pilot-lon` (number) pilot longitude, positive is East - -value is a table for date/time, see getDateTime() - -value is a table for battery cells(except where no cells were detected in which case the returned value is 0): - -* table has one item for each detected cell: -* key (number) cell number (1 to number of cells) -* value (number) current cell voltage - -@status current Introduced in 2.8.0 - -### Parameters - -* `source` can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source. - -### Return value - -* `value` current source value (number), or last known telemetry item value. -* `isCurrent` is true for telemetry sources that are within the "Sensor Lost" duration and telemetry is streaming . Always true for non-telemetry items. -* `isFresh` is true for telemetry sources which have been recently updated and telemetry is streaming. Always true for non-telemetry items. - -#### Notice - -Getting a value by its numerical identifier is much faster than by its name. While `Cels` sensor returns current values of all cells in a table, a `Cels+` or `Cels-` will return a single value - the maximum or minimum Cels value. diff --git a/lua-api-reference/variables/getswitchindex.md b/lua-api-reference/variables/getswitchindex.md deleted file mode 100644 index ab90b916d..000000000 --- a/lua-api-reference/variables/getswitchindex.md +++ /dev/null @@ -1,11 +0,0 @@ -# getSwitchIndex(positionName) - -@status current Introduced in 2.6 - -## Parameters - -* `positionName`: string naming a switch position as it is shown on radio menus where you can select a switch. Notice that many names have special characters in them like arrow up/down etc. (see [Special Character Constants](../constants/special-character-constants.md)). - -## Return value - -* value: integer. The switchIndex, which can be used as input for \`getSwitchName(switchIndex)\` and \`getSwitchValue(switchIndex)\`. Also corresponds to the fields in the table returned by \`model.getLogicalSwitch(switch)\` identifying switches. diff --git a/lua-api-reference/variables/getswitchname.md b/lua-api-reference/variables/getswitchname.md deleted file mode 100644 index 9aa2337f9..000000000 --- a/lua-api-reference/variables/getswitchname.md +++ /dev/null @@ -1,11 +0,0 @@ -# getSwitchName(switchIndex) - -@status current Introduced in 2.6 - -## Parameter - -* `switchIndex`: integer identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches. - -## Return value - -* value: string naming the switch position as it is shown on radio menus where a switch can be chosen. diff --git a/lua-api-reference/variables/getswitchvalue.md b/lua-api-reference/variables/getswitchvalue.md deleted file mode 100644 index 188be9d4b..000000000 --- a/lua-api-reference/variables/getswitchvalue.md +++ /dev/null @@ -1,12 +0,0 @@ -# getSwitchValue(switchIndex) - -@status current Introduced in 2.6 - -## Parameter - -* `switchIndex`: integer identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches. - -## Return value - -* `value`: true/false. The value of the switch. - diff --git a/lua-api-reference/variables/getvalue.md b/lua-api-reference/variables/getvalue.md deleted file mode 100644 index 885578d89..000000000 --- a/lua-api-reference/variables/getvalue.md +++ /dev/null @@ -1,48 +0,0 @@ -# getValue\(source\) - -Returns the value of a source. - -The list of fixed sources: - -| OpenTX Version | Radio | -| :--- | :--- | -| 2.0 | [all](http://downloads-20.open-tx.org/firmware/lua_fields.txt) | -| 2.1 | [X9D and X9D+](http://downloads-21.open-tx.org/firmware/lua_fields_taranis.txt), [X9E](http://downloads-21.open-tx.org/firmware/lua_fields_taranis_x9e.txt) | -| 2.2 | [X9D and X9D+](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9e.txt), [Horus](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x12s.txt) | -| 2.3 | [X9D and X9D+](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9e.txt), [X7](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x7.txt), [Horus](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x12s.txt) | - -In OpenTX 2.1.x the telemetry sources no longer have a predefined name. To get a telemetry value simply use it's sensor name. For example: - -* Altitude sensor has a name "Alt" -* to get the current altitude use the source "Alt" -* to get the minimum altitude use the source "Alt-", to get the maximum use "Alt+" - -@status current Introduced in 2.0.0, changed in 2.1.0, `Cels+` and `Cels-` added in 2.1.9 - -## Parameters - -* `source` can be an identifier \(number\) \(which was obtained by the getFieldInfo\(\)\) - - or a name \(string\) of the source. - -## Return value - -* `value` current source value \(number\). Zero is returned for: - * non-existing sources - * for all telemetry source when the telemetry stream is not received - * far all non allowed sensors while FAI MODE is active -* `table` GPS position is returned in a table: - * `lat` \(number\) latitude, positive is North - * `lon` \(number\) longitude, positive is East - * `pilot-lat` \(number\) pilot latitude, positive is North - * `pilot-lon` \(number\) pilot longitude, positive is East -* `table` GPS date/time, see getDateTime\(\) -* `table` Cells are returned in a table \(except where no cells were detected in which case the returned value is 0\): - * table has one item for each detected cell: - * key \(number\) cell number \(1 to number of cells\) - * value \(number\) current cell voltage - -### Notice - -Getting a value by its numerical identifier is faster then by its name. While `Cels` sensor returns current values of all cells in a table, a `Cels+` or `Cels-` will return a single value - the maximum or minimum Cels value. - diff --git a/lua-api-reference/variables/setshmvar.md b/lua-api-reference/variables/setshmvar.md deleted file mode 100644 index ccc19608a..000000000 --- a/lua-api-reference/variables/setshmvar.md +++ /dev/null @@ -1,18 +0,0 @@ -# setShmVar(id, value) - -Sets the value of a shared memory variable that can be used for passing data between Lua widgets and other Lua scripts. - -@status current Introduced in 2.6 - -**Parameters** - -* `id:` integer between 1 and 16 identifying the shared memory variable. -* `value:` integer. The value of the shared memory variable. - -**Return value** - -none - -**Notice** - -Only available on radios with color display diff --git a/lua-api-reference/variables/setstickyswitch.md b/lua-api-reference/variables/setstickyswitch.md deleted file mode 100644 index 36d43fa68..000000000 --- a/lua-api-reference/variables/setstickyswitch.md +++ /dev/null @@ -1,15 +0,0 @@ -# setStickySwitch(id, value) - -Sets the value of a sticky logical switch. - -@status current Introduced in 2.6 - -## Parameters - -* id: integer identifying the sticky logical switch (zero for LS1 etc.). -* value: true/false. The new value of the sticky logical switch. - -## Return value - -* bufferFull: true/false. This function sends a message from Lua to the logical switch processor via a buffer with eight slots that are read 10 times per second. If the buffer is full, then a true value is returned, and no message was sent (i.e. the switch was not changed). - diff --git a/lua-api-reference/variables/sources.md b/lua-api-reference/variables/sources.md deleted file mode 100644 index 13ed1e93c..000000000 --- a/lua-api-reference/variables/sources.md +++ /dev/null @@ -1,16 +0,0 @@ -# sources(\[first\[, last]]) - -This is an iterator function over value sources. - -`for sourceIndex, sourceName in sources() do ...` - -will iterate over all available value sources. - -### Parameters - -* `first`: the first source index. If `nil` or omitted, the first available source is used. -* `last`: the last soure index. If `nil` or omitted, the last available source is used. - -### Status - -current Introduced in 2.6 diff --git a/lua-api-reference/variables/switches.md b/lua-api-reference/variables/switches.md deleted file mode 100644 index 43c408584..000000000 --- a/lua-api-reference/variables/switches.md +++ /dev/null @@ -1,16 +0,0 @@ -# switches(\[first\[, last]]) - -This is an iterator function over switch positions. - -`for switchIndex, switchName in switches() do ...` - -will iterate over all available switch positions. - -### Parameters - -* `first`: the first switch index. If `nil` or omitted, the first available switch is used. -* `last`: the last switch index. If `nil` or omitted, the last available switch is used. - -### Status - -Current Introduced in 2.6 diff --git a/mkdocs.dev.yml b/mkdocs.dev.yml new file mode 100644 index 000000000..8b2d1f485 --- /dev/null +++ b/mkdocs.dev.yml @@ -0,0 +1,385 @@ +INHERIT: mkdocs.yml + +# Internal working config: un-excludes everything mkdocs.yml drops from the +# public build (migration/ pipeline docs, the review workbench, and the +# per-module dashboards), restates nav with the Migration section added +# back, and restates extra_javascript with review-workbench.js added back +# (it talks to a localhost-only decision server and has no reason to ship +# in the public build; MkDocs replaces rather than merges list-type keys +# on INHERIT, so both of these have to be full restatements, not diffs). +# +# Usage: mkdocs serve -f mkdocs.dev.yml (defaults to http://127.0.0.1:8014, +# per HANDOFF.md's local-preview convention) +exclude_docs: "" + +extra_javascript: + - javascripts/mobile-nav-inline.js + - javascripts/review-workbench.js + - javascripts/legacy-version-banner.js + +nav: + - EdgeTX Lua Reference Guide: index.md + - API Overview: + - API Overview: api-overview/README.md + - Lua version: + - Lua version: api-overview/version-libraries/README.md + - io Library: api-overview/version-libraries/io-library.md + - Script Types: + - Script Types: api-overview/script-types/README.md + - One-Time Scripts: api-overview/script-types/one-time-scripts.md + - Telemetry Scripts: api-overview/script-types/telemetry-scripts.md + - Widget Scripts: api-overview/script-types/widget-scripts.md + - Function Scripts: api-overview/script-types/function-scripts.md + - Mixes Scripts: api-overview/script-types/mixes-scripts.md + - Constants: + - api-overview/constants/README.md + - Color Constants: api-overview/constants/color-constants.md + - Flags and Pattern Constants: api-overview/constants/flags-and-pattern-constants.md + - Key Event Constants: api-overview/constants/key-event-constants.md + - Key Event Mechanism: api-overview/constants/key_events.md + - Logical Switch Function Constants: api-overview/constants/logical-switch-function-constants.md + - LVGL Constants: api-overview/constants/lvgl-constants.md + - Screen Constants: api-overview/constants/screen-constants.md + - Special Character Constants: api-overview/constants/special-character-constants.md + - Special Function Constants: api-overview/constants/special-function-constants.md + - Touch Event Constants: api-overview/constants/touch-event-constants.md + - Widget Options Constants: api-overview/constants/widget-options.md + - Units: api-overview/constants/units.md + - Sources and Switches: + - Sources and Switches: api-overview/internal-indexes/README.md + - Sources: api-overview/internal-indexes/source-list.md + - Switches: api-overview/internal-indexes/switch-positions-id.md + - Fonts: api-overview/fonts.md + - API Reference: + - API Reference: api-reference/index.md + # BEGIN GENERATED -- tools/docs_pipeline.py update-nav; do not hand-edit + - Audio-Sound: + - Audio-Sound: api-reference/audio-sound/index.md + - flushAudio: api-reference/audio-sound/flush-audio.md + - playDuration: api-reference/audio-sound/play-duration.md + - playFile: api-reference/audio-sound/play-file.md + - playHaptic: api-reference/audio-sound/play-haptic.md + - playNumber: api-reference/audio-sound/play-number.md + - playTone: api-reference/audio-sound/play-tone.md + - Display LCD: + - Display LCD: api-reference/display-lcd/index.md + - Bitmap.getSize: api-reference/display-lcd/bitmap-get-size.md + - Bitmap.open: api-reference/display-lcd/bitmap-open.md + - Bitmap.resize: api-reference/display-lcd/bitmap-resize.md + - Bitmap.toMask: api-reference/display-lcd/bitmap-to-mask.md + - GREY: api-reference/display-lcd/grey.md + - lcd.RGB: api-reference/display-lcd/lcd-rgb.md + - lcd.clear: api-reference/display-lcd/lcd-clear.md + - lcd.drawAnnulus: api-reference/display-lcd/lcd-draw-annulus.md + - lcd.drawArc: api-reference/display-lcd/lcd-draw-arc.md + - lcd.drawBitmap: api-reference/display-lcd/lcd-draw-bitmap.md + - lcd.drawBitmapPattern: api-reference/display-lcd/lcd-draw-bitmap-pattern.md + - lcd.drawBitmapPatternPie: api-reference/display-lcd/lcd-draw-bitmap-pattern-pie.md + - lcd.drawChannel: api-reference/display-lcd/lcd-draw-channel.md + - lcd.drawCircle: api-reference/display-lcd/lcd-draw-circle.md + - lcd.drawCombobox: api-reference/display-lcd/lcd-draw-combobox.md + - lcd.drawFilledCircle: api-reference/display-lcd/lcd-draw-filled-circle.md + - lcd.drawFilledRectangle: api-reference/display-lcd/lcd-draw-filled-rectangle.md + - lcd.drawFilledTriangle: api-reference/display-lcd/lcd-draw-filled-triangle.md + - lcd.drawGauge: api-reference/display-lcd/lcd-draw-gauge.md + - lcd.drawHudRectangle: api-reference/display-lcd/lcd-draw-hud-rectangle.md + - lcd.drawLine: api-reference/display-lcd/lcd-draw-line.md + - lcd.drawLineWithClipping: api-reference/display-lcd/lcd-draw-line-with-clipping.md + - lcd.drawNumber: api-reference/display-lcd/lcd-draw-number.md + - lcd.drawPie: api-reference/display-lcd/lcd-draw-pie.md + - lcd.drawPixmap: api-reference/display-lcd/lcd-draw-pixmap.md + - lcd.drawPoint: api-reference/display-lcd/lcd-draw-point.md + - lcd.drawRectangle: api-reference/display-lcd/lcd-draw-rectangle.md + - lcd.drawScreenTitle: api-reference/display-lcd/lcd-draw-screen-title.md + - lcd.drawSource: api-reference/display-lcd/lcd-draw-source.md + - lcd.drawSwitch: api-reference/display-lcd/lcd-draw-switch.md + - lcd.drawText: api-reference/display-lcd/lcd-draw-text.md + - lcd.drawTextLines: api-reference/display-lcd/lcd-draw-text-lines.md + - lcd.drawTimer: api-reference/display-lcd/lcd-draw-timer.md + - lcd.drawTriangle: api-reference/display-lcd/lcd-draw-triangle.md + - lcd.exitFullScreen: api-reference/display-lcd/lcd-exit-full-screen.md + - lcd.getColor: api-reference/display-lcd/lcd-get-color.md + - lcd.getLastLeftPos: api-reference/display-lcd/lcd-get-last-left-pos.md + - lcd.getLastPos: api-reference/display-lcd/lcd-get-last-pos.md + - lcd.getLastRightPos: api-reference/display-lcd/lcd-get-last-right-pos.md + - lcd.invertRect: api-reference/display-lcd/lcd-invert-rect.md + - lcd.refresh: api-reference/display-lcd/lcd-refresh.md + - lcd.resetBacklightTimeout: api-reference/display-lcd/lcd-reset-backlight-timeout.md + - lcd.setColor: api-reference/display-lcd/lcd-set-color.md + - lcd.sizeText: api-reference/display-lcd/lcd-size-text.md + - popupConfirmation: api-reference/display-lcd/popup-confirmation.md + - popupInput: api-reference/display-lcd/popup-input.md + - popupWarning: api-reference/display-lcd/popup-warning.md + - Display LVGL: + - Display LVGL: api-reference/display-lvgl/index.md + - lvgl.align: api-reference/display-lvgl/lvgl-align.md + - lvgl.arc: api-reference/display-lvgl/lvgl-arc.md + - lvgl.box: api-reference/display-lvgl/lvgl-box.md + - lvgl.build: api-reference/display-lvgl/lvgl-build.md + - lvgl.button: api-reference/display-lvgl/lvgl-button.md + - lvgl.choice: api-reference/display-lvgl/lvgl-choice.md + - lvgl.circle: api-reference/display-lvgl/lvgl-circle.md + - lvgl.clear: api-reference/display-lvgl/lvgl-clear.md + - lvgl.close: api-reference/display-lvgl/lvgl-close.md + - lvgl.color: api-reference/display-lvgl/lvgl-color.md + - lvgl.confirm: api-reference/display-lvgl/lvgl-confirm.md + - lvgl.dialog: api-reference/display-lvgl/lvgl-dialog.md + - lvgl.disable: api-reference/display-lvgl/lvgl-disable.md + - lvgl.enable: api-reference/display-lvgl/lvgl-enable.md + - lvgl.exitFullScreen: api-reference/display-lvgl/lvgl-exit-full-screen.md + - lvgl.file: api-reference/display-lvgl/lvgl-file.md + - lvgl.font: api-reference/display-lvgl/lvgl-font.md + - lvgl.getContext: api-reference/display-lvgl/lvgl-get-context.md + - lvgl.getScrollPos: api-reference/display-lvgl/lvgl-get-scroll-pos.md + - lvgl.hide: api-reference/display-lvgl/lvgl-hide.md + - lvgl.hline: api-reference/display-lvgl/lvgl-hline.md + - lvgl.image: api-reference/display-lvgl/lvgl-image.md + - lvgl.isAppMode: api-reference/display-lvgl/lvgl-is-app-mode.md + - lvgl.isFullScreen: api-reference/display-lvgl/lvgl-is-full-screen.md + - lvgl.label: api-reference/display-lvgl/lvgl-label.md + - lvgl.line: api-reference/display-lvgl/lvgl-line.md + - lvgl.menu: api-reference/display-lvgl/lvgl-menu.md + - lvgl.message: api-reference/display-lvgl/lvgl-message.md + - lvgl.momentaryButton: api-reference/display-lvgl/lvgl-momentary-button.md + - lvgl.numberEdit: api-reference/display-lvgl/lvgl-number-edit.md + - lvgl.page: api-reference/display-lvgl/lvgl-page.md + - lvgl.qrcode: api-reference/display-lvgl/lvgl-qrcode.md + - lvgl.rectangle: api-reference/display-lvgl/lvgl-rectangle.md + - lvgl.set: api-reference/display-lvgl/lvgl-set.md + - lvgl.setting: api-reference/display-lvgl/lvgl-setting.md + - lvgl.show: api-reference/display-lvgl/lvgl-show.md + - lvgl.slider: api-reference/display-lvgl/lvgl-slider.md + - lvgl.source: api-reference/display-lvgl/lvgl-source.md + - lvgl.switch: api-reference/display-lvgl/lvgl-switch.md + - lvgl.textEdit: api-reference/display-lvgl/lvgl-text-edit.md + - lvgl.timer: api-reference/display-lvgl/lvgl-timer.md + - lvgl.toggle: api-reference/display-lvgl/lvgl-toggle.md + - lvgl.triangle: api-reference/display-lvgl/lvgl-triangle.md + - lvgl.verticalSlider: api-reference/display-lvgl/lvgl-vertical-slider.md + - lvgl.vline: api-reference/display-lvgl/lvgl-vline.md + - Filesystem: + - Filesystem: api-reference/filesystem/index.md + - chdir: api-reference/filesystem/chdir.md + - del: api-reference/filesystem/del.md + - dir: api-reference/filesystem/dir.md + - fstat: api-reference/filesystem/fstat.md + - mkdir: api-reference/filesystem/mkdir.md + - rename: api-reference/filesystem/rename.md + - Inputs: + - Inputs: api-reference/key-inputs/index.md + - defaultChannel: api-reference/key-inputs/default-channel.md + - defaultStick: api-reference/key-inputs/default-stick.md + - getRotEncMode: api-reference/key-inputs/get-rot-enc-mode.md + - getRotEncSpeed: api-reference/key-inputs/get-rot-enc-speed.md + - killEvents: api-reference/key-inputs/kill-events.md + - Lua Scripts: + - Lua Scripts: api-reference/lua-scripts/index.md + - loadScript: api-reference/lua-scripts/load-script.md + - Model Functions: + - Model Functions: api-reference/model-functions/index.md + - getFlightMode: api-reference/model-functions/get-flight-mode.md + - getOutputValue: api-reference/model-functions/get-output-value.md + - model.defaultInputs: api-reference/model-functions/model-default-inputs.md + - model.deleteFlightModes: api-reference/model-functions/model-delete-flight-modes.md + - model.deleteInput: api-reference/model-functions/model-delete-input.md + - model.deleteInputs: api-reference/model-functions/model-delete-inputs.md + - model.deleteMix: api-reference/model-functions/model-delete-mix.md + - model.deleteMixes: api-reference/model-functions/model-delete-mixes.md + - model.getCurve: api-reference/model-functions/model-get-curve.md + - model.getCustomFunction: api-reference/model-functions/model-get-custom-function.md + - model.getFlightMode: api-reference/model-functions/model-get-flight-mode.md + - model.getGlobalVariable: api-reference/model-functions/model-get-global-variable.md + - model.getGlobalVariableDetails: api-reference/model-functions/model-get-global-variable-details.md + - model.getInfo: api-reference/model-functions/model-get-info.md + - model.getInput: api-reference/model-functions/model-get-input.md + - model.getInputsCount: api-reference/model-functions/model-get-inputs-count.md + - model.getLogicalSwitch: api-reference/model-functions/model-get-logical-switch.md + - model.getMix: api-reference/model-functions/model-get-mix.md + - model.getMixesCount: api-reference/model-functions/model-get-mixes-count.md + - model.getModule: api-reference/model-functions/model-get-module.md + - model.getOutput: api-reference/model-functions/model-get-output.md + - model.getSensor: api-reference/model-functions/model-get-sensor.md + - model.getSwashRing: api-reference/model-functions/model-get-swash-ring.md + - model.getTimer: api-reference/model-functions/model-get-timer.md + - model.insertInput: api-reference/model-functions/model-insert-input.md + - model.insertMix: api-reference/model-functions/model-insert-mix.md + - model.resetSensor: api-reference/model-functions/model-reset-sensor.md + - model.resetTimer: api-reference/model-functions/model-reset-timer.md + - model.setCurve: api-reference/model-functions/model-set-curve.md + - model.setCustomFunction: api-reference/model-functions/model-set-custom-function.md + - model.setFlightMode: api-reference/model-functions/model-set-flight-mode.md + - model.setGlobalVariable: api-reference/model-functions/model-set-global-variable.md + - model.setGlobalVariableDetails: api-reference/model-functions/model-set-global-variable-details.md + - model.setInfo: api-reference/model-functions/model-set-info.md + - model.setLogicalSwitch: api-reference/model-functions/model-set-logical-switch.md + - model.setModule: api-reference/model-functions/model-set-module.md + - model.setOutput: api-reference/model-functions/model-set-output.md + - model.setSwashRing: api-reference/model-functions/model-set-swash-ring.md + - model.setTimer: api-reference/model-functions/model-set-timer.md + - RF module: + - RF module: api-reference/rf-module/index.md + - accessTelemetryPush: api-reference/rf-module/access-telemetry-push.md + - crossfireTelemetryPush: api-reference/rf-module/crossfire-telemetry-push.md + - ghostTelemetryPush: api-reference/rf-module/ghost-telemetry-push.md + - multiBuffer: api-reference/rf-module/multi-buffer.md + - sportTelemetryPush: api-reference/rf-module/sport-telemetry-push.md + - Radio Hardware: + - Radio Hardware: api-reference/radio-hardware/index.md + - applyRGBLedColors: api-reference/radio-hardware/apply-rgbled-colors.md + - getStickMode: api-reference/radio-hardware/get-stick-mode.md + - getTxGPS: api-reference/radio-hardware/get-tx-gps.md + - setCFSLedColor: api-reference/radio-hardware/set-cfsled-color.md + - setIMU_X: api-reference/radio-hardware/set-imu-x.md + - setIMU_Y: api-reference/radio-hardware/set-imu-y.md + - setRGBLedColor: api-reference/radio-hardware/set-rgbled-color.md + - Serial Ports: + - Serial Ports: api-reference/serial-ports/index.md + - serialGetPower: api-reference/serial-ports/serial-get-power.md + - serialRead: api-reference/serial-ports/serial-read.md + - serialSetPower: api-reference/serial-ports/serial-set-power.md + - serialWrite: api-reference/serial-ports/serial-write.md + - setSerialBaudrate: api-reference/serial-ports/set-serial-baudrate.md + - Sources: + - Sources: api-reference/sources/index.md + - getFieldInfo: api-reference/sources/get-field-info.md + - getSourceIndex: api-reference/sources/get-source-index.md + - getSourceName: api-reference/sources/get-source-name.md + - getSourceValue: api-reference/sources/get-source-value.md + - getValue: api-reference/sources/get-value.md + - sources: api-reference/sources/sources.md + - Switches: + - Switches: api-reference/switches/index.md + - getLogicalSwitchValue: api-reference/switches/get-logical-switch-value.md + - getSwitchIndex: api-reference/switches/get-switch-index.md + - getSwitchInfo: api-reference/switches/get-switch-info.md + - getSwitchName: api-reference/switches/get-switch-name.md + - getSwitchValue: api-reference/switches/get-switch-value.md + - setStickySwitch: api-reference/switches/set-sticky-switch.md + - switches: api-reference/switches/switches.md + - System: + - System: api-reference/system/index.md + - getAvailableMemory: api-reference/system/get-available-memory.md + - getGeneralSettings: api-reference/system/get-general-settings.md + - getUsage: api-reference/system/get-usage.md + - getVersion: api-reference/system/get-version.md + - screenshot: api-reference/system/screenshot.md + - Telemetry: + - Telemetry: api-reference/telemetry/index.md + - crossfireTelemetryPop: api-reference/telemetry/crossfire-telemetry-pop.md + - getRAS: api-reference/telemetry/get-ras.md + - getRSSI: api-reference/telemetry/get-rssi.md + - getTrainerStatus: api-reference/telemetry/get-trainer-status.md + - ghostTelemetryPop: api-reference/telemetry/ghost-telemetry-pop.md + - setTelemetryValue: api-reference/telemetry/set-telemetry-value.md + - sportTelemetryPop: api-reference/telemetry/sport-telemetry-pop.md + - Time: + - Time: api-reference/time/index.md + - getDateTime: api-reference/time/get-date-time.md + - getGlobalTimer: api-reference/time/get-global-timer.md + - getRtcTime: api-reference/time/get-rtc-time.md + - getTime: api-reference/time/get-time.md + - resetGlobalTimer: api-reference/time/reset-global-timer.md + - Variables: + - Variables: api-reference/variables/index.md + - getShmVar: api-reference/variables/get-shm-var.md + - setShmVar: api-reference/variables/set-shm-var.md + # END GENERATED + - Programming: + - Programming: programming/README.md + - Basics: + - Lua Basics: api-overview/lua-basics.md + - Editor: programming/basics/editor.md + - Files and Organization: programming/basics/files-and-organization.md + - Naming: programming/basics/naming.md + - Practicing: programming/basics/practicing.md + - Testing: programming/basics/testing.md + - Troubleshooting: programming/basics/troubleshooting.md + - Memory: programming/basics/memory.md + - Performance: programming/basics/performance.md + - Core Concepts: + - Using Flags and Colors: programming/core-concepts/drawing-flags-and-colors.md + - Using LVGL Library: programming/core-concepts/lvgl-for-lua.md + - Using Key and Touch Events: programming/core-concepts/using-key-and-touch-events.md + - Data Exchange with the EdgeTX Model Setup: programming/core-concepts/data-exchange-with-the-edgetx-model-setup.md + - Advanced Topics: + - Debugging techniques: programming/advanced-topics/debugging-techniques.md + - Loading Code Modules Dynamically: programming/core-concepts/loading-code-modules-dynamically.md + - Lua data sharing across scripts: programming/advanced-topics/lua-data-sharing-across-scripts.md + - Saving Memory: programming/core-concepts/saving-memory.md + - Speed/memory optimizaton tricks: programming/advanced-topics/optimization-tricks.md + - Radios: + - radios/README.md + - BetaFPV: + - radios/betafpv/README.md + - LiteRadio3 Pro: radios/betafpv/betafpv-literadio3-pro.md + - FatFish: + - radios/fatfish/README.md + - F16: radios/fatfish/fatfish-f16.md + - FlySky: + - radios/flysky/README.md + - EL18: radios/flysky/flysky-el18.md + - NB4+: radios/flysky/flysky-nb4-plus.md + - NV14: radios/flysky/flysky-nv14.md + - PA01: radios/flysky/flysky-pa01.md + - PL18 / PL18EV: radios/flysky/flysky-pl18-pl18ev.md + - PL18U: radios/flysky/flysky-pl18u.md + - ST16: radios/flysky/flysky-st16.md + - FrSky: + - radios/frsky/README.md + - QX7 / QX7S / QX7 ACCESS / QX7S ACCESS: radios/frsky/frsky-qx7-qx7s.md + - X-Lite / X-Lite S / X-Lite Pro: radios/frsky/frsky-x-lite-x-lite-s-x-lite-pro.md + - X9 Lite / X9 Lite S: radios/frsky/frsky-x9-lite-x9-lite-s.md + - X9D / X9D+ / X9D SE: radios/frsky/frsky-x9d-x9d-plus-x9d-plus-se.md + - X9D+ 2019 / X9D+ 2019 SE: radios/frsky/frsky-x9dp2019.md + - X9E / X9E Hall: radios/frsky/frsky-x9e-x9e-hall.md + - X10 / X10S / X10 Express / X10S Express: radios/frsky/frsky-x10express.md + - X12S / X12S IRSM: radios/frsky/frsky-x12s-x12s-irsm.md + - HelloRadioSky: + - radios/helloradiosky/README.md + - V12: radios/helloradiosky/helloradiosky-v12.md + - V14: radios/helloradiosky/helloradiosky-v14.md + - V16: radios/helloradiosky/helloradiosky-v16.md + - iFlight: + - radios/iflight/README.md + - Commando8: radios/iflight/iflight-commando8.md + - Commando14: radios/iflight/iflight-commando14.md + - Jumper: + - radios/jumper/README.md + - Bumblebee: radios/jumper/jumper-bumblebee.md + - T-Lite / T-Lite v2: radios/jumper/jumper-t-lite-t-lite-v2.md + - T-Pro: radios/jumper/jumper-t-pro.md + - T-12 / T12 Plus / T12 Pro Hall: radios/jumper/jumper-t12-t12-plus-t12-pro-hall.md + - T-14: radios/jumper/jumper-t14.md + - T-20: radios/jumper/jumper-t20.md + - T15: radios/jumper/jumper-t15.md + - T15 Pro: radios/jumper/jumper-t15-pro.md + - T16 / T16 Plus / T16 Pro Hall: radios/jumper/jumper-t16-t16-plus-t16-pro-hall.md + - T18 / T18 Lite / T18 Pro: radios/jumper/jumper-t18-t18-lite-t18-pro.md + - T20 V2: radios/jumper/jumper-t20-v2.md + - RadioMaster: + - radios/radiomaster/README.md + - Boxer: radios/radiomaster/radiomaster-boxer.md + - GX12: radios/radiomaster/radiomaster-gx12.md + - MT12: radios/radiomaster/radiomaster-mt12.md + - Pocket: radios/radiomaster/radiomaster-pocket.md + - T8 Pro: radios/radiomaster/radiomaster-t8-pro.md + - TX12: radios/radiomaster/radiomaster-tx12.md + - TX12 Mark II: radios/radiomaster/radiomaster-tx12-mark-ii.md + - Zorro: radios/radiomaster/radiomaster-zorro.md + - TX15: radios/radiomaster/radiomaster-tx15.md + - TX16S / TX16S MAX / TX16S Mark II: radios/radiomaster/radiomaster-tx16s.md + - TX16S MK3 / TX16S MK3 MAX: radios/radiomaster/radiomaster-tx16smk3.md + # - TBS: + # - radios/tbs/README.md + - Migration: + - Overview: migration/overview.md + - Pipeline: + - Overview: migration/pipeline/index.md + - Annotation Contract: migration/pipeline/annotation-contract.md + - Overlay Contract: migration/pipeline/overlay-contract.md + - API Schema: migration/pipeline/api-schema.md + - LVGL Migration Notes: migration/pipeline/lvgl-migration.md + - Real Extraction Notes: migration/pipeline/real-extraction-notes.md + - Internal Review Tools: + - API Review Dashboard: api-reference/review.md + - Developer Questions: migration/internal-review-tools/developer-questions.md diff --git a/mkdocs.yml b/mkdocs.yml new file mode 100644 index 000000000..839fedbf0 --- /dev/null +++ b/mkdocs.yml @@ -0,0 +1,440 @@ +site_name: EdgeTX Lua Reference Guide +site_description: Next-generation Lua API docs generated from EdgeTX source annotations +site_url: https://luadoc.edgetx.org/ +repo_url: https://github.com/EdgeTX/lua-reference-guide +repo_name: EdgeTX/lua-reference-guide +# The publish workflow sets DOCS_EDIT_URI to the branch being built, so +# "Edit this page" on /dev/ points at main and on /2.12/ at edgetx_2.12. +edit_uri: !ENV [DOCS_EDIT_URI, "edit/edgetx_2.12/website/md-docs/"] +docs_dir: website/md-docs +site_dir: site +exclude_docs: | + migration/ + api-reference/review.md + api-reference/review-*.md + api-reference/module-*.md + javascripts/review-workbench.js +theme: + name: material + logo: assets/edgetx-logo.svg + favicon: assets/edgetx-logo.svg + font: false + palette: + - media: "(prefers-color-scheme: light)" + scheme: default + primary: custom + accent: custom + toggle: + icon: material/brightness-7 + name: Switch to dark mode + - media: "(prefers-color-scheme: dark)" + scheme: slate + primary: custom + accent: custom + toggle: + icon: material/brightness-4 + name: Switch to light mode + features: + - navigation.indexes + - navigation.path + - navigation.top + - toc.follow + - search.suggest + - search.highlight + - content.code.copy + - content.action.edit +plugins: + - search: + # Default separator only splits on whitespace/hyphens ([\s\-]+), so a + # dotted API symbol like "model.getMix" indexes as one token and a + # search for just "getMix" can't prefix-match it (the token starts + # with "model", not "getmix"). Also split on "." so the module and + # member name become separate searchable tokens. + separator: '[\s\-\.]+' + - minify: + minify_html: true +extra_css: + - stylesheets/extra-live-v2.css +extra_javascript: + - javascripts/mobile-nav-inline.js + - javascripts/legacy-version-banner.js +extra: + version: + provider: mike + default: latest + alias: true + social: + - icon: fontawesome/brands/github + link: https://github.com/EdgeTX/lua-reference-guide + - icon: fontawesome/brands/discord + link: https://discord.gg/wF9wUKnZ6H +nav: + - EdgeTX Lua Reference Guide: index.md + - API Overview: + - API Overview: api-overview/README.md + - Lua version: + - Lua version: api-overview/version-libraries/README.md + - io Library: api-overview/version-libraries/io-library.md + - Script Types: + - Script Types: api-overview/script-types/README.md + - One-Time Scripts: api-overview/script-types/one-time-scripts.md + - Telemetry Scripts: api-overview/script-types/telemetry-scripts.md + - Widget Scripts: api-overview/script-types/widget-scripts.md + - Function Scripts: api-overview/script-types/function-scripts.md + - Mixes Scripts: api-overview/script-types/mixes-scripts.md + - Constants: + - api-overview/constants/README.md + - Color Constants: api-overview/constants/color-constants.md + - Flags and Pattern Constants: api-overview/constants/flags-and-pattern-constants.md + - Key Event Constants: api-overview/constants/key-event-constants.md + - Key Event Mechanism: api-overview/constants/key_events.md + - Logical Switch Function Constants: api-overview/constants/logical-switch-function-constants.md + - LVGL Constants: api-overview/constants/lvgl-constants.md + - Screen Constants: api-overview/constants/screen-constants.md + - Special Character Constants: api-overview/constants/special-character-constants.md + - Special Function Constants: api-overview/constants/special-function-constants.md + - Touch Event Constants: api-overview/constants/touch-event-constants.md + - Widget Options Constants: api-overview/constants/widget-options.md + - Units: api-overview/constants/units.md + - Sources and Switches: + - Sources and Switches: api-overview/internal-indexes/README.md + - Sources: api-overview/internal-indexes/source-list.md + - Switches: api-overview/internal-indexes/switch-positions-id.md + - Fonts: api-overview/fonts.md + - API Reference: + - API Reference: api-reference/index.md + # BEGIN GENERATED -- tools/docs_pipeline.py update-nav; do not hand-edit + - Audio-Sound: + - Audio-Sound: api-reference/audio-sound/index.md + - flushAudio: api-reference/audio-sound/flush-audio.md + - playDuration: api-reference/audio-sound/play-duration.md + - playFile: api-reference/audio-sound/play-file.md + - playHaptic: api-reference/audio-sound/play-haptic.md + - playNumber: api-reference/audio-sound/play-number.md + - playTone: api-reference/audio-sound/play-tone.md + - Display LCD: + - Display LCD: api-reference/display-lcd/index.md + - Bitmap.getSize: api-reference/display-lcd/bitmap-get-size.md + - Bitmap.open: api-reference/display-lcd/bitmap-open.md + - Bitmap.resize: api-reference/display-lcd/bitmap-resize.md + - Bitmap.toMask: api-reference/display-lcd/bitmap-to-mask.md + - GREY: api-reference/display-lcd/grey.md + - lcd.RGB: api-reference/display-lcd/lcd-rgb.md + - lcd.clear: api-reference/display-lcd/lcd-clear.md + - lcd.drawAnnulus: api-reference/display-lcd/lcd-draw-annulus.md + - lcd.drawArc: api-reference/display-lcd/lcd-draw-arc.md + - lcd.drawBitmap: api-reference/display-lcd/lcd-draw-bitmap.md + - lcd.drawBitmapPattern: api-reference/display-lcd/lcd-draw-bitmap-pattern.md + - lcd.drawBitmapPatternPie: api-reference/display-lcd/lcd-draw-bitmap-pattern-pie.md + - lcd.drawChannel: api-reference/display-lcd/lcd-draw-channel.md + - lcd.drawCircle: api-reference/display-lcd/lcd-draw-circle.md + - lcd.drawCombobox: api-reference/display-lcd/lcd-draw-combobox.md + - lcd.drawFilledCircle: api-reference/display-lcd/lcd-draw-filled-circle.md + - lcd.drawFilledRectangle: api-reference/display-lcd/lcd-draw-filled-rectangle.md + - lcd.drawFilledTriangle: api-reference/display-lcd/lcd-draw-filled-triangle.md + - lcd.drawGauge: api-reference/display-lcd/lcd-draw-gauge.md + - lcd.drawHudRectangle: api-reference/display-lcd/lcd-draw-hud-rectangle.md + - lcd.drawLine: api-reference/display-lcd/lcd-draw-line.md + - lcd.drawLineWithClipping: api-reference/display-lcd/lcd-draw-line-with-clipping.md + - lcd.drawNumber: api-reference/display-lcd/lcd-draw-number.md + - lcd.drawPie: api-reference/display-lcd/lcd-draw-pie.md + - lcd.drawPixmap: api-reference/display-lcd/lcd-draw-pixmap.md + - lcd.drawPoint: api-reference/display-lcd/lcd-draw-point.md + - lcd.drawRectangle: api-reference/display-lcd/lcd-draw-rectangle.md + - lcd.drawScreenTitle: api-reference/display-lcd/lcd-draw-screen-title.md + - lcd.drawSource: api-reference/display-lcd/lcd-draw-source.md + - lcd.drawSwitch: api-reference/display-lcd/lcd-draw-switch.md + - lcd.drawText: api-reference/display-lcd/lcd-draw-text.md + - lcd.drawTextLines: api-reference/display-lcd/lcd-draw-text-lines.md + - lcd.drawTimer: api-reference/display-lcd/lcd-draw-timer.md + - lcd.drawTriangle: api-reference/display-lcd/lcd-draw-triangle.md + - lcd.exitFullScreen: api-reference/display-lcd/lcd-exit-full-screen.md + - lcd.getColor: api-reference/display-lcd/lcd-get-color.md + - lcd.getLastLeftPos: api-reference/display-lcd/lcd-get-last-left-pos.md + - lcd.getLastPos: api-reference/display-lcd/lcd-get-last-pos.md + - lcd.getLastRightPos: api-reference/display-lcd/lcd-get-last-right-pos.md + - lcd.invertRect: api-reference/display-lcd/lcd-invert-rect.md + - lcd.refresh: api-reference/display-lcd/lcd-refresh.md + - lcd.resetBacklightTimeout: api-reference/display-lcd/lcd-reset-backlight-timeout.md + - lcd.setColor: api-reference/display-lcd/lcd-set-color.md + - lcd.sizeText: api-reference/display-lcd/lcd-size-text.md + - popupConfirmation: api-reference/display-lcd/popup-confirmation.md + - popupInput: api-reference/display-lcd/popup-input.md + - popupWarning: api-reference/display-lcd/popup-warning.md + - Display LVGL: + - Display LVGL: api-reference/display-lvgl/index.md + - lvgl.align: api-reference/display-lvgl/lvgl-align.md + - lvgl.arc: api-reference/display-lvgl/lvgl-arc.md + - lvgl.box: api-reference/display-lvgl/lvgl-box.md + - lvgl.build: api-reference/display-lvgl/lvgl-build.md + - lvgl.button: api-reference/display-lvgl/lvgl-button.md + - lvgl.choice: api-reference/display-lvgl/lvgl-choice.md + - lvgl.circle: api-reference/display-lvgl/lvgl-circle.md + - lvgl.clear: api-reference/display-lvgl/lvgl-clear.md + - lvgl.close: api-reference/display-lvgl/lvgl-close.md + - lvgl.color: api-reference/display-lvgl/lvgl-color.md + - lvgl.confirm: api-reference/display-lvgl/lvgl-confirm.md + - lvgl.dialog: api-reference/display-lvgl/lvgl-dialog.md + - lvgl.disable: api-reference/display-lvgl/lvgl-disable.md + - lvgl.enable: api-reference/display-lvgl/lvgl-enable.md + - lvgl.exitFullScreen: api-reference/display-lvgl/lvgl-exit-full-screen.md + - lvgl.file: api-reference/display-lvgl/lvgl-file.md + - lvgl.font: api-reference/display-lvgl/lvgl-font.md + - lvgl.getContext: api-reference/display-lvgl/lvgl-get-context.md + - lvgl.getScrollPos: api-reference/display-lvgl/lvgl-get-scroll-pos.md + - lvgl.hide: api-reference/display-lvgl/lvgl-hide.md + - lvgl.hline: api-reference/display-lvgl/lvgl-hline.md + - lvgl.image: api-reference/display-lvgl/lvgl-image.md + - lvgl.isAppMode: api-reference/display-lvgl/lvgl-is-app-mode.md + - lvgl.isFullScreen: api-reference/display-lvgl/lvgl-is-full-screen.md + - lvgl.label: api-reference/display-lvgl/lvgl-label.md + - lvgl.line: api-reference/display-lvgl/lvgl-line.md + - lvgl.menu: api-reference/display-lvgl/lvgl-menu.md + - lvgl.message: api-reference/display-lvgl/lvgl-message.md + - lvgl.momentaryButton: api-reference/display-lvgl/lvgl-momentary-button.md + - lvgl.numberEdit: api-reference/display-lvgl/lvgl-number-edit.md + - lvgl.page: api-reference/display-lvgl/lvgl-page.md + - lvgl.qrcode: api-reference/display-lvgl/lvgl-qrcode.md + - lvgl.rectangle: api-reference/display-lvgl/lvgl-rectangle.md + - lvgl.set: api-reference/display-lvgl/lvgl-set.md + - lvgl.setting: api-reference/display-lvgl/lvgl-setting.md + - lvgl.show: api-reference/display-lvgl/lvgl-show.md + - lvgl.slider: api-reference/display-lvgl/lvgl-slider.md + - lvgl.source: api-reference/display-lvgl/lvgl-source.md + - lvgl.switch: api-reference/display-lvgl/lvgl-switch.md + - lvgl.textEdit: api-reference/display-lvgl/lvgl-text-edit.md + - lvgl.timer: api-reference/display-lvgl/lvgl-timer.md + - lvgl.toggle: api-reference/display-lvgl/lvgl-toggle.md + - lvgl.triangle: api-reference/display-lvgl/lvgl-triangle.md + - lvgl.verticalSlider: api-reference/display-lvgl/lvgl-vertical-slider.md + - lvgl.vline: api-reference/display-lvgl/lvgl-vline.md + - Filesystem: + - Filesystem: api-reference/filesystem/index.md + - chdir: api-reference/filesystem/chdir.md + - del: api-reference/filesystem/del.md + - dir: api-reference/filesystem/dir.md + - fstat: api-reference/filesystem/fstat.md + - mkdir: api-reference/filesystem/mkdir.md + - rename: api-reference/filesystem/rename.md + - Inputs: + - Inputs: api-reference/key-inputs/index.md + - defaultChannel: api-reference/key-inputs/default-channel.md + - defaultStick: api-reference/key-inputs/default-stick.md + - getRotEncMode: api-reference/key-inputs/get-rot-enc-mode.md + - getRotEncSpeed: api-reference/key-inputs/get-rot-enc-speed.md + - killEvents: api-reference/key-inputs/kill-events.md + - Lua Scripts: + - Lua Scripts: api-reference/lua-scripts/index.md + - loadScript: api-reference/lua-scripts/load-script.md + - Model Functions: + - Model Functions: api-reference/model-functions/index.md + - getFlightMode: api-reference/model-functions/get-flight-mode.md + - getOutputValue: api-reference/model-functions/get-output-value.md + - model.defaultInputs: api-reference/model-functions/model-default-inputs.md + - model.deleteFlightModes: api-reference/model-functions/model-delete-flight-modes.md + - model.deleteInput: api-reference/model-functions/model-delete-input.md + - model.deleteInputs: api-reference/model-functions/model-delete-inputs.md + - model.deleteMix: api-reference/model-functions/model-delete-mix.md + - model.deleteMixes: api-reference/model-functions/model-delete-mixes.md + - model.getCurve: api-reference/model-functions/model-get-curve.md + - model.getCustomFunction: api-reference/model-functions/model-get-custom-function.md + - model.getFlightMode: api-reference/model-functions/model-get-flight-mode.md + - model.getGlobalVariable: api-reference/model-functions/model-get-global-variable.md + - model.getGlobalVariableDetails: api-reference/model-functions/model-get-global-variable-details.md + - model.getInfo: api-reference/model-functions/model-get-info.md + - model.getInput: api-reference/model-functions/model-get-input.md + - model.getInputsCount: api-reference/model-functions/model-get-inputs-count.md + - model.getLogicalSwitch: api-reference/model-functions/model-get-logical-switch.md + - model.getMix: api-reference/model-functions/model-get-mix.md + - model.getMixesCount: api-reference/model-functions/model-get-mixes-count.md + - model.getModule: api-reference/model-functions/model-get-module.md + - model.getOutput: api-reference/model-functions/model-get-output.md + - model.getSensor: api-reference/model-functions/model-get-sensor.md + - model.getSwashRing: api-reference/model-functions/model-get-swash-ring.md + - model.getTimer: api-reference/model-functions/model-get-timer.md + - model.insertInput: api-reference/model-functions/model-insert-input.md + - model.insertMix: api-reference/model-functions/model-insert-mix.md + - model.resetSensor: api-reference/model-functions/model-reset-sensor.md + - model.resetTimer: api-reference/model-functions/model-reset-timer.md + - model.setCurve: api-reference/model-functions/model-set-curve.md + - model.setCustomFunction: api-reference/model-functions/model-set-custom-function.md + - model.setFlightMode: api-reference/model-functions/model-set-flight-mode.md + - model.setGlobalVariable: api-reference/model-functions/model-set-global-variable.md + - model.setGlobalVariableDetails: api-reference/model-functions/model-set-global-variable-details.md + - model.setInfo: api-reference/model-functions/model-set-info.md + - model.setLogicalSwitch: api-reference/model-functions/model-set-logical-switch.md + - model.setModule: api-reference/model-functions/model-set-module.md + - model.setOutput: api-reference/model-functions/model-set-output.md + - model.setSwashRing: api-reference/model-functions/model-set-swash-ring.md + - model.setTimer: api-reference/model-functions/model-set-timer.md + - RF module: + - RF module: api-reference/rf-module/index.md + - accessTelemetryPush: api-reference/rf-module/access-telemetry-push.md + - crossfireTelemetryPush: api-reference/rf-module/crossfire-telemetry-push.md + - ghostTelemetryPush: api-reference/rf-module/ghost-telemetry-push.md + - multiBuffer: api-reference/rf-module/multi-buffer.md + - sportTelemetryPush: api-reference/rf-module/sport-telemetry-push.md + - Radio Hardware: + - Radio Hardware: api-reference/radio-hardware/index.md + - applyRGBLedColors: api-reference/radio-hardware/apply-rgbled-colors.md + - getStickMode: api-reference/radio-hardware/get-stick-mode.md + - getTxGPS: api-reference/radio-hardware/get-tx-gps.md + - setCFSLedColor: api-reference/radio-hardware/set-cfsled-color.md + - setIMU_X: api-reference/radio-hardware/set-imu-x.md + - setIMU_Y: api-reference/radio-hardware/set-imu-y.md + - setRGBLedColor: api-reference/radio-hardware/set-rgbled-color.md + - Serial Ports: + - Serial Ports: api-reference/serial-ports/index.md + - serialGetPower: api-reference/serial-ports/serial-get-power.md + - serialRead: api-reference/serial-ports/serial-read.md + - serialSetPower: api-reference/serial-ports/serial-set-power.md + - serialWrite: api-reference/serial-ports/serial-write.md + - setSerialBaudrate: api-reference/serial-ports/set-serial-baudrate.md + - Sources: + - Sources: api-reference/sources/index.md + - getFieldInfo: api-reference/sources/get-field-info.md + - getSourceIndex: api-reference/sources/get-source-index.md + - getSourceName: api-reference/sources/get-source-name.md + - getSourceValue: api-reference/sources/get-source-value.md + - getValue: api-reference/sources/get-value.md + - sources: api-reference/sources/sources.md + - Switches: + - Switches: api-reference/switches/index.md + - getLogicalSwitchValue: api-reference/switches/get-logical-switch-value.md + - getSwitchIndex: api-reference/switches/get-switch-index.md + - getSwitchInfo: api-reference/switches/get-switch-info.md + - getSwitchName: api-reference/switches/get-switch-name.md + - getSwitchValue: api-reference/switches/get-switch-value.md + - setStickySwitch: api-reference/switches/set-sticky-switch.md + - switches: api-reference/switches/switches.md + - System: + - System: api-reference/system/index.md + - getAvailableMemory: api-reference/system/get-available-memory.md + - getGeneralSettings: api-reference/system/get-general-settings.md + - getUsage: api-reference/system/get-usage.md + - getVersion: api-reference/system/get-version.md + - screenshot: api-reference/system/screenshot.md + - Telemetry: + - Telemetry: api-reference/telemetry/index.md + - crossfireTelemetryPop: api-reference/telemetry/crossfire-telemetry-pop.md + - getRAS: api-reference/telemetry/get-ras.md + - getRSSI: api-reference/telemetry/get-rssi.md + - getTrainerStatus: api-reference/telemetry/get-trainer-status.md + - ghostTelemetryPop: api-reference/telemetry/ghost-telemetry-pop.md + - setTelemetryValue: api-reference/telemetry/set-telemetry-value.md + - sportTelemetryPop: api-reference/telemetry/sport-telemetry-pop.md + - Time: + - Time: api-reference/time/index.md + - getDateTime: api-reference/time/get-date-time.md + - getGlobalTimer: api-reference/time/get-global-timer.md + - getRtcTime: api-reference/time/get-rtc-time.md + - getTime: api-reference/time/get-time.md + - resetGlobalTimer: api-reference/time/reset-global-timer.md + - Variables: + - Variables: api-reference/variables/index.md + - getShmVar: api-reference/variables/get-shm-var.md + - setShmVar: api-reference/variables/set-shm-var.md + # END GENERATED + - Programming: + - Programming: programming/README.md + - Basics: + - Lua Basics: api-overview/lua-basics.md + - Editor: programming/basics/editor.md + - Files and Organization: programming/basics/files-and-organization.md + - Naming: programming/basics/naming.md + - Practicing: programming/basics/practicing.md + - Testing: programming/basics/testing.md + - Troubleshooting: programming/basics/troubleshooting.md + - Memory: programming/basics/memory.md + - Performance: programming/basics/performance.md + - Core Concepts: + - Using Flags and Colors: programming/core-concepts/drawing-flags-and-colors.md + - Using LVGL Library: programming/core-concepts/lvgl-for-lua.md + - Using Key and Touch Events: programming/core-concepts/using-key-and-touch-events.md + - Data Exchange with the EdgeTX Model Setup: programming/core-concepts/data-exchange-with-the-edgetx-model-setup.md + - Advanced Topics: + - Debugging techniques: programming/advanced-topics/debugging-techniques.md + - Loading Code Modules Dynamically: programming/core-concepts/loading-code-modules-dynamically.md + - Lua data sharing across scripts: programming/advanced-topics/lua-data-sharing-across-scripts.md + - Saving Memory: programming/core-concepts/saving-memory.md + - Speed/memory optimizaton tricks: programming/advanced-topics/optimization-tricks.md + - Radios: + - radios/README.md + - BetaFPV: + - radios/betafpv/README.md + - LiteRadio3 Pro: radios/betafpv/betafpv-literadio3-pro.md + - FatFish: + - radios/fatfish/README.md + - F16: radios/fatfish/fatfish-f16.md + - FlySky: + - radios/flysky/README.md + - EL18: radios/flysky/flysky-el18.md + - NB4+: radios/flysky/flysky-nb4-plus.md + - NV14: radios/flysky/flysky-nv14.md + - PA01: radios/flysky/flysky-pa01.md + - PL18 / PL18EV: radios/flysky/flysky-pl18-pl18ev.md + - PL18U: radios/flysky/flysky-pl18u.md + - ST16: radios/flysky/flysky-st16.md + - FrSky: + - radios/frsky/README.md + - QX7 / QX7S / QX7 ACCESS / QX7S ACCESS: radios/frsky/frsky-qx7-qx7s.md + - X-Lite / X-Lite S / X-Lite Pro: radios/frsky/frsky-x-lite-x-lite-s-x-lite-pro.md + - X9 Lite / X9 Lite S: radios/frsky/frsky-x9-lite-x9-lite-s.md + - X9D / X9D+ / X9D SE: radios/frsky/frsky-x9d-x9d-plus-x9d-plus-se.md + - X9D+ 2019 / X9D+ 2019 SE: radios/frsky/frsky-x9dp2019.md + - X9E / X9E Hall: radios/frsky/frsky-x9e-x9e-hall.md + - X10 / X10S / X10 Express / X10S Express: radios/frsky/frsky-x10express.md + - X12S / X12S IRSM: radios/frsky/frsky-x12s-x12s-irsm.md + - HelloRadioSky: + - radios/helloradiosky/README.md + - V12: radios/helloradiosky/helloradiosky-v12.md + - V14: radios/helloradiosky/helloradiosky-v14.md + - V16: radios/helloradiosky/helloradiosky-v16.md + - iFlight: + - radios/iflight/README.md + - Commando8: radios/iflight/iflight-commando8.md + - Commando14: radios/iflight/iflight-commando14.md + - Jumper: + - radios/jumper/README.md + - Bumblebee: radios/jumper/jumper-bumblebee.md + - T-Lite / T-Lite v2: radios/jumper/jumper-t-lite-t-lite-v2.md + - T-Pro: radios/jumper/jumper-t-pro.md + - T-12 / T12 Plus / T12 Pro Hall: radios/jumper/jumper-t12-t12-plus-t12-pro-hall.md + - T-14: radios/jumper/jumper-t14.md + - T-20: radios/jumper/jumper-t20.md + - T15: radios/jumper/jumper-t15.md + - T15 Pro: radios/jumper/jumper-t15-pro.md + - T16 / T16 Plus / T16 Pro Hall: radios/jumper/jumper-t16-t16-plus-t16-pro-hall.md + - T18 / T18 Lite / T18 Pro: radios/jumper/jumper-t18-t18-lite-t18-pro.md + - T20 V2: radios/jumper/jumper-t20-v2.md + - RadioMaster: + - radios/radiomaster/README.md + - Boxer: radios/radiomaster/radiomaster-boxer.md + - GX12: radios/radiomaster/radiomaster-gx12.md + - MT12: radios/radiomaster/radiomaster-mt12.md + - Pocket: radios/radiomaster/radiomaster-pocket.md + - T8 Pro: radios/radiomaster/radiomaster-t8-pro.md + - TX12: radios/radiomaster/radiomaster-tx12.md + - TX12 Mark II: radios/radiomaster/radiomaster-tx12-mark-ii.md + - Zorro: radios/radiomaster/radiomaster-zorro.md + - TX15: radios/radiomaster/radiomaster-tx15.md + - TX16S / TX16S MAX / TX16S Mark II: radios/radiomaster/radiomaster-tx16s.md + - TX16S MK3 / TX16S MK3 MAX: radios/radiomaster/radiomaster-tx16smk3.md + # - TBS: + # - radios/tbs/README.md +markdown_extensions: + - tables + - admonition + - pymdownx.details + - pymdownx.superfences + - pymdownx.highlight: + anchor_linenums: true + - pymdownx.inlinehilite + - pymdownx.snippets + - pymdownx.tabbed: + alternate_style: true + - pymdownx.tilde + - attr_list + - md_in_html + - toc: + permalink: true diff --git a/overview/README.md b/overview/README.md deleted file mode 100644 index f4a577a62..000000000 --- a/overview/README.md +++ /dev/null @@ -1,14 +0,0 @@ ---- -description: >- - This section covers various topics of LUA implementation in EdgeTX operating - system system ---- - -# Overview - -| Topic | Description | -| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------- | -| LUA Basics | Brief introduction to LUA language | -| LUA Version and included libraries | Dut to memory limits not all standard LUA libraries are included in EdgeTX embedded version of LUA interpreter & compiler. | -| Script Types | EdgeTX allows to use various LUA scripts for different purposes. Here you can check which one suits your needs. | - diff --git a/overview/internal-indexes/README.md b/overview/internal-indexes/README.md deleted file mode 100644 index f8c8ea514..000000000 --- a/overview/internal-indexes/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Internal indexes - diff --git a/overview/radios/README.md b/overview/radios/README.md deleted file mode 100644 index 2e150753e..000000000 --- a/overview/radios/README.md +++ /dev/null @@ -1,15 +0,0 @@ -# Radios - -## Radios with B\&W LCD screen - -
    ManufacturerModelintroduced in EdgeTX
    RadioMasterTX122.4
    RadioMasterT8 Pro2.4
    RadioMasterZorro2.6
    RadioMasterTX12 Mark II2.8
    RadioMaster Boxer2.8.1
    RadioMasterMT122.10
    RadioMasterPocket 2.10
    JumperT-Lite / T-Lite v22.4
    JumperT-12 / T12 Pro / T12 Pro Hall2.4
    JumperT-Pro2.6
    JumperT-142.10
    JumperT-202.10
    FrSkyQX7 / QX7S / QX7 ACCESS / QX7S ACCESS2.4
    FrSkyX9 Lite / X9 Lite S2.4
    FrSkyX9E / X9E Hall2.4
    FrSkyX-Lite / X-Lite S / X-Lite Pro2.4
    iFlightCommando82.8
    BetaflightLireRadio32.8
    - -## Radios with Grayscale LCD screen - -
    ManufacturerModelintroduced in EdgeTX
    FrSkyX9D / X9D+ / X9D SE2.4
    FrSkyX9D+2019 / X9D+2019 SE2.4
    - -## Radios with COLOR LCD screen - -
    ManufacturerModelintroduced in EdgeTX
    FlyskyNV142.5
    FlyskyEL182.8
    RadioMasterTX16S / TX16S MAX / TX16S Mark II2.4
    JumperT16 / T16 Plus / T16 Pro Hall2.4
    JumperT18 / T18 Lite / T18 Pro2.4
    EachineTX16S2.4
    FrSkyX10 / X10S / X10S Express / X10S Express2.4
    FrSkyX12S / X12S IRSM2.4
    - -### diff --git a/overview/radios/betafpv.md b/overview/radios/betafpv.md deleted file mode 100644 index bd6f6dbcc..000000000 --- a/overview/radios/betafpv.md +++ /dev/null @@ -1,2 +0,0 @@ -# BetaFPV - diff --git a/overview/radios/flysky.md b/overview/radios/flysky.md deleted file mode 100644 index b3a34ce3e..000000000 --- a/overview/radios/flysky.md +++ /dev/null @@ -1,2 +0,0 @@ -# FlySky - diff --git a/overview/radios/frsky.md b/overview/radios/frsky.md deleted file mode 100644 index 7d51a59ce..000000000 --- a/overview/radios/frsky.md +++ /dev/null @@ -1,2 +0,0 @@ -# FrSky - diff --git a/overview/radios/jumper.md b/overview/radios/jumper.md deleted file mode 100644 index b43efc67b..000000000 --- a/overview/radios/jumper.md +++ /dev/null @@ -1,2 +0,0 @@ -# Jumper - diff --git a/overview/radios/radiomaster/README.md b/overview/radios/radiomaster/README.md deleted file mode 100644 index 01420d8a5..000000000 --- a/overview/radios/radiomaster/README.md +++ /dev/null @@ -1,2 +0,0 @@ -# Radiomaster - diff --git a/overview/radios/radiomaster/tx16s.md b/overview/radios/radiomaster/tx16s.md deleted file mode 100644 index 41ab92d40..000000000 --- a/overview/radios/radiomaster/tx16s.md +++ /dev/null @@ -1,15 +0,0 @@ -# Radiomaster TX16S - -## Technical Data - -
    NameTX16S
    MCUSTM32F7
    LCD typecolor TFT or IPS
    LCD size480x320
    LCD color depth16 bit - RGB565
    Internal moduleMulti-module, ELRS
    External Module BayYes (JR micro)
    - -## LUA data - -| getVersion() name | tx16s | -| ----------------- | ----- | -| LCD\_W | 480 | -| LCD\_H | 320 | -| memory for LUA | 1MB | - -## Inputs overview diff --git a/overview/script-types/README.md b/overview/script-types/README.md deleted file mode 100644 index a3a6290d6..000000000 --- a/overview/script-types/README.md +++ /dev/null @@ -1,8 +0,0 @@ ---- -description: >- - This section introduces the types of Lua scripts supported by EdgeTX and how - they may be used. ---- - -# Part I - Script Type Overview - diff --git a/overview/script-types/mixes-scripts.md b/overview/script-types/mixes-scripts.md deleted file mode 100644 index a2be0f397..000000000 --- a/overview/script-types/mixes-scripts.md +++ /dev/null @@ -1,168 +0,0 @@ -# Mixes Scripts - -{% hint style="warning" %} -### Don't use Lua Mixes Scripts for controlling any aspect of your model that could cause a crash if the script stops executing! -{% endhint %} - -## Purpose - -Mixes Scripts take one or more values as inputs, do some processing in Lua code, and output one or more values. Each model can have several Mixes Scripts associated with it, and these scripts are run periodically. They behave similarly to standard EdgeTX mixers, but at the same time they provide a much more flexible and powerful tool. - -Typical use cases: - -* replacement for complex mixes that are _not critical_ to model function -* complex processing of inputs and reaction to their current state and/or their history -* filtering of telemetry values - -## Execution & Lifetime - -Mixes script is loded when model is selected.\ -\ -Script executes until - -* it misbehaves (e.g. run-time error or low memory) -* [One-time Script](one-time-scripts.md) is running. When One-time script finishes execution, Wigdet Script resumes execution. - -{% hint style="warning" %} -### Limitations - -* cannot update LCD screen or perform user input. -* should not exceed allowed run-time/ number of instructions. -* custom scripts are run with less priority than built-in mixes. Their execution period is around 30ms and is not guaranteed! -{% endhint %} - -{% hint style="warning" %} -If the script output is used as a `mixer source` , and the **script is killed** for whatever reason, then _the_ **whole mixer line is disabled**! -{% endhint %} - -{% hint style="info" %} -Mixes Scripts should be as short as possible, to avoid delays. It is also important to keep in mind that other loaded Telemetry and Function scripts can add to the response time, or worse: hang the system! -{% endhint %} - -{% hint style="info" %} -By default, the necessary compile time option `LUA_MIXER` to use Mixes Scripts is enabled for all radio targets from EdgeTX v2.11 onwards. -{% endhint %} - - - -## File Location - -Mixes scripts are located on SD card in folder /SCRIPTS/MIXES/ - -{% hint style="warning" %} -File name length (without extension) **must be 6 characters or less** -{% endhint %} - - - -## Interface - -Every Mixes Script must include a `return` statement at the end, defining its interface to EdgeTX. This statement returns a table with the following fields: - -| table item | type | required | -| ---------- | -------- | -------- | -| **run** | function | yes | - -This function is called periodicaly when script is running. \ -\ -**Parameters** \ -Variables matching those used in `input` table\ -\ -**Return values**\ -Variables matching those used in `output` table\ - - -| table item | type | required | -| ---------- | -------- | -------- | -| **init** | function | no | - -This function is called once when Mixes Script is loaded and executed for the first time - -**Parameters**\ -none\ -\ -**Return values**\ -none\ - - -| table item | type | required | -| ---------- | ----- | -------- | -| **input** | table | yes | - -The input table defines what values are available as input(s) to custom scripts. - -There are two forms of input table entries - -**SOURCE** - -``` -{ "", SOURCE } -``` - -SOURCE inputs provide the current value of a selected OpenTX variable. The source must be selected by the user when the script is configured. Source can be any value that EdgeTX knows about (inputs, channels, telemetry values, switches, custom functions etc.).\ -**Note:** the typical input range is -1024 thru +1024. Simply divide the input value by 10.24 to convert to a percentage from -100% to +100%. - -**VALUE** - -``` -{ "", VALUE, , , } -``` - -VALUE inputs provide a constant value that is set by the user when the script is configured. - -* _name_ - maximum length of 8 characters -* _min_ - minimum value of -128 -* _max_ - maximum value of 127 -* _default_ - must be within the valid range specified -* **Maximum of 6 inputs per script** - - - -| table item | type | required | -| ---------- | ----- | -------- | -| **output** | table | yes | - -The output table defines only name(s), as the actual values are returned by the script's run function. - -```lua -{ "", "" } -``` - -{% hint style="info" %} -Above names are only visible as source values on the radio screen when the script is running. If the model is edited in Companion, then the values show as `LUA1a` and `LUA1b` etc. -{% endhint %} - - - -### Examples - -Example of \. - -```lua -local my_input = - { - { "Strength", SOURCE}, -- user selects source (typically slider or knob) - { "Interval", VALUE, 0, 100, 0 } -- interval value, default = 0. - } - -local my_output = { "Val1", "Val2" } - -local function my_init() - -- Called once when the script is loaded -end - -local function my_run(Strength, Interval) -- Must match input table - local v1, v2 - -- Called periodically - return v1, v2 -- Must match output table -end - -return { input = my_input, output = my_output, run = my_run, init = my_init } -``` - -Example where Lua mix script is used to drive ailerons in some clever way, but control falls back to the standard aileron mix if script is killed. Second mixer line replaces the first one when the script is alive: - -``` -CH1 [I4]Ail Weight(+100%) - := LUA4b Weight(+100%) -``` diff --git a/overview/script-types/one-time-scripts.md b/overview/script-types/one-time-scripts.md deleted file mode 100644 index 9e14f23b6..000000000 --- a/overview/script-types/one-time-scripts.md +++ /dev/null @@ -1,106 +0,0 @@ -# One-Time Scripts - -## Purpose - -One-time scripts are used mainly to perform tasks that are not connected with flying. In example ELRS configuration LUA script. They do their task and are then terminated (by user or function) and unloaded. - -## Execution & Lifetime - -Script is executed when user selects "Execute" on a script file from SD card browser screen, or opens a Lua Tool, or creates a new model with a Wizard script. - -The script executes until: - -* it returns value different from 0 (except returning string that contains new script name to be executed) -* is forcefully closed by user by long press of EXIT key -* is forcefully closed by system if it misbehaves (e.g. run-time error or low - - memory) - -{% hint style="danger" %} -**Running a One-Time script will suspend execution of all other currently loaded Lua scripts (Custom, Telemetry, and Functions). They are automatically restarted once the One-Time script is finished. This is done to provide enough system resources to execute the One-Time script.** -{% endhint %} - -## File Location - -One-Time Scripts can be placed anywhere on SD card, however, the folder /SCRIPTS/ is recommended. - -{% hint style="info" %} -If One-Time Script is placed in special folder /SCRIPTS/TOOLS it will be visible in EdgeTX RADIO>TOOLS tab\ -\ -To give this One-Time Script unique name place at the beginning of lua script line:\ -`-- toolName = "TNS|ScriptName|TNE` - -Otherwise script's filename will be used to display in RADIO>TOOLS list. -{% endhint %} - -{% hint style="info" %} -Wizard scripts must be stored in the same subfolder of /TEMPLATES/ with the same "first name" as the template file using it. Some Wizard scripts are just small scripts that load one of the common scripts located in /SCRIPTS/WIZARD/. -{% endhint %} - -## **Interface** - -Every script must include a `return` statement at the end, defining its interface to EdgeTX. This statement returns a table with the following fields: - -
    FieldTypeRequiredDesctiption
    runfunctiontrueFunction is called periodicaly when script is running.
    - -_Parameters_ - -
    ParameterDecription
    event
    number
    Used to indicates which radio key has been pressed (see Key Events)
    touchState
    table
    This parameter is only present when radio is equiped with touch interface and event is a touch event (see Touch State Events).
    - -_Return values_ - -
    ReturnsDescription
    exit
    multi type
    • if exit value is 0 (zero) script will continue to run
    • if exit value is non-zero script will be halted.
    • If exit value is a text string with the file path to a new Lua script, then the new script will be loaded and run.
    - - - -
    FieldTypeRequiredDesctiption
    initfunctionfalseThis function is called once when script is executed
    - -_Parameters_\ -none - -_Return Values_\ -none - - - -## Examples - -Simplest one-time LUA script - -```lua -local function my_run(event, touchState) - print("Script run executed") - return 0 -end - -return { run = my_run } -``` - -{% hint style="info" %} -Because 0 is returned all the time this script will continue running until user long press EXIT (RTN) key. -{% endhint %} - -*** - -One-Time LUA script with initialization and exit feature if user short press and release EXIT (RTN) key - -```lua -local exit = 0 - -local function my_run(event, touchState) - print("Script my_run function executed") - -- code to execute - if event == EVT_VIRTUAL_EXIT then - print("Script exit executed") - exit = 1 - end - return exit -end - -local function my_init() - print("Script my_init function executed") - -- code to execute -end - -return { run = my_run, init = my_init } -``` diff --git a/overview/script-types/widget-scripts.md b/overview/script-types/widget-scripts.md deleted file mode 100644 index c577c3405..000000000 --- a/overview/script-types/widget-scripts.md +++ /dev/null @@ -1,196 +0,0 @@ -# Widget Scripts - -## Purpose - -Widget scripts are avaiable on radios equiped with color LCD. They are designed to run constantly in the background performinfg various task. Widget scripts are mostly used to extend EdgeTX functionality via _Widgets_ that are places by user on _Main Views_. They are equivalent of Telemetry Scripts on radios equiped with B\&W LCD. - -Most of the time, widget scripts show some info in a _Widget's zone_ in one of the user defined _Main Views._ They cannot receive direct input from the user via key events with exeption of being displayed in so called _Full Screen mode_. Full screen mode can be entered by selecting the widget, pressing ENTER and selecting **Full screen** from the widget's contextual menu, ~~or by double tapping the widget on radios with a touch screen~~. Full screen mode can be exited by long pressing the EXIT (RTN) button, or by calling the Lua function `lcd.exitFullScreen()`. - -Each model can have up to nine Main Views, with up to 8 widgets per screen, depending on their size and layout. Each instance of a widget has his own _options_ table. - -{% hint style="warning" %} -Widget scripts are only available on radios with color LCD screens, such as e.g. FrSky X10 or X12, Radiomaster TX16S, Jumper T16 or T18, Flysky NV14., etc.\ -Read more about _radios_. -{% endhint %} - -## Execution & Lifetime - -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. - -{% hint style="warning" %} - It is important to either keep Widget Scripts small, or to use Lua's [loadScript()](../../lua-api-reference/lua-scripts/loadscript.md) function to load code dynamically -{% endhint %} - -Script executes until: - -* it misbehaves (e.g. too long runtime, run-time error, or low memory) -* One-Time script is running. When One-time script finishes execution, Wigdet Script resumes execution. - -## File Location - -Widget scripts are located on the SD card, each one in their specific folder: \ -/WIDGETS/\/ - -{% hint style="warning" %} -Widget script folder name length **must be 8 characters or less** -{% endhint %} - -Widget script name is constant and has to be named **main.lua** - -{% hint style="info" %} -Example of proper Widget script placement to be registered by EdgeTX as valid Widget script available to user in Widgets selection menu:\ -/WIDGETS/MYWGT/main.lua -{% endhint %} - -{% hint style="info" %} -Try to use unique folder name. In case of naming clash, previously installed widget will be overwritten. -{% endhint %} - -## Interface - -Every Widget Script must include a `return` statement at the end, defining its interface to EdgeTX. This statement returns a table with the following fields: - -
    FieldTypeRequiredDesctiption
    namestringtrueThis variable holds a name that is displayed to user as Widget scripts name in available Widgets list.
    - -{% hint style="warning" %} -The `name` length must be 10 **characters or less**. -{% endhint %} - - - - - -
    FieldTypeRequiredDesctiption
    optionstablefalseOptions table is to store Widget's options available to EdgeTX user via Widget's Settings menu.
    To see valid options read Widget Options Constants.
    - -{% hint style="info" %} -`options` table is passed to `create` function when invoked and then stored in Lua. Changing options table values while Widget script is running has no effect. This table is designed to be changed with EdgeTX system menus. -{% endhint %} - -{% hint style="info" %} -If `options` is changed by the user in the Widget Settings menu, then `update` will be called with a new `options` table, unaffected by any changes made by Lua code to the old `options` table. -{% endhint %} - - - - - -
    FieldTypeRequiredDesctiption
    createfunctiontruefunction is called once when the widget instance is registered (started).
    - -_Parameters_ - -
    ParameterDecription
    zone
    table
    This parameter will hold visible dimensions of Widget (height & width)
    options
    table
    Initial options table as described above
    - -_Return values_ - -
    ReturnsDescription
    widget
    table
    Create function will return table that has to be later passed to update , background & refresh functions allowing to access widget's unique variables
    - -{% hint style="info" %} -The size of the widget's zone area is as follows: - -* Full screen mode: `LCD_W` by `LCD_H` -* Not full screen mode: `zone.w` by `zone.h` (updated if screen options are changed) -{% endhint %} - -{% hint style="info" %} -If local variables are declared outside functions in the widget script, then they are shared between all instances of the widget. Therefore, local variables that are private for each instance should be added to the `widget` table in the `create` function before returning the `widget` table to EdgeTX. -{% endhint %} - - - - - -
    FieldTypeRequiredDesctiption
    updatefunctionfalseThis function is called when Widget's Settings are changed by the user. It is mostly used to modify Widget Script variables or behaviour basing on options values entered by user.
    - -_Parameters_ - -
    ParameterDecription
    widget
    table
    Widget's table returned by create function, decribed above.
    options
    table
    Initial options table as described above
    - -_Return values_\ -_none_ - - - - - -
    FieldTypeRequiredDesctiption
    backgroundfunctionfalseThis function is called periodically when the widget instance is NOT VISIBLE.
    - -_Parameters_ - -
    ParameterDecription
    widget
    table
    Widget's table returned by create function, decribed above.
    - -_Return values_\ -_none_ - - - - - -
    FieldTypeRequiredDesctiption
    refreshfunctiontrueThis function is called periodically when the widget instance IS VISIBLE.
    - -_Parameters_ - -
    ParameterDecription
    widget
    table
    Widget's table returned by create function, decribed above.
    event
    number
    • When Widget Script is in full screen mode, then event is either 0, a key event value, or a touch event value.
    • When the widget is not in full screen mode, then event is nil

    See Key Events.

    touchState
    table

    This parameter is only present when radio is equiped with touch interface and event is a touch event.

    • If event is a touch event value, then touchState is a table. Otherwise, it is nil.
    • When the widget is not in full screen mode then touchState is nil


    See Touch State Events.

    - -_Return values_\ -_none_ - -{% hint style="info" %} -if you want `background` function to run when the widget is visible, then call it from `refresh function.` -{% endhint %} - - - -### Examples - -```lua -local name = "WidgetName" - --- Create a table with default options --- Options can be changed by the user from the Widget Settings menu --- Notice that each line is a table inside { } -local options = { - { "Source", SOURCE, 1 }, - -- BOOL is actually not a boolean, but toggles between 0 and 1 - { "Boolean", BOOL, 1 }, - { "Value", VALUE, 1, 0, 10}, - { "Color", COLOR, ORANGE }, - { "Text", STRING, "Max8chrs" } -} - -local function create(zone, options) - -- Runs one time when the widget instance is registered - -- Store zone and options in the widget table for later use - local widget = { - zone = zone, - options = options - } - -- Add local variables to the widget table, - -- unless you want to share with other instances! - widget.someVariable = 3 - -- Return widget table to EdgeTX - return widget -end - -local function update(widget, options) - -- Runs if options are changed from the Widget Settings menu - widget.options = options -end - -local function background(widget) - -- Runs periodically only when widget instance is not visible -end - -local function refresh(widget, event, touchState) - -- Runs periodically only when widget instance is visible - -- If full screen, then event is 0 or event value, otherwise nil -end - -return { - name = name, - options = options, - create = create, - update = update, - refresh = refresh, - background = background -} -``` diff --git a/overview/version-libraries/README.md b/overview/version-libraries/README.md deleted file mode 100644 index 81fba2dea..000000000 --- a/overview/version-libraries/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# LUA version and included libraries - -## LUA Version - -EdgeTX 2.10 uses LUA interpreter and compiler version 5.2 \ -For detailed reference read [Lua 5.2 Reference Manual](https://www.lua.org/manual/5.2/manual.html) - -## Included standard libraries - -| Lua Standard Libraries | Comment | -| -------------------------------------------------------- | -------------------------------------------------------------------- | -| [math](https://www.lua.org/manual/5.2/manual.html#6.6) | included | -| [string](https://www.lua.org/manual/5.2/manual.html#6.4) | included | -| [bit32](https://www.lua.org/manual/5.2/manual.html#6.7) | included | -| [table](https://www.lua.org/manual/5.2/manual.html#6.5) | included only on color LCD Radios | -| [io](io-library.md) | included partialy | -| package | not included | -| coroutine | not included | -| os | not included | -| debug | not included | diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 000000000..b49058885 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,15 @@ +[project] +name = "lua-reference-guide-docs" +version = "0.1.0" +description = "Docs tooling for the EdgeTX Lua Reference Guide migration" +requires-python = ">=3.11" +dependencies = [ + "mkdocs>=1.6,<2.0", + "mkdocs-material>=9.5,<10.0", + "mike>=2,<3", + "mkdocs-minify-plugin>=0.8,<1.0", + "markdown>=3.6,<4.0", +] + +[tool.uv] +package = false diff --git a/tools/docs_pipeline.py b/tools/docs_pipeline.py new file mode 100644 index 000000000..b5421694e --- /dev/null +++ b/tools/docs_pipeline.py @@ -0,0 +1,2001 @@ +#!/usr/bin/env python3 + +import argparse +import datetime +import json +import html +import markdown +import os +from pathlib import Path +import re +import sys +from collections import Counter + + +TYPE_DEFINITIONS_PATH = Path("docs-system/type-definitions.json") +REVIEW_DECISIONS_PATH = Path("docs-system/generated/review-decisions.json") +API_GROUPS_PATH = Path("docs-system/api-groups.json") +LUALS_BUILTIN_TYPES = { + "any", + "boolean", + "function", + "integer", + "nil", + "number", + "pointer", + "string", + "table", + "unknown", +} + + +def load_model(path: Path) -> dict: + with path.open("r", encoding="utf-8") as handle: + model = json.load(handle) + normalize_model(model) + validate_model(model) + return model + + +def load_type_definitions() -> dict: + if not TYPE_DEFINITIONS_PATH.exists(): + return {} + with TYPE_DEFINITIONS_PATH.open("r", encoding="utf-8") as handle: + return json.load(handle) + + +def load_review_decisions() -> dict: + if not REVIEW_DECISIONS_PATH.exists(): + return {} + with REVIEW_DECISIONS_PATH.open("r", encoding="utf-8") as handle: + return json.load(handle) + + +def load_api_groups() -> list[dict]: + if not API_GROUPS_PATH.exists(): + return [] + with API_GROUPS_PATH.open("r", encoding="utf-8") as handle: + payload = json.load(handle) + return payload.get("groups", []) + + +def normalize_model(model: dict) -> None: + for item in model.get("items", []): + item.setdefault("doc_id", default_doc_id(item["module"], item["id"])) + item.setdefault("aliases", []) + item.setdefault("deprecated_aliases", []) + item.setdefault("raw_luadoc", "") + item.setdefault("source_line", None) + + +def validate_model(model: dict) -> None: + required_root = ["docs_version", "upstream_ref", "generated_at", "items"] + for key in required_root: + if key not in model: + raise ValueError(f"missing root key: {key}") + + seen_ids = set() + for item in model["items"]: + for key in [ + "id", + "doc_id", + "symbol", + "module", + "kind", + "syntax", + "summary", + "parameters", + "returns", + "availability", + "notes", + "source_location", + "raw_luadoc", + "source_line", + ]: + if key not in item: + raise ValueError(f"item missing key {key}: {item.get('id', '')}") + + item_id = item["id"] + if item_id in seen_ids: + raise ValueError(f"duplicate item id: {item_id}") + seen_ids.add(item_id) + + if "since" not in item["availability"]: + raise ValueError(f"item missing availability.since: {item_id}") + + +def ensure_dir(path: Path) -> None: + path.mkdir(parents=True, exist_ok=True) + + +def unique_strings(values: list[str]) -> list[str]: + return list(dict.fromkeys(value for value in values if value)) + + +def slugify_token(text: str) -> str: + text = re.sub(r"([a-z0-9])([A-Z])", r"\1-\2", text) + text = re.sub(r"[^A-Za-z0-9]+", "-", text) + return text.strip("-").lower() + + +def scoped_symbol_parts(module: str, symbol: str) -> list[str]: + scoped_name = symbol + if module != "runtime" and symbol.startswith(f"{module}."): + scoped_name = symbol[len(module) + 1 :] + elif module == "runtime" and "." in symbol: + scoped_name = symbol.split(".", 1)[1] + return [slugify_token(part) for part in scoped_name.split(".")] + + +def default_doc_id(module: str, symbol: str) -> str: + parts = [slugify_token(module)] if module else [] + parts.extend(scoped_symbol_parts(module, symbol)) + return ".".join(part for part in parts if part) + + +def nested_item_slug(item: dict) -> str: + """Item-page filename stem for the nested-by-topic-group scheme. + + Unlike doc_id, this drops the "runtime" module qualifier for bare/ + ungrouped functions -- "runtime" is an internal doc-grouping label, + not a real Lua namespace, and the topic-group folder already + disambiguates those. Real namespaces (model., lcd., lvgl., Bitmap.) + are kept since the group folder doesn't imply a namespace. + """ + module = item["module"] + parts = scoped_symbol_parts(module, item["symbol"]) + if module != "runtime": + parts = [slugify_token(module)] + parts + return "-".join(part for part in parts if part) + + +def page_slug(text: str) -> str: + return safe_file_stem(text).replace(".", "-") + + +def group_for_item(item: dict) -> dict: + for group in load_api_groups(): + if item_matches_group(item, group): + return group + return { + "name": "Uncategorized", + "slug": "uncategorized", + "description": "APIs not yet assigned to a user-facing group.", + } + + +def page_name_for_item(item: dict) -> str: + group = group_for_item(item) + return str(Path(group["slug"]) / f"{nested_item_slug(item)}.md") + + +def review_page_name_for_item(item: dict) -> str: + return f"review-{page_slug(item['doc_id'])}.md" + + +def rendered_dir(path: Path) -> Path: + """The effective directory a page is served from under mkdocs' default + use_directory_urls behavior: foo/bar.md serves at .../foo/bar/, so its + own directory (for the purposes of resolving a relative link FROM it) + is one level deeper than its file-system parent. foo/index.md serves at + .../foo/, i.e. its own file-system parent -- no extra depth to add.""" + if path.name == "index.md": + return path.parent + return path.parent / path.stem + + +def page_href(from_page: str | Path, to_page: str | Path) -> str: + from_dir = rendered_dir(docs_path(from_page)) + to_dir = rendered_dir(docs_path(to_page)) + href = os.path.relpath(to_dir, start=from_dir).replace(os.sep, "/") + return f"{href}/" if href != "." else "./" + + +def doc_link(from_page: str | Path, to_page: str | Path) -> str: + return os.path.relpath(docs_path(to_page), start=docs_path(from_page).parent).replace(os.sep, "/") + + +def docs_path(path: str | Path) -> Path: + path = Path(path) + if path.is_absolute(): + return path + return Path(os.path.normpath(str(Path("/__docs__") / path))) + + +def group_page_name(group: dict) -> str: + # A true folder index (group/index.md), not a flat sibling (group.md) -- + # rendered_dir() computes the same served URL either way, so every + # link this pipeline generates (nav, cards, page_href) is unaffected, + # but Material's navigation.indexes feature only recognizes and + # deduplicates a section's self-referencing first nav entry (hiding it + # from the visible list, promoting it into the clickable header + # instead) when that entry is a genuine folder index living alongside + # its siblings -- confirmed by comparing against the legacy + # GitBook-imported versions (tools/import_legacy_gitbook.py), whose + # group hub pages have always been real folder indexes and don't show + # the "duplicate first entry" the flat scheme caused here. + return f"{group['slug']}/index.md" + + +def module_page_name(module_name: str) -> str: + return f"module-{safe_file_stem(module_name)}.md" + + +def item_matches_group(item: dict, group: dict) -> bool: + if item["id"] in group.get("ids", []): + return True + if item["module"] in group.get("modules", []): + return True + for prefix in group.get("id_prefixes", []): + if item["id"].startswith(prefix): + return True + return False + + +def items_by_group(model: dict) -> list[tuple[dict, list[dict]]]: + groups = load_api_groups() + ordered: list[tuple[dict, list[dict]]] = [] + matched_ids = set() + for group in groups: + matched = [item for item in model["items"] if item["id"] not in matched_ids and item_matches_group(item, group)] + matched_ids.update(item["id"] for item in matched) + ordered.append((group, matched)) + return ordered + + +NAV_GENERATED_BEGIN = " # BEGIN GENERATED -- tools/docs_pipeline.py update-nav; do not hand-edit" +NAV_GENERATED_END = " # END GENERATED" + + +def render_nav_yaml_block(model: dict) -> list[str]: + """YAML lines for the API Reference nav sub-tree, adding every item + page as a real nav entry under its group instead of only the 16 group + hub pages. Without this, item pages aren't in the nav tree at all, so + Material can't mark them active or show a navigation.path breadcrumb + for them server-side -- that gap is what api-function-breadcrumb.js + existed to paper over with JS. The legacy GitBook-imported versions + don't have this problem since their nav is built straight from + SUMMARY.md, which already lists every page. + + Indentation matches mkdocs.yml's existing "API Reference" block + exactly: 6 spaces for a group's own entry (sibling of the other + top-level API Reference children), 10 for its items, so + update_mkdocs_nav's marker-splice drops in without reformatting + anything around it. A group's self-referencing first child (its own + hub page) mirrors the same pattern already used one level up for + "API Reference" and "API Overview" -- not a new convention. + + Item label is item["symbol"] (e.g. "getFlightMode", "model.getMix"), + the same convention render_group_page uses for its card titles, + sorted the same way, so the sidebar and the hub page's card grid + agree on naming and order. + + Groups are sorted alphabetically by name rather than kept in + items_by_group's order (docs-system/api-groups.json's own file order, + which isn't alphabetical) -- matches the previous hand-authored nav's + order, the least surprising choice for a sidebar.""" + lines = [] + for group, items in sorted(items_by_group(model), key=lambda pair: pair[0]["name"]): + if not items: + continue + group_href = f"api-reference/{group_page_name(group)}" + lines.append(f" - {group['name']}:") + lines.append(f" - {group['name']}: {group_href}") + for item in sorted(items, key=lambda entry: entry["symbol"]): + item_href = f"api-reference/{page_name_for_item(item)}" + lines.append(f" - {item['symbol']}: {item_href}") + return lines + + +def update_mkdocs_nav(config_path: Path, nav_lines: list[str]) -> None: + """Splice the generated API Reference item nav block into an mkdocs + config file between two marker comments, leaving everything else in + the file byte-for-byte untouched. A full yaml.safe_load + yaml.safe_dump + round-trip would destroy this file's hand-written comments and exact + formatting (PyYAML preserves neither), so this edits the raw text + instead -- the same "generated content lives in a clearly marked + region, hand-authored content stays outside it" convention already + used for generated .md/.d.lua files in this pipeline.""" + text = config_path.read_text(encoding="utf-8") + if NAV_GENERATED_BEGIN not in text or NAV_GENERATED_END not in text: + raise ValueError( + f"{config_path}: missing generated-nav markers " + f"({NAV_GENERATED_BEGIN!r} / {NAV_GENERATED_END!r}). Add them " + "once by hand around the API Reference group entries (empty " + "between them is fine); this command fills them in from then on." + ) + before, rest = text.split(NAV_GENERATED_BEGIN, 1) + _, after = rest.split(NAV_GENERATED_END, 1) + new_text = before + NAV_GENERATED_BEGIN + "\n" + "\n".join(nav_lines) + "\n" + NAV_GENERATED_END + after + config_path.write_text(new_text, encoding="utf-8") + + +def source_label(item: dict) -> str: + if item.get("source_line"): + return f"{item['source_location']}:{item['source_line']}" + return item["source_location"] + + +def review_action(item: dict) -> tuple[str, str]: + unknown_params = [param["name"] for param in item["parameters"] if param["type"] == "unknown"] + unknown_returns = [ret.get("name") or "-" for ret in item["returns"] if ret["type"] == "unknown"] + if unknown_params or unknown_returns: + parts = [] + if unknown_params: + parts.append(f"unknown param types: {', '.join(unknown_params)}") + if unknown_returns: + parts.append(f"unknown return types: {', '.join(unknown_returns)}") + return ("Fix C++ annotation first", "; ".join(parts)) + issues = is_suspicious_item(item) + if issues: + return ("Check parser behavior", ", ".join(issues)) + return ("No action needed", "Parsed output looks structurally healthy.") + + +def suggestion_type(type_name: str) -> str: + return "TODO" if type_name == "unknown" else type_name + + +def suggested_function_signature(item: dict) -> str: + if not item["parameters"]: + return f"@function {item['symbol']}()" + names = ", ".join(param["name"] for param in item["parameters"]) + return f"@function {item['symbol']}([{names}])" + + +def render_suggested_luadoc(item: dict) -> str: + lines = [suggested_function_signature(item), ""] + if item["summary"]: + lines.append(item["summary"]) + lines.append("") + for param in item["parameters"]: + lines.append( + f"@param {param['name']} ({suggestion_type(param['type'])}) {param['description']}".rstrip() + ) + lines.append("") + for retval in item["returns"]: + name = retval.get("name") or "" + prefix = f"@retval {name} " if name and name != "-" else "@retval " + lines.append(f"{prefix}({suggestion_type(retval['type'])}) {retval['description']}".rstrip()) + lines.append("") + if item["notes"]: + for note in item["notes"]: + lines.append(f"@notice {note}") + lines.append("") + if item["availability"].get("since"): + lines.append(f"@status current Introduced in {item['availability']['since']}") + return "\n".join(lines).strip() + + +def decision_select_options() -> list[str]: + return [ + "TODO", + "integer", + "number", + "string", + "boolean", + "table", + "function", + "pointer", + "nil", + "integer|string", + "table|nil", + "function|nil", + "string|nil", + ] + + +def render_decision_controls(item: dict) -> list[str]: + editable_params = item["parameters"] + editable_returns = item["returns"] + if not editable_params and not editable_returns: + return ["No fields to edit."] + + payload = { + "item_id": item["id"], + "symbol": item["symbol"], + "summary": item["summary"], + "parameters": item["parameters"], + "returns": item["returns"], + "notes": item["notes"], + "since": item["availability"].get("since"), + } + options = "".join( + f'' + for option in decision_select_options() + ) + lines = [ + f'
    ', + '
    Decision server not connected yet.
    ', + '', + '', + '', + ] + for param in editable_params: + current_type = suggestion_type(param["type"]) + lines.append( + "" + f'' + "" + f"" + f"" + "" + "" + ) + for retval in editable_returns: + name = retval.get("name") or "-" + current_type = suggestion_type(retval["type"]) + lines.append( + "" + f'' + "" + f"" + f"" + "" + "" + ) + lines.extend( + [ + "", + "
    FieldKindCurrent TypeDescriptionSelect Type
    {html.escape(param["name"])}param{html.escape(param['type'])}{html.escape(param['description'])}" + f'' + f'' + "
    {html.escape(name)}return{html.escape(retval['type'])}{html.escape(retval['description'])}" + f'' + f'' + "
    ", + '
    ', + f'', + "
    ", + ] + ) + return lines + + +def render_doc_text(text: str, page_path: str | Path) -> str: + return rewrite_legacy_doc_links(text, page_path) + + +TABLE_FIELD_BULLET_RE = re.compile(r"^`([^`]+)`\s*\(([^)]+)\)\s*(.*)$") +TABLE_FIELD_BULLET_NO_TYPE_RE = re.compile(r"^`([^`]+)`\s+(.*)$") + + +def split_intro_and_bullets(text: str) -> tuple[list[str], list[str]]: + """Split a possibly-multi-line description into leading non-bullet + lines and `* item` bullet lines (a continuation line with no bullet + marker is folded into the previous bullet). Shared by both the plain + Markdown-table cell renderer and the raw-HTML table renderer below.""" + lines = [line.strip() for line in text.split("\n") if line.strip()] + intro: list[str] = [] + items: list[str] = [] + for line in lines: + bullet_match = re.match(r"^[*-]\s+(.*)$", line) + if bullet_match: + items.append(bullet_match.group(1)) + elif items: + items[-1] = f"{items[-1]} {line}" + else: + intro.append(line) + return intro, items + + +def render_table_cell_text(intro: list[str], items: list[str]) -> str: + """Render a description's already-split intro/bullet lines (see + split_intro_and_bullets) for a plain Markdown table cell. Table cells + can't contain literal newlines, and GFM only parses inline markup + inside them (not block-level lists), so collapsing newlines to spaces + would crush any `* item` bullet list (e.g. a `@commonparams`-expanded + settings list) into an unreadable run-on paragraph. Bullet lines are + rendered as a real `
    • ` list -- GFM tables allow raw inline HTML + in cells, and this convention is already used elsewhere in this site's + hand-authored pages. Any non-bullet lines are joined with `
      `. Only + used for rows that don't need a nested field table -- see + render_field_html_table for those.""" + parts = [] + if intro: + parts.append("
      ".join(intro)) + if items: + parts.append("
        " + "".join(f"
      • {item}
      • " for item in items) + "
      ") + return "".join(parts) + + +def html_code(text: str) -> str: + """Wrap plain text (a param/return name or type) in a literal + tag, for a cell in a hand-built raw -- see render_field_html_table. + Used instead of re-wrapping in backticks and relying on Markdown to + convert them, since that conversion doesn't happen inside a raw HTML + block (see render_inline_markdown).""" + return f"{html.escape(text)}" + + +def render_inline_markdown(text: str) -> str: + """Render a single line of description text (may contain a backtick + code span or a Markdown link from rewrite_legacy_doc_links) to HTML, for + embedding in a hand-built raw
      -- see render_field_html_table. + A full
      ...
      is classified as an HTML block by + Python-Markdown, and content inside an HTML block does NOT get inline + Markdown processing by default (confirmed empirically -- even + md_in_html's markdown="1" attribute doesn't reach into hand-authored + content), unlike a plain Markdown-table cell, which processes + inline Markdown for free. So cell content headed into a raw table has + to be pre-rendered here instead.""" + text = text.strip() + if not text: + return "" + rendered = markdown.markdown(text) + if rendered.startswith("

      ") and rendered.endswith("

      ") and rendered.count("

      ") == 1: + rendered = rendered[len("

      ") : -len("

      ")] + return rendered + + +def render_nested_field_table(items: list[str], type_hint: str) -> str | None: + """A `table`-typed parameter's own sub-fields are documented in the + firmware source as `* `name` (type) description` bullets (see e.g. + lvgl.arc's `params`) -- occasionally missing the `(type)` part (e.g. + model.getMix's `delayPrec`/`speedPrec`, a genuine gap in the upstream + annotation). Rendered as a flat `
        `, a field list of any real size + (some run past 15 fields) turns into a wall of text with no visible + Type column for the sub-fields themselves, and crammed into the + Description cell it's still squeezed into whatever width that one + column got. When every bullet in a cell matches one of those two + shapes, this renders a real Field/Type/Description `` instead + (blank Type cell for a bullet missing one), for the caller to place in + a full-width row of its own (see render_field_html_table) rather than + inside the narrow cell. + + Only attempted when type_hint is exactly "table": an integer/string + parameter's bullets are enum/flag VALUE options (e.g. play-tone's + `flags`), not fields of a table, and share the exact same + `` `TOKEN` description `` surface shape as a name-only field bullet -- + the parameter's own type is what actually distinguishes them, not + anything about the bullet text itself. Returns None (caller falls back + to the plain `
          `) if the type isn't "table", or if not one single + item matches either field shape. + + A bullet that matches neither shape (e.g. lvgl.build's trailing "any + other key accepted by the constructor function for the chosen `type`", + which names no field at all) is kept as a plain note appended after the + field table rather than forcing the whole list back to a flat `
            ` -- + once type_hint has already established this is a table's own field + list and not an enum/flag value list, a bullet that doesn't fit the + `name (type) description` shape is safely read as a caveat about the + table as a whole, not a value option to preserve alongside real + fields.""" + if type_hint != "table": + return None + rows = [] + notes = [] + for item in items: + match = TABLE_FIELD_BULLET_RE.match(item) + if match: + name, field_type, description = match.groups() + else: + match = TABLE_FIELD_BULLET_NO_TYPE_RE.match(item) + if not match: + notes.append(item) + continue + name, description = match.groups() + field_type = "" + rows.append( + "
        " + ) + if not rows: + return None + header = "" + table_html = f'
        " + + html_code(name) + + "" + + (html_code(field_type) if field_type else "-") + + "" + + render_inline_markdown(description) + + "
        FieldTypeDescription
        {header}{"".join(rows)}
        ' + if notes: + notes_html = "
          " + "".join( + f"
        • {render_inline_markdown(note)}
        • " for note in notes + ) + "
        " + return table_html + notes_html + return table_html + + +def render_table_cell_html(intro: list[str], items: list[str], type_hint: str) -> tuple[str, str | None]: + """Render a cell's intro/bullet content for the raw-HTML table path + (see render_field_html_table). Mirrors render_table_cell_text's + intro/bullet handling, but pre-renders inline Markdown itself via + render_inline_markdown instead of relying on GFM's per-cell inline + processing, which a hand-built raw HTML table doesn't get for free. + Returns (cell_html, nested_table_html_or_None).""" + nested_table = render_nested_field_table(items, type_hint) if items else None + if nested_table: + intro_html = render_inline_markdown("
        ".join(intro)) if intro else "" + return intro_html, nested_table + parts = [] + if intro: + parts.append("
        ".join(render_inline_markdown(line) for line in intro)) + if items: + parts.append("
          " + "".join(f"
        • {render_inline_markdown(item)}
        • " for item in items) + "
        ") + return "".join(parts), None + + +def render_field_html_table(headers: list[str], row_specs: list[tuple[list[str], str | None]]) -> str: + """Hand-built raw HTML for a Parameters/Returns section where at + least one row needs a genuine full-width row underneath it (a + table-typed parameter's own field list, from render_nested_field_table). + Plain Markdown pipe tables have no colspan support, and a pipe-syntax + table can't have extra raw-HTML rows spliced into its either (the + `tables` extension owns that whole element), so once any row in a + section needs one, the entire section's table is built here instead -- + keeps the visual result a single real
        with one seamless + full-width row, rather than a second table stacked underneath with a + visible border/gap.""" + col_count = len(headers) + head = "" + "".join(f"" for h in headers) + "" + body_rows = [] + for cells, nested_html in row_specs: + body_rows.append("" + "".join(f"" for cell in cells) + "") + if nested_html: + body_rows.append(f'') + return f"
        {h}
        {cell}
        {nested_html}
        {head}{''.join(body_rows)}
        " + + +def render_api_page(item: dict, overlay_text: str | None, page_path: str | Path) -> str: + lines = [] + lines.append(f"# {item['symbol']}") + lines.append("") + lines.append(f"`{item['syntax']}`") + lines.append("") + lines.append(render_doc_text(item["summary"], page_path)) + lines.append("") + if item["aliases"]: + lines.append("## Aliases") + lines.append("") + for alias in item["aliases"]: + if alias in item["deprecated_aliases"]: + lines.append(f"- `{alias}` (deprecated alias)") + else: + lines.append(f"- `{alias}`") + lines.append("") + lines.append("## Parameters") + lines.append("") + if item["parameters"]: + parsed_params = [] + for param in item["parameters"]: + req = "yes" if param["required"] else "no" + intro, bullet_items = split_intro_and_bullets(render_doc_text(param["description"], page_path)) + nested_html = render_nested_field_table(bullet_items, param["type"]) if bullet_items else None + parsed_params.append((param, req, intro, bullet_items, nested_html)) + if any(nested_html for *_, nested_html in parsed_params): + row_specs = [] + for param, req, intro, bullet_items, nested_html in parsed_params: + cell_html, nested_html = render_table_cell_html(intro, bullet_items, param["type"]) + row_specs.append(([html_code(param["name"]), req, html_code(param["type"]), cell_html], nested_html)) + lines.append(render_field_html_table(["Name", "Req", "Type", "Description"], row_specs)) + else: + lines.append("| Name | Req | Type | Description |") + lines.append("| --- | --- | --- | --- |") + for param, req, intro, bullet_items, _ in parsed_params: + description = render_table_cell_text(intro, bullet_items) + lines.append(f"| `{param['name']}` | {req} | `{param['type']}` | {description} |") + else: + lines.append("None.") + lines.append("") + lines.append("## Returns") + lines.append("") + if item["returns"]: + parsed_returns = [] + for retval in item["returns"]: + name = retval.get("name") or "-" + intro, bullet_items = split_intro_and_bullets(render_doc_text(retval["description"], page_path)) + nested_html = render_nested_field_table(bullet_items, retval["type"]) if bullet_items else None + parsed_returns.append((name, retval, intro, bullet_items, nested_html)) + if any(nested_html for *_, nested_html in parsed_returns): + row_specs = [] + for name, retval, intro, bullet_items, nested_html in parsed_returns: + cell_html, nested_html = render_table_cell_html(intro, bullet_items, retval["type"]) + row_specs.append(([html_code(name), html_code(retval["type"]), cell_html], nested_html)) + lines.append(render_field_html_table(["Name", "Type", "Description"], row_specs)) + else: + lines.append("| Name | Type | Description |") + lines.append("| --- | --- | --- |") + for name, retval, intro, bullet_items, _ in parsed_returns: + description = render_table_cell_text(intro, bullet_items) + lines.append(f"| `{name}` | `{retval['type']}` | {description} |") + else: + lines.append("None.") + lines.append("") + lines.append("## Availability") + lines.append("") + lines.append(f"- Since: `{item['availability']['since']}`") + for radio in item["availability"].get("radios", []): + lines.append(f"- Radio support: `{radio}`") + lines.append("") + if item["notes"]: + lines.append("## Notes") + lines.append("") + for note in item["notes"]: + lines.append(f"- {render_doc_text(note, page_path)}") + lines.append("") + lines.append("## Source") + lines.append("") + lines.append(f"`{item['source_location']}`") + lines.append("") + if overlay_text: + lines.extend(render_overlay_sections(overlay_text)) + return "\n".join(lines) + + +def render_api_index(model: dict) -> str: + current_page = Path("index.md") + lines = [] + lines.append("# Generated API Reference") + lines.append("") + lines.append("This section is generated from the normalized API model and grouped with the same user-facing topic names used in the 2.11 docs.") + lines.append("") + for group, items in items_by_group(model): + page = group_page_name(group) + lines.append(f"## [{group['name']}]({doc_link(current_page, page)})") + lines.append("") + lines.append(f"- `{len(items)}` APIs") + lines.append(f"- {group.get('description', 'User-facing topic grouping for this API area.')}") + lines.append("") + + return "\n".join(lines) + + +def card_summary_text(summary: str) -> str: + summary = compact_whitespace(summary) + if not summary: + return "Needs summary review" + first_sentence = re.split(r"(?<=[.!?])\s+", summary, maxsplit=1)[0].strip() + candidate = first_sentence or summary + if len(candidate) <= 120: + return candidate + shortened = candidate[:117].rsplit(" ", 1)[0].strip() + return f"{shortened}..." if shortened else f"{candidate[:117]}..." + + +def render_module_page(module_name: str, items: list[dict], report: dict, page_path: str | Path) -> str: + suspicious_by_id = {} + module_report = report["modules"].get(module_name, {}) + for suspicious in module_report.get("suspicious_items", []): + suspicious_by_id[suspicious["id"]] = suspicious["issues"] + + lines = [] + lines.append(f"# {module_name}") + lines.append("") + lines.append(f"`{len(items)}` APIs in this module.") + lines.append("") + lines.append(f"[Back to API overview]({doc_link(page_path, 'index.md')}) | [Open review dashboard]({doc_link(page_path, 'review.md')})") + lines.append("") + lines.append('
        ') + for item in sorted(items, key=lambda entry: entry["symbol"]): + issues = suspicious_by_id.get(item["id"], []) + badge = "" + if issues: + badge = f'{" / ".join(issues)}' + summary = card_summary_text(item["summary"]) + lines.append(''.format(href=page_href(page_path, page_name_for_item(item)))) + lines.append(f'{item["symbol"]}') + lines.append(f'{summary}') + if badge: + lines.append(badge) + lines.append("") + lines.append("
        ") + lines.append("") + return "\n".join(lines) + + +def render_group_page(group: dict, items: list[dict], page_path: str | Path) -> str: + lines = [] + lines.append(f"# {group['name']}") + lines.append("") + lines.append(group.get("description", "")) + lines.append("") + if not items: + lines.append("No extracted APIs are assigned to this group yet.") + lines.append("") + return "\n".join(lines) + lines.append('
        ') + for item in sorted(items, key=lambda entry: entry["symbol"]): + summary = card_summary_text(item["summary"]) + lines.append(''.format(href=page_href(page_path, page_name_for_item(item)))) + lines.append(f'{item["symbol"]}') + lines.append(f'{summary}') + lines.append("") + lines.append("
        ") + lines.append("") + return "\n".join(lines) + + +def render_overlay_sections(overlay_text: str) -> list[str]: + text = overlay_text.strip() + if not text: + return [] + + lines = [] + for raw_line in text.splitlines(): + if raw_line.startswith("## "): + lines.append(raw_line) + elif raw_line.startswith("# "): + lines.append(f"### {raw_line[2:]}") + else: + lines.append(raw_line) + lines.append("") + return lines + + +def render_review_page(model: dict) -> str: + current_page = Path("review.md") + report = quality_report(model) + decisions = load_review_decisions() + lines = [] + lines.append("# API Review Dashboard") + lines.append("") + lines.append("This page is generated from the extracted API model and is meant to speed up review of the real source-derived docs.") + lines.append("") + lines.append("## Snapshot") + lines.append("") + lines.append(f"- Docs version: `{model['docs_version']}`") + lines.append(f"- Upstream ref: `{model['upstream_ref']}`") + lines.append(f"- Generated at: `{model['generated_at']}`") + lines.append(f"- Total items: `{len(model['items'])}`") + lines.append(f"- Review backlog entries: `{len(report['backlog'])}`") + reviewed_backlog = sum(1 for entry in report["backlog"] if entry["id"] in decisions) + lines.append(f"- Backlog items with saved decisions: `{reviewed_backlog}`") + lines.append("") + lines.append("## Module Health") + lines.append("") + lines.append("| Module | Items | Unknown Param Types | Unknown Return Types |") + lines.append("| --- | ---: | ---: | ---: |") + for module_name, data in report["modules"].items(): + lines.append( + f"| `{module_name}` | {data['items']} | {data['unknown_param_types']} | {data['unknown_return_types']} |" + ) + lines.append("") + lines.append("## Review Backlog") + lines.append("") + if report["backlog"]: + lines.append("| API | Status | Module | Parser Fixable | Upstream Fix Likely |") + lines.append("| --- | --- | --- | --- | --- |") + for entry in report["backlog"]: + page_name = review_page_name_for_item(entry) + parser_fixable = ", ".join(entry["parser_fixable"]) or "-" + upstream_fix_likely = ", ".join(entry["upstream_fix_likely"]) or "-" + decision = decisions.get(entry["id"]) + status = "`pending`" + if decision: + status = f"`reviewed` ({decision.get('updated_at', 'saved')})" + lines.append( + f"| [`{entry['id']}`]({doc_link(current_page, page_name)}) | {status} | `{entry['module']}` | `{parser_fixable}` | `{upstream_fix_likely}` |" + ) + else: + lines.append("No backlog items.") + lines.append("") + lines.append("## Suspicious Items By Module") + lines.append("") + item_by_id = {item["id"]: item for item in model["items"]} + for module_name, data in report["modules"].items(): + if not data["suspicious_items"]: + continue + lines.append(f"### {module_name}") + lines.append("") + lines.append("| API | Issues | Source |") + lines.append("| --- | --- | --- |") + for suspicious in data["suspicious_items"]: + item = item_by_id[suspicious["id"]] + issues = ", ".join(suspicious["issues"]) + lines.append( + f"| [`{item['id']}`]({doc_link(current_page, review_page_name_for_item(item))}) | `{issues}` | `{source_label(item)}` |" + ) + lines.append("") + lines.append("## Suggested Spot Checks") + lines.append("") + for item_id in [ + "getRSSI", + "getSourceValue", + "popupConfirmation", + "lcd.drawText", + "model.setModule", + ]: + item = item_by_id.get(item_id) + if not item: + continue + lines.append(f"- [`{item_id}`]({doc_link(current_page, review_page_name_for_item(item))}) - {item['summary'] or 'Needs summary review'}") + lines.append("") + return "\n".join(lines) + + +def render_review_item_page(item: dict, page_path: str | Path) -> str: + action_title, action_detail = review_action(item) + unknown_params = [param["name"] for param in item["parameters"] if param["type"] == "unknown"] + unknown_returns = [ret.get("name") or "-" for ret in item["returns"] if ret["type"] == "unknown"] + lines = [] + lines.append(f"# Review: {item['id']}") + lines.append("") + lines.append(f"[Back to dashboard]({doc_link(page_path, 'review.md')}) | [Open API page]({doc_link(page_path, page_name_for_item(item))})") + lines.append("") + lines.append("## Snapshot") + lines.append("") + lines.append(f"- Module: `{item['module']}`") + lines.append(f"- Current symbol: `{item['symbol']}`") + lines.append(f"- Doc id: `{item['doc_id']}`") + lines.append(f"- Source: `{source_label(item)}`") + lines.append(f"- Recommended action: **{action_title}**") + lines.append(f"- Why: {action_detail}") + lines.append("") + if item["aliases"]: + lines.append("## Aliases") + lines.append("") + for alias in item["aliases"]: + suffix = " (deprecated)" if alias in item["deprecated_aliases"] else "" + lines.append(f"- `{alias}`{suffix}") + lines.append("") + lines.append("## Decide") + lines.append("") + if unknown_params or unknown_returns: + if unknown_params: + lines.append(f"- Unknown params to decide: `{', '.join(unknown_params)}`") + if unknown_returns: + lines.append(f"- Unknown returns to decide: `{', '.join(unknown_returns)}`") + lines.append("- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block.") + else: + lines.append("- This one looks structurally complete, but you can still change any param or return type below if you want to override it.") + lines.append("") + lines.append("### Decision Controls") + lines.append("") + lines.extend(render_decision_controls(item)) + lines.append("") + lines.append('
        ') + lines.append('
        ') + lines.append("### Source luadoc") + lines.append("") + lines.append("~~~~text") + lines.append(item["raw_luadoc"].strip() or "") + lines.append("~~~~") + lines.append("
        ") + lines.append('
        ') + lines.append("### Parsed doc") + lines.append("") + lines.append("#### Summary") + lines.append("") + lines.append(render_doc_text(item["summary"], page_path) or "None.") + lines.append("") + lines.append("#### Parameters") + lines.append("") + if item["parameters"]: + lines.append("| Name | Req | Type | Description |") + lines.append("| --- | --- | --- | --- |") + for param in item["parameters"]: + req = "yes" if param["required"] else "no" + lines.append( + f"| `{param['name']}` | {req} | `{param['type']}` | {render_doc_text(param['description'], page_path).replace(chr(10), ' ')} |" + ) + else: + lines.append("None.") + lines.append("") + lines.append("#### Returns") + lines.append("") + if item["returns"]: + lines.append("| Name | Type | Description |") + lines.append("| --- | --- | --- |") + for retval in item["returns"]: + name = retval.get("name") or "-" + lines.append( + f"| `{name}` | `{retval['type']}` | {render_doc_text(retval['description'], page_path).replace(chr(10), ' ')} |" + ) + else: + lines.append("None.") + lines.append("") + lines.append("#### Notes") + lines.append("") + if item["notes"]: + for note in item["notes"]: + lines.append(f"- {render_doc_text(note, page_path)}") + else: + lines.append("None.") + lines.append("") + lines.append("
        ") + lines.append("
        ") + lines.append("") + lines.append("## Suggested luadoc patch") + lines.append("") + lines.append("Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type.") + lines.append("") + lines.append("~~~~text") + lines.append(render_suggested_luadoc(item)) + lines.append("~~~~") + lines.append("") + return "\n".join(lines) + + +LUADOC_BLOCK_RE = re.compile(r"/\*luadoc(.*?)\*/", re.DOTALL) +FUNCTION_RE = re.compile(r"^@function\s+(.+)$", re.MULTILINE) +PARAM_RE = re.compile(r"^[ \t]*@param\s+(.+?)(?:\n\s*\n|\Z)", re.MULTILINE | re.DOTALL) +RETVAL_RE = re.compile(r"^[ \t]*@retval\s+(.+?)(?:\n\s*\n|\Z)", re.MULTILINE | re.DOTALL) +NOTICE_RE = re.compile(r"^[ \t]*@notice\s+(.+?)(?:\n\s*\n|\Z)", re.MULTILINE | re.DOTALL) +STATUS_RE = re.compile(r"^[ \t]*@status\s+(.+)$", re.MULTILINE) +TAG_START_RE = re.compile(r"^@(param|retval|notice|status)\b") +COMMON_BLOCK_RE = re.compile(r"^@common\s+(\S+)\s*\n(.*)\Z", re.DOTALL) +COMMONPARAMS_REF_RE = re.compile(r"^[ \t]*@commonparams\s+(\S+)\s*$", re.MULTILINE) +MARKDOWN_TABLE_RE = re.compile(r"^\|.*\|$") +LIST_LINE_RE = re.compile(r"^\s*[*-]\s+") +CODE_FENCE_RE = re.compile(r"^\s*```") +KNOWN_VALUE_TYPES = { + "string", + "number", + "integer", + "boolean", + "table", + "function", + "nil", + "value", + "multiple", + "buffer", +} +GOLDEN_MODULES = {"runtime", "lcd", "model"} +LEGACY_DOC_LINK_REWRITES = [ + ( + "../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html#color-constants", + "../api-overview/constants/color-constants.md#indexed-colors", + ), + ( + "../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html", + "../programming/core-concepts/drawing-flags-and-colors.md", + ), + ( + "../../part_vii_-_appendix/fonts.md", + "../api-overview/fonts.md", + ), + ( + "../../appendix/units.html", + "../api-overview/constants/units.md", + ), + ( + "../appendix/units.html", + "../api-overview/constants/units.md", + ), + ( + "(../appendix/units.html)", + "(../api-overview/constants/units.md)", + ), + ( + "../key_events.md", + "../api-overview/constants/key-event-constants.md", + ), +] + + +def extract_blocks(text: str) -> list[dict]: + blocks = [] + for match in LUADOC_BLOCK_RE.finditer(text): + line_number = text.count("\n", 0, match.start()) + 1 + blocks.append( + { + "text": match.group(1).strip(), + "line": line_number, + } + ) + return blocks + + +def split_signature(function_decl: str) -> tuple[str, str]: + if "(" not in function_decl or not function_decl.endswith(")"): + return function_decl.strip(), "" + name, params = function_decl.split("(", 1) + return name.strip(), params[:-1].strip() + + +def parse_since(status_text: str | None) -> str: + if not status_text: + return "unknown" + match = re.search(r"Introduced in ([0-9.]+)", status_text) + return match.group(1) if match else "unknown" + + +def version_key(version: str) -> tuple[int, ...]: + if version == "unknown": + return (9999,) + parts = [] + for piece in version.split("."): + try: + parts.append(int(piece)) + except ValueError: + parts.append(9999) + return tuple(parts) + + +def clean_text(text: str) -> str: + lines = [line.rstrip() for line in text.strip().splitlines()] + return "\n".join(lines).strip() + + +def compact_whitespace(text: str) -> str: + return re.sub(r"\s+", " ", text.strip()) + + +def clean_inline_markup(text: str) -> str: + text = text.replace("`", "") + return compact_whitespace(text) + + +def api_overview_doc_link(from_page: str | Path, relative_target: str) -> str: + return sibling_doc_link(from_page, "api-overview", relative_target) + + +def sibling_doc_link(from_page: str | Path, sibling_dir: str, relative_target: str) -> str: + from_path = Path(from_page) + up_levels = [".."] * (len(from_path.parent.parts) + 1) + target = Path(*up_levels) / sibling_dir / relative_target + return str(target).replace(os.sep, "/") + + +def rewrite_legacy_doc_links(text: str, from_page: str | Path) -> str: + rewritten = text + rewritten = rewritten.replace( + "[Full list]((../appendix/units.html))", + f"[Full list]({api_overview_doc_link(from_page, 'constants/units.md')})", + ) + for old, new in LEGACY_DOC_LINK_REWRITES: + if old == "../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html#color-constants": + target = api_overview_doc_link(from_page, "constants/color-constants.md#indexed-colors") + elif old == "../lcd-functions-less-than-greater-than-luadoc-begin-lcd/lcd_functions-overview.html": + target = sibling_doc_link(from_page, "programming", "core-concepts/drawing-flags-and-colors.md") + elif old == "../../part_vii_-_appendix/fonts.md": + target = api_overview_doc_link(from_page, "fonts.md") + elif old in {"../appendix/units.html", "(../appendix/units.html)", "../../appendix/units.html"}: + target = api_overview_doc_link(from_page, "constants/units.md") + if old.startswith("("): + target = f"({target})" + elif old == "../key_events.md": + target = api_overview_doc_link(from_page, "constants/key-event-constants.md") + else: + target = new + rewritten = rewritten.replace(old, target) + rewritten = rewritten.replace( + "[Full list]((../api-overview/constants/units.md))", + f"[Full list]({api_overview_doc_link(from_page, 'constants/units.md')})", + ) + return rewritten + + +def normalize_type_annotation(raw_type: str) -> str: + raw_type = compact_whitespace(raw_type) + if not raw_type: + return "unknown" + primary = raw_type.split(",", 1)[0].strip() + return primary or "unknown" + + +def normalize_item_links(item: dict) -> None: + item["summary"] = rewrite_legacy_doc_links(item["summary"]) + item["notes"] = [rewrite_legacy_doc_links(note) for note in item["notes"]] + for param in item["parameters"]: + param["description"] = rewrite_legacy_doc_links(param["description"]) + for retval in item["returns"]: + retval["description"] = rewrite_legacy_doc_links(retval["description"]) + + +def luals_type_parts(type_name: str) -> list[str]: + return [part.strip() for part in type_name.split("|") if part.strip()] + + +def collect_custom_types(model: dict) -> list[str]: + custom = [] + seen = set() + for item in model["items"]: + for type_name in [param["type"] for param in item["parameters"]] + [ret["type"] for ret in item["returns"]]: + for part in luals_type_parts(type_name): + if part in LUALS_BUILTIN_TYPES: + continue + if part not in seen: + custom.append(part) + seen.add(part) + return custom + + +def render_luals_aliases(model: dict) -> list[str]: + type_definitions = load_type_definitions() + lines = [] + for type_name in type_definitions.keys(): + definition = type_definitions.get(type_name, {}) + description = definition.get("description") + alias_target = definition.get("luals_alias_of", "any") + if description: + lines.append(f"--- {description}") + else: + lines.append(f"--- Custom semantic Lua API type: {type_name}") + lines.append(f"---@alias {type_name} {alias_target}") + if lines: + lines.append("") + return lines + + +def split_name_description(text: str) -> tuple[str, str]: + pieces = text.split(" ", 1) + if len(pieces) == 1: + return pieces[0], "" + return pieces[0], pieces[1] + + +def sanitize_symbol(symbol: str) -> str: + symbol = compact_whitespace(symbol) + if "(" in symbol and ")" in symbol: + symbol = symbol[: symbol.rfind(")") + 1] + symbol = re.sub(r"\s+deprecated.*$", "", symbol, flags=re.IGNORECASE) + return symbol.strip() + + +def safe_file_stem(symbol: str) -> str: + return re.sub(r"[^A-Za-z0-9._-]+", "_", symbol).strip("._") or "api-item" + + +def parse_param_or_retval_body(body: str, *, is_retval: bool = False) -> tuple[str, str, str]: + body = clean_text(body) + first_line, *rest = body.splitlines() + stripped_line = first_line.strip() + + if is_retval and stripped_line.lower().startswith("multiple "): + raw_name = "multiple" + raw_type = "multiple" + description = stripped_line[len("multiple"):].strip() + elif is_retval and stripped_line.startswith("("): + match = re.match(r"^\(([^)]+)\)\s*(.*)$", stripped_line) + raw_name = "" + raw_type = match.group(1).strip() if match else "unknown" + description = match.group(2).strip() if match else stripped_line + else: + colon_match = re.match(r'^([A-Za-z0-9_"\'.,/-]*)\s*:\s*([A-Za-z0-9_|/-]+)\s*,?\s*(.*)$', stripped_line) + if colon_match: + raw_name = colon_match.group(1).strip() + raw_type = colon_match.group(2).strip() + description = colon_match.group(3).strip() + else: + match = re.match(r'^([A-Za-z0-9_"\'.,:/-]+)\s*\(([^)]+)\)\s*(.*)$', stripped_line) + if match: + raw_name = match.group(1).strip() + raw_type = match.group(2).strip() + description = match.group(3).strip() + if description.startswith(":"): + # leftover colon from a "name (type):" line -- whether or + # not more content follows it on the same line, it's + # punctuation from the type annotation, not meaningful + # content (e.g. a bulleted "params (table):" settings + # list, or "volume (integer): - (1..5) override ..."). + description = description[1:].strip() + else: + pieces = stripped_line.split(" ", 1) + raw_name = pieces[0].strip() + raw_type = "unknown" + description = pieces[1].strip() if len(pieces) > 1 else "" + + if is_retval and raw_type == "unknown": + lowered = raw_name.lower() + if lowered in KNOWN_VALUE_TYPES: + raw_type = lowered if lowered != "value" else "unknown" + raw_name = "" + + if is_retval and raw_type == "function" and "or `nil`" in description: + raw_type = "function|nil" + + if is_retval and raw_type == "string" and ("if any" in description.lower() or "blank if no error occurred" in description.lower()): + raw_type = "string|nil" + + raw_name = raw_name.rstrip(":") + if raw_name == "": + raw_name = "-" + + if rest: + extra = clean_text("\n".join(rest)) + if description and re.match(r"^[*-]\s+", extra): + # `extra` starts with a bullet list (e.g. a `table` return value's + # own field list, see model.getMix) -- joining with a space would + # glue the first bullet onto the intro line (e.g. "mix data: * + # `name` ..."), silently dropping it from bullet-list parsing + # downstream (split_intro_and_bullets, render_nested_field_table) + # since it's no longer at the start of its own line. + description = f"{description}\n{extra}".strip() + else: + description = f"{description} {extra}".strip() + + return raw_name, normalize_type_annotation(raw_type), description + + +def raw_type_to_practical_type(raw_type: str) -> str: + if "|" in raw_type: + return "|".join(raw_type_to_practical_type(part.strip()) for part in raw_type.split("|")) + lower = raw_type.lower() + if lower == "nil": + return "nil" + if lower in {"byte", "unsigned", "coord_t", "index"}: + return "integer" + if "string" in lower or "text" in lower: + return "string" + if "bool" in lower: + return "boolean" + if "number" in lower or "integer" in lower or "positive" in lower or "numeric" in lower: + return "integer" + if "function" in lower: + return "function" + if "table" in lower: + return "table" + if "pointer" in lower: + return "pointer" + if "optional" in lower: + return "unknown" + return raw_type.replace(" ", "-") + + +def normalize_identifier(text: str, fallback: str) -> str: + text = text.strip().lower() + text = re.sub(r"[^a-z0-9]+", "_", text) + text = text.strip("_") + return text or fallback + + +def normalize_param_name(raw_name: str, signature_names: list[str], parameter_index: int) -> list[str]: + name = raw_name.strip().rstrip(":") + if name.startswith("(") or name in {"", "-"}: + if parameter_index < len(signature_names): + return [signature_names[parameter_index]] + return [f"arg{parameter_index + 1}"] + return [part.strip() for part in name.split(",") if part.strip()] + + +CONCRETE_PRACTICAL_TYPES = {"nil", "integer", "string", "boolean", "function", "table", "pointer"} + + +def is_concrete_practical_type(practical_type: str) -> bool: + """True if every part of a (possibly `|`-joined) practical type is + already one raw_type_to_practical_type recognized outright, as opposed + to a raw type string it didn't know how to map (falls through to + `raw_type.replace(" ", "-")`, e.g. "flags") or the "unknown" sentinel. + Used to gate infer_type_from_description's content-sniffing heuristics + below -- they exist to guess a real type from context when the source + only gave a vague placeholder, and must never get a chance to + second-guess an already-unambiguous declared type. A word like "flag" + or "path" appearing incidentally inside an otherwise-unrelated + description (e.g. a `table` return whose own field list happens to + mention "file attribute flags") is exactly the false-positive this + guards against -- confirmed empirically as the actual cause of fstat's + return being misclassified as `integer` instead of `table`.""" + return all(part in CONCRETE_PRACTICAL_TYPES for part in practical_type.split("|")) + + +def infer_type_from_description(name: str, description: str, fallback_type: str, module: str) -> str: + if is_concrete_practical_type(fallback_type): + return fallback_type + text = f"{name} {description}".lower() + if module in GOLDEN_MODULES: + if "true/false" in text or "true if" in text or "false otherwise" in text: + return "boolean" + if "source identifier" in text and "source name" in text: + return "integer|string" + if "name (string)" in text or "path" in text or "file name" in text or "file path" in text: + return "string" + if "table of data bytes" in text or "data bytes" in text: + return "table" + if "drawing flags" in text or "flag" in text: + return "integer" + if "index" in text or "number" in text or "value of" in text or "coordinates" in text: + return "integer" + return fallback_type + + +def parse_optional_names(signature_params: str) -> set[str]: + optional = set() + for chunk in re.findall(r"\[([^\]]+)\]", signature_params): + for name in re.findall(r"[A-Za-z_][A-Za-z0-9_]*", chunk): + optional.add(name) + return optional + + +def signature_param_names(signature_params: str) -> list[str]: + cleaned = re.sub(r"[\[\]]", "", signature_params) + return re.findall(r"[A-Za-z_][A-Za-z0-9_]*", cleaned) + + +def parse_summary(block: str) -> str: + lines = [] + started = False + for line in block.splitlines(): + stripped = line.strip() + if stripped.startswith("@function"): + started = True + continue + if not started: + continue + if TAG_START_RE.match(stripped): + break + if stripped.startswith("### "): + break + if MARKDOWN_TABLE_RE.match(stripped) or LIST_LINE_RE.match(stripped) or CODE_FENCE_RE.match(stripped): + break + lines.append(line) + cleaned = [line.rstrip() for line in lines] + summary_lines = [] + for line in cleaned: + stripped = line.strip() + if stripped == "" and summary_lines: + break + summary_lines.append(line) + return clean_text("\n".join(summary_lines)) + + +def infer_module(symbol: str) -> str: + if "." in symbol: + return symbol.split(".", 1)[0] + return "runtime" + + +def parse_block(block: str, source_location: str, source_line: int | None = None) -> dict | None: + function_match = FUNCTION_RE.search(block) + if not function_match: + return None + + function_decl = sanitize_symbol(function_match.group(1).strip()) + symbol, signature_params = split_signature(function_decl) + optional_names = parse_optional_names(signature_params) + signature_names = signature_param_names(signature_params) + status_match = STATUS_RE.search(block) + availability_since = parse_since(status_match.group(1) if status_match else None) + + parameters = [] + signature_index = 0 + for param_body in PARAM_RE.findall(block + "\n\n"): + raw_name, raw_type, description = parse_param_or_retval_body(param_body) + names = normalize_param_name(raw_name, signature_names, signature_index) + for name in names: + practical_type = raw_type_to_practical_type(raw_type) + practical_type = infer_type_from_description(name, description, practical_type, infer_module(symbol)) + parameters.append( + { + "name": name, + "type": practical_type, + "required": name not in optional_names, + "description": clean_text(description), + } + ) + signature_index += 1 + + if signature_names and len(parameters) == len(signature_names): + for index, name in enumerate(signature_names): + parameters[index]["name"] = name + parameters[index]["required"] = name not in optional_names + + returns = [] + for retval_body in RETVAL_RE.findall(block + "\n\n"): + raw_name, raw_type, description = parse_param_or_retval_body(retval_body, is_retval=True) + if raw_type == "multiple": + bullet_lines = [line.strip()[1:].strip() for line in retval_body.splitlines() if line.strip().startswith("*")] + for index, bullet in enumerate(bullet_lines, start=1): + if bullet.startswith("("): + bullet_name, bullet_type, bullet_description = parse_param_or_retval_body(bullet, is_retval=True) + bullet_name = normalize_identifier(bullet_description.split(".")[0], f"value{index}") + else: + bullet_match = re.match(r"^(.*?)\s*\(([^)]+)\)\s*(.*)$", bullet) + if bullet_match: + bullet_name = normalize_identifier(bullet_match.group(1), f"value{index}") + bullet_type = bullet_match.group(2).strip() + bullet_description = bullet_match.group(3).strip() + else: + bullet_name, bullet_type, bullet_description = parse_param_or_retval_body(bullet, is_retval=True) + bullet_name = normalize_identifier(bullet_name, f"value{index}") + returns.append( + { + "name": bullet_name or f"value{index}", + "type": infer_type_from_description( + bullet_name, + bullet_description, + raw_type_to_practical_type(bullet_type), + infer_module(symbol), + ), + "description": clean_text(bullet_description), + } + ) + continue + practical_type = raw_type_to_practical_type(raw_type) + practical_type = infer_type_from_description(raw_name, description, practical_type, infer_module(symbol)) + returns.append( + { + "name": "" if raw_name in {"", "-"} else raw_name, + "type": practical_type, + "description": clean_text(description), + } + ) + + summary = parse_summary(block) + notes = [] + for notice_body in NOTICE_RE.findall(block + "\n\n"): + notes.append(clean_text(notice_body)) + + radios = infer_radios(source_location, notes) + + return { + "id": symbol, + "doc_id": default_doc_id(infer_module(symbol), symbol), + "symbol": symbol, + "aliases": [], + "deprecated_aliases": [], + "module": infer_module(symbol), + "kind": "function", + "syntax": function_decl, + "summary": summary, + "parameters": parameters, + "returns": returns, + "availability": { + "since": availability_since, + "radios": radios, + }, + "notes": notes, + "source_location": source_location, + "raw_luadoc": block, + "source_line": source_line, + } + + +def infer_radios(source_location: str, notes: list[str]) -> list[str]: + source_name = Path(source_location).name + text = " ".join(notes).lower() + radios = [] + if "colorlcd" in source_name or "color display" in text: + radios.append("color-lcd") + if "stdlcd" in source_name: + radios.append("bw-lcd") + if not radios: + radios.append("all") + return radios + + +def merge_item(existing: dict, incoming: dict) -> dict: + merged = dict(existing) + + if len(incoming["parameters"]) > len(existing["parameters"]): + merged["parameters"] = incoming["parameters"] + merged["syntax"] = incoming["syntax"] + if len(incoming["returns"]) > len(existing["returns"]): + merged["returns"] = incoming["returns"] + if len(incoming["summary"]) > len(existing["summary"]): + merged["summary"] = incoming["summary"] + + merged["doc_id"] = existing["doc_id"] + merged["aliases"] = unique_strings(existing.get("aliases", []) + incoming.get("aliases", [])) + merged["deprecated_aliases"] = unique_strings( + existing.get("deprecated_aliases", []) + incoming.get("deprecated_aliases", []) + ) + merged["notes"] = list(dict.fromkeys(existing["notes"] + incoming["notes"])) + merged["raw_luadoc"] = incoming["raw_luadoc"] if len(incoming["raw_luadoc"]) > len(existing["raw_luadoc"]) else existing["raw_luadoc"] + merged["source_line"] = existing.get("source_line") or incoming.get("source_line") + merged["availability"] = { + "since": min( + existing["availability"]["since"], + incoming["availability"]["since"], + key=version_key, + ), + "radios": sorted( + set(existing["availability"].get("radios", [])) + | set(incoming["availability"].get("radios", [])) + ), + } + + locations = [] + for part in (existing["source_location"], incoming["source_location"]): + for location in part.split("; "): + if location not in locations: + locations.append(location) + merged["source_location"] = "; ".join(locations) + return merged + + +def is_suspicious_item(item: dict) -> list[str]: + issues = [] + param_names = [param["name"] for param in item["parameters"]] + duplicates = [name for name, count in Counter(param_names).items() if count > 1] + if duplicates: + issues.append(f"duplicate_params:{','.join(sorted(duplicates))}") + if re.search(r"[^A-Za-z0-9._-]", item["id"]): + issues.append("nonportable_id") + if any(ret["type"] == "unknown" for ret in item["returns"]): + issues.append("unknown_return_type") + if any(param["type"] == "unknown" for param in item["parameters"]): + issues.append("unknown_param_type") + return issues + + +def quality_report(model: dict) -> dict: + modules = {} + for module_name in sorted({item["module"] for item in model["items"] if item["module"] in GOLDEN_MODULES}): + items = [item for item in model["items"] if item["module"] == module_name] + modules[module_name] = { + "items": len(items), + "unknown_param_types": sum(1 for item in items for param in item["parameters"] if param["type"] == "unknown"), + "unknown_return_types": sum(1 for item in items for ret in item["returns"] if ret["type"] == "unknown"), + "suspicious_items": [ + {"id": item["id"], "issues": is_suspicious_item(item)} + for item in items + if is_suspicious_item(item) + ][:25], + } + backlog = [] + for item in model["items"]: + if item["module"] not in GOLDEN_MODULES: + continue + issues = is_suspicious_item(item) + if issues: + backlog.append( + { + "id": item["id"], + "doc_id": item["doc_id"], + "module": item["module"], + "parser_fixable": [issue for issue in issues if issue != "unknown_param_type" and issue != "unknown_return_type"], + "upstream_fix_likely": [issue for issue in issues if issue in {"unknown_param_type", "unknown_return_type"}], + } + ) + return {"modules": modules, "backlog": backlog[:40]} + + +def parse_common_block(block: str) -> tuple[str, str] | None: + """Recognize a `@common ` block (a reusable, non-callable chunk of + luadoc body text) and return its (name, body). Returns None for any + block that isn't a `@common` block (e.g. a normal `@function` block).""" + match = COMMON_BLOCK_RE.match(block.strip()) + if not match: + return None + return match.group(1).strip(), match.group(2) + + +def expand_common_params( + block: str, + common_blocks: dict[str, str], + used: set[str], + relative_path: str, + line: int | None, +) -> str: + """Replace every `@commonparams ` reference in `block` with the + body text of the matching `@common ` block, textually, before the + normal @param/@retval/etc. parsing runs. Raises if a reference points at + an undefined @common block.""" + + def replace(match: re.Match) -> str: + name = match.group(1).strip() + if name not in common_blocks: + location = f"{relative_path}:{line}" if line else relative_path + raise ValueError( + f"@commonparams references undefined @common block '{name}' at {location}" + ) + used.add(name) + return common_blocks[name].strip("\n") + + return COMMONPARAMS_REF_RE.sub(replace, block) + + +def extract_model(source_dir: Path, docs_version: str, upstream_ref: str) -> dict: + all_blocks: list[tuple[str, str, int | None]] = [] + for path in sorted(source_dir.glob("*.cpp")): + text = path.read_text(encoding="utf-8") + relative_path = str(path.relative_to(source_dir.parent.parent.parent)) + for block in extract_blocks(text): + all_blocks.append((block["text"], relative_path, block["line"])) + + # Pass 1: collect @common block definitions. These are reusable chunks of + # luadoc body text (e.g. a parameter set shared by many @function blocks) + # and are never themselves a callable API item. + common_blocks: dict[str, str] = {} + common_used: set[str] = set() + for block_text, relative_path, line in all_blocks: + parsed_common = parse_common_block(block_text) + if parsed_common is None: + continue + name, body = parsed_common + if name in common_blocks: + location = f"{relative_path}:{line}" if line else relative_path + raise ValueError(f"duplicate @common block '{name}' at {location}") + common_blocks[name] = body + + # Pass 2: expand @commonparams references against the collected @common + # blocks, then parse @function blocks as normal. @common blocks are + # skipped here -- they have no @function tag, so parse_block already + # returns None for them, but we skip explicitly for clarity. + items_by_id = {} + for block_text, relative_path, line in all_blocks: + if parse_common_block(block_text) is not None: + continue + expanded_text = expand_common_params(block_text, common_blocks, common_used, relative_path, line) + item = parse_block(expanded_text, relative_path, line) + if item: + existing = items_by_id.get(item["id"]) + items_by_id[item["id"]] = merge_item(existing, item) if existing else item + + unused_common = set(common_blocks) - common_used + if unused_common: + print( + f"WARNING: @common block(s) defined but never referenced by any @commonparams: " + f"{', '.join(sorted(unused_common))}", + file=sys.stderr, + ) + + model = { + "docs_version": docs_version, + "upstream_ref": upstream_ref, + "generated_at": datetime.datetime.now(datetime.UTC).isoformat().replace("+00:00", "Z"), + "items": sorted(items_by_id.values(), key=lambda entry: entry["id"]), + } + validate_model(model) + return model + + +def luals_param_list(parameters: list[dict]) -> str: + return ", ".join(normalize_identifier(param["name"], f"arg{index+1}") for index, param in enumerate(parameters)) + + +def luals_return_annotations(returns: list[dict]) -> list[str]: + lines = [] + for retval in returns: + name = retval.get("name") + safe_name = normalize_identifier(name, "") if name and name != "-" else "" + suffix = f" {safe_name}" if safe_name else "" + lines.append(f"---@return {retval['type']}{suffix}") + return lines + + +GENERATED_MARKER_MD = ( + "\n\n" +) + +GENERATED_MARKER_LUA = ( + "-- GENERATED FILE — do not hand-edit.\n" + "-- Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md).\n" + "-- To fix API facts: edit the upstream EdgeTX /*luadoc*/ comment, then\n" + "-- re-extract and rebuild. To add narrative content: edit\n" + "-- docs-system/overlays/.md, then rebuild.\n\n" +) + + +def write_generated_markdown(path: Path, content: str) -> None: + path.write_text(GENERATED_MARKER_MD + content, encoding="utf-8") + + +def render_luals_module(module_name: str, items: list[dict], alias_lines: list[str]) -> str: + lines = ["---@meta", ""] + lines.extend(GENERATED_MARKER_LUA.rstrip("\n").split("\n")) + lines.append("") + lines.extend(alias_lines) + if module_name != "runtime": + lines.append(f"---@class {module_name}") + lines.append(f"{module_name} = {{}}") + lines.append("") + + for item in items: + lines.append(f"--- {item['summary']}") + lines.append(f"--- @since {item['availability']['since']}") + for index, param in enumerate(item["parameters"]): + optional = "?" if not param["required"] else "" + param_name = normalize_identifier(param["name"], f"arg{index+1}") + description = clean_inline_markup(param["description"]) + lines.append(f"---@param {param_name}{optional} {param['type']} {description}") + lines.extend(luals_return_annotations(item["returns"])) + target = item["symbol"] if module_name != "runtime" else item["symbol"] + lines.append(f"function {target}({luals_param_list(item['parameters'])}) end") + lines.append("") + return "\n".join(lines).rstrip() + "\n" + + +def build_outputs( + model: dict, + overlay_dir: Path, + docs_output: Path, + luals_outputs: list[Path], + report_unowned: bool = False, +) -> None: + ensure_dir(docs_output) + for luals_output in luals_outputs: + ensure_dir(luals_output) + report = quality_report(model) + + # A zero-item group's page is normally just the empty-group stub, safe to + # regenerate freely. But if a group has zero *currently extracted* items + # and its page already holds real, hand-authored content (e.g. LVGL, + # whose firmware has no luadoc annotations at all to extract from), never + # overwrite or delete it -- both here and in the stale-page cleanup below, + # which would otherwise unlink it before the per-group write loop ever + # gets a chance to check what's currently on disk. + preserved_group_pages: dict[str, str] = {} + for group, group_items in items_by_group(model): + if group_items: + continue + group_page = group_page_name(group) + group_path = docs_output / group_page + if not group_path.exists(): + continue + existing = group_path.read_text(encoding="utf-8") + rendered = render_group_page(group, group_items, group_page) + if existing.strip() != rendered.strip(): + preserved_group_pages[group_page] = ( + f"group '{group['slug']}' has zero extracted items, but the page " + "already has real (non-stub) content" + ) + + generated_pages = { + "index.md", + "review.md", + } + generated_pages.update(module_page_name(module_name) for module_name in {item["module"] for item in model["items"]}) + generated_pages.update(group_page_name(group) for group, _ in items_by_group(model)) + generated_pages.update(page_name_for_item(item) for item in model["items"]) + generated_pages.update(review_page_name_for_item(item) for item in model["items"]) + generated_pages -= preserved_group_pages.keys() + for page_name in generated_pages: + stale_page = docs_output / page_name + if stale_page.exists(): + stale_page.unlink() + + index_path = docs_output / "index.md" + write_generated_markdown(index_path, render_api_index(model)) + review_path = docs_output / "review.md" + write_generated_markdown(review_path, render_review_page(model)) + + modules: dict[str, list[dict]] = {} + for item in model["items"]: + modules.setdefault(item["module"], []).append(item) + + for module_name, module_items in sorted(modules.items()): + module_path = docs_output / module_page_name(module_name) + ensure_dir(module_path.parent) + write_generated_markdown(module_path, render_module_page(module_name, module_items, report, module_page_name(module_name))) + + for group, group_items in items_by_group(model): + group_page = group_page_name(group) + if group_page in preserved_group_pages: + print(f"Skipping {docs_output / group_page}: {preserved_group_pages[group_page]}. Not overwriting.") + continue + group_path = docs_output / group_page + rendered = render_group_page(group, group_items, group_page) + ensure_dir(group_path.parent) + write_generated_markdown(group_path, rendered) + + for item in model["items"]: + overlay_text = None + for overlay_path in [overlay_dir / f"{item['doc_id']}.md", overlay_dir / f"{item['id']}.md"]: + if overlay_path.exists(): + overlay_text = overlay_path.read_text(encoding="utf-8") + break + page_path = docs_output / page_name_for_item(item) + ensure_dir(page_path.parent) + write_generated_markdown(page_path, render_api_page(item, overlay_text, page_name_for_item(item))) + review_item_path = docs_output / review_page_name_for_item(item) + ensure_dir(review_item_path.parent) + write_generated_markdown(review_item_path, render_review_item_page(item, review_page_name_for_item(item))) + + for module_name, module_items in sorted(modules.items()): + alias_lines = render_luals_aliases(model) + content = render_luals_module(module_name, sorted(module_items, key=lambda entry: entry["symbol"]), alias_lines) + for luals_output in luals_outputs: + target_path = luals_output / f"{module_name}.d.lua" + target_path.write_text(content, encoding="utf-8") + + if report_unowned: + owned = set(generated_pages) | set(preserved_group_pages.keys()) + unowned = [] + for path in sorted(docs_output.rglob("*.md")): + rel = str(path.relative_to(docs_output)) + if rel not in owned: + unowned.append(rel) + if unowned: + print( + f"\n{len(unowned)} .md file(s) under {docs_output} are not accounted " + "for by the current model (not an index/review/module/group page, " + "not an item page, not a preserved zero-item group page). This does " + "NOT delete anything -- some of these may be legitimate hand-authored " + "content with no model backing (e.g. LVGL pages); some may be genuine " + "orphans left over from a prior run under a different page-naming " + "scheme or group assignment. Review each one manually:" + ) + for rel in unowned: + print(f" {rel}") + else: + print(f"\nNo unowned .md files found under {docs_output}.") + + +def parse_args() -> argparse.Namespace: + parser = argparse.ArgumentParser(description="Render Markdown and LuaLS output from a normalized API model.") + subparsers = parser.add_subparsers(dest="command", required=True) + + extract_parser = subparsers.add_parser("extract", help="Extract a normalized API model from EdgeTX luadoc comments.") + extract_parser.add_argument("--source-dir", required=True, type=Path) + extract_parser.add_argument("--docs-version", required=True) + extract_parser.add_argument("--upstream-ref", required=True) + extract_parser.add_argument("--output", required=True, type=Path) + + validate_parser = subparsers.add_parser("validate", help="Validate a normalized API model.") + validate_parser.add_argument("input", type=Path) + + report_parser = subparsers.add_parser("report", help="Generate a quality report for golden modules.") + report_parser.add_argument("input", type=Path) + report_parser.add_argument("--output", type=Path) + + build_parser = subparsers.add_parser("build", help="Build Markdown and LuaLS outputs.") + build_parser.add_argument("--input", required=True, type=Path) + build_parser.add_argument("--overlay-dir", required=True, type=Path) + build_parser.add_argument("--docs-output", required=True, type=Path) + build_parser.add_argument("--luals-output", required=True, type=Path, nargs="+") + build_parser.add_argument( + "--report-unowned", + action="store_true", + help=( + "After building, list every .md file under --docs-output that the " + "current model doesn't account for (not an index/review/module/group " + "page, not an item page, not a preserved zero-item group page). " + "Report-only -- never deletes anything. Some listed files may be " + "legitimate hand-authored content the pipeline has no model data " + "for (e.g. LVGL pages); some may be genuine orphans left over from " + "a prior run under a different page-naming scheme or group " + "assignment. Review each one manually before deleting." + ), + ) + + nav_parser = subparsers.add_parser( + "update-nav", help="Regenerate the API Reference item nav sub-tree in one or more mkdocs config files." + ) + nav_parser.add_argument("--input", required=True, type=Path) + nav_parser.add_argument("--mkdocs-config", required=True, type=Path, nargs="+") + + return parser.parse_args() + + +def main() -> int: + args = parse_args() + + try: + if args.command == "extract": + model = extract_model(args.source_dir, args.docs_version, args.upstream_ref) + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(json.dumps(model, indent=2) + "\n", encoding="utf-8") + print(f"Extracted {len(model['items'])} items into {args.output}") + return 0 + + if args.command == "validate": + load_model(args.input) + print(f"Validated {args.input}") + return 0 + + if args.command == "report": + model = load_model(args.input) + report = quality_report(model) + text = json.dumps(report, indent=2) + "\n" + if args.output: + args.output.parent.mkdir(parents=True, exist_ok=True) + args.output.write_text(text, encoding="utf-8") + print(f"Wrote quality report to {args.output}") + else: + print(text, end="") + return 0 + + if args.command == "build": + model = load_model(args.input) + build_outputs(model, args.overlay_dir, args.docs_output, args.luals_output, args.report_unowned) + print(f"Built Markdown into {args.docs_output}") + for luals_output in args.luals_output: + print(f"Built LuaLS into {luals_output}") + return 0 + + if args.command == "update-nav": + model = load_model(args.input) + nav_lines = render_nav_yaml_block(model) + for config_path in args.mkdocs_config: + update_mkdocs_nav(config_path, nav_lines) + print(f"Updated nav in {config_path}") + return 0 + except Exception as exc: + print(f"Error: {exc}", file=sys.stderr) + return 1 + + return 1 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/tools/generate_radio_subpages.py b/tools/generate_radio_subpages.py new file mode 100644 index 000000000..a9cfd72e8 --- /dev/null +++ b/tools/generate_radio_subpages.py @@ -0,0 +1,326 @@ +from __future__ import annotations + +from dataclasses import dataclass +from pathlib import Path +import shutil +from typing import Iterable + + +ROOT = Path(__file__).resolve().parent.parent +DOCS_ROOT = ROOT / "website" +RADIOS_ROOT = DOCS_ROOT / "overview" / "radios" +RADIO_ASSETS_ROOT = DOCS_ROOT / "assets" / "radios" +WEBSIM_RADIOS_ROOT = ROOT.parent / "edgetx-websim" / "source-gfx" / "radios-white-bg-original" + + +@dataclass(frozen=True) +class RadioEntry: + manufacturer: str + manufacturer_slug: str + model_label: str + introduced: str + lcd_type: str + radio_id: str + lcd_spec: str + lua_radio_id: str | None = None + + @property + def aliases(self) -> list[str]: + return [part.strip() for part in self.model_label.split(" / ") if part.strip()] + + @property + def primary_model(self) -> str: + return self.aliases[0] + + @property + def filename(self) -> str: + if self.radio_id.startswith(f"{self.manufacturer_slug}-"): + return f"{self.radio_id}.md" + return f"{self.manufacturer_slug}-{self.radio_id}.md" + + @property + def page_path(self) -> Path: + return RADIOS_ROOT / self.manufacturer_slug / self.filename + + @property + def route_path(self) -> str: + return f"{self.filename.removesuffix('.md')}/" + + @property + def image_name(self) -> str | None: + return IMAGE_NAME_BY_ID.get(self.radio_id) + + @property + def display_radio_id(self) -> str: + return self.lua_radio_id or self.radio_id + + @property + def display_radio_id_html(self) -> str: + parts = [part.strip() for part in self.display_radio_id.split("/") if part.strip()] + if len(parts) <= 1: + return f"{self.display_radio_id}" + return ", ".join(f"{part}" for part in parts) + + +RADIOS: tuple[RadioEntry, ...] = ( + RadioEntry("BetaFPV", "betafpv", "LiteRadio3 Pro", "-", "B&W LCD", "betafpv-literadio3-pro", "B&W LCD 128x64 1bit", "lr3pro"), + RadioEntry("FatFish", "fatfish", "F16", "2.10", "Color LCD", "fatfish-f16", "Color LCD 480x272 RGB565", "f16"), + RadioEntry("FlySky", "flysky", "EL18", "2.10", "Color LCD", "el18", "Color LCD 320x480 RGB565"), + RadioEntry("FlySky", "flysky", "NB4+", "2.11", "Color LCD", "flysky-nb4-plus", "Color LCD 320x240 RGB565", "nb4p"), + RadioEntry("FlySky", "flysky", "NV14", "2.10", "Color LCD", "flysky-nv14", "Color LCD 320x480 RGB565", "nv14"), + RadioEntry("FlySky", "flysky", "PA01", "2.11", "Color LCD", "flysky-pa01", "Color LCD 320x240 RGB565", "pa01"), + RadioEntry("FlySky", "flysky", "PL18 / PL18EV", "2.10", "Color LCD", "flysky-pl18-pl18ev", "Color LCD 480x320 RGB565", "pl18 / pl18ev"), + RadioEntry("FlySky", "flysky", "PL18U", "2.11", "Color LCD", "flysky-pl18u", "Color LCD 480x320 RGB565"), + RadioEntry("FlySky", "flysky", "ST16", "2.11", "Color LCD", "flysky-st16", "Color LCD 480x320 RGB565", "st16"), + RadioEntry("FrSky", "frsky", "QX7 / QX7S / QX7 ACCESS / QX7S ACCESS", "2.10", "B&W LCD", "frsky-qx7-qx7s", "B&W LCD 128x64 1bit", "x7 / x7access"), + RadioEntry("FrSky", "frsky", "X-Lite / X-Lite S / X-Lite Pro", "2.10", "B&W LCD", "frsky-x-lite-x-lite-s-x-lite-pro", "B&W LCD 128x64 1bit", "xlite / xlites"), + RadioEntry("FrSky", "frsky", "X9 Lite / X9 Lite S", "2.10", "B&W LCD", "frsky-x9-lite-x9-lite-s", "B&W LCD 128x64 1bit", "x9lite / x9lites"), + RadioEntry("FrSky", "frsky", "X9D / X9D+ / X9D SE", "2.10", "Grayscale LCD", "frsky-x9d-x9d-plus-x9d-plus-se", "Grayscale LCD 212x64 4bit", "x9d / x9d+"), + RadioEntry("FrSky", "frsky", "X9D+ 2019 / X9D+ 2019 SE", "2.10", "Grayscale LCD", "x9dp2019", "Grayscale LCD 212x64 4bit"), + RadioEntry("FrSky", "frsky", "X9E / X9E Hall", "2.10", "Grayscale LCD", "frsky-x9e-x9e-hall", "Grayscale LCD 212x64 4bit", "x9e"), + RadioEntry("FrSky", "frsky", "X10 / X10S / X10 Express / X10S Express", "2.10", "Color LCD", "x10express", "Color LCD 480x272 RGB565", "x10 / x10express"), + RadioEntry("FrSky", "frsky", "X12S / X12S IRSM", "2.10", "Color LCD", "frsky-x12s-x12s-irsm", "Color LCD 480x272 RGB565", "x12s"), + RadioEntry("HelloRadioSky", "helloradiosky", "V12", "2.11", "Color LCD", "helloradiosky-v12", "Color LCD 480x272 RGB565", "v12"), + RadioEntry("HelloRadioSky", "helloradiosky", "V14", "2.11", "B&W LCD", "helloradiosky-v14", "B&W LCD 128x64 1bit", "v14"), + RadioEntry("HelloRadioSky", "helloradiosky", "V16", "2.11", "Color LCD", "helloradiosky-v16", "Color LCD 480x272 RGB565", "v16"), + RadioEntry("iFlight", "iflight", "Commando8", "2.10", "B&W LCD", "iflight-commando8", "B&W LCD 480x272 1bit", "commando8"), + RadioEntry("iFlight", "iflight", "Commando14", "-", "Color LCD", "iflight-commando14", "Color LCD 480x272 RGB565"), + RadioEntry("Jumper", "jumper", "Bumblebee", "2.10", "B&W LCD", "jumper-bumblebee", "B&W LCD 128x64 1bit", "bumblebee"), + RadioEntry("Jumper", "jumper", "T-Lite / T-Lite v2", "2.10", "B&W LCD", "jumper-t-lite-t-lite-v2", "B&W LCD 128x64 1bit", "tlite / tlitef4"), + RadioEntry("Jumper", "jumper", "T-Pro", "2.10", "B&W LCD", "jumper-t-pro", "B&W LCD 128x64 1bit", "tpro / tprov2 / tpros"), + RadioEntry("Jumper", "jumper", "T-12 / T12 Plus / T12 Pro Hall", "2.10", "B&W LCD", "jumper-t12-t12-plus-t12-pro-hall", "B&W LCD 128x64 1bit", "t12 / t12max"), + RadioEntry("Jumper", "jumper", "T-14", "2.10", "B&W LCD", "jumper-t14", "B&W LCD 128x64 1bit", "t14"), + RadioEntry("Jumper", "jumper", "T-20", "2.10", "B&W LCD", "jumper-t20", "B&W LCD 128x64 1bit", "t20"), + RadioEntry("Jumper", "jumper", "T15", "2.10", "Color LCD", "t15", "Color LCD 480x320 RGB565"), + RadioEntry("Jumper", "jumper", "T15 Pro", "2.12", "Color LCD", "jumper-t15-pro", "Color LCD 480x320 RGB565", "t15pro"), + RadioEntry("Jumper", "jumper", "T16 / T16 Plus / T16 Pro Hall", "2.10", "Color LCD", "jumper-t16-t16-plus-t16-pro-hall", "Color LCD 480x272 RGB565", "t16"), + RadioEntry("Jumper", "jumper", "T18 / T18 Lite / T18 Pro", "2.10", "Color LCD", "jumper-t18-t18-lite-t18-pro", "Color LCD 480x272 RGB565", "t18"), + RadioEntry("Jumper", "jumper", "T20 V2", "2.10", "B&W LCD", "jumper-t20-v2", "B&W LCD 128x64 1bit", "t20v2"), + RadioEntry("RadioMaster", "radiomaster", "Boxer", "2.10", "B&W LCD", "boxer", "B&W LCD 128x64 1bit"), + RadioEntry("RadioMaster", "radiomaster", "GX12", "2.11", "B&W LCD", "radiomaster-gx12", "B&W LCD 128x64 1bit", "gx12"), + RadioEntry("RadioMaster", "radiomaster", "MT12", "2.10", "B&W LCD", "radiomaster-mt12", "B&W LCD 128x64 1bit", "mt12"), + RadioEntry("RadioMaster", "radiomaster", "Pocket", "2.10", "B&W LCD", "radiomaster-pocket", "B&W LCD 128x64 1bit"), + RadioEntry("RadioMaster", "radiomaster", "T8 Pro", "-", "B&W LCD", "radiomaster-t8-pro", "B&W LCD 128x64 1bit", "t8"), + RadioEntry("RadioMaster", "radiomaster", "TX12", "2.10", "B&W LCD", "radiomaster-tx12", "B&W LCD 128x64 1bit", "tx12"), + RadioEntry("RadioMaster", "radiomaster", "TX12 Mark II", "2.10", "B&W LCD", "radiomaster-tx12-mark-ii", "B&W LCD 128x64 1bit", "tx12mk2"), + RadioEntry("RadioMaster", "radiomaster", "Zorro", "2.10", "B&W LCD", "zorro", "B&W LCD 128x64 1bit"), + RadioEntry("RadioMaster", "radiomaster", "TX15", "2.12", "Color LCD", "tx15", "Color LCD 480x320 RGB565"), + RadioEntry("RadioMaster", "radiomaster", "TX16S / TX16S MAX / TX16S Mark II", "2.10", "Color LCD", "tx16s", "Color LCD 480x272 RGB565"), + RadioEntry("RadioMaster", "radiomaster", "TX16S MK3 / TX16S MK3 MAX", "2.12", "Color LCD", "tx16smk3", "Color LCD 800x480 RGB565"), +) + + +IMAGE_NAME_BY_ID: dict[str, str] = { + "betafpv-literadio3-pro": "betafpv-literadio-3-pro-500.png", + "fatfish-f16": "fatfish-f16-500.png", + "el18": "flysky-el18-500.png", + "flysky-nb4-plus": "flysky-nb4-500.png", + "flysky-nv14": "flysky-nv14-500.png", + "flysky-pa01": "flysky-pa01-500.png", + "flysky-pl18-pl18ev": "flysky-pl18-500.png", + "flysky-pl18u": "flysky-pl18u-500.png", + "flysky-st16": "flysky-st16-500.png", + "frsky-qx7-qx7s": "frsky-qx7-500.png", + "frsky-x-lite-x-lite-s-x-lite-pro": "frsky-xlite-pro-500.png", + "frsky-x9-lite-x9-lite-s": "frsky-x9-lite-500.png", + "frsky-x9d-x9d-plus-x9d-plus-se": "frsky-x9d-500.png", + "x9dp2019": "frsky-x9d-2019-500.png", + "frsky-x9e-x9e-hall": "frsky-x9e-500.png", + "x10express": "frsky-x10-500.png", + "frsky-x12s-x12s-irsm": "frsky-x12s-500.png", + "helloradiosky-v12": "hrs-v12-500.png", + "helloradiosky-v14": "hrs-v14-500.png", + "helloradiosky-v16": "hrs-v16-500.png", + "iflight-commando8": "iflight-commando-8-500.png", + "iflight-commando14": "iflight-commando-14-500.png", + "jumper-bumblebee": "jumper-bumblebee-500.png", + "jumper-t-lite-t-lite-v2": "jumper-t-lite-500.png", + "jumper-t-pro": "jumper-tpro-500.png", + "jumper-t12-t12-plus-t12-pro-hall": "jumper-t12-500.png", + "jumper-t14": "jumper-t14-500.png", + "jumper-t20": "jumper-t20-500.png", + "t15": "jumper-t15-500.png", + "jumper-t15-pro": "jumper-t15-pro-500.png", + "jumper-t16-t16-plus-t16-pro-hall": "jumper-t16-500.png", + "jumper-t18-t18-lite-t18-pro": "jumper-t18-500.png", + "jumper-t20-v2": "jumper-t20-500.png", + "boxer": "radiomaster-boxer-500.png", + "radiomaster-gx12": "radiomaster-gx12-500.png", + "radiomaster-mt12": "radiomaster-mt12-500.png", + "radiomaster-pocket": "radiomaster-pocket-500.png", + "radiomaster-t8-pro": "radiomaster-t8pro-500.png", + "radiomaster-tx12": "radiomaster-tx12-500.png", + "radiomaster-tx12-mark-ii": "radiomaster-tx12-500.png", + "zorro": "radiomaster-zorro-500.png", + "tx15": "radiomaster-tx15-500.png", + "tx16s": "radiomaster-tx16s-max-500.png", + "tx16smk3": "radiomaster-tx16s-mk3-max-500.png", +} + + +def entries_for(manufacturer_slug: str) -> list[RadioEntry]: + return [entry for entry in RADIOS if entry.manufacturer_slug == manufacturer_slug] + + +def link_label(entry: RadioEntry) -> str: + return f"[{entry.model_label}]({entry.filename})" + + +def manufacturer_readme(manufacturer: str, manufacturer_slug: str, entries: Iterable[RadioEntry]) -> str: + lines = [ + f"# {manufacturer}", + "", + '', + '', + '', + ] + for entry in entries: + if entry.image_name: + model_cell = ( + f'
        ' + f'{entry.manufacturer} {entry.primary_model}' + f'{entry.model_label}' + f'
        ' + ) + else: + model_cell = f'{entry.model_label}' + lines.append( + f"" + ) + lines.extend(["", "
        Modelfrom EdgeTXLCD type
        {model_cell}{entry.introduced}{entry.lcd_type}
        ", ""]) + return "\n".join(lines) + + +def radios_overview_readme(entries: Iterable[RadioEntry]) -> str: + groups = ( + ("B&W LCD", "Radios with B&W LCD screen"), + ("Grayscale LCD", "Radios with Grayscale LCD screen"), + ("Color LCD", "Radios with COLOR LCD screen"), + ) + + lines = ["# Radios", ""] + for lcd_type, heading in groups: + lines.extend([f"## {heading}", ""]) + lines.extend( + [ + '', + '', + '', + ] + ) + for entry in [item for item in entries if item.lcd_type == lcd_type]: + if entry.image_name: + model_cell = ( + f'
        ' + f'{entry.manufacturer} {entry.primary_model}' + f'{entry.model_label}' + f'
        ' + ) + else: + model_cell = f'{entry.model_label}' + lines.append( + f"" + ) + lines.extend(["", "
        ModelManufacturerfrom EdgeTX
        {model_cell}{entry.manufacturer}{entry.introduced}
        ", ""]) + return "\n".join(lines) + + +def radio_page(entry: RadioEntry) -> str: + rows = [ + ("Manufacturer", entry.manufacturer), + ("Model", entry.primary_model), + ] + if len(entry.aliases) > 1: + rows.append(("Versions", ", ".join(f"{alias}" for alias in entry.aliases[1:]))) + rows.extend([ + ("from EdgeTX", entry.introduced), + ("LCD type", entry.lcd_spec), + ("Radio ID", entry.display_radio_id_html), + ]) + + lines = [ + f"# {entry.manufacturer} {entry.primary_model}", + "", + f"[Back to {entry.manufacturer}](README.md) | [All radios](../README.md)", + "", + "## Overview", + "", + '
        ', + '
        ', + ] + if entry.image_name: + lines.extend( + [ + f'{entry.manufacturer} {entry.primary_model}', + "
        ", + '
        ', + "", + ] + ) + else: + lines.extend( + [ + "Picture not imported yet.", + "
        ", + '
        ', + "", + ] + ) + lines.extend( + [ + '', + '', + '', + ] + ) + for key, value in rows: + lines.append(f"") + lines.extend( + [ + "", + "
        PropertyValue
        {key}{value}
        ", + "", + "
        ", + "
        ", + "", + ] + ) + return "\n".join(lines) + + +def sync_images(entries: Iterable[RadioEntry]) -> None: + RADIO_ASSETS_ROOT.mkdir(parents=True, exist_ok=True) + for entry in entries: + if not entry.image_name: + continue + source = WEBSIM_RADIOS_ROOT / entry.image_name + target = RADIO_ASSETS_ROOT / entry.image_name + if source.exists(): + shutil.copy2(source, target) + + +def main() -> None: + RADIOS_ROOT.mkdir(parents=True, exist_ok=True) + (RADIOS_ROOT / "README.md").write_text( + radios_overview_readme(RADIOS), + encoding="utf-8", + ) + manufacturer_dirs = sorted({entry.manufacturer_slug for entry in RADIOS}) + for manufacturer_slug in manufacturer_dirs: + entries = entries_for(manufacturer_slug) + if not entries: + continue + manufacturer = entries[0].manufacturer + target_dir = RADIOS_ROOT / manufacturer_slug + target_dir.mkdir(parents=True, exist_ok=True) + (target_dir / "README.md").write_text( + manufacturer_readme(manufacturer, manufacturer_slug, entries), + encoding="utf-8", + ) + for entry in entries: + entry.page_path.write_text(radio_page(entry), encoding="utf-8") + sync_images(RADIOS) + + +if __name__ == "__main__": + main() diff --git a/tools/import_legacy_gitbook.py b/tools/import_legacy_gitbook.py new file mode 100644 index 000000000..3087c4df7 --- /dev/null +++ b/tools/import_legacy_gitbook.py @@ -0,0 +1,649 @@ +#!/usr/bin/env python3 + +from __future__ import annotations + +import argparse +import json +import os +import re +import shutil +import subprocess +import tarfile +import tempfile +from dataclasses import dataclass, field +from pathlib import Path +from typing import Iterable + + +SUMMARY_RE = re.compile(r"^(?P\s*)\* \[(?P.+)\]\((?P<path>[^)]+)\)\s*$") +HINT_OPEN_RE = re.compile(r'^\{%\s*hint style="(?P<style>[^"]+)"\s*%\}\s*$') +HINT_CLOSE_RE = re.compile(r"^\{%\s*endhint\s*%\}\s*$") +TAB_OPEN_RE = re.compile(r'^\{%\s*tab title="(?P<title>[^"]+)"\s*%\}\s*$') +TABS_OPEN_RE = re.compile(r"^\{%\s*tabs\s*%\}\s*$") +TAB_CLOSE_RE = re.compile(r"^\{%\s*endtab\s*%\}\s*$") +TABS_CLOSE_RE = re.compile(r"^\{%\s*endtabs\s*%\}\s*$") +LINK_RE = re.compile(r"(!?\[[^\]]*\])\(([^)]+)\)") + +LEGACY_PATH_PREFIX_ALIASES: tuple[tuple[str, str], ...] = ( + ( + "part_iii_-_opentx_lua_api_reference/bitmap-functions-less-than-greater-than-luadoc-begin-bitmap/", + "api-reference/bitmap/", + ), + ( + "part_iii_-_opentx_lua_api_reference/general-functions-less-than-greater-than-luadoc-begin-general/", + "api-reference/general/", + ), + ( + "part_iii_-_opentx_lua_api_reference/lcd-functions-less-than-greater-than-luadoc-begin-lcd/", + "api-reference/lcd/", + ), + ( + "part_iii_-_opentx_lua_api_reference/model-functions-less-than-greater-than-luadoc-begin-model/", + "api-reference/model/", + ), + ("part_i_-_script_type_overview/", "overview/"), + ("part_ii_-_opentx_lua_api_programming_guide/", "programming/"), + ("part_iii_-_opentx_lua_api_reference/", "api-reference/"), + ("part_iv_-_advanced_topics/", "advanced-topics/"), + # The real branch content (2.4-2.9, verified against the actual repo + # trees) always uses the undotted "opentx_20_scripts" spelling -- no + # branch anywhere uses the dotted "2.0" form below. Kept the dotted + # entries too rather than replacing them, in case some other branch we + # haven't checked still uses it; either way both fall through cleanly + # to raw slugging if genuinely unmatched. + ("part_iv_-_converting_opentx_20_scripts/", "converting-opentx-20-scripts/"), + ("part_iv_-_converting_opentx_2.0_scripts/", "converting-opentx-2-0-scripts/"), + ("part_v_-_converting_opentx_21_scripts/", "converting-opentx-21-scripts/"), + ("part_vi_-_advanced_topics/", "advanced-topics/"), + ("part_vii_-_appendix/", "appendix/"), + ("part_i_-_script_type_overview.md", "overview/index.md"), + ("part_ii_-_opentx_lua_api_programming_guide.md", "programming/index.md"), + ("part_iii_-_opentx_lua_api_reference.md", "api-reference/index.md"), + ("part_iv_-_converting_opentx_20_scripts.md", "converting-opentx-20-scripts/index.md"), + ("part_iv_-_converting_opentx_2.0_scripts.md", "converting-opentx-2-0-scripts/index.md"), + ("part_v_-_converting_opentx_21_scripts.md", "converting-opentx-21-scripts/index.md"), + ("part_vi_-_advanced_topics.md", "advanced-topics/index.md"), + ("part_vii_-_appendix.md", "appendix/index.md"), + ("lua-api-programming/", "programming/"), + ("lua-api-reference/", "api-reference/"), + ("overview/", "overview/"), +) + + +@dataclass +class SummaryNode: + title: str + path: str + children: list["SummaryNode"] = field(default_factory=list) + + +def repo_root() -> Path: + return Path(__file__).resolve().parent.parent + + +def infer_version_name(ref: str) -> str: + match = re.search(r"(\d+\.\d+)", ref) + return match.group(1) if match else "legacy" + + +def run_archive(ref: str, dest_dir: Path) -> None: + archive_bytes = subprocess.check_output(["git", "archive", ref], cwd=repo_root()) + with tempfile.NamedTemporaryFile() as temp_file: + temp_file.write(archive_bytes) + temp_file.flush() + with tarfile.open(temp_file.name) as tar: + tar.extractall(dest_dir) + + +def parse_summary(text: str) -> list[SummaryNode]: + roots: list[SummaryNode] = [] + stack: list[tuple[int, SummaryNode]] = [] + + for raw_line in text.splitlines(): + match = SUMMARY_RE.match(raw_line) + if not match: + continue + + indent = len(match.group("indent")) + node = SummaryNode(match.group("title"), decode_gitbook_path(match.group("path"))) + + while stack and stack[-1][0] >= indent: + stack.pop() + + if stack: + stack[-1][1].children.append(node) + else: + roots.append(node) + + stack.append((indent, node)) + + return roots + + +def decode_gitbook_path(path: str) -> str: + # Older GitBook SUMMARY files escape markdown punctuation inside paths, + # e.g. part\_i\_-\_script\_type\_overview/mix.md. MkDocs should receive + # the literal filename, not the markdown-escaped form. + return re.sub(r"\\([_()[\]\\-])", r"\1", path) + + +def apply_legacy_path_aliases(path: str) -> str: + lowered = decode_gitbook_path(path).strip().lower() + for legacy_prefix, clean_prefix in LEGACY_PATH_PREFIX_ALIASES: + if lowered == legacy_prefix.rstrip("/"): + return clean_prefix.rstrip("/") + if lowered.startswith(legacy_prefix): + return f"{clean_prefix}{lowered[len(legacy_prefix):]}" + return lowered + + +def normalize_component(component: str) -> str: + cleaned = decode_gitbook_path(component).strip() + if cleaned in {"", ".", ".."}: + return cleaned + + if cleaned.lower() == "readme.md": + return "README.md" + + if cleaned.lower().endswith(".md"): + stem = cleaned[:-3] + suffix = ".md" + else: + stem = cleaned + suffix = "" + + stem = stem.lower() + stem = re.sub(r"[&+]", " and ", stem) + stem = re.sub(r"[^a-z0-9]+", "-", stem) + stem = re.sub(r"-{2,}", "-", stem).strip("-") + stem = stem or "page" + return f"{stem}{suffix}" + + +def normalize_relative_path(path: str) -> str: + decoded = apply_legacy_path_aliases(path) + path_obj = Path(decoded) + normalized_parts = [normalize_component(part) for part in path_obj.parts] + return Path(*normalized_parts).as_posix() + + +def build_path_map(source_root: Path) -> dict[Path, Path]: + path_map: dict[Path, Path] = {} + used_targets: set[Path] = set() + + for source_file in sorted(source_root.rglob("*.md")): + relative_path = source_file.relative_to(source_root) + if relative_path.name == "SUMMARY.md": + continue + normalized = Path(normalize_relative_path(relative_path.as_posix())) + + candidate = normalized + counter = 2 + while candidate in used_targets: + if candidate.suffix: + candidate = candidate.with_name(f"{candidate.stem}-{counter}{candidate.suffix}") + else: + candidate = candidate.with_name(f"{candidate.name}-{counter}") + counter += 1 + + path_map[relative_path] = candidate + used_targets.add(candidate) + + return path_map + + +def build_source_lookup(source_root: Path) -> dict[str, Path]: + # Two passes: first register every file under its own *exact*-case path + # (unconditional assignment -- each real file has a distinct exact path, + # so these never collide with each other). Only then build the + # case-insensitive fallback, deciding collisions explicitly instead of + # via a plain setdefault ordered by rglob's sort. The naive single-pass + # setdefault version had a real bug: when a lowercase folder (the + # "real" one, with its own README.md) coexists with an accidental + # differently-cased duplicate (e.g. edgetx_2.4's + # "Bitmap-functions.../getsize.md" next to + # "bitmap-functions.../getsize.md"), the capitalized variant sorts + # first and its *lowercased* key registration collides with -- and + # silently wins over -- the real lowercase file's own *exact*-case key, + # since for an already-lowercase path those two strings are identical. + # SUMMARY.md links use the real folder's exact original casing, so this + # was resolving to the wrong (duplicate, README-less) source file. + exact: dict[str, Path] = {} + case_insensitive_candidates: dict[str, list[Path]] = {} + for source_file in sorted(source_root.rglob("*.md")): + relative_path = source_file.relative_to(source_root) + if relative_path.name == "SUMMARY.md": + continue + decoded = decode_gitbook_path(relative_path.as_posix()) + exact[decoded] = relative_path + case_insensitive_candidates.setdefault(decoded.lower(), []).append(relative_path) + + lookup: dict[str, Path] = dict(exact) + for lower_key, candidates in case_insensitive_candidates.items(): + if lower_key in lookup: + continue + if len(candidates) == 1: + lookup[lower_key] = candidates[0] + continue + # Multiple differently-cased source files collapse to the same + # lowercased key. Prefer whichever one's directory has its own + # README.md -- the real, "complete" section -- over a bare + # duplicate with no index page; otherwise fall back to the first + # in sorted order (prior behavior). + with_readme = [c for c in candidates if (source_root / c.parent / "README.md").exists()] + chosen = with_readme[0] if with_readme else candidates[0] + lookup[lower_key] = chosen + others = [c for c in candidates if c != chosen] + print(f" (case-duplicate sources for {lower_key!r}: using {chosen}, ignoring {others})") + return lookup + + +def resolve_source_relative(path: str, source_lookup: dict[str, Path]) -> Path: + decoded = decode_gitbook_path(path) + return source_lookup.get(decoded) or source_lookup.get(decoded.lower()) or Path(decoded) + + +def map_summary_paths( + nodes: list[SummaryNode], + path_map: dict[Path, Path], + source_lookup: dict[str, Path], +) -> list[SummaryNode]: + mapped: list[SummaryNode] = [] + for node in nodes: + source_path = resolve_source_relative(node.path, source_lookup) + mapped_node = SummaryNode( + title=node.title, + path=path_map.get(source_path, source_path).as_posix(), + children=map_summary_paths(node.children, path_map, source_lookup), + ) + mapped.append(mapped_node) + return mapped + + +def normalize_nav_path(path: str) -> str: + path_obj = Path(path) + if path_obj.name == "README.md": + if path_obj.parent == Path("."): + return "index.md" + return (path_obj.parent / "index.md").as_posix() + return path + + +def nav_entry(node: SummaryNode) -> dict[str, object]: + path = normalize_nav_path(node.path) + if not node.children: + return {node.title: path} + + children: list[object] = [{node.title: path}] + children.extend(nav_entry(child) for child in node.children) + return {node.title: children} + + +def build_nav(summary_nodes: list[SummaryNode]) -> list[object]: + nav: list[object] = [] + for node in summary_nodes: + title = "EdgeTX Lua Reference Guide" if node.path == "README.md" else node.title + rewritten = SummaryNode(title=title, path=node.path, children=node.children) + nav.append(nav_entry(rewritten)) + return nav + + +def convert_hint_style(style: str) -> str: + return { + "info": "info", + "warning": "warning", + "danger": "danger", + "success": "success", + }.get(style, "note") + + +def indent_block(lines: Iterable[str]) -> list[str]: + return [f" {line}" if line else "" for line in lines] + + +def rewrite_link_target_with_map( + target: str, + source_file: Path, + source_root: Path, + path_map: dict[Path, Path], + source_lookup: dict[str, Path], + legacy_assets_dir: str, +) -> str: + if target.startswith(("http://", "https://", "mailto:", "#")): + return target + + if ".gitbook/assets/" in target: + return target.replace(".gitbook/assets/", f"assets/{legacy_assets_dir}/") + + if target.startswith("/"): + return target + + bare_target, hash_part = (target.split("#", 1) + [""])[:2] + suffix = f"#{hash_part}" if hash_part else "" + if not bare_target: + return target + + bare_target = decode_gitbook_path(bare_target) + + if bare_target.endswith("/"): + candidate = (source_file.parent / bare_target / "README.md").resolve() + if candidate.exists(): + bare_target = f"{bare_target}README.md" + + relative_path = (source_file.parent / bare_target).resolve() + if relative_path.is_dir() and (relative_path / "README.md").exists(): + stripped = bare_target.rstrip("/") + bare_target = f"{stripped}/README.md" + relative_path = (source_file.parent / bare_target).resolve() + + if not Path(bare_target).suffix and relative_path.with_suffix(".md").exists(): + bare_target = f"{bare_target}.md" + relative_path = (source_file.parent / bare_target).resolve() + + try: + relative_path.relative_to(source_root.resolve()) + except ValueError: + return target + + try: + source_relative = relative_path.relative_to(source_root.resolve()) + except ValueError: + source_relative = resolve_source_relative( + Path(bare_target).as_posix(), + source_lookup, + ) + if source_relative == Path(decode_gitbook_path(Path(bare_target).as_posix())): + return target + + mapped_target = path_map.get(source_relative) + if mapped_target is None: + return target + # README.md is also mirrored to index.md, and MkDocs drops README.md when + # both exist, so links have to point at the index.md copy. + mapped_target = Path(normalize_nav_path(mapped_target.as_posix())) + + current_output = path_map[source_file.relative_to(source_root)] + relative_to_output = Path( + os.path.relpath(mapped_target, start=current_output.parent if current_output.parent != Path("") else Path(".")) + ) + return f"{relative_to_output.as_posix()}{suffix}" + +def transform_markdown( + content: str, + source_file: Path, + source_root: Path, + path_map: dict[Path, Path], + source_lookup: dict[str, Path], + legacy_assets_dir: str, +) -> str: + lines = content.splitlines() + output: list[str] = [] + i = 0 + + while i < len(lines): + line = lines[i] + + hint_open = HINT_OPEN_RE.match(line) + if hint_open: + style = convert_hint_style(hint_open.group("style")) + block: list[str] = [] + i += 1 + while i < len(lines) and not HINT_CLOSE_RE.match(lines[i]): + block.append(lines[i]) + i += 1 + output.append(f"!!! {style}") + output.extend(indent_block(block)) + if block: + output.append("") + i += 1 + continue + + if TABS_OPEN_RE.match(line) or TABS_CLOSE_RE.match(line): + i += 1 + continue + + tab_open = TAB_OPEN_RE.match(line) + if tab_open: + output.append(f"#### {tab_open.group('title')}") + output.append("") + i += 1 + continue + + if TAB_CLOSE_RE.match(line): + output.append("") + i += 1 + continue + + output.append(line) + i += 1 + + rewritten = "\n".join(output) + + def replace_link(match: re.Match[str]) -> str: + label, target = match.groups() + return f"{label}({rewrite_link_target_with_map(target, source_file, source_root, path_map, source_lookup, legacy_assets_dir)})" + + rewritten = LINK_RE.sub(replace_link, rewritten) + return f"{rewritten.rstrip()}\n" + + +def copy_current_theme_assets(output_docs_dir: Path) -> None: + current_docs_root = repo_root() / "website" / "md-docs" + for folder_name in ("assets", "javascripts", "stylesheets"): + src = current_docs_root / folder_name + dst = output_docs_dir / folder_name + if dst.exists(): + shutil.rmtree(dst) + shutil.copytree(src, dst) + + +def copy_legacy_assets(source_root: Path, output_docs_dir: Path, legacy_assets_dir: str) -> None: + legacy_assets = source_root / ".gitbook" / "assets" + if not legacy_assets.exists(): + return + dst = output_docs_dir / "assets" / legacy_assets_dir + if dst.exists(): + shutil.rmtree(dst) + shutil.copytree(legacy_assets, dst) + + +def build_output_tree( + source_root: Path, + output_docs_dir: Path, + path_map: dict[Path, Path], + source_lookup: dict[str, Path], + legacy_assets_dir: str, +) -> None: + if output_docs_dir.exists(): + shutil.rmtree(output_docs_dir) + output_docs_dir.mkdir(parents=True, exist_ok=True) + + copy_current_theme_assets(output_docs_dir) + copy_legacy_assets(source_root, output_docs_dir, legacy_assets_dir) + + # Every book has both a real section folder (.../part_i_-_..._overview/ + # README.md) and a same-titled top-level stub file + # (part_i_-_..._overview.md) that LEGACY_PATH_PREFIX_ALIASES maps + # straight to the same "overview/index.md" target the folder's + # README.md also auto-mirrors to below. Verified empirically against + # edgetx_2.4: the folder's README.md is consistently the more complete + # of the two (has frontmatter, more current wording -- "EdgeTX" vs the + # stub's "OpenTX" -- more lines), so it should win. build_path_map's own + # collision handling doesn't cover this (it only dedupes when two + # *different source files* map to the *same explicit target*, which + # isn't this case: the stub's target IS index.md, the folder's target + # is its own README.md; the mirror write below is untracked by it + # entirely). Rather than special-case the mirror, track every path + # actually written to output_docs_dir and make ANY write -- primary or + # mirror -- back off once something else already claimed that exact + # path, first-processed wins. rglob's sort naturally processes each + # folder's README.md (and its mirror) before that section's top-level + # stub (Path comparison is by parts-tuple, and "section" as a bare + # first part sorts before "section.md" as a longer first part), so this + # gives the README priority without needing to special-case which side + # is the "real" one. + written_targets: set[Path] = set() + + for source_file in sorted(source_root.rglob("*.md")): + relative_path = source_file.relative_to(source_root) + if relative_path.name == "SUMMARY.md": + continue + target = path_map[relative_path] + destination = output_docs_dir / target + transformed = transform_markdown( + source_file.read_text(encoding="utf-8"), + source_file, + source_root, + path_map, + source_lookup, + legacy_assets_dir, + ) + + if target in written_targets: + print(f" (skipping {relative_path}: {target} was already written by an earlier source file)") + else: + destination.parent.mkdir(parents=True, exist_ok=True) + destination.write_text(transformed, encoding="utf-8") + written_targets.add(target) + + if destination.name == "README.md": + index_target = (destination.parent / "index.md").relative_to(output_docs_dir) + if index_target in written_targets: + print(f" (skipping index.md mirror for {relative_path}: {index_target} already written)") + else: + (destination.parent / "index.md").write_text(transformed, encoding="utf-8") + written_targets.add(index_target) + + +def build_config( + output_docs_dir: Path, + nav: list[object], + config_path: Path, + site_dir: Path, + version_name: str, +) -> None: + # theme/plugins/markdown_extensions mirror the current root mkdocs.yml + # feature-for-feature (dark mode palette, the dotted-symbol search + # separator fix, minify, pymdownx set) so a legacy + # version doesn't look or search noticeably worse than the current + # site just because it was generated once and never regenerated. + # There's no shared-config loader between the two -- this is a plain + # copy -- so if mkdocs.yml's theme config changes again, update this + # to match. + config = { + "site_name": "EdgeTX Lua Reference Guide", + "site_description": f"Legacy EdgeTX {version_name} Lua documentation imported from the GitBook branch", + "site_url": "https://luadoc.edgetx.org/", + "repo_url": "https://github.com/EdgeTX/lua-reference-guide", + "repo_name": "EdgeTX/lua-reference-guide", + # No edit_uri: docs_dir is a temp workspace, not real repo content + # (this converted GitBook page isn't something you can "edit" back + # into the branch the same way), so leave it empty to suppress + # Material's edit-this-page pencil rather than let it infer a + # broken link from repo_url. repo_url/repo_name alone are enough to + # show the GitHub header widget, which is all that's wanted here. + "edit_uri": "", + "docs_dir": str(output_docs_dir), + "site_dir": str(site_dir), + "theme": { + "name": "material", + "logo": "assets/edgetx-logo.svg", + "favicon": "assets/edgetx-logo.svg", + "font": False, + "palette": [ + { + "media": "(prefers-color-scheme: light)", + "scheme": "default", + "primary": "custom", + "accent": "custom", + "toggle": {"icon": "material/brightness-7", "name": "Switch to dark mode"}, + }, + { + "media": "(prefers-color-scheme: dark)", + "scheme": "slate", + "primary": "custom", + "accent": "custom", + "toggle": {"icon": "material/brightness-4", "name": "Switch to light mode"}, + }, + ], + "features": [ + "navigation.indexes", + "navigation.path", + "navigation.top", + "toc.follow", + "search.suggest", + "search.highlight", + "content.code.copy", + ], + }, + "plugins": [ + { + "search": { + "separator": "[\\s\\-\\.]+", + }, + }, + {"minify": {"minify_html": True}}, + ], + "extra_css": ["stylesheets/extra-live-v2.css"], + "extra_javascript": [ + "javascripts/mobile-nav-inline.js", + "javascripts/legacy-version-banner.js", + ], + "extra": { + # legacy-version-banner.js picks the notice from versions.json at + # runtime, so no per-version banner config is needed here. + "version": {"provider": "mike", "default": "latest", "alias": True}, + }, + "markdown_extensions": [ + "tables", + "admonition", + "pymdownx.details", + "pymdownx.superfences", + {"pymdownx.highlight": {"anchor_linenums": True}}, + "pymdownx.inlinehilite", + "pymdownx.snippets", + {"pymdownx.tabbed": {"alternate_style": True}}, + "pymdownx.tilde", + "attr_list", + "md_in_html", + {"toc": {"permalink": True}}, + ], + "nav": nav, + } + config_path.parent.mkdir(parents=True, exist_ok=True) + config_path.write_text(json.dumps(config, indent=2, ensure_ascii=False), encoding="utf-8") + + +def main() -> None: + parser = argparse.ArgumentParser(description="Import a GitBook-era branch into a MkDocs-ready legacy docs tree.") + parser.add_argument("--ref", default="upstream/edgetx_2.11") + parser.add_argument("--output-docs-dir") + parser.add_argument("--output-config") + parser.add_argument("--site-dir") + args = parser.parse_args() + + root = repo_root() + version_name = infer_version_name(args.ref) + output_docs_dir = (root / (args.output_docs_dir or f".site-legacy-generated/{version_name}/docs")).resolve() + output_config = (root / (args.output_config or f".site-legacy-generated/{version_name}/mkdocs.yml")).resolve() + site_dir = (root / (args.site_dir or f"site-legacy/{version_name}")).resolve() + legacy_assets_dir = f"legacy-{version_name}" + temp_root = root / ".tmp" + temp_root.mkdir(parents=True, exist_ok=True) + + with tempfile.TemporaryDirectory(dir=temp_root, prefix="legacy-gitbook-") as temp_dir: + source_root = Path(temp_dir) + run_archive(args.ref, source_root) + summary_text = (source_root / "SUMMARY.md").read_text(encoding="utf-8") + path_map = build_path_map(source_root) + source_lookup = build_source_lookup(source_root) + summary_nodes = map_summary_paths(parse_summary(summary_text), path_map, source_lookup) + build_output_tree(source_root, output_docs_dir, path_map, source_lookup, legacy_assets_dir) + build_config(output_docs_dir, build_nav(summary_nodes), output_config, site_dir, version_name) + + print(f"Generated legacy docs in {output_docs_dir}") + print(f"Generated MkDocs config at {output_config}") + + +if __name__ == "__main__": + main() diff --git a/tools/prepare_branch_site.py b/tools/prepare_branch_site.py new file mode 100644 index 000000000..478187493 --- /dev/null +++ b/tools/prepare_branch_site.py @@ -0,0 +1,246 @@ +#!/usr/bin/env python3 + +from __future__ import annotations + +import argparse +import io +import re +import shutil +import subprocess +import tarfile +from dataclasses import dataclass, field +from pathlib import Path +from shutil import copy2 + + +SUMMARY_ITEM_RE = re.compile(r"^(?P<indent>\s*)\*\s+\[(?P<title>.+?)\]\((?P<path>.+?)\)\s*$") +MARKDOWN_HTML_LINK_RE = re.compile(r"(\[[^\]]*\]\()([^)#]+)\.html(#[^)]+)?(\))") +HTML_HREF_RE = re.compile(r'(<a[^>]+href=")([^"#]+)\.html(#[^"]+)?(")') +SHARED_SHELL_DIRS = ("assets", "stylesheets", "javascripts") + + +@dataclass +class NavItem: + title: str + path: str + children: list["NavItem"] = field(default_factory=list) + + +def unescape_summary_path(path: str) -> str: + return ( + path.strip() + .replace(r"\_", "_") + .replace(r"\(", "(") + .replace(r"\)", ")") + .replace(r"\[", "[") + .replace(r"\]", "]") + .replace(r"\ ", " ") + ) + + +def yaml_quote(value: str) -> str: + return "'" + value.replace("'", "''") + "'" + + +def resolve_existing_path(docs_dir: Path, raw_path: str) -> str: + candidate = docs_dir / raw_path + if candidate.exists(): + return raw_path + + current = docs_dir + resolved_parts: list[str] = [] + for part in Path(raw_path).parts: + children = {child.name.lower(): child.name for child in current.iterdir()} if current.is_dir() else {} + matched = children.get(part.lower()) + if matched is None: + return raw_path + resolved_parts.append(matched) + current = current / matched + + return str(Path(*resolved_parts)) + + +def parse_summary(summary_path: Path) -> list[NavItem]: + items: list[NavItem] = [] + stack: list[tuple[int, list[NavItem]]] = [(-1, items)] + + for raw_line in summary_path.read_text(encoding="utf-8").splitlines(): + match = SUMMARY_ITEM_RE.match(raw_line) + if not match: + continue + + depth = len(match.group("indent")) // 2 + title = match.group("title").strip() + path = unescape_summary_path(match.group("path")) + item = NavItem(title=title, path=path) + + while stack and depth <= stack[-1][0]: + stack.pop() + + parent_items = stack[-1][1] + parent_items.append(item) + stack.append((depth, item.children)) + + return items + + +def normalize_nav_paths(items: list[NavItem], docs_dir: Path) -> None: + for item in items: + item.path = resolve_existing_path(docs_dir, item.path) + normalize_nav_paths(item.children, docs_dir) + + +def render_nav(items: list[NavItem], indent: int = 2) -> list[str]: + lines: list[str] = [] + prefix = " " * indent + + for item in items: + if item.children: + lines.append(f"{prefix}- {yaml_quote(item.title)}:") + lines.append(f"{prefix} - {item.path}") + lines.extend(render_nav(item.children, indent + 4)) + else: + lines.append(f"{prefix}- {yaml_quote(item.title)}: {item.path}") + + return lines + + +def export_git_ref(repo_root: Path, ref: str, docs_dir: Path) -> None: + archive = subprocess.run( + ["git", "archive", "--format=tar", ref], + cwd=repo_root, + check=True, + stdout=subprocess.PIPE, + ) + docs_dir.mkdir(parents=True, exist_ok=True) + with tarfile.open(fileobj=io.BytesIO(archive.stdout), mode="r:") as tar: + tar.extractall(docs_dir) + + +def mirror_legacy_assets(docs_dir: Path) -> None: + asset_source = docs_dir / ".gitbook" / "assets" + if not asset_source.exists(): + return + + asset_target = docs_dir / "gitbook-assets" + shutil.copytree(asset_source, asset_target, dirs_exist_ok=True) + + for asset in asset_target.rglob("*"): + if not asset.is_file(): + continue + root_alias = docs_dir / asset.name + if not root_alias.exists(): + copy2(asset, root_alias) + + +def rewrite_legacy_links(docs_dir: Path) -> None: + for markdown_file in docs_dir.rglob("*.md"): + text = markdown_file.read_text(encoding="utf-8") + updated = text.replace(".gitbook/assets/", "gitbook-assets/") + updated = MARKDOWN_HTML_LINK_RE.sub(r"\1\2.md\3\4", updated) + updated = HTML_HREF_RE.sub(r"\1\2.md\3\4", updated) + if updated != text: + markdown_file.write_text(updated, encoding="utf-8") + + +def copy_shared_site_shell(repo_root: Path, docs_dir: Path) -> None: + shared_root = repo_root / "website" + if not shared_root.exists(): + return + + for dirname in SHARED_SHELL_DIRS: + source_dir = shared_root / dirname + if not source_dir.exists(): + continue + shutil.copytree(source_dir, docs_dir / dirname, dirs_exist_ok=True) + + +def build_config_text(site_name: str, docs_dir: Path, site_dir: Path, nav: list[NavItem]) -> str: + lines = [ + f"site_name: {yaml_quote(site_name)}", + f"docs_dir: {yaml_quote(str(docs_dir))}", + f"site_dir: {yaml_quote(str(site_dir))}", + "theme:", + " name: material", + " logo: assets/edgetx-logo.svg", + " favicon: assets/edgetx-logo.svg", + " palette:", + " primary: custom", + " accent: custom", + " features:", + " - navigation.indexes", + " - navigation.path", + "extra_css:", + " - stylesheets/extra.css", + "extra_javascript:", + " - javascripts/review-workbench.js", + " - javascripts/legacy-version-banner.js", + "extra:", + " version:", + " provider: mike", + " default: latest", + " alias: true", + "markdown_extensions:", + " - tables", + " - admonition", + " - fenced_code", + "nav:", + ] + lines.extend(render_nav(nav)) + lines.append("") + return "\n".join(lines) + + +def prepare_workspace(repo_root: Path, ref: str, output_dir: Path) -> tuple[Path, Path]: + if output_dir.exists(): + shutil.rmtree(output_dir) + + docs_dir = output_dir / "docs" + site_dir = output_dir / "site" + export_git_ref(repo_root, ref, docs_dir) + mirror_legacy_assets(docs_dir) + rewrite_legacy_links(docs_dir) + copy_shared_site_shell(repo_root, docs_dir) + + summary_path = docs_dir / "SUMMARY.md" + if not summary_path.exists(): + raise FileNotFoundError(f"{ref} does not contain SUMMARY.md") + + nav = parse_summary(summary_path) + if not nav: + raise RuntimeError(f"Could not parse any nav items from {summary_path}") + normalize_nav_paths(nav, docs_dir) + + site_name = nav[0].title + config_path = output_dir / "mkdocs.branch.yml" + config_path.write_text( + build_config_text(site_name=site_name, docs_dir=docs_dir, site_dir=site_dir, nav=nav), + encoding="utf-8", + ) + return config_path, docs_dir + + +def main() -> int: + parser = argparse.ArgumentParser( + description="Export a git branch into a standalone MkDocs workspace using that branch's SUMMARY.md nav." + ) + parser.add_argument("--ref", required=True, help="Git ref to export, for example origin/edgetx_2.10") + parser.add_argument( + "--output", + required=True, + help="Output directory for the generated workspace", + ) + args = parser.parse_args() + + repo_root = Path(__file__).resolve().parent.parent + output_dir = Path(args.output).resolve() + config_path, docs_dir = prepare_workspace(repo_root=repo_root, ref=args.ref, output_dir=output_dir) + + print(f"Prepared branch workspace for {args.ref}") + print(f"Docs dir: {docs_dir}") + print(f"MkDocs config: {config_path}") + return 0 + + +if __name__ == "__main__": + raise SystemExit(main()) diff --git a/tools/review_decision_server.py b/tools/review_decision_server.py new file mode 100644 index 000000000..88f3d8a0b --- /dev/null +++ b/tools/review_decision_server.py @@ -0,0 +1,122 @@ +#!/usr/bin/env python3 + +import json +from datetime import datetime, UTC +from http.server import BaseHTTPRequestHandler, ThreadingHTTPServer +from pathlib import Path + + +DECISIONS_PATH = Path("docs-system/generated/review-decisions.json") +TYPE_OPTIONS_PATH = Path("docs-system/review-type-options.json") +TYPE_DEFINITIONS_PATH = Path("docs-system/type-definitions.json") + + +def read_decisions() -> dict: + if not DECISIONS_PATH.exists(): + return {} + return json.loads(DECISIONS_PATH.read_text(encoding="utf-8")) + + +def write_decisions(data: dict) -> None: + DECISIONS_PATH.parent.mkdir(parents=True, exist_ok=True) + DECISIONS_PATH.write_text(json.dumps(data, indent=2) + "\n", encoding="utf-8") + + +def read_type_options() -> dict: + if not TYPE_OPTIONS_PATH.exists(): + return {"common_types": [], "custom_types": []} + return json.loads(TYPE_OPTIONS_PATH.read_text(encoding="utf-8")) + + +def write_type_options(data: dict) -> None: + TYPE_OPTIONS_PATH.parent.mkdir(parents=True, exist_ok=True) + TYPE_OPTIONS_PATH.write_text(json.dumps(data, indent=2) + "\n", encoding="utf-8") + + +def read_type_definitions() -> dict: + if not TYPE_DEFINITIONS_PATH.exists(): + return {} + return json.loads(TYPE_DEFINITIONS_PATH.read_text(encoding="utf-8")) + + +def write_type_definitions(data: dict) -> None: + TYPE_DEFINITIONS_PATH.parent.mkdir(parents=True, exist_ok=True) + TYPE_DEFINITIONS_PATH.write_text(json.dumps(data, indent=2) + "\n", encoding="utf-8") + + +def maybe_record_custom_types(payload: dict) -> None: + type_options = read_type_options() + type_definitions = read_type_definitions() + common = set(type_options.get("common_types", [])) + custom = list(type_options.get("custom_types", [])) + seen = set(custom) + for bucket in ("params", "returns"): + for type_name in payload.get(bucket, {}).values(): + if not type_name or type_name == "TODO" or type_name in common or type_name in seen: + continue + custom.append(type_name) + seen.add(type_name) + type_definitions.setdefault( + type_name, + { + "luals_alias_of": "any", + "description": f"Custom semantic Lua API type: {type_name}", + }, + ) + type_options["custom_types"] = custom + write_type_options(type_options) + write_type_definitions(type_definitions) + + +class Handler(BaseHTTPRequestHandler): + def _send_json(self, status: int, payload: dict) -> None: + body = json.dumps(payload).encode("utf-8") + self.send_response(status) + self.send_header("Content-Type", "application/json") + self.send_header("Content-Length", str(len(body))) + self.send_header("Access-Control-Allow-Origin", "*") + self.send_header("Access-Control-Allow-Headers", "Content-Type") + self.send_header("Access-Control-Allow-Methods", "GET, POST, OPTIONS") + self.end_headers() + self.wfile.write(body) + + def do_OPTIONS(self) -> None: + self._send_json(200, {"ok": True}) + + def do_GET(self) -> None: + if self.path == "/healthz": + self._send_json(200, {"ok": True}) + return + if self.path == "/decisions": + self._send_json(200, read_decisions()) + return + if self.path == "/types": + self._send_json(200, read_type_options()) + return + self._send_json(404, {"error": "not found"}) + + def do_POST(self) -> None: + if self.path != "/decisions/save": + self._send_json(404, {"error": "not found"}) + return + length = int(self.headers.get("Content-Length", "0")) + payload = json.loads(self.rfile.read(length) or b"{}") + item_id = payload.get("item_id") + if not item_id: + self._send_json(400, {"error": "missing item_id"}) + return + decisions = read_decisions() + decisions[item_id] = { + "params": payload.get("params", {}), + "returns": payload.get("returns", {}), + "updated_at": datetime.now(UTC).isoformat().replace("+00:00", "Z"), + } + write_decisions(decisions) + maybe_record_custom_types(decisions[item_id]) + self._send_json(200, {"ok": True, "item_id": item_id}) + + +if __name__ == "__main__": + server = ThreadingHTTPServer(("127.0.0.1", 8123), Handler) + print("Review decision server listening on http://127.0.0.1:8123") + server.serve_forever() diff --git a/uv.lock b/uv.lock new file mode 100644 index 000000000..019bbe245 --- /dev/null +++ b/uv.lock @@ -0,0 +1,627 @@ +version = 1 +revision = 3 +requires-python = ">=3.11" + +[[package]] +name = "babel" +version = "2.18.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7d/b2/51899539b6ceeeb420d40ed3cd4b7a40519404f9baf3d4ac99dc413a834b/babel-2.18.0.tar.gz", hash = "sha256:b80b99a14bd085fcacfa15c9165f651fbb3406e66cc603abf11c5750937c992d", size = 9959554, upload-time = "2026-02-01T12:30:56.078Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/77/f5/21d2de20e8b8b0408f0681956ca2c69f1320a3848ac50e6e7f39c6159675/babel-2.18.0-py3-none-any.whl", hash = "sha256:e2b422b277c2b9a9630c1d7903c2a00d0830c409c59ac8cae9081c92f1aeba35", size = 10196845, upload-time = "2026-02-01T12:30:53.445Z" }, +] + +[[package]] +name = "backrefs" +version = "6.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/4e/a6/e325ec73b638d3ede4421b5445d4a0b8b219481826cc079d510100af356c/backrefs-6.2.tar.gz", hash = "sha256:f44ff4d48808b243b6c0cdc6231e22195c32f77046018141556c66f8bab72a49", size = 7012303, upload-time = "2026-02-16T19:10:15.828Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1b/39/3765df263e08a4df37f4f43cb5aa3c6c17a4bdd42ecfe841e04c26037171/backrefs-6.2-py310-none-any.whl", hash = "sha256:0fdc7b012420b6b144410342caeb8adc54c6866cf12064abc9bb211302e496f8", size = 381075, upload-time = "2026-02-16T19:10:04.322Z" }, + { url = "https://files.pythonhosted.org/packages/0f/f0/35240571e1b67ffb19dafb29ab34150b6f59f93f717b041082cdb1bfceb1/backrefs-6.2-py311-none-any.whl", hash = "sha256:08aa7fae530c6b2361d7bdcbda1a7c454e330cc9dbcd03f5c23205e430e5c3be", size = 392874, upload-time = "2026-02-16T19:10:06.314Z" }, + { url = "https://files.pythonhosted.org/packages/e3/63/77e8c9745b4d227cce9f5e0a6f68041278c5f9b18588b35905f5f19c1beb/backrefs-6.2-py312-none-any.whl", hash = "sha256:c3f4b9cb2af8cda0d87ab4f57800b57b95428488477be164dd2b47be54db0c90", size = 398787, upload-time = "2026-02-16T19:10:08.274Z" }, + { url = "https://files.pythonhosted.org/packages/c5/71/c754b1737ad99102e03fa3235acb6cb6d3ac9d6f596cbc3e5f236705abd8/backrefs-6.2-py313-none-any.whl", hash = "sha256:12df81596ab511f783b7d87c043ce26bc5b0288cf3bb03610fe76b8189282b2b", size = 400747, upload-time = "2026-02-16T19:10:09.791Z" }, + { url = "https://files.pythonhosted.org/packages/af/75/be12ba31a6eb20dccef2320cd8ccb3f7d9013b68ba4c70156259fee9e409/backrefs-6.2-py314-none-any.whl", hash = "sha256:e5f805ae09819caa1aa0623b4a83790e7028604aa2b8c73ba602c4454e665de7", size = 412602, upload-time = "2026-02-16T19:10:12.317Z" }, + { url = "https://files.pythonhosted.org/packages/21/f8/d02f650c47d05034dcd6f9c8cf94f39598b7a89c00ecda0ecb2911bc27e9/backrefs-6.2-py39-none-any.whl", hash = "sha256:664e33cd88c6840b7625b826ecf2555f32d491800900f5a541f772c485f7cda7", size = 381077, upload-time = "2026-02-16T19:10:13.74Z" }, +] + +[[package]] +name = "certifi" +version = "2026.2.25" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/af/2d/7bf41579a8986e348fa033a31cdd0e4121114f6bce2457e8876010b092dd/certifi-2026.2.25.tar.gz", hash = "sha256:e887ab5cee78ea814d3472169153c2d12cd43b14bd03329a39a9c6e2e80bfba7", size = 155029, upload-time = "2026-02-25T02:54:17.342Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/9a/3c/c17fb3ca2d9c3acff52e30b309f538586f9f5b9c9cf454f3845fc9af4881/certifi-2026.2.25-py3-none-any.whl", hash = "sha256:027692e4402ad994f1c42e52a4997a9763c646b73e4096e4d5d6db8af1d6f0fa", size = 153684, upload-time = "2026-02-25T02:54:15.766Z" }, +] + +[[package]] +name = "charset-normalizer" +version = "3.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7b/60/e3bec1881450851b087e301bedc3daa9377a4d45f1c26aa90b0b235e38aa/charset_normalizer-3.4.6.tar.gz", hash = "sha256:1ae6b62897110aa7c79ea2f5dd38d1abca6db663687c0b1ad9aed6f6bae3d9d6", size = 143363, upload-time = "2026-03-15T18:53:25.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/28/ff6f234e628a2de61c458be2779cb182bc03f6eec12200d4a525bbfc9741/charset_normalizer-3.4.6-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:82060f995ab5003a2d6e0f4ad29065b7672b6593c8c63559beefe5b443242c3e", size = 293582, upload-time = "2026-03-15T18:50:25.454Z" }, + { url = "https://files.pythonhosted.org/packages/1c/b7/b1a117e5385cbdb3205f6055403c2a2a220c5ea80b8716c324eaf75c5c95/charset_normalizer-3.4.6-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:60c74963d8350241a79cb8feea80e54d518f72c26db618862a8f53e5023deaf9", size = 197240, upload-time = "2026-03-15T18:50:27.196Z" }, + { url = "https://files.pythonhosted.org/packages/a1/5f/2574f0f09f3c3bc1b2f992e20bce6546cb1f17e111c5be07308dc5427956/charset_normalizer-3.4.6-cp311-cp311-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:f6e4333fb15c83f7d1482a76d45a0818897b3d33f00efd215528ff7c51b8e35d", size = 217363, upload-time = "2026-03-15T18:50:28.601Z" }, + { url = "https://files.pythonhosted.org/packages/4a/d1/0ae20ad77bc949ddd39b51bf383b6ca932f2916074c95cad34ae465ab71f/charset_normalizer-3.4.6-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:bc72863f4d9aba2e8fd9085e63548a324ba706d2ea2c83b260da08a59b9482de", size = 212994, upload-time = "2026-03-15T18:50:30.102Z" }, + { url = "https://files.pythonhosted.org/packages/60/ac/3233d262a310c1b12633536a07cde5ddd16985e6e7e238e9f3f9423d8eb9/charset_normalizer-3.4.6-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:9cc4fc6c196d6a8b76629a70ddfcd4635a6898756e2d9cac5565cf0654605d73", size = 204697, upload-time = "2026-03-15T18:50:31.654Z" }, + { url = "https://files.pythonhosted.org/packages/25/3c/8a18fc411f085b82303cfb7154eed5bd49c77035eb7608d049468b53f87c/charset_normalizer-3.4.6-cp311-cp311-manylinux_2_31_armv7l.whl", hash = "sha256:0c173ce3a681f309f31b87125fecec7a5d1347261ea11ebbb856fa6006b23c8c", size = 191673, upload-time = "2026-03-15T18:50:33.433Z" }, + { url = "https://files.pythonhosted.org/packages/ff/a7/11cfe61d6c5c5c7438d6ba40919d0306ed83c9ab957f3d4da2277ff67836/charset_normalizer-3.4.6-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:c907cdc8109f6c619e6254212e794d6548373cc40e1ec75e6e3823d9135d29cc", size = 201120, upload-time = "2026-03-15T18:50:35.105Z" }, + { url = "https://files.pythonhosted.org/packages/b5/10/cf491fa1abd47c02f69687046b896c950b92b6cd7337a27e6548adbec8e4/charset_normalizer-3.4.6-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:404a1e552cf5b675a87f0651f8b79f5f1e6fd100ee88dc612f89aa16abd4486f", size = 200911, upload-time = "2026-03-15T18:50:36.819Z" }, + { url = "https://files.pythonhosted.org/packages/28/70/039796160b48b18ed466fde0af84c1b090c4e288fae26cd674ad04a2d703/charset_normalizer-3.4.6-cp311-cp311-musllinux_1_2_armv7l.whl", hash = "sha256:e3c701e954abf6fc03a49f7c579cc80c2c6cc52525340ca3186c41d3f33482ef", size = 192516, upload-time = "2026-03-15T18:50:38.228Z" }, + { url = "https://files.pythonhosted.org/packages/ff/34/c56f3223393d6ff3124b9e78f7de738047c2d6bc40a4f16ac0c9d7a1cb3c/charset_normalizer-3.4.6-cp311-cp311-musllinux_1_2_ppc64le.whl", hash = "sha256:7a6967aaf043bceabab5412ed6bd6bd26603dae84d5cb75bf8d9a74a4959d398", size = 218795, upload-time = "2026-03-15T18:50:39.664Z" }, + { url = "https://files.pythonhosted.org/packages/e8/3b/ce2d4f86c5282191a041fdc5a4ce18f1c6bd40a5bd1f74cf8625f08d51c1/charset_normalizer-3.4.6-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:5feb91325bbceade6afab43eb3b508c63ee53579fe896c77137ded51c6b6958e", size = 201833, upload-time = "2026-03-15T18:50:41.552Z" }, + { url = "https://files.pythonhosted.org/packages/3b/9b/b6a9f76b0fd7c5b5ec58b228ff7e85095370282150f0bd50b3126f5506d6/charset_normalizer-3.4.6-cp311-cp311-musllinux_1_2_s390x.whl", hash = "sha256:f820f24b09e3e779fe84c3c456cb4108a7aa639b0d1f02c28046e11bfcd088ed", size = 213920, upload-time = "2026-03-15T18:50:43.33Z" }, + { url = "https://files.pythonhosted.org/packages/ae/98/7bc23513a33d8172365ed30ee3a3b3fe1ece14a395e5fc94129541fc6003/charset_normalizer-3.4.6-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:b35b200d6a71b9839a46b9b7fff66b6638bb52fc9658aa58796b0326595d3021", size = 206951, upload-time = "2026-03-15T18:50:44.789Z" }, + { url = "https://files.pythonhosted.org/packages/32/73/c0b86f3d1458468e11aec870e6b3feac931facbe105a894b552b0e518e79/charset_normalizer-3.4.6-cp311-cp311-win32.whl", hash = "sha256:9ca4c0b502ab399ef89248a2c84c54954f77a070f28e546a85e91da627d1301e", size = 143703, upload-time = "2026-03-15T18:50:46.103Z" }, + { url = "https://files.pythonhosted.org/packages/c6/e3/76f2facfe8eddee0bbd38d2594e709033338eae44ebf1738bcefe0a06185/charset_normalizer-3.4.6-cp311-cp311-win_amd64.whl", hash = "sha256:a9e68c9d88823b274cf1e72f28cb5dc89c990edf430b0bfd3e2fb0785bfeabf4", size = 153857, upload-time = "2026-03-15T18:50:47.563Z" }, + { url = "https://files.pythonhosted.org/packages/e2/dc/9abe19c9b27e6cd3636036b9d1b387b78c40dedbf0b47f9366737684b4b0/charset_normalizer-3.4.6-cp311-cp311-win_arm64.whl", hash = "sha256:97d0235baafca5f2b09cf332cc275f021e694e8362c6bb9c96fc9a0eb74fc316", size = 142751, upload-time = "2026-03-15T18:50:49.234Z" }, + { url = "https://files.pythonhosted.org/packages/e5/62/c0815c992c9545347aeea7859b50dc9044d147e2e7278329c6e02ac9a616/charset_normalizer-3.4.6-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:2ef7fedc7a6ecbe99969cd09632516738a97eeb8bd7258bf8a0f23114c057dab", size = 295154, upload-time = "2026-03-15T18:50:50.88Z" }, + { url = "https://files.pythonhosted.org/packages/a8/37/bdca6613c2e3c58c7421891d80cc3efa1d32e882f7c4a7ee6039c3fc951a/charset_normalizer-3.4.6-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:a4ea868bc28109052790eb2b52a9ab33f3aa7adc02f96673526ff47419490e21", size = 199191, upload-time = "2026-03-15T18:50:52.658Z" }, + { url = "https://files.pythonhosted.org/packages/6c/92/9934d1bbd69f7f398b38c5dae1cbf9cc672e7c34a4adf7b17c0a9c17d15d/charset_normalizer-3.4.6-cp312-cp312-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:836ab36280f21fc1a03c99cd05c6b7af70d2697e374c7af0b61ed271401a72a2", size = 218674, upload-time = "2026-03-15T18:50:54.102Z" }, + { url = "https://files.pythonhosted.org/packages/af/90/25f6ab406659286be929fd89ab0e78e38aa183fc374e03aa3c12d730af8a/charset_normalizer-3.4.6-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:f1ce721c8a7dfec21fcbdfe04e8f68174183cf4e8188e0645e92aa23985c57ff", size = 215259, upload-time = "2026-03-15T18:50:55.616Z" }, + { url = "https://files.pythonhosted.org/packages/4e/ef/79a463eb0fff7f96afa04c1d4c51f8fc85426f918db467854bfb6a569ce3/charset_normalizer-3.4.6-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0e28d62a8fc7a1fa411c43bd65e346f3bce9716dc51b897fbe930c5987b402d5", size = 207276, upload-time = "2026-03-15T18:50:57.054Z" }, + { url = "https://files.pythonhosted.org/packages/f7/72/d0426afec4b71dc159fa6b4e68f868cd5a3ecd918fec5813a15d292a7d10/charset_normalizer-3.4.6-cp312-cp312-manylinux_2_31_armv7l.whl", hash = "sha256:530d548084c4a9f7a16ed4a294d459b4f229db50df689bfe92027452452943a0", size = 195161, upload-time = "2026-03-15T18:50:58.686Z" }, + { url = "https://files.pythonhosted.org/packages/bf/18/c82b06a68bfcb6ce55e508225d210c7e6a4ea122bfc0748892f3dc4e8e11/charset_normalizer-3.4.6-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:30f445ae60aad5e1f8bdbb3108e39f6fbc09f4ea16c815c66578878325f8f15a", size = 203452, upload-time = "2026-03-15T18:51:00.196Z" }, + { url = "https://files.pythonhosted.org/packages/44/d6/0c25979b92f8adafdbb946160348d8d44aa60ce99afdc27df524379875cb/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:ac2393c73378fea4e52aa56285a3d64be50f1a12395afef9cce47772f60334c2", size = 202272, upload-time = "2026-03-15T18:51:01.703Z" }, + { url = "https://files.pythonhosted.org/packages/2e/3d/7fea3e8fe84136bebbac715dd1221cc25c173c57a699c030ab9b8900cbb7/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_armv7l.whl", hash = "sha256:90ca27cd8da8118b18a52d5f547859cc1f8354a00cd1e8e5120df3e30d6279e5", size = 195622, upload-time = "2026-03-15T18:51:03.526Z" }, + { url = "https://files.pythonhosted.org/packages/57/8a/d6f7fd5cb96c58ef2f681424fbca01264461336d2a7fc875e4446b1f1346/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_ppc64le.whl", hash = "sha256:8e5a94886bedca0f9b78fecd6afb6629142fd2605aa70a125d49f4edc6037ee6", size = 220056, upload-time = "2026-03-15T18:51:05.269Z" }, + { url = "https://files.pythonhosted.org/packages/16/50/478cdda782c8c9c3fb5da3cc72dd7f331f031e7f1363a893cdd6ca0f8de0/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:695f5c2823691a25f17bc5d5ffe79fa90972cc34b002ac6c843bb8a1720e950d", size = 203751, upload-time = "2026-03-15T18:51:06.858Z" }, + { url = "https://files.pythonhosted.org/packages/75/fc/cc2fcac943939c8e4d8791abfa139f685e5150cae9f94b60f12520feaa9b/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_s390x.whl", hash = "sha256:231d4da14bcd9301310faf492051bee27df11f2bc7549bc0bb41fef11b82daa2", size = 216563, upload-time = "2026-03-15T18:51:08.564Z" }, + { url = "https://files.pythonhosted.org/packages/a8/b7/a4add1d9a5f68f3d037261aecca83abdb0ab15960a3591d340e829b37298/charset_normalizer-3.4.6-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:a056d1ad2633548ca18ffa2f85c202cfb48b68615129143915b8dc72a806a923", size = 209265, upload-time = "2026-03-15T18:51:10.312Z" }, + { url = "https://files.pythonhosted.org/packages/6c/18/c094561b5d64a24277707698e54b7f67bd17a4f857bbfbb1072bba07c8bf/charset_normalizer-3.4.6-cp312-cp312-win32.whl", hash = "sha256:c2274ca724536f173122f36c98ce188fd24ce3dad886ec2b7af859518ce008a4", size = 144229, upload-time = "2026-03-15T18:51:11.694Z" }, + { url = "https://files.pythonhosted.org/packages/ab/20/0567efb3a8fd481b8f34f739ebddc098ed062a59fed41a8d193a61939e8f/charset_normalizer-3.4.6-cp312-cp312-win_amd64.whl", hash = "sha256:c8ae56368f8cc97c7e40a7ee18e1cedaf8e780cd8bc5ed5ac8b81f238614facb", size = 154277, upload-time = "2026-03-15T18:51:13.004Z" }, + { url = "https://files.pythonhosted.org/packages/15/57/28d79b44b51933119e21f65479d0864a8d5893e494cf5daab15df0247c17/charset_normalizer-3.4.6-cp312-cp312-win_arm64.whl", hash = "sha256:899d28f422116b08be5118ef350c292b36fc15ec2daeb9ea987c89281c7bb5c4", size = 142817, upload-time = "2026-03-15T18:51:14.408Z" }, + { url = "https://files.pythonhosted.org/packages/1e/1d/4fdabeef4e231153b6ed7567602f3b68265ec4e5b76d6024cf647d43d981/charset_normalizer-3.4.6-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:11afb56037cbc4b1555a34dd69151e8e069bee82e613a73bef6e714ce733585f", size = 294823, upload-time = "2026-03-15T18:51:15.755Z" }, + { url = "https://files.pythonhosted.org/packages/47/7b/20e809b89c69d37be748d98e84dce6820bf663cf19cf6b942c951a3e8f41/charset_normalizer-3.4.6-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:423fb7e748a08f854a08a222b983f4df1912b1daedce51a72bd24fe8f26a1843", size = 198527, upload-time = "2026-03-15T18:51:17.177Z" }, + { url = "https://files.pythonhosted.org/packages/37/a6/4f8d27527d59c039dce6f7622593cdcd3d70a8504d87d09eb11e9fdc6062/charset_normalizer-3.4.6-cp313-cp313-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:d73beaac5e90173ac3deb9928a74763a6d230f494e4bfb422c217a0ad8e629bf", size = 218388, upload-time = "2026-03-15T18:51:18.934Z" }, + { url = "https://files.pythonhosted.org/packages/f6/9b/4770ccb3e491a9bacf1c46cc8b812214fe367c86a96353ccc6daf87b01ec/charset_normalizer-3.4.6-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:d60377dce4511655582e300dc1e5a5f24ba0cb229005a1d5c8d0cb72bb758ab8", size = 214563, upload-time = "2026-03-15T18:51:20.374Z" }, + { url = "https://files.pythonhosted.org/packages/2b/58/a199d245894b12db0b957d627516c78e055adc3a0d978bc7f65ddaf7c399/charset_normalizer-3.4.6-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:530e8cebeea0d76bdcf93357aa5e41336f48c3dc709ac52da2bb167c5b8271d9", size = 206587, upload-time = "2026-03-15T18:51:21.807Z" }, + { url = "https://files.pythonhosted.org/packages/7e/70/3def227f1ec56f5c69dfc8392b8bd63b11a18ca8178d9211d7cc5e5e4f27/charset_normalizer-3.4.6-cp313-cp313-manylinux_2_31_armv7l.whl", hash = "sha256:a26611d9987b230566f24a0a125f17fe0de6a6aff9f25c9f564aaa2721a5fb88", size = 194724, upload-time = "2026-03-15T18:51:23.508Z" }, + { url = "https://files.pythonhosted.org/packages/58/ab/9318352e220c05efd31c2779a23b50969dc94b985a2efa643ed9077bfca5/charset_normalizer-3.4.6-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:34315ff4fc374b285ad7f4a0bf7dcbfe769e1b104230d40f49f700d4ab6bbd84", size = 202956, upload-time = "2026-03-15T18:51:25.239Z" }, + { url = "https://files.pythonhosted.org/packages/75/13/f3550a3ac25b70f87ac98c40d3199a8503676c2f1620efbf8d42095cfc40/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5f8ddd609f9e1af8c7bd6e2aca279c931aefecd148a14402d4e368f3171769fd", size = 201923, upload-time = "2026-03-15T18:51:26.682Z" }, + { url = "https://files.pythonhosted.org/packages/1b/db/c5c643b912740b45e8eec21de1bbab8e7fc085944d37e1e709d3dcd9d72f/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_armv7l.whl", hash = "sha256:80d0a5615143c0b3225e5e3ef22c8d5d51f3f72ce0ea6fb84c943546c7b25b6c", size = 195366, upload-time = "2026-03-15T18:51:28.129Z" }, + { url = "https://files.pythonhosted.org/packages/5a/67/3b1c62744f9b2448443e0eb160d8b001c849ec3fef591e012eda6484787c/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_ppc64le.whl", hash = "sha256:92734d4d8d187a354a556626c221cd1a892a4e0802ccb2af432a1d85ec012194", size = 219752, upload-time = "2026-03-15T18:51:29.556Z" }, + { url = "https://files.pythonhosted.org/packages/f6/98/32ffbaf7f0366ffb0445930b87d103f6b406bc2c271563644bde8a2b1093/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:613f19aa6e082cf96e17e3ffd89383343d0d589abda756b7764cf78361fd41dc", size = 203296, upload-time = "2026-03-15T18:51:30.921Z" }, + { url = "https://files.pythonhosted.org/packages/41/12/5d308c1bbe60cabb0c5ef511574a647067e2a1f631bc8634fcafaccd8293/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_s390x.whl", hash = "sha256:2b1a63e8224e401cafe7739f77efd3f9e7f5f2026bda4aead8e59afab537784f", size = 215956, upload-time = "2026-03-15T18:51:32.399Z" }, + { url = "https://files.pythonhosted.org/packages/53/e9/5f85f6c5e20669dbe56b165c67b0260547dea97dba7e187938833d791687/charset_normalizer-3.4.6-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:6cceb5473417d28edd20c6c984ab6fee6c6267d38d906823ebfe20b03d607dc2", size = 208652, upload-time = "2026-03-15T18:51:34.214Z" }, + { url = "https://files.pythonhosted.org/packages/f1/11/897052ea6af56df3eef3ca94edafee410ca699ca0c7b87960ad19932c55e/charset_normalizer-3.4.6-cp313-cp313-win32.whl", hash = "sha256:d7de2637729c67d67cf87614b566626057e95c303bc0a55ffe391f5205e7003d", size = 143940, upload-time = "2026-03-15T18:51:36.15Z" }, + { url = "https://files.pythonhosted.org/packages/a1/5c/724b6b363603e419829f561c854b87ed7c7e31231a7908708ac086cdf3e2/charset_normalizer-3.4.6-cp313-cp313-win_amd64.whl", hash = "sha256:572d7c822caf521f0525ba1bce1a622a0b85cf47ffbdae6c9c19e3b5ac3c4389", size = 154101, upload-time = "2026-03-15T18:51:37.876Z" }, + { url = "https://files.pythonhosted.org/packages/01/a5/7abf15b4c0968e47020f9ca0935fb3274deb87cb288cd187cad92e8cdffd/charset_normalizer-3.4.6-cp313-cp313-win_arm64.whl", hash = "sha256:a4474d924a47185a06411e0064b803c68be044be2d60e50e8bddcc2649957c1f", size = 143109, upload-time = "2026-03-15T18:51:39.565Z" }, + { url = "https://files.pythonhosted.org/packages/25/6f/ffe1e1259f384594063ea1869bfb6be5cdb8bc81020fc36c3636bc8302a1/charset_normalizer-3.4.6-cp314-cp314-macosx_10_15_universal2.whl", hash = "sha256:9cc6e6d9e571d2f863fa77700701dae73ed5f78881efc8b3f9a4398772ff53e8", size = 294458, upload-time = "2026-03-15T18:51:41.134Z" }, + { url = "https://files.pythonhosted.org/packages/56/60/09bb6c13a8c1016c2ed5c6a6488e4ffef506461aa5161662bd7636936fb1/charset_normalizer-3.4.6-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ef5960d965e67165d75b7c7ffc60a83ec5abfc5c11b764ec13ea54fbef8b4421", size = 199277, upload-time = "2026-03-15T18:51:42.953Z" }, + { url = "https://files.pythonhosted.org/packages/00/50/dcfbb72a5138bbefdc3332e8d81a23494bf67998b4b100703fd15fa52d81/charset_normalizer-3.4.6-cp314-cp314-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:b3694e3f87f8ac7ce279d4355645b3c878d24d1424581b46282f24b92f5a4ae2", size = 218758, upload-time = "2026-03-15T18:51:44.339Z" }, + { url = "https://files.pythonhosted.org/packages/03/b3/d79a9a191bb75f5aa81f3aaaa387ef29ce7cb7a9e5074ba8ea095cc073c2/charset_normalizer-3.4.6-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5d11595abf8dd942a77883a39d81433739b287b6aa71620f15164f8096221b30", size = 215299, upload-time = "2026-03-15T18:51:45.871Z" }, + { url = "https://files.pythonhosted.org/packages/76/7e/bc8911719f7084f72fd545f647601ea3532363927f807d296a8c88a62c0d/charset_normalizer-3.4.6-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7bda6eebafd42133efdca535b04ccb338ab29467b3f7bf79569883676fc628db", size = 206811, upload-time = "2026-03-15T18:51:47.308Z" }, + { url = "https://files.pythonhosted.org/packages/e2/40/c430b969d41dda0c465aa36cc7c2c068afb67177bef50905ac371b28ccc7/charset_normalizer-3.4.6-cp314-cp314-manylinux_2_31_armv7l.whl", hash = "sha256:bbc8c8650c6e51041ad1be191742b8b421d05bbd3410f43fa2a00c8db87678e8", size = 193706, upload-time = "2026-03-15T18:51:48.849Z" }, + { url = "https://files.pythonhosted.org/packages/48/15/e35e0590af254f7df984de1323640ef375df5761f615b6225ba8deb9799a/charset_normalizer-3.4.6-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:22c6f0c2fbc31e76c3b8a86fba1a56eda6166e238c29cdd3d14befdb4a4e4815", size = 202706, upload-time = "2026-03-15T18:51:50.257Z" }, + { url = "https://files.pythonhosted.org/packages/5e/bd/f736f7b9cc5e93a18b794a50346bb16fbfd6b37f99e8f306f7951d27c17c/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7edbed096e4a4798710ed6bc75dcaa2a21b68b6c356553ac4823c3658d53743a", size = 202497, upload-time = "2026-03-15T18:51:52.012Z" }, + { url = "https://files.pythonhosted.org/packages/9d/ba/2cc9e3e7dfdf7760a6ed8da7446d22536f3d0ce114ac63dee2a5a3599e62/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_armv7l.whl", hash = "sha256:7f9019c9cb613f084481bd6a100b12e1547cf2efe362d873c2e31e4035a6fa43", size = 193511, upload-time = "2026-03-15T18:51:53.723Z" }, + { url = "https://files.pythonhosted.org/packages/9e/cb/5be49b5f776e5613be07298c80e1b02a2d900f7a7de807230595c85a8b2e/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_ppc64le.whl", hash = "sha256:58c948d0d086229efc484fe2f30c2d382c86720f55cd9bc33591774348ad44e0", size = 220133, upload-time = "2026-03-15T18:51:55.333Z" }, + { url = "https://files.pythonhosted.org/packages/83/43/99f1b5dad345accb322c80c7821071554f791a95ee50c1c90041c157ae99/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:419a9d91bd238052642a51938af8ac05da5b3343becde08d5cdeab9046df9ee1", size = 203035, upload-time = "2026-03-15T18:51:56.736Z" }, + { url = "https://files.pythonhosted.org/packages/87/9a/62c2cb6a531483b55dddff1a68b3d891a8b498f3ca555fbcf2978e804d9d/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_s390x.whl", hash = "sha256:5273b9f0b5835ff0350c0828faea623c68bfa65b792720c453e22b25cc72930f", size = 216321, upload-time = "2026-03-15T18:51:58.17Z" }, + { url = "https://files.pythonhosted.org/packages/6e/79/94a010ff81e3aec7c293eb82c28f930918e517bc144c9906a060844462eb/charset_normalizer-3.4.6-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:0e901eb1049fdb80f5bd11ed5ea1e498ec423102f7a9b9e4645d5b8204ff2815", size = 208973, upload-time = "2026-03-15T18:51:59.998Z" }, + { url = "https://files.pythonhosted.org/packages/2a/57/4ecff6d4ec8585342f0c71bc03efaa99cb7468f7c91a57b105bcd561cea8/charset_normalizer-3.4.6-cp314-cp314-win32.whl", hash = "sha256:b4ff1d35e8c5bd078be89349b6f3a845128e685e751b6ea1169cf2160b344c4d", size = 144610, upload-time = "2026-03-15T18:52:02.213Z" }, + { url = "https://files.pythonhosted.org/packages/80/94/8434a02d9d7f168c25767c64671fead8d599744a05d6a6c877144c754246/charset_normalizer-3.4.6-cp314-cp314-win_amd64.whl", hash = "sha256:74119174722c4349af9708993118581686f343adc1c8c9c007d59be90d077f3f", size = 154962, upload-time = "2026-03-15T18:52:03.658Z" }, + { url = "https://files.pythonhosted.org/packages/46/4c/48f2cdbfd923026503dfd67ccea45c94fd8fe988d9056b468579c66ed62b/charset_normalizer-3.4.6-cp314-cp314-win_arm64.whl", hash = "sha256:e5bcc1a1ae744e0bb59641171ae53743760130600da8db48cbb6e4918e186e4e", size = 143595, upload-time = "2026-03-15T18:52:05.123Z" }, + { url = "https://files.pythonhosted.org/packages/31/93/8878be7569f87b14f1d52032946131bcb6ebbd8af3e20446bc04053dc3f1/charset_normalizer-3.4.6-cp314-cp314t-macosx_10_15_universal2.whl", hash = "sha256:ad8faf8df23f0378c6d527d8b0b15ea4a2e23c89376877c598c4870d1b2c7866", size = 314828, upload-time = "2026-03-15T18:52:06.831Z" }, + { url = "https://files.pythonhosted.org/packages/06/b6/fae511ca98aac69ecc35cde828b0a3d146325dd03d99655ad38fc2cc3293/charset_normalizer-3.4.6-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f5ea69428fa1b49573eef0cc44a1d43bebd45ad0c611eb7d7eac760c7ae771bc", size = 208138, upload-time = "2026-03-15T18:52:08.239Z" }, + { url = "https://files.pythonhosted.org/packages/54/57/64caf6e1bf07274a1e0b7c160a55ee9e8c9ec32c46846ce59b9c333f7008/charset_normalizer-3.4.6-cp314-cp314t-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl", hash = "sha256:06a7e86163334edfc5d20fe104db92fcd666e5a5df0977cb5680a506fe26cc8e", size = 224679, upload-time = "2026-03-15T18:52:10.043Z" }, + { url = "https://files.pythonhosted.org/packages/aa/cb/9ff5a25b9273ef160861b41f6937f86fae18b0792fe0a8e75e06acb08f1d/charset_normalizer-3.4.6-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:e1f6e2f00a6b8edb562826e4632e26d063ac10307e80f7461f7de3ad8ef3f077", size = 223475, upload-time = "2026-03-15T18:52:11.854Z" }, + { url = "https://files.pythonhosted.org/packages/fc/97/440635fc093b8d7347502a377031f9605a1039c958f3cd18dcacffb37743/charset_normalizer-3.4.6-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:95b52c68d64c1878818687a473a10547b3292e82b6f6fe483808fb1468e2f52f", size = 215230, upload-time = "2026-03-15T18:52:13.325Z" }, + { url = "https://files.pythonhosted.org/packages/cd/24/afff630feb571a13f07c8539fbb502d2ab494019492aaffc78ef41f1d1d0/charset_normalizer-3.4.6-cp314-cp314t-manylinux_2_31_armv7l.whl", hash = "sha256:7504e9b7dc05f99a9bbb4525c67a2c155073b44d720470a148b34166a69c054e", size = 199045, upload-time = "2026-03-15T18:52:14.752Z" }, + { url = "https://files.pythonhosted.org/packages/e5/17/d1399ecdaf7e0498c327433e7eefdd862b41236a7e484355b8e0e5ebd64b/charset_normalizer-3.4.6-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:172985e4ff804a7ad08eebec0a1640ece87ba5041d565fff23c8f99c1f389484", size = 211658, upload-time = "2026-03-15T18:52:16.278Z" }, + { url = "https://files.pythonhosted.org/packages/b5/38/16baa0affb957b3d880e5ac2144caf3f9d7de7bc4a91842e447fbb5e8b67/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:4be9f4830ba8741527693848403e2c457c16e499100963ec711b1c6f2049b7c7", size = 210769, upload-time = "2026-03-15T18:52:17.782Z" }, + { url = "https://files.pythonhosted.org/packages/05/34/c531bc6ac4c21da9ddfddb3107be2287188b3ea4b53b70fc58f2a77ac8d8/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_armv7l.whl", hash = "sha256:79090741d842f564b1b2827c0b82d846405b744d31e84f18d7a7b41c20e473ff", size = 201328, upload-time = "2026-03-15T18:52:19.553Z" }, + { url = "https://files.pythonhosted.org/packages/fa/73/a5a1e9ca5f234519c1953608a03fe109c306b97fdfb25f09182babad51a7/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_ppc64le.whl", hash = "sha256:87725cfb1a4f1f8c2fc9890ae2f42094120f4b44db9360be5d99a4c6b0e03a9e", size = 225302, upload-time = "2026-03-15T18:52:21.043Z" }, + { url = "https://files.pythonhosted.org/packages/ba/f6/cd782923d112d296294dea4bcc7af5a7ae0f86ab79f8fefbda5526b6cfc0/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:fcce033e4021347d80ed9c66dcf1e7b1546319834b74445f561d2e2221de5659", size = 211127, upload-time = "2026-03-15T18:52:22.491Z" }, + { url = "https://files.pythonhosted.org/packages/0e/c5/0b6898950627af7d6103a449b22320372c24c6feda91aa24e201a478d161/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_s390x.whl", hash = "sha256:ca0276464d148c72defa8bb4390cce01b4a0e425f3b50d1435aa6d7a18107602", size = 222840, upload-time = "2026-03-15T18:52:24.113Z" }, + { url = "https://files.pythonhosted.org/packages/7d/25/c4bba773bef442cbdc06111d40daa3de5050a676fa26e85090fc54dd12f0/charset_normalizer-3.4.6-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:197c1a244a274bb016dd8b79204850144ef77fe81c5b797dc389327adb552407", size = 216890, upload-time = "2026-03-15T18:52:25.541Z" }, + { url = "https://files.pythonhosted.org/packages/35/1a/05dacadb0978da72ee287b0143097db12f2e7e8d3ffc4647da07a383b0b7/charset_normalizer-3.4.6-cp314-cp314t-win32.whl", hash = "sha256:2a24157fa36980478dd1770b585c0f30d19e18f4fb0c47c13aa568f871718579", size = 155379, upload-time = "2026-03-15T18:52:27.05Z" }, + { url = "https://files.pythonhosted.org/packages/5d/7a/d269d834cb3a76291651256f3b9a5945e81d0a49ab9f4a498964e83c0416/charset_normalizer-3.4.6-cp314-cp314t-win_amd64.whl", hash = "sha256:cd5e2801c89992ed8c0a3f0293ae83c159a60d9a5d685005383ef4caca77f2c4", size = 169043, upload-time = "2026-03-15T18:52:28.502Z" }, + { url = "https://files.pythonhosted.org/packages/23/06/28b29fba521a37a8932c6a84192175c34d49f84a6d4773fa63d05f9aff22/charset_normalizer-3.4.6-cp314-cp314t-win_arm64.whl", hash = "sha256:47955475ac79cc504ef2704b192364e51d0d473ad452caedd0002605f780101c", size = 148523, upload-time = "2026-03-15T18:52:29.956Z" }, + { url = "https://files.pythonhosted.org/packages/2a/68/687187c7e26cb24ccbd88e5069f5ef00eba804d36dde11d99aad0838ab45/charset_normalizer-3.4.6-py3-none-any.whl", hash = "sha256:947cf925bc916d90adba35a64c82aace04fa39b46b52d4630ece166655905a69", size = 61455, upload-time = "2026-03-15T18:53:23.833Z" }, +] + +[[package]] +name = "click" +version = "8.3.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "colorama", marker = "sys_platform == 'win32'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/3d/fa/656b739db8587d7b5dfa22e22ed02566950fbfbcdc20311993483657a5c0/click-8.3.1.tar.gz", hash = "sha256:12ff4785d337a1bb490bb7e9c2b1ee5da3112e94a8622f26a6c77f5d2fc6842a", size = 295065, upload-time = "2025-11-15T20:45:42.706Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/98/78/01c019cdb5d6498122777c1a43056ebb3ebfeef2076d9d026bfe15583b2b/click-8.3.1-py3-none-any.whl", hash = "sha256:981153a64e25f12d547d3426c367a4857371575ee7ad18df2a6183ab0545b2a6", size = 108274, upload-time = "2025-11-15T20:45:41.139Z" }, +] + +[[package]] +name = "colorama" +version = "0.4.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/d8/53/6f443c9a4a8358a93a6792e2acffb9d9d5cb0a5cfd8802644b7b1c9a02e4/colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44", size = 27697, upload-time = "2022-10-25T02:36:22.414Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/d1/d6/3965ed04c63042e047cb6a3e6ed1a63a35087b6a609aa3a15ed8ac56c221/colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6", size = 25335, upload-time = "2022-10-25T02:36:20.889Z" }, +] + +[[package]] +name = "csscompressor" +version = "0.9.5" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f1/2a/8c3ac3d8bc94e6de8d7ae270bb5bc437b210bb9d6d9e46630c98f4abd20c/csscompressor-0.9.5.tar.gz", hash = "sha256:afa22badbcf3120a4f392e4d22f9fff485c044a1feda4a950ecc5eba9dd31a05", size = 237808, upload-time = "2017-11-26T21:13:08.238Z" } + +[[package]] +name = "ghp-import" +version = "2.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "python-dateutil" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/d9/29/d40217cbe2f6b1359e00c6c307bb3fc876ba74068cbab3dde77f03ca0dc4/ghp-import-2.1.0.tar.gz", hash = "sha256:9c535c4c61193c2df8871222567d7fd7e5014d835f97dc7b7439069e2413d343", size = 10943, upload-time = "2022-05-02T15:47:16.11Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/f7/ec/67fbef5d497f86283db54c22eec6f6140243aae73265799baaaa19cd17fb/ghp_import-2.1.0-py3-none-any.whl", hash = "sha256:8337dd7b50877f163d4c0289bc1f1c7f127550241988d568c1db512c4324a619", size = 11034, upload-time = "2022-05-02T15:47:14.552Z" }, +] + +[[package]] +name = "htmlmin2" +version = "0.1.13" +source = { registry = "https://pypi.org/simple" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/be/31/a76f4bfa885f93b8167cb4c85cf32b54d1f64384d0b897d45bc6d19b7b45/htmlmin2-0.1.13-py3-none-any.whl", hash = "sha256:75609f2a42e64f7ce57dbff28a39890363bde9e7e5885db633317efbdf8c79a2", size = 34486, upload-time = "2023-03-14T21:28:30.388Z" }, +] + +[[package]] +name = "idna" +version = "3.11" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/6f/6d/0703ccc57f3a7233505399edb88de3cbd678da106337b9fcde432b65ed60/idna-3.11.tar.gz", hash = "sha256:795dafcc9c04ed0c1fb032c2aa73654d8e8c5023a7df64a53f39190ada629902", size = 194582, upload-time = "2025-10-12T14:55:20.501Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/0e/61/66938bbb5fc52dbdf84594873d5b51fb1f7c7794e9c0f5bd885f30bc507b/idna-3.11-py3-none-any.whl", hash = "sha256:771a87f49d9defaf64091e6e6fe9c18d4833f140bd19464795bc32d966ca37ea", size = 71008, upload-time = "2025-10-12T14:55:18.883Z" }, +] + +[[package]] +name = "jinja2" +version = "3.1.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markupsafe" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/df/bf/f7da0350254c0ed7c72f3e33cef02e048281fec7ecec5f032d4aac52226b/jinja2-3.1.6.tar.gz", hash = "sha256:0137fb05990d35f1275a587e9aee6d56da821fc83491a0fb838183be43f66d6d", size = 245115, upload-time = "2025-03-05T20:05:02.478Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/62/a1/3d680cbfd5f4b8f15abc1d571870c5fc3e594bb582bc3b64ea099db13e56/jinja2-3.1.6-py3-none-any.whl", hash = "sha256:85ece4451f492d0c13c5dd7c13a64681a86afae63a5f347908daf103ce6d2f67", size = 134899, upload-time = "2025-03-05T20:05:00.369Z" }, +] + +[[package]] +name = "jsmin" +version = "3.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/5e/73/e01e4c5e11ad0494f4407a3f623ad4d87714909f50b17a06ed121034ff6e/jsmin-3.0.1.tar.gz", hash = "sha256:c0959a121ef94542e807a674142606f7e90214a2b3d1eb17300244bbb5cc2bfc", size = 13925, upload-time = "2022-01-16T20:35:59.13Z" } + +[[package]] +name = "lua-reference-guide-docs" +version = "0.1.0" +source = { virtual = "." } +dependencies = [ + { name = "markdown" }, + { name = "mike" }, + { name = "mkdocs" }, + { name = "mkdocs-material" }, + { name = "mkdocs-minify-plugin" }, +] + +[package.metadata] +requires-dist = [ + { name = "markdown", specifier = ">=3.6,<4.0" }, + { name = "mike", specifier = ">=2,<3" }, + { name = "mkdocs", specifier = ">=1.6,<2.0" }, + { name = "mkdocs-material", specifier = ">=9.5,<10.0" }, + { name = "mkdocs-minify-plugin", specifier = ">=0.8,<1.0" }, +] + +[[package]] +name = "markdown" +version = "3.10.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2b/f4/69fa6ed85ae003c2378ffa8f6d2e3234662abd02c10d216c0ba96081a238/markdown-3.10.2.tar.gz", hash = "sha256:994d51325d25ad8aa7ce4ebaec003febcce822c3f8c911e3b17c52f7f589f950", size = 368805, upload-time = "2026-02-09T14:57:26.942Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/de/1f/77fa3081e4f66ca3576c896ae5d31c3002ac6607f9747d2e3aa49227e464/markdown-3.10.2-py3-none-any.whl", hash = "sha256:e91464b71ae3ee7afd3017d9f358ef0baf158fd9a298db92f1d4761133824c36", size = 108180, upload-time = "2026-02-09T14:57:25.787Z" }, +] + +[[package]] +name = "markupsafe" +version = "3.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/7e/99/7690b6d4034fffd95959cbe0c02de8deb3098cc577c67bb6a24fe5d7caa7/markupsafe-3.0.3.tar.gz", hash = "sha256:722695808f4b6457b320fdc131280796bdceb04ab50fe1795cd540799ebe1698", size = 80313, upload-time = "2025-09-27T18:37:40.426Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/08/db/fefacb2136439fc8dd20e797950e749aa1f4997ed584c62cfb8ef7c2be0e/markupsafe-3.0.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1cc7ea17a6824959616c525620e387f6dd30fec8cb44f649e31712db02123dad", size = 11631, upload-time = "2025-09-27T18:36:18.185Z" }, + { url = "https://files.pythonhosted.org/packages/e1/2e/5898933336b61975ce9dc04decbc0a7f2fee78c30353c5efba7f2d6ff27a/markupsafe-3.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4bd4cd07944443f5a265608cc6aab442e4f74dff8088b0dfc8238647b8f6ae9a", size = 12058, upload-time = "2025-09-27T18:36:19.444Z" }, + { url = "https://files.pythonhosted.org/packages/1d/09/adf2df3699d87d1d8184038df46a9c80d78c0148492323f4693df54e17bb/markupsafe-3.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6b5420a1d9450023228968e7e6a9ce57f65d148ab56d2313fcd589eee96a7a50", size = 24287, upload-time = "2025-09-27T18:36:20.768Z" }, + { url = "https://files.pythonhosted.org/packages/30/ac/0273f6fcb5f42e314c6d8cd99effae6a5354604d461b8d392b5ec9530a54/markupsafe-3.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0bf2a864d67e76e5c9a34dc26ec616a66b9888e25e7b9460e1c76d3293bd9dbf", size = 22940, upload-time = "2025-09-27T18:36:22.249Z" }, + { url = "https://files.pythonhosted.org/packages/19/ae/31c1be199ef767124c042c6c3e904da327a2f7f0cd63a0337e1eca2967a8/markupsafe-3.0.3-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:bc51efed119bc9cfdf792cdeaa4d67e8f6fcccab66ed4bfdd6bde3e59bfcbb2f", size = 21887, upload-time = "2025-09-27T18:36:23.535Z" }, + { url = "https://files.pythonhosted.org/packages/b2/76/7edcab99d5349a4532a459e1fe64f0b0467a3365056ae550d3bcf3f79e1e/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:068f375c472b3e7acbe2d5318dea141359e6900156b5b2ba06a30b169086b91a", size = 23692, upload-time = "2025-09-27T18:36:24.823Z" }, + { url = "https://files.pythonhosted.org/packages/a4/28/6e74cdd26d7514849143d69f0bf2399f929c37dc2b31e6829fd2045b2765/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:7be7b61bb172e1ed687f1754f8e7484f1c8019780f6f6b0786e76bb01c2ae115", size = 21471, upload-time = "2025-09-27T18:36:25.95Z" }, + { url = "https://files.pythonhosted.org/packages/62/7e/a145f36a5c2945673e590850a6f8014318d5577ed7e5920a4b3448e0865d/markupsafe-3.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:f9e130248f4462aaa8e2552d547f36ddadbeaa573879158d721bbd33dfe4743a", size = 22923, upload-time = "2025-09-27T18:36:27.109Z" }, + { url = "https://files.pythonhosted.org/packages/0f/62/d9c46a7f5c9adbeeeda52f5b8d802e1094e9717705a645efc71b0913a0a8/markupsafe-3.0.3-cp311-cp311-win32.whl", hash = "sha256:0db14f5dafddbb6d9208827849fad01f1a2609380add406671a26386cdf15a19", size = 14572, upload-time = "2025-09-27T18:36:28.045Z" }, + { url = "https://files.pythonhosted.org/packages/83/8a/4414c03d3f891739326e1783338e48fb49781cc915b2e0ee052aa490d586/markupsafe-3.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:de8a88e63464af587c950061a5e6a67d3632e36df62b986892331d4620a35c01", size = 15077, upload-time = "2025-09-27T18:36:29.025Z" }, + { url = "https://files.pythonhosted.org/packages/35/73/893072b42e6862f319b5207adc9ae06070f095b358655f077f69a35601f0/markupsafe-3.0.3-cp311-cp311-win_arm64.whl", hash = "sha256:3b562dd9e9ea93f13d53989d23a7e775fdfd1066c33494ff43f5418bc8c58a5c", size = 13876, upload-time = "2025-09-27T18:36:29.954Z" }, + { url = "https://files.pythonhosted.org/packages/5a/72/147da192e38635ada20e0a2e1a51cf8823d2119ce8883f7053879c2199b5/markupsafe-3.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:d53197da72cc091b024dd97249dfc7794d6a56530370992a5e1a08983ad9230e", size = 11615, upload-time = "2025-09-27T18:36:30.854Z" }, + { url = "https://files.pythonhosted.org/packages/9a/81/7e4e08678a1f98521201c3079f77db69fb552acd56067661f8c2f534a718/markupsafe-3.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:1872df69a4de6aead3491198eaf13810b565bdbeec3ae2dc8780f14458ec73ce", size = 12020, upload-time = "2025-09-27T18:36:31.971Z" }, + { url = "https://files.pythonhosted.org/packages/1e/2c/799f4742efc39633a1b54a92eec4082e4f815314869865d876824c257c1e/markupsafe-3.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:3a7e8ae81ae39e62a41ec302f972ba6ae23a5c5396c8e60113e9066ef893da0d", size = 24332, upload-time = "2025-09-27T18:36:32.813Z" }, + { url = "https://files.pythonhosted.org/packages/3c/2e/8d0c2ab90a8c1d9a24f0399058ab8519a3279d1bd4289511d74e909f060e/markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d6dd0be5b5b189d31db7cda48b91d7e0a9795f31430b7f271219ab30f1d3ac9d", size = 22947, upload-time = "2025-09-27T18:36:33.86Z" }, + { url = "https://files.pythonhosted.org/packages/2c/54/887f3092a85238093a0b2154bd629c89444f395618842e8b0c41783898ea/markupsafe-3.0.3-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:94c6f0bb423f739146aec64595853541634bde58b2135f27f61c1ffd1cd4d16a", size = 21962, upload-time = "2025-09-27T18:36:35.099Z" }, + { url = "https://files.pythonhosted.org/packages/c9/2f/336b8c7b6f4a4d95e91119dc8521402461b74a485558d8f238a68312f11c/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:be8813b57049a7dc738189df53d69395eba14fb99345e0a5994914a3864c8a4b", size = 23760, upload-time = "2025-09-27T18:36:36.001Z" }, + { url = "https://files.pythonhosted.org/packages/32/43/67935f2b7e4982ffb50a4d169b724d74b62a3964bc1a9a527f5ac4f1ee2b/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:83891d0e9fb81a825d9a6d61e3f07550ca70a076484292a70fde82c4b807286f", size = 21529, upload-time = "2025-09-27T18:36:36.906Z" }, + { url = "https://files.pythonhosted.org/packages/89/e0/4486f11e51bbba8b0c041098859e869e304d1c261e59244baa3d295d47b7/markupsafe-3.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:77f0643abe7495da77fb436f50f8dab76dbc6e5fd25d39589a0f1fe6548bfa2b", size = 23015, upload-time = "2025-09-27T18:36:37.868Z" }, + { url = "https://files.pythonhosted.org/packages/2f/e1/78ee7a023dac597a5825441ebd17170785a9dab23de95d2c7508ade94e0e/markupsafe-3.0.3-cp312-cp312-win32.whl", hash = "sha256:d88b440e37a16e651bda4c7c2b930eb586fd15ca7406cb39e211fcff3bf3017d", size = 14540, upload-time = "2025-09-27T18:36:38.761Z" }, + { url = "https://files.pythonhosted.org/packages/aa/5b/bec5aa9bbbb2c946ca2733ef9c4ca91c91b6a24580193e891b5f7dbe8e1e/markupsafe-3.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:26a5784ded40c9e318cfc2bdb30fe164bdb8665ded9cd64d500a34fb42067b1c", size = 15105, upload-time = "2025-09-27T18:36:39.701Z" }, + { url = "https://files.pythonhosted.org/packages/e5/f1/216fc1bbfd74011693a4fd837e7026152e89c4bcf3e77b6692fba9923123/markupsafe-3.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:35add3b638a5d900e807944a078b51922212fb3dedb01633a8defc4b01a3c85f", size = 13906, upload-time = "2025-09-27T18:36:40.689Z" }, + { url = "https://files.pythonhosted.org/packages/38/2f/907b9c7bbba283e68f20259574b13d005c121a0fa4c175f9bed27c4597ff/markupsafe-3.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:e1cf1972137e83c5d4c136c43ced9ac51d0e124706ee1c8aa8532c1287fa8795", size = 11622, upload-time = "2025-09-27T18:36:41.777Z" }, + { url = "https://files.pythonhosted.org/packages/9c/d9/5f7756922cdd676869eca1c4e3c0cd0df60ed30199ffd775e319089cb3ed/markupsafe-3.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:116bb52f642a37c115f517494ea5feb03889e04df47eeff5b130b1808ce7c219", size = 12029, upload-time = "2025-09-27T18:36:43.257Z" }, + { url = "https://files.pythonhosted.org/packages/00/07/575a68c754943058c78f30db02ee03a64b3c638586fba6a6dd56830b30a3/markupsafe-3.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:133a43e73a802c5562be9bbcd03d090aa5a1fe899db609c29e8c8d815c5f6de6", size = 24374, upload-time = "2025-09-27T18:36:44.508Z" }, + { url = "https://files.pythonhosted.org/packages/a9/21/9b05698b46f218fc0e118e1f8168395c65c8a2c750ae2bab54fc4bd4e0e8/markupsafe-3.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ccfcd093f13f0f0b7fdd0f198b90053bf7b2f02a3927a30e63f3ccc9df56b676", size = 22980, upload-time = "2025-09-27T18:36:45.385Z" }, + { url = "https://files.pythonhosted.org/packages/7f/71/544260864f893f18b6827315b988c146b559391e6e7e8f7252839b1b846a/markupsafe-3.0.3-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:509fa21c6deb7a7a273d629cf5ec029bc209d1a51178615ddf718f5918992ab9", size = 21990, upload-time = "2025-09-27T18:36:46.916Z" }, + { url = "https://files.pythonhosted.org/packages/c2/28/b50fc2f74d1ad761af2f5dcce7492648b983d00a65b8c0e0cb457c82ebbe/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:a4afe79fb3de0b7097d81da19090f4df4f8d3a2b3adaa8764138aac2e44f3af1", size = 23784, upload-time = "2025-09-27T18:36:47.884Z" }, + { url = "https://files.pythonhosted.org/packages/ed/76/104b2aa106a208da8b17a2fb72e033a5a9d7073c68f7e508b94916ed47a9/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:795e7751525cae078558e679d646ae45574b47ed6e7771863fcc079a6171a0fc", size = 21588, upload-time = "2025-09-27T18:36:48.82Z" }, + { url = "https://files.pythonhosted.org/packages/b5/99/16a5eb2d140087ebd97180d95249b00a03aa87e29cc224056274f2e45fd6/markupsafe-3.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:8485f406a96febb5140bfeca44a73e3ce5116b2501ac54fe953e488fb1d03b12", size = 23041, upload-time = "2025-09-27T18:36:49.797Z" }, + { url = "https://files.pythonhosted.org/packages/19/bc/e7140ed90c5d61d77cea142eed9f9c303f4c4806f60a1044c13e3f1471d0/markupsafe-3.0.3-cp313-cp313-win32.whl", hash = "sha256:bdd37121970bfd8be76c5fb069c7751683bdf373db1ed6c010162b2a130248ed", size = 14543, upload-time = "2025-09-27T18:36:51.584Z" }, + { url = "https://files.pythonhosted.org/packages/05/73/c4abe620b841b6b791f2edc248f556900667a5a1cf023a6646967ae98335/markupsafe-3.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:9a1abfdc021a164803f4d485104931fb8f8c1efd55bc6b748d2f5774e78b62c5", size = 15113, upload-time = "2025-09-27T18:36:52.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/3a/fa34a0f7cfef23cf9500d68cb7c32dd64ffd58a12b09225fb03dd37d5b80/markupsafe-3.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:7e68f88e5b8799aa49c85cd116c932a1ac15caaa3f5db09087854d218359e485", size = 13911, upload-time = "2025-09-27T18:36:53.513Z" }, + { url = "https://files.pythonhosted.org/packages/e4/d7/e05cd7efe43a88a17a37b3ae96e79a19e846f3f456fe79c57ca61356ef01/markupsafe-3.0.3-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:218551f6df4868a8d527e3062d0fb968682fe92054e89978594c28e642c43a73", size = 11658, upload-time = "2025-09-27T18:36:54.819Z" }, + { url = "https://files.pythonhosted.org/packages/99/9e/e412117548182ce2148bdeacdda3bb494260c0b0184360fe0d56389b523b/markupsafe-3.0.3-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:3524b778fe5cfb3452a09d31e7b5adefeea8c5be1d43c4f810ba09f2ceb29d37", size = 12066, upload-time = "2025-09-27T18:36:55.714Z" }, + { url = "https://files.pythonhosted.org/packages/bc/e6/fa0ffcda717ef64a5108eaa7b4f5ed28d56122c9a6d70ab8b72f9f715c80/markupsafe-3.0.3-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:4e885a3d1efa2eadc93c894a21770e4bc67899e3543680313b09f139e149ab19", size = 25639, upload-time = "2025-09-27T18:36:56.908Z" }, + { url = "https://files.pythonhosted.org/packages/96/ec/2102e881fe9d25fc16cb4b25d5f5cde50970967ffa5dddafdb771237062d/markupsafe-3.0.3-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:8709b08f4a89aa7586de0aadc8da56180242ee0ada3999749b183aa23df95025", size = 23569, upload-time = "2025-09-27T18:36:57.913Z" }, + { url = "https://files.pythonhosted.org/packages/4b/30/6f2fce1f1f205fc9323255b216ca8a235b15860c34b6798f810f05828e32/markupsafe-3.0.3-cp313-cp313t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:b8512a91625c9b3da6f127803b166b629725e68af71f8184ae7e7d54686a56d6", size = 23284, upload-time = "2025-09-27T18:36:58.833Z" }, + { url = "https://files.pythonhosted.org/packages/58/47/4a0ccea4ab9f5dcb6f79c0236d954acb382202721e704223a8aafa38b5c8/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_aarch64.whl", hash = "sha256:9b79b7a16f7fedff2495d684f2b59b0457c3b493778c9eed31111be64d58279f", size = 24801, upload-time = "2025-09-27T18:36:59.739Z" }, + { url = "https://files.pythonhosted.org/packages/6a/70/3780e9b72180b6fecb83a4814d84c3bf4b4ae4bf0b19c27196104149734c/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_riscv64.whl", hash = "sha256:12c63dfb4a98206f045aa9563db46507995f7ef6d83b2f68eda65c307c6829eb", size = 22769, upload-time = "2025-09-27T18:37:00.719Z" }, + { url = "https://files.pythonhosted.org/packages/98/c5/c03c7f4125180fc215220c035beac6b9cb684bc7a067c84fc69414d315f5/markupsafe-3.0.3-cp313-cp313t-musllinux_1_2_x86_64.whl", hash = "sha256:8f71bc33915be5186016f675cd83a1e08523649b0e33efdb898db577ef5bb009", size = 23642, upload-time = "2025-09-27T18:37:01.673Z" }, + { url = "https://files.pythonhosted.org/packages/80/d6/2d1b89f6ca4bff1036499b1e29a1d02d282259f3681540e16563f27ebc23/markupsafe-3.0.3-cp313-cp313t-win32.whl", hash = "sha256:69c0b73548bc525c8cb9a251cddf1931d1db4d2258e9599c28c07ef3580ef354", size = 14612, upload-time = "2025-09-27T18:37:02.639Z" }, + { url = "https://files.pythonhosted.org/packages/2b/98/e48a4bfba0a0ffcf9925fe2d69240bfaa19c6f7507b8cd09c70684a53c1e/markupsafe-3.0.3-cp313-cp313t-win_amd64.whl", hash = "sha256:1b4b79e8ebf6b55351f0d91fe80f893b4743f104bff22e90697db1590e47a218", size = 15200, upload-time = "2025-09-27T18:37:03.582Z" }, + { url = "https://files.pythonhosted.org/packages/0e/72/e3cc540f351f316e9ed0f092757459afbc595824ca724cbc5a5d4263713f/markupsafe-3.0.3-cp313-cp313t-win_arm64.whl", hash = "sha256:ad2cf8aa28b8c020ab2fc8287b0f823d0a7d8630784c31e9ee5edea20f406287", size = 13973, upload-time = "2025-09-27T18:37:04.929Z" }, + { url = "https://files.pythonhosted.org/packages/33/8a/8e42d4838cd89b7dde187011e97fe6c3af66d8c044997d2183fbd6d31352/markupsafe-3.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:eaa9599de571d72e2daf60164784109f19978b327a3910d3e9de8c97b5b70cfe", size = 11619, upload-time = "2025-09-27T18:37:06.342Z" }, + { url = "https://files.pythonhosted.org/packages/b5/64/7660f8a4a8e53c924d0fa05dc3a55c9cee10bbd82b11c5afb27d44b096ce/markupsafe-3.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c47a551199eb8eb2121d4f0f15ae0f923d31350ab9280078d1e5f12b249e0026", size = 12029, upload-time = "2025-09-27T18:37:07.213Z" }, + { url = "https://files.pythonhosted.org/packages/da/ef/e648bfd021127bef5fa12e1720ffed0c6cbb8310c8d9bea7266337ff06de/markupsafe-3.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:f34c41761022dd093b4b6896d4810782ffbabe30f2d443ff5f083e0cbbb8c737", size = 24408, upload-time = "2025-09-27T18:37:09.572Z" }, + { url = "https://files.pythonhosted.org/packages/41/3c/a36c2450754618e62008bf7435ccb0f88053e07592e6028a34776213d877/markupsafe-3.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:457a69a9577064c05a97c41f4e65148652db078a3a509039e64d3467b9e7ef97", size = 23005, upload-time = "2025-09-27T18:37:10.58Z" }, + { url = "https://files.pythonhosted.org/packages/bc/20/b7fdf89a8456b099837cd1dc21974632a02a999ec9bf7ca3e490aacd98e7/markupsafe-3.0.3-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e8afc3f2ccfa24215f8cb28dcf43f0113ac3c37c2f0f0806d8c70e4228c5cf4d", size = 22048, upload-time = "2025-09-27T18:37:11.547Z" }, + { url = "https://files.pythonhosted.org/packages/9a/a7/591f592afdc734f47db08a75793a55d7fbcc6902a723ae4cfbab61010cc5/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:ec15a59cf5af7be74194f7ab02d0f59a62bdcf1a537677ce67a2537c9b87fcda", size = 23821, upload-time = "2025-09-27T18:37:12.48Z" }, + { url = "https://files.pythonhosted.org/packages/7d/33/45b24e4f44195b26521bc6f1a82197118f74df348556594bd2262bda1038/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:0eb9ff8191e8498cca014656ae6b8d61f39da5f95b488805da4bb029cccbfbaf", size = 21606, upload-time = "2025-09-27T18:37:13.485Z" }, + { url = "https://files.pythonhosted.org/packages/ff/0e/53dfaca23a69fbfbbf17a4b64072090e70717344c52eaaaa9c5ddff1e5f0/markupsafe-3.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:2713baf880df847f2bece4230d4d094280f4e67b1e813eec43b4c0e144a34ffe", size = 23043, upload-time = "2025-09-27T18:37:14.408Z" }, + { url = "https://files.pythonhosted.org/packages/46/11/f333a06fc16236d5238bfe74daccbca41459dcd8d1fa952e8fbd5dccfb70/markupsafe-3.0.3-cp314-cp314-win32.whl", hash = "sha256:729586769a26dbceff69f7a7dbbf59ab6572b99d94576a5592625d5b411576b9", size = 14747, upload-time = "2025-09-27T18:37:15.36Z" }, + { url = "https://files.pythonhosted.org/packages/28/52/182836104b33b444e400b14f797212f720cbc9ed6ba34c800639d154e821/markupsafe-3.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:bdc919ead48f234740ad807933cdf545180bfbe9342c2bb451556db2ed958581", size = 15341, upload-time = "2025-09-27T18:37:16.496Z" }, + { url = "https://files.pythonhosted.org/packages/6f/18/acf23e91bd94fd7b3031558b1f013adfa21a8e407a3fdb32745538730382/markupsafe-3.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:5a7d5dc5140555cf21a6fefbdbf8723f06fcd2f63ef108f2854de715e4422cb4", size = 14073, upload-time = "2025-09-27T18:37:17.476Z" }, + { url = "https://files.pythonhosted.org/packages/3c/f0/57689aa4076e1b43b15fdfa646b04653969d50cf30c32a102762be2485da/markupsafe-3.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:1353ef0c1b138e1907ae78e2f6c63ff67501122006b0f9abad68fda5f4ffc6ab", size = 11661, upload-time = "2025-09-27T18:37:18.453Z" }, + { url = "https://files.pythonhosted.org/packages/89/c3/2e67a7ca217c6912985ec766c6393b636fb0c2344443ff9d91404dc4c79f/markupsafe-3.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:1085e7fbddd3be5f89cc898938f42c0b3c711fdcb37d75221de2666af647c175", size = 12069, upload-time = "2025-09-27T18:37:19.332Z" }, + { url = "https://files.pythonhosted.org/packages/f0/00/be561dce4e6ca66b15276e184ce4b8aec61fe83662cce2f7d72bd3249d28/markupsafe-3.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:1b52b4fb9df4eb9ae465f8d0c228a00624de2334f216f178a995ccdcf82c4634", size = 25670, upload-time = "2025-09-27T18:37:20.245Z" }, + { url = "https://files.pythonhosted.org/packages/50/09/c419f6f5a92e5fadde27efd190eca90f05e1261b10dbd8cbcb39cd8ea1dc/markupsafe-3.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:fed51ac40f757d41b7c48425901843666a6677e3e8eb0abcff09e4ba6e664f50", size = 23598, upload-time = "2025-09-27T18:37:21.177Z" }, + { url = "https://files.pythonhosted.org/packages/22/44/a0681611106e0b2921b3033fc19bc53323e0b50bc70cffdd19f7d679bb66/markupsafe-3.0.3-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:f190daf01f13c72eac4efd5c430a8de82489d9cff23c364c3ea822545032993e", size = 23261, upload-time = "2025-09-27T18:37:22.167Z" }, + { url = "https://files.pythonhosted.org/packages/5f/57/1b0b3f100259dc9fffe780cfb60d4be71375510e435efec3d116b6436d43/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:e56b7d45a839a697b5eb268c82a71bd8c7f6c94d6fd50c3d577fa39a9f1409f5", size = 24835, upload-time = "2025-09-27T18:37:23.296Z" }, + { url = "https://files.pythonhosted.org/packages/26/6a/4bf6d0c97c4920f1597cc14dd720705eca0bf7c787aebc6bb4d1bead5388/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:f3e98bb3798ead92273dc0e5fd0f31ade220f59a266ffd8a4f6065e0a3ce0523", size = 22733, upload-time = "2025-09-27T18:37:24.237Z" }, + { url = "https://files.pythonhosted.org/packages/14/c7/ca723101509b518797fedc2fdf79ba57f886b4aca8a7d31857ba3ee8281f/markupsafe-3.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:5678211cb9333a6468fb8d8be0305520aa073f50d17f089b5b4b477ea6e67fdc", size = 23672, upload-time = "2025-09-27T18:37:25.271Z" }, + { url = "https://files.pythonhosted.org/packages/fb/df/5bd7a48c256faecd1d36edc13133e51397e41b73bb77e1a69deab746ebac/markupsafe-3.0.3-cp314-cp314t-win32.whl", hash = "sha256:915c04ba3851909ce68ccc2b8e2cd691618c4dc4c4232fb7982bca3f41fd8c3d", size = 14819, upload-time = "2025-09-27T18:37:26.285Z" }, + { url = "https://files.pythonhosted.org/packages/1a/8a/0402ba61a2f16038b48b39bccca271134be00c5c9f0f623208399333c448/markupsafe-3.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4faffd047e07c38848ce017e8725090413cd80cbc23d86e55c587bf979e579c9", size = 15426, upload-time = "2025-09-27T18:37:27.316Z" }, + { url = "https://files.pythonhosted.org/packages/70/bc/6f1c2f612465f5fa89b95bead1f44dcb607670fd42891d8fdcd5d039f4f4/markupsafe-3.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:32001d6a8fc98c8cb5c947787c5d08b0a50663d139f1305bac5885d98d9b40fa", size = 14146, upload-time = "2025-09-27T18:37:28.327Z" }, +] + +[[package]] +name = "mergedeep" +version = "1.3.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/3a/41/580bb4006e3ed0361b8151a01d324fb03f420815446c7def45d02f74c270/mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8", size = 4661, upload-time = "2021-02-05T18:55:30.623Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2c/19/04f9b178c2d8a15b076c8b5140708fa6ffc5601fb6f1e975537072df5b2a/mergedeep-1.3.4-py3-none-any.whl", hash = "sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307", size = 6354, upload-time = "2021-02-05T18:55:29.583Z" }, +] + +[[package]] +name = "mike" +version = "2.1.4" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "jinja2" }, + { name = "mkdocs" }, + { name = "pyparsing" }, + { name = "pyyaml" }, + { name = "pyyaml-env-tag" }, + { name = "verspec" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ec/09/de1cab0018eb5f1fbd9dcc26b6e61f9453c5ec2eb790949d6ed75e1ffe55/mike-2.1.4.tar.gz", hash = "sha256:75d549420b134603805a65fc67f7dcd9fcd0ad1454fb2c893d9e844cba1aa6e4", size = 38190, upload-time = "2026-03-08T02:46:29.187Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/48/f7/10f5e101db25741b91e4f4792c5d97b4fa834ead5cf509ae91097d939424/mike-2.1.4-py3-none-any.whl", hash = "sha256:39933e992e155dd70f2297e749a0ed78d8fd7942bc33a3666195d177758a280e", size = 33820, upload-time = "2026-03-08T02:46:28.149Z" }, +] + +[[package]] +name = "mkdocs" +version = "1.6.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "click" }, + { name = "colorama", marker = "sys_platform == 'win32'" }, + { name = "ghp-import" }, + { name = "jinja2" }, + { name = "markdown" }, + { name = "markupsafe" }, + { name = "mergedeep" }, + { name = "mkdocs-get-deps" }, + { name = "packaging" }, + { name = "pathspec" }, + { name = "pyyaml" }, + { name = "pyyaml-env-tag" }, + { name = "watchdog" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/bc/c6/bbd4f061bd16b378247f12953ffcb04786a618ce5e904b8c5a01a0309061/mkdocs-1.6.1.tar.gz", hash = "sha256:7b432f01d928c084353ab39c57282f29f92136665bdd6abf7c1ec8d822ef86f2", size = 3889159, upload-time = "2024-08-30T12:24:06.899Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/22/5b/dbc6a8cddc9cfa9c4971d59fb12bb8d42e161b7e7f8cc89e49137c5b279c/mkdocs-1.6.1-py3-none-any.whl", hash = "sha256:db91759624d1647f3f34aa0c3f327dd2601beae39a366d6e064c03468d35c20e", size = 3864451, upload-time = "2024-08-30T12:24:05.054Z" }, +] + +[[package]] +name = "mkdocs-get-deps" +version = "0.2.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "mergedeep" }, + { name = "platformdirs" }, + { name = "pyyaml" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ce/25/b3cccb187655b9393572bde9b09261d267c3bf2f2cdabe347673be5976a6/mkdocs_get_deps-0.2.2.tar.gz", hash = "sha256:8ee8d5f316cdbbb2834bc1df6e69c08fe769a83e040060de26d3c19fad3599a1", size = 11047, upload-time = "2026-03-10T02:46:33.632Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/88/29/744136411e785c4b0b744d5413e56555265939ab3a104c6a4b719dad33fd/mkdocs_get_deps-0.2.2-py3-none-any.whl", hash = "sha256:e7878cbeac04860b8b5e0ca31d3abad3df9411a75a32cde82f8e44b6c16ff650", size = 9555, upload-time = "2026-03-10T02:46:32.256Z" }, +] + +[[package]] +name = "mkdocs-material" +version = "9.7.6" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "babel" }, + { name = "backrefs" }, + { name = "colorama" }, + { name = "jinja2" }, + { name = "markdown" }, + { name = "mkdocs" }, + { name = "mkdocs-material-extensions" }, + { name = "paginate" }, + { name = "pygments" }, + { name = "pymdown-extensions" }, + { name = "requests" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/45/29/6d2bcf41ae40802c4beda2432396fff97b8456fb496371d1bc7aad6512ec/mkdocs_material-9.7.6.tar.gz", hash = "sha256:00bdde50574f776d328b1862fe65daeaf581ec309bd150f7bff345a098c64a69", size = 4097959, upload-time = "2026-03-19T15:41:58.161Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2c/01/bc663630c510822c95c47a66af9fa7a443c295b47d5f041e5e6ae62ef659/mkdocs_material-9.7.6-py3-none-any.whl", hash = "sha256:71b84353921b8ea1ba84fe11c50912cc512da8fe0881038fcc9a0761c0e635ba", size = 9305470, upload-time = "2026-03-19T15:41:55.217Z" }, +] + +[[package]] +name = "mkdocs-material-extensions" +version = "1.3.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/79/9b/9b4c96d6593b2a541e1cb8b34899a6d021d208bb357042823d4d2cabdbe7/mkdocs_material_extensions-1.3.1.tar.gz", hash = "sha256:10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443", size = 11847, upload-time = "2023-11-22T19:09:45.208Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/5b/54/662a4743aa81d9582ee9339d4ffa3c8fd40a4965e033d77b9da9774d3960/mkdocs_material_extensions-1.3.1-py3-none-any.whl", hash = "sha256:adff8b62700b25cb77b53358dad940f3ef973dd6db797907c49e3c2ef3ab4e31", size = 8728, upload-time = "2023-11-22T19:09:43.465Z" }, +] + +[[package]] +name = "mkdocs-minify-plugin" +version = "0.8.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "csscompressor" }, + { name = "htmlmin2" }, + { name = "jsmin" }, + { name = "mkdocs" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/52/67/fe4b77e7a8ae7628392e28b14122588beaf6078b53eb91c7ed000fd158ac/mkdocs-minify-plugin-0.8.0.tar.gz", hash = "sha256:bc11b78b8120d79e817308e2b11539d790d21445eb63df831e393f76e52e753d", size = 8366, upload-time = "2024-01-29T16:11:32.982Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1b/cd/2e8d0d92421916e2ea4ff97f10a544a9bd5588eb747556701c983581df13/mkdocs_minify_plugin-0.8.0-py3-none-any.whl", hash = "sha256:5fba1a3f7bd9a2142c9954a6559a57e946587b21f133165ece30ea145c66aee6", size = 6723, upload-time = "2024-01-29T16:11:31.851Z" }, +] + +[[package]] +name = "packaging" +version = "26.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/65/ee/299d360cdc32edc7d2cf530f3accf79c4fca01e96ffc950d8a52213bd8e4/packaging-26.0.tar.gz", hash = "sha256:00243ae351a257117b6a241061796684b084ed1c516a08c48a3f7e147a9d80b4", size = 143416, upload-time = "2026-01-21T20:50:39.064Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/b9/c538f279a4e237a006a2c98387d081e9eb060d203d8ed34467cc0f0b9b53/packaging-26.0-py3-none-any.whl", hash = "sha256:b36f1fef9334a5588b4166f8bcd26a14e521f2b55e6b9de3aaa80d3ff7a37529", size = 74366, upload-time = "2026-01-21T20:50:37.788Z" }, +] + +[[package]] +name = "paginate" +version = "0.5.7" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/ec/46/68dde5b6bc00c1296ec6466ab27dddede6aec9af1b99090e1107091b3b84/paginate-0.5.7.tar.gz", hash = "sha256:22bd083ab41e1a8b4f3690544afb2c60c25e5c9a63a30fa2f483f6c60c8e5945", size = 19252, upload-time = "2024-08-25T14:17:24.139Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/90/96/04b8e52da071d28f5e21a805b19cb9390aa17a47462ac87f5e2696b9566d/paginate-0.5.7-py2.py3-none-any.whl", hash = "sha256:b885e2af73abcf01d9559fd5216b57ef722f8c42affbb63942377668e35c7591", size = 13746, upload-time = "2024-08-25T14:17:22.55Z" }, +] + +[[package]] +name = "pathspec" +version = "1.0.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/fa/36/e27608899f9b8d4dff0617b2d9ab17ca5608956ca44461ac14ac48b44015/pathspec-1.0.4.tar.gz", hash = "sha256:0210e2ae8a21a9137c0d470578cb0e595af87edaa6ebf12ff176f14a02e0e645", size = 131200, upload-time = "2026-01-27T03:59:46.938Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ef/3c/2c197d226f9ea224a9ab8d197933f9da0ae0aac5b6e0f884e2b8d9c8e9f7/pathspec-1.0.4-py3-none-any.whl", hash = "sha256:fb6ae2fd4e7c921a165808a552060e722767cfa526f99ca5156ed2ce45a5c723", size = 55206, upload-time = "2026-01-27T03:59:45.137Z" }, +] + +[[package]] +name = "platformdirs" +version = "4.9.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/19/56/8d4c30c8a1d07013911a8fdbd8f89440ef9f08d07a1b50ab8ca8be5a20f9/platformdirs-4.9.4.tar.gz", hash = "sha256:1ec356301b7dc906d83f371c8f487070e99d3ccf9e501686456394622a01a934", size = 28737, upload-time = "2026-03-05T18:34:13.271Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/63/d7/97f7e3a6abb67d8080dd406fd4df842c2be0efaf712d1c899c32a075027c/platformdirs-4.9.4-py3-none-any.whl", hash = "sha256:68a9a4619a666ea6439f2ff250c12a853cd1cbd5158d258bd824a7df6be2f868", size = 21216, upload-time = "2026-03-05T18:34:12.172Z" }, +] + +[[package]] +name = "pygments" +version = "2.19.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/b0/77/a5b8c569bf593b0140bde72ea885a803b82086995367bf2037de0159d924/pygments-2.19.2.tar.gz", hash = "sha256:636cb2477cec7f8952536970bc533bc43743542f70392ae026374600add5b887", size = 4968631, upload-time = "2025-06-21T13:39:12.283Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/c7/21/705964c7812476f378728bdf590ca4b771ec72385c533964653c68e86bdc/pygments-2.19.2-py3-none-any.whl", hash = "sha256:86540386c03d588bb81d44bc3928634ff26449851e99741617ecb9037ee5ec0b", size = 1225217, upload-time = "2025-06-21T13:39:07.939Z" }, +] + +[[package]] +name = "pymdown-extensions" +version = "10.21" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "markdown" }, + { name = "pyyaml" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/ba/63/06673d1eb6d8f83c0ea1f677d770e12565fb516928b4109c9e2055656a9e/pymdown_extensions-10.21.tar.gz", hash = "sha256:39f4a020f40773f6b2ff31d2cd2546c2c04d0a6498c31d9c688d2be07e1767d5", size = 853363, upload-time = "2026-02-15T20:44:06.748Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6f/2c/5b079febdc65e1c3fb2729bf958d18b45be7113828528e8a0b5850dd819a/pymdown_extensions-10.21-py3-none-any.whl", hash = "sha256:91b879f9f864d49794c2d9534372b10150e6141096c3908a455e45ca72ad9d3f", size = 268877, upload-time = "2026-02-15T20:44:05.464Z" }, +] + +[[package]] +name = "pyparsing" +version = "3.3.2" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/f3/91/9c6ee907786a473bf81c5f53cf703ba0957b23ab84c264080fb5a450416f/pyparsing-3.3.2.tar.gz", hash = "sha256:c777f4d763f140633dcb6d8a3eda953bf7a214dc4eff598413c070bcdc117cbc", size = 6851574, upload-time = "2026-01-21T03:57:59.36Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/10/bd/c038d7cc38edc1aa5bf91ab8068b63d4308c66c4c8bb3cbba7dfbc049f9c/pyparsing-3.3.2-py3-none-any.whl", hash = "sha256:850ba148bd908d7e2411587e247a1e4f0327839c40e2e5e6d05a007ecc69911d", size = 122781, upload-time = "2026-01-21T03:57:55.912Z" }, +] + +[[package]] +name = "python-dateutil" +version = "2.9.0.post0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "six" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432, upload-time = "2024-03-01T18:36:20.211Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" }, +] + +[[package]] +name = "pyyaml" +version = "6.0.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/05/8e/961c0007c59b8dd7729d542c61a4d537767a59645b82a0b521206e1e25c2/pyyaml-6.0.3.tar.gz", hash = "sha256:d76623373421df22fb4cf8817020cbb7ef15c725b9d5e45f17e189bfc384190f", size = 130960, upload-time = "2025-09-25T21:33:16.546Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/6d/16/a95b6757765b7b031c9374925bb718d55e0a9ba8a1b6a12d25962ea44347/pyyaml-6.0.3-cp311-cp311-macosx_10_13_x86_64.whl", hash = "sha256:44edc647873928551a01e7a563d7452ccdebee747728c1080d881d68af7b997e", size = 185826, upload-time = "2025-09-25T21:31:58.655Z" }, + { url = "https://files.pythonhosted.org/packages/16/19/13de8e4377ed53079ee996e1ab0a9c33ec2faf808a4647b7b4c0d46dd239/pyyaml-6.0.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:652cb6edd41e718550aad172851962662ff2681490a8a711af6a4d288dd96824", size = 175577, upload-time = "2025-09-25T21:32:00.088Z" }, + { url = "https://files.pythonhosted.org/packages/0c/62/d2eb46264d4b157dae1275b573017abec435397aa59cbcdab6fc978a8af4/pyyaml-6.0.3-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:10892704fc220243f5305762e276552a0395f7beb4dbf9b14ec8fd43b57f126c", size = 775556, upload-time = "2025-09-25T21:32:01.31Z" }, + { url = "https://files.pythonhosted.org/packages/10/cb/16c3f2cf3266edd25aaa00d6c4350381c8b012ed6f5276675b9eba8d9ff4/pyyaml-6.0.3-cp311-cp311-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:850774a7879607d3a6f50d36d04f00ee69e7fc816450e5f7e58d7f17f1ae5c00", size = 882114, upload-time = "2025-09-25T21:32:03.376Z" }, + { url = "https://files.pythonhosted.org/packages/71/60/917329f640924b18ff085ab889a11c763e0b573da888e8404ff486657602/pyyaml-6.0.3-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:b8bb0864c5a28024fac8a632c443c87c5aa6f215c0b126c449ae1a150412f31d", size = 806638, upload-time = "2025-09-25T21:32:04.553Z" }, + { url = "https://files.pythonhosted.org/packages/dd/6f/529b0f316a9fd167281a6c3826b5583e6192dba792dd55e3203d3f8e655a/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:1d37d57ad971609cf3c53ba6a7e365e40660e3be0e5175fa9f2365a379d6095a", size = 767463, upload-time = "2025-09-25T21:32:06.152Z" }, + { url = "https://files.pythonhosted.org/packages/f2/6a/b627b4e0c1dd03718543519ffb2f1deea4a1e6d42fbab8021936a4d22589/pyyaml-6.0.3-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:37503bfbfc9d2c40b344d06b2199cf0e96e97957ab1c1b546fd4f87e53e5d3e4", size = 794986, upload-time = "2025-09-25T21:32:07.367Z" }, + { url = "https://files.pythonhosted.org/packages/45/91/47a6e1c42d9ee337c4839208f30d9f09caa9f720ec7582917b264defc875/pyyaml-6.0.3-cp311-cp311-win32.whl", hash = "sha256:8098f252adfa6c80ab48096053f512f2321f0b998f98150cea9bd23d83e1467b", size = 142543, upload-time = "2025-09-25T21:32:08.95Z" }, + { url = "https://files.pythonhosted.org/packages/da/e3/ea007450a105ae919a72393cb06f122f288ef60bba2dc64b26e2646fa315/pyyaml-6.0.3-cp311-cp311-win_amd64.whl", hash = "sha256:9f3bfb4965eb874431221a3ff3fdcddc7e74e3b07799e0e84ca4a0f867d449bf", size = 158763, upload-time = "2025-09-25T21:32:09.96Z" }, + { url = "https://files.pythonhosted.org/packages/d1/33/422b98d2195232ca1826284a76852ad5a86fe23e31b009c9886b2d0fb8b2/pyyaml-6.0.3-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:7f047e29dcae44602496db43be01ad42fc6f1cc0d8cd6c83d342306c32270196", size = 182063, upload-time = "2025-09-25T21:32:11.445Z" }, + { url = "https://files.pythonhosted.org/packages/89/a0/6cf41a19a1f2f3feab0e9c0b74134aa2ce6849093d5517a0c550fe37a648/pyyaml-6.0.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:fc09d0aa354569bc501d4e787133afc08552722d3ab34836a80547331bb5d4a0", size = 173973, upload-time = "2025-09-25T21:32:12.492Z" }, + { url = "https://files.pythonhosted.org/packages/ed/23/7a778b6bd0b9a8039df8b1b1d80e2e2ad78aa04171592c8a5c43a56a6af4/pyyaml-6.0.3-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9149cad251584d5fb4981be1ecde53a1ca46c891a79788c0df828d2f166bda28", size = 775116, upload-time = "2025-09-25T21:32:13.652Z" }, + { url = "https://files.pythonhosted.org/packages/65/30/d7353c338e12baef4ecc1b09e877c1970bd3382789c159b4f89d6a70dc09/pyyaml-6.0.3-cp312-cp312-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:5fdec68f91a0c6739b380c83b951e2c72ac0197ace422360e6d5a959d8d97b2c", size = 844011, upload-time = "2025-09-25T21:32:15.21Z" }, + { url = "https://files.pythonhosted.org/packages/8b/9d/b3589d3877982d4f2329302ef98a8026e7f4443c765c46cfecc8858c6b4b/pyyaml-6.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ba1cc08a7ccde2d2ec775841541641e4548226580ab850948cbfda66a1befcdc", size = 807870, upload-time = "2025-09-25T21:32:16.431Z" }, + { url = "https://files.pythonhosted.org/packages/05/c0/b3be26a015601b822b97d9149ff8cb5ead58c66f981e04fedf4e762f4bd4/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:8dc52c23056b9ddd46818a57b78404882310fb473d63f17b07d5c40421e47f8e", size = 761089, upload-time = "2025-09-25T21:32:17.56Z" }, + { url = "https://files.pythonhosted.org/packages/be/8e/98435a21d1d4b46590d5459a22d88128103f8da4c2d4cb8f14f2a96504e1/pyyaml-6.0.3-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:41715c910c881bc081f1e8872880d3c650acf13dfa8214bad49ed4cede7c34ea", size = 790181, upload-time = "2025-09-25T21:32:18.834Z" }, + { url = "https://files.pythonhosted.org/packages/74/93/7baea19427dcfbe1e5a372d81473250b379f04b1bd3c4c5ff825e2327202/pyyaml-6.0.3-cp312-cp312-win32.whl", hash = "sha256:96b533f0e99f6579b3d4d4995707cf36df9100d67e0c8303a0c55b27b5f99bc5", size = 137658, upload-time = "2025-09-25T21:32:20.209Z" }, + { url = "https://files.pythonhosted.org/packages/86/bf/899e81e4cce32febab4fb42bb97dcdf66bc135272882d1987881a4b519e9/pyyaml-6.0.3-cp312-cp312-win_amd64.whl", hash = "sha256:5fcd34e47f6e0b794d17de1b4ff496c00986e1c83f7ab2fb8fcfe9616ff7477b", size = 154003, upload-time = "2025-09-25T21:32:21.167Z" }, + { url = "https://files.pythonhosted.org/packages/1a/08/67bd04656199bbb51dbed1439b7f27601dfb576fb864099c7ef0c3e55531/pyyaml-6.0.3-cp312-cp312-win_arm64.whl", hash = "sha256:64386e5e707d03a7e172c0701abfb7e10f0fb753ee1d773128192742712a98fd", size = 140344, upload-time = "2025-09-25T21:32:22.617Z" }, + { url = "https://files.pythonhosted.org/packages/d1/11/0fd08f8192109f7169db964b5707a2f1e8b745d4e239b784a5a1dd80d1db/pyyaml-6.0.3-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:8da9669d359f02c0b91ccc01cac4a67f16afec0dac22c2ad09f46bee0697eba8", size = 181669, upload-time = "2025-09-25T21:32:23.673Z" }, + { url = "https://files.pythonhosted.org/packages/b1/16/95309993f1d3748cd644e02e38b75d50cbc0d9561d21f390a76242ce073f/pyyaml-6.0.3-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:2283a07e2c21a2aa78d9c4442724ec1eb15f5e42a723b99cb3d822d48f5f7ad1", size = 173252, upload-time = "2025-09-25T21:32:25.149Z" }, + { url = "https://files.pythonhosted.org/packages/50/31/b20f376d3f810b9b2371e72ef5adb33879b25edb7a6d072cb7ca0c486398/pyyaml-6.0.3-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ee2922902c45ae8ccada2c5b501ab86c36525b883eff4255313a253a3160861c", size = 767081, upload-time = "2025-09-25T21:32:26.575Z" }, + { url = "https://files.pythonhosted.org/packages/49/1e/a55ca81e949270d5d4432fbbd19dfea5321eda7c41a849d443dc92fd1ff7/pyyaml-6.0.3-cp313-cp313-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a33284e20b78bd4a18c8c2282d549d10bc8408a2a7ff57653c0cf0b9be0afce5", size = 841159, upload-time = "2025-09-25T21:32:27.727Z" }, + { url = "https://files.pythonhosted.org/packages/74/27/e5b8f34d02d9995b80abcef563ea1f8b56d20134d8f4e5e81733b1feceb2/pyyaml-6.0.3-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:0f29edc409a6392443abf94b9cf89ce99889a1dd5376d94316ae5145dfedd5d6", size = 801626, upload-time = "2025-09-25T21:32:28.878Z" }, + { url = "https://files.pythonhosted.org/packages/f9/11/ba845c23988798f40e52ba45f34849aa8a1f2d4af4b798588010792ebad6/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:f7057c9a337546edc7973c0d3ba84ddcdf0daa14533c2065749c9075001090e6", size = 753613, upload-time = "2025-09-25T21:32:30.178Z" }, + { url = "https://files.pythonhosted.org/packages/3d/e0/7966e1a7bfc0a45bf0a7fb6b98ea03fc9b8d84fa7f2229e9659680b69ee3/pyyaml-6.0.3-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:eda16858a3cab07b80edaf74336ece1f986ba330fdb8ee0d6c0d68fe82bc96be", size = 794115, upload-time = "2025-09-25T21:32:31.353Z" }, + { url = "https://files.pythonhosted.org/packages/de/94/980b50a6531b3019e45ddeada0626d45fa85cbe22300844a7983285bed3b/pyyaml-6.0.3-cp313-cp313-win32.whl", hash = "sha256:d0eae10f8159e8fdad514efdc92d74fd8d682c933a6dd088030f3834bc8e6b26", size = 137427, upload-time = "2025-09-25T21:32:32.58Z" }, + { url = "https://files.pythonhosted.org/packages/97/c9/39d5b874e8b28845e4ec2202b5da735d0199dbe5b8fb85f91398814a9a46/pyyaml-6.0.3-cp313-cp313-win_amd64.whl", hash = "sha256:79005a0d97d5ddabfeeea4cf676af11e647e41d81c9a7722a193022accdb6b7c", size = 154090, upload-time = "2025-09-25T21:32:33.659Z" }, + { url = "https://files.pythonhosted.org/packages/73/e8/2bdf3ca2090f68bb3d75b44da7bbc71843b19c9f2b9cb9b0f4ab7a5a4329/pyyaml-6.0.3-cp313-cp313-win_arm64.whl", hash = "sha256:5498cd1645aa724a7c71c8f378eb29ebe23da2fc0d7a08071d89469bf1d2defb", size = 140246, upload-time = "2025-09-25T21:32:34.663Z" }, + { url = "https://files.pythonhosted.org/packages/9d/8c/f4bd7f6465179953d3ac9bc44ac1a8a3e6122cf8ada906b4f96c60172d43/pyyaml-6.0.3-cp314-cp314-macosx_10_13_x86_64.whl", hash = "sha256:8d1fab6bb153a416f9aeb4b8763bc0f22a5586065f86f7664fc23339fc1c1fac", size = 181814, upload-time = "2025-09-25T21:32:35.712Z" }, + { url = "https://files.pythonhosted.org/packages/bd/9c/4d95bb87eb2063d20db7b60faa3840c1b18025517ae857371c4dd55a6b3a/pyyaml-6.0.3-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:34d5fcd24b8445fadc33f9cf348c1047101756fd760b4dacb5c3e99755703310", size = 173809, upload-time = "2025-09-25T21:32:36.789Z" }, + { url = "https://files.pythonhosted.org/packages/92/b5/47e807c2623074914e29dabd16cbbdd4bf5e9b2db9f8090fa64411fc5382/pyyaml-6.0.3-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:501a031947e3a9025ed4405a168e6ef5ae3126c59f90ce0cd6f2bfc477be31b7", size = 766454, upload-time = "2025-09-25T21:32:37.966Z" }, + { url = "https://files.pythonhosted.org/packages/02/9e/e5e9b168be58564121efb3de6859c452fccde0ab093d8438905899a3a483/pyyaml-6.0.3-cp314-cp314-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:b3bc83488de33889877a0f2543ade9f70c67d66d9ebb4ac959502e12de895788", size = 836355, upload-time = "2025-09-25T21:32:39.178Z" }, + { url = "https://files.pythonhosted.org/packages/88/f9/16491d7ed2a919954993e48aa941b200f38040928474c9e85ea9e64222c3/pyyaml-6.0.3-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c458b6d084f9b935061bc36216e8a69a7e293a2f1e68bf956dcd9e6cbcd143f5", size = 794175, upload-time = "2025-09-25T21:32:40.865Z" }, + { url = "https://files.pythonhosted.org/packages/dd/3f/5989debef34dc6397317802b527dbbafb2b4760878a53d4166579111411e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:7c6610def4f163542a622a73fb39f534f8c101d690126992300bf3207eab9764", size = 755228, upload-time = "2025-09-25T21:32:42.084Z" }, + { url = "https://files.pythonhosted.org/packages/d7/ce/af88a49043cd2e265be63d083fc75b27b6ed062f5f9fd6cdc223ad62f03e/pyyaml-6.0.3-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:5190d403f121660ce8d1d2c1bb2ef1bd05b5f68533fc5c2ea899bd15f4399b35", size = 789194, upload-time = "2025-09-25T21:32:43.362Z" }, + { url = "https://files.pythonhosted.org/packages/23/20/bb6982b26a40bb43951265ba29d4c246ef0ff59c9fdcdf0ed04e0687de4d/pyyaml-6.0.3-cp314-cp314-win_amd64.whl", hash = "sha256:4a2e8cebe2ff6ab7d1050ecd59c25d4c8bd7e6f400f5f82b96557ac0abafd0ac", size = 156429, upload-time = "2025-09-25T21:32:57.844Z" }, + { url = "https://files.pythonhosted.org/packages/f4/f4/a4541072bb9422c8a883ab55255f918fa378ecf083f5b85e87fc2b4eda1b/pyyaml-6.0.3-cp314-cp314-win_arm64.whl", hash = "sha256:93dda82c9c22deb0a405ea4dc5f2d0cda384168e466364dec6255b293923b2f3", size = 143912, upload-time = "2025-09-25T21:32:59.247Z" }, + { url = "https://files.pythonhosted.org/packages/7c/f9/07dd09ae774e4616edf6cda684ee78f97777bdd15847253637a6f052a62f/pyyaml-6.0.3-cp314-cp314t-macosx_10_13_x86_64.whl", hash = "sha256:02893d100e99e03eda1c8fd5c441d8c60103fd175728e23e431db1b589cf5ab3", size = 189108, upload-time = "2025-09-25T21:32:44.377Z" }, + { url = "https://files.pythonhosted.org/packages/4e/78/8d08c9fb7ce09ad8c38ad533c1191cf27f7ae1effe5bb9400a46d9437fcf/pyyaml-6.0.3-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:c1ff362665ae507275af2853520967820d9124984e0f7466736aea23d8611fba", size = 183641, upload-time = "2025-09-25T21:32:45.407Z" }, + { url = "https://files.pythonhosted.org/packages/7b/5b/3babb19104a46945cf816d047db2788bcaf8c94527a805610b0289a01c6b/pyyaml-6.0.3-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:6adc77889b628398debc7b65c073bcb99c4a0237b248cacaf3fe8a557563ef6c", size = 831901, upload-time = "2025-09-25T21:32:48.83Z" }, + { url = "https://files.pythonhosted.org/packages/8b/cc/dff0684d8dc44da4d22a13f35f073d558c268780ce3c6ba1b87055bb0b87/pyyaml-6.0.3-cp314-cp314t-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl", hash = "sha256:a80cb027f6b349846a3bf6d73b5e95e782175e52f22108cfa17876aaeff93702", size = 861132, upload-time = "2025-09-25T21:32:50.149Z" }, + { url = "https://files.pythonhosted.org/packages/b1/5e/f77dc6b9036943e285ba76b49e118d9ea929885becb0a29ba8a7c75e29fe/pyyaml-6.0.3-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:00c4bdeba853cc34e7dd471f16b4114f4162dc03e6b7afcc2128711f0eca823c", size = 839261, upload-time = "2025-09-25T21:32:51.808Z" }, + { url = "https://files.pythonhosted.org/packages/ce/88/a9db1376aa2a228197c58b37302f284b5617f56a5d959fd1763fb1675ce6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:66e1674c3ef6f541c35191caae2d429b967b99e02040f5ba928632d9a7f0f065", size = 805272, upload-time = "2025-09-25T21:32:52.941Z" }, + { url = "https://files.pythonhosted.org/packages/da/92/1446574745d74df0c92e6aa4a7b0b3130706a4142b2d1a5869f2eaa423c6/pyyaml-6.0.3-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:16249ee61e95f858e83976573de0f5b2893b3677ba71c9dd36b9cf8be9ac6d65", size = 829923, upload-time = "2025-09-25T21:32:54.537Z" }, + { url = "https://files.pythonhosted.org/packages/f0/7a/1c7270340330e575b92f397352af856a8c06f230aa3e76f86b39d01b416a/pyyaml-6.0.3-cp314-cp314t-win_amd64.whl", hash = "sha256:4ad1906908f2f5ae4e5a8ddfce73c320c2a1429ec52eafd27138b7f1cbe341c9", size = 174062, upload-time = "2025-09-25T21:32:55.767Z" }, + { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, +] + +[[package]] +name = "pyyaml-env-tag" +version = "1.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pyyaml" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/eb/2e/79c822141bfd05a853236b504869ebc6b70159afc570e1d5a20641782eaa/pyyaml_env_tag-1.1.tar.gz", hash = "sha256:2eb38b75a2d21ee0475d6d97ec19c63287a7e140231e4214969d0eac923cd7ff", size = 5737, upload-time = "2025-05-13T15:24:01.64Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/11/432f32f8097b03e3cd5fe57e88efb685d964e2e5178a48ed61e841f7fdce/pyyaml_env_tag-1.1-py3-none-any.whl", hash = "sha256:17109e1a528561e32f026364712fee1264bc2ea6715120891174ed1b980d2e04", size = 4722, upload-time = "2025-05-13T15:23:59.629Z" }, +] + +[[package]] +name = "requests" +version = "2.32.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "certifi" }, + { name = "charset-normalizer" }, + { name = "idna" }, + { name = "urllib3" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/c9/74/b3ff8e6c8446842c3f5c837e9c3dfcfe2018ea6ecef224c710c85ef728f4/requests-2.32.5.tar.gz", hash = "sha256:dbba0bac56e100853db0ea71b82b4dfd5fe2bf6d3754a8893c3af500cec7d7cf", size = 134517, upload-time = "2025-08-18T20:46:02.573Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/1e/db/4254e3eabe8020b458f1a747140d32277ec7a271daf1d235b70dc0b4e6e3/requests-2.32.5-py3-none-any.whl", hash = "sha256:2462f94637a34fd532264295e186976db0f5d453d1cdd31473c85a6a161affb6", size = 64738, upload-time = "2025-08-18T20:46:00.542Z" }, +] + +[[package]] +name = "six" +version = "1.17.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031, upload-time = "2024-12-04T17:35:28.174Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" }, +] + +[[package]] +name = "urllib3" +version = "2.6.3" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/c7/24/5f1b3bdffd70275f6661c76461e25f024d5a38a46f04aaca912426a2b1d3/urllib3-2.6.3.tar.gz", hash = "sha256:1b62b6884944a57dbe321509ab94fd4d3b307075e0c2eae991ac71ee15ad38ed", size = 435556, upload-time = "2026-01-07T16:24:43.925Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/39/08/aaaad47bc4e9dc8c725e68f9d04865dbcb2052843ff09c97b08904852d84/urllib3-2.6.3-py3-none-any.whl", hash = "sha256:bf272323e553dfb2e87d9bfd225ca7b0f467b919d7bbd355436d3fd37cb0acd4", size = 131584, upload-time = "2026-01-07T16:24:42.685Z" }, +] + +[[package]] +name = "verspec" +version = "0.1.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/e7/44/8126f9f0c44319b2efc65feaad589cadef4d77ece200ae3c9133d58464d0/verspec-0.1.0.tar.gz", hash = "sha256:c4504ca697b2056cdb4bfa7121461f5a0e81809255b41c03dda4ba823637c01e", size = 27123, upload-time = "2020-11-30T02:24:09.646Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a4/ce/3b6fee91c85626eaf769d617f1be9d2e15c1cca027bbdeb2e0d751469355/verspec-0.1.0-py3-none-any.whl", hash = "sha256:741877d5633cc9464c45a469ae2a31e801e6dbbaa85b9675d481cda100f11c31", size = 19640, upload-time = "2020-11-30T02:24:08.387Z" }, +] + +[[package]] +name = "watchdog" +version = "6.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/db/7d/7f3d619e951c88ed75c6037b246ddcf2d322812ee8ea189be89511721d54/watchdog-6.0.0.tar.gz", hash = "sha256:9ddf7c82fda3ae8e24decda1338ede66e1c99883db93711d8fb941eaa2d8c282", size = 131220, upload-time = "2024-11-01T14:07:13.037Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/e0/24/d9be5cd6642a6aa68352ded4b4b10fb0d7889cb7f45814fb92cecd35f101/watchdog-6.0.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:6eb11feb5a0d452ee41f824e271ca311a09e250441c262ca2fd7ebcf2461a06c", size = 96393, upload-time = "2024-11-01T14:06:31.756Z" }, + { url = "https://files.pythonhosted.org/packages/63/7a/6013b0d8dbc56adca7fdd4f0beed381c59f6752341b12fa0886fa7afc78b/watchdog-6.0.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:ef810fbf7b781a5a593894e4f439773830bdecb885e6880d957d5b9382a960d2", size = 88392, upload-time = "2024-11-01T14:06:32.99Z" }, + { url = "https://files.pythonhosted.org/packages/d1/40/b75381494851556de56281e053700e46bff5b37bf4c7267e858640af5a7f/watchdog-6.0.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:afd0fe1b2270917c5e23c2a65ce50c2a4abb63daafb0d419fde368e272a76b7c", size = 89019, upload-time = "2024-11-01T14:06:34.963Z" }, + { url = "https://files.pythonhosted.org/packages/39/ea/3930d07dafc9e286ed356a679aa02d777c06e9bfd1164fa7c19c288a5483/watchdog-6.0.0-cp312-cp312-macosx_10_13_universal2.whl", hash = "sha256:bdd4e6f14b8b18c334febb9c4425a878a2ac20efd1e0b231978e7b150f92a948", size = 96471, upload-time = "2024-11-01T14:06:37.745Z" }, + { url = "https://files.pythonhosted.org/packages/12/87/48361531f70b1f87928b045df868a9fd4e253d9ae087fa4cf3f7113be363/watchdog-6.0.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:c7c15dda13c4eb00d6fb6fc508b3c0ed88b9d5d374056b239c4ad1611125c860", size = 88449, upload-time = "2024-11-01T14:06:39.748Z" }, + { url = "https://files.pythonhosted.org/packages/5b/7e/8f322f5e600812e6f9a31b75d242631068ca8f4ef0582dd3ae6e72daecc8/watchdog-6.0.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:6f10cb2d5902447c7d0da897e2c6768bca89174d0c6e1e30abec5421af97a5b0", size = 89054, upload-time = "2024-11-01T14:06:41.009Z" }, + { url = "https://files.pythonhosted.org/packages/68/98/b0345cabdce2041a01293ba483333582891a3bd5769b08eceb0d406056ef/watchdog-6.0.0-cp313-cp313-macosx_10_13_universal2.whl", hash = "sha256:490ab2ef84f11129844c23fb14ecf30ef3d8a6abafd3754a6f75ca1e6654136c", size = 96480, upload-time = "2024-11-01T14:06:42.952Z" }, + { url = "https://files.pythonhosted.org/packages/85/83/cdf13902c626b28eedef7ec4f10745c52aad8a8fe7eb04ed7b1f111ca20e/watchdog-6.0.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:76aae96b00ae814b181bb25b1b98076d5fc84e8a53cd8885a318b42b6d3a5134", size = 88451, upload-time = "2024-11-01T14:06:45.084Z" }, + { url = "https://files.pythonhosted.org/packages/fe/c4/225c87bae08c8b9ec99030cd48ae9c4eca050a59bf5c2255853e18c87b50/watchdog-6.0.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:a175f755fc2279e0b7312c0035d52e27211a5bc39719dd529625b1930917345b", size = 89057, upload-time = "2024-11-01T14:06:47.324Z" }, + { url = "https://files.pythonhosted.org/packages/a9/c7/ca4bf3e518cb57a686b2feb4f55a1892fd9a3dd13f470fca14e00f80ea36/watchdog-6.0.0-py3-none-manylinux2014_aarch64.whl", hash = "sha256:7607498efa04a3542ae3e05e64da8202e58159aa1fa4acddf7678d34a35d4f13", size = 79079, upload-time = "2024-11-01T14:06:59.472Z" }, + { url = "https://files.pythonhosted.org/packages/5c/51/d46dc9332f9a647593c947b4b88e2381c8dfc0942d15b8edc0310fa4abb1/watchdog-6.0.0-py3-none-manylinux2014_armv7l.whl", hash = "sha256:9041567ee8953024c83343288ccc458fd0a2d811d6a0fd68c4c22609e3490379", size = 79078, upload-time = "2024-11-01T14:07:01.431Z" }, + { url = "https://files.pythonhosted.org/packages/d4/57/04edbf5e169cd318d5f07b4766fee38e825d64b6913ca157ca32d1a42267/watchdog-6.0.0-py3-none-manylinux2014_i686.whl", hash = "sha256:82dc3e3143c7e38ec49d61af98d6558288c415eac98486a5c581726e0737c00e", size = 79076, upload-time = "2024-11-01T14:07:02.568Z" }, + { url = "https://files.pythonhosted.org/packages/ab/cc/da8422b300e13cb187d2203f20b9253e91058aaf7db65b74142013478e66/watchdog-6.0.0-py3-none-manylinux2014_ppc64.whl", hash = "sha256:212ac9b8bf1161dc91bd09c048048a95ca3a4c4f5e5d4a7d1b1a7d5752a7f96f", size = 79077, upload-time = "2024-11-01T14:07:03.893Z" }, + { url = "https://files.pythonhosted.org/packages/2c/3b/b8964e04ae1a025c44ba8e4291f86e97fac443bca31de8bd98d3263d2fcf/watchdog-6.0.0-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:e3df4cbb9a450c6d49318f6d14f4bbc80d763fa587ba46ec86f99f9e6876bb26", size = 79078, upload-time = "2024-11-01T14:07:05.189Z" }, + { url = "https://files.pythonhosted.org/packages/62/ae/a696eb424bedff7407801c257d4b1afda455fe40821a2be430e173660e81/watchdog-6.0.0-py3-none-manylinux2014_s390x.whl", hash = "sha256:2cce7cfc2008eb51feb6aab51251fd79b85d9894e98ba847408f662b3395ca3c", size = 79077, upload-time = "2024-11-01T14:07:06.376Z" }, + { url = "https://files.pythonhosted.org/packages/b5/e8/dbf020b4d98251a9860752a094d09a65e1b436ad181faf929983f697048f/watchdog-6.0.0-py3-none-manylinux2014_x86_64.whl", hash = "sha256:20ffe5b202af80ab4266dcd3e91aae72bf2da48c0d33bdb15c66658e685e94e2", size = 79078, upload-time = "2024-11-01T14:07:07.547Z" }, + { url = "https://files.pythonhosted.org/packages/07/f6/d0e5b343768e8bcb4cda79f0f2f55051bf26177ecd5651f84c07567461cf/watchdog-6.0.0-py3-none-win32.whl", hash = "sha256:07df1fdd701c5d4c8e55ef6cf55b8f0120fe1aef7ef39a1c6fc6bc2e606d517a", size = 79065, upload-time = "2024-11-01T14:07:09.525Z" }, + { url = "https://files.pythonhosted.org/packages/db/d9/c495884c6e548fce18a8f40568ff120bc3a4b7b99813081c8ac0c936fa64/watchdog-6.0.0-py3-none-win_amd64.whl", hash = "sha256:cbafb470cf848d93b5d013e2ecb245d4aa1c8fd0504e863ccefa32445359d680", size = 79070, upload-time = "2024-11-01T14:07:10.686Z" }, + { url = "https://files.pythonhosted.org/packages/33/e8/e40370e6d74ddba47f002a32919d91310d6074130fe4e17dabcafc15cbf1/watchdog-6.0.0-py3-none-win_ia64.whl", hash = "sha256:a1914259fa9e1454315171103c6a30961236f508b9b623eae470268bbcc6a22f", size = 79067, upload-time = "2024-11-01T14:07:11.845Z" }, +] diff --git a/website/md-docs/api-overview/README.md b/website/md-docs/api-overview/README.md new file mode 100644 index 000000000..343fb046b --- /dev/null +++ b/website/md-docs/api-overview/README.md @@ -0,0 +1,15 @@ +--- +description: >- + This section covers various topics of Lua implementation in EdgeTX operating + system system +--- + +# API Overview + +| Topic | Description | +| --- | --- | +| [Lua version and included libraries](version-libraries/README.md) | Explains the embedded Lua version used by EdgeTX and which standard libraries are available or limited. | +| [Script Types](script-types/README.md) | Covers the supported EdgeTX Lua script categories and helps you choose the right script type for your use case. | +| [Constants](constants/README.md) | Collects shared constants, flags, events, and units used throughout the Lua docs and API reference. | +| [Sources and Switches](internal-indexes/README.md) | Reference tables for source and switch names, positions, and IDs used by the Lua API. | +| [Fonts](fonts.md) | Summarizes the available font identifiers and text rendering options used by EdgeTX display functions. | diff --git a/website/md-docs/api-overview/constants/README.md b/website/md-docs/api-overview/constants/README.md new file mode 100644 index 000000000..2257c10c9 --- /dev/null +++ b/website/md-docs/api-overview/constants/README.md @@ -0,0 +1,21 @@ +--- +description: This section describes various constants that are provided for Lua by EdgeTX. +--- + +# Constants + +This section describes various constants that are provided for Lua by EdgeTX. + +| Topic | Description | +| --- | --- | +| [Key Events](key-event-constants.md) | Key input event constants returned to Lua scripts. | +| [Touch Events](touch-event-constants.md) | Touch interaction event constants for radios with touch support. | +| [Flags and Patterns](flags-and-pattern-constants.md) | Drawing flags, font flags, and fill/pattern constants used by LCD APIs. | +| [Colors](color-constants.md) | Color constants and indexed color helpers for color LCD radios. | +| [Screen size](screen-constants.md) | Screen-related constants and display-size helpers. | +| [Logical Switch Functions](logical-switch-function-constants.md) | Function constants used by logical switch APIs. | +| [Special Functions](special-function-constants.md) | Special function constants used by model configuration APIs. | +| [Special Characters](special-character-constants.md) | Character constants that appear in source and switch labels. | +| [Widget Options](widget-options.md) | Constants used when defining widget option metadata. | +| [LVGL Constants](lvgl-constants.md) | LVGL-specific layout, picker, scrolling, and object-construction constants. | +| [Units](units.md) | Unit constants used by telemetry and value-display APIs. | diff --git a/website/md-docs/api-overview/constants/color-constants.md b/website/md-docs/api-overview/constants/color-constants.md new file mode 100644 index 000000000..9bb72d2b4 --- /dev/null +++ b/website/md-docs/api-overview/constants/color-constants.md @@ -0,0 +1,91 @@ +--- +description: >- + On radios with color display, a color may be added to the flags described + above. +--- + +# Color Constants + +There are two types of color constants: one that is an index into a table holding a palette of theme colors, and one that is just a color. + +## Indexed colors + +These are the theme colors plus CUSTOM\_COLOR, and they can be changed with the function lcd.setColor\(color\_index, color\). + +!!! note + + If an indexed color is changed, it changes everywhere that it is used. For the theme colors, this is not only in other widgets, but everywhere throughout the radio's user interface. + +| Color constant name | Default theme color | +| :--- | :--- | +| `COLOR_THEME_PRIMARY1` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#000000; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `COLOR_THEME_PRIMARY2` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#ffffff; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `COLOR_THEME_PRIMARY3` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#0c3f66; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `COLOR_THEME_SECONDARY1` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#125e99; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `COLOR_THEME_SECONDARY2` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#b6e0f2; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `COLOR_THEME_SECONDARY3` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#e4eef2; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `COLOR_THEME_FOCUS` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#14a1e5; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `COLOR_THEME_EDIT` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#009909; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `COLOR_THEME_ACTIVE` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#ffde00; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `COLOR_THEME_WARNING` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#e00000; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `COLOR_THEME_DISABLED` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#8c8c8c; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `CUSTOM_COLOR` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#aa5500; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | + +## Literal colors + +These color constants cannot be changed: + +| Color constant name | Fixed color | +| :--- | :--- | +| `BLACK` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#000000; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `WHITE` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#ffffff; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `LIGHTWHITE` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#eaeaea; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `YELLOW` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#ffff00; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `BLUE` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#0000ff; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `DARKBLUE` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#0000a0; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `GREY` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#606060; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `DARKGREY` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#404040; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `LIGHTGREY` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#c0c0c0; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `RED` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#ff0000; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `DARKRED` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#a00000; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `GREEN` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#00ff00; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `DARKGREEN` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#00a000; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `LIGHTBROWN` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#9c6d20; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `DARKBROWN` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#6a4810; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `BRIGHTGREEN` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#00b43c; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | +| `ORANGE` | <span style="display:inline-block; width:1.5rem; height:1.5rem; background:#e5641e; border:1px solid #cbd5e1; border-radius:0.2rem; vertical-align:middle;"></span> | + +## Deprecated color constants + +These should no longer be used, but they are included for backwards compatibility. The old OpenTX API had a large number of indexed theme colors, and these have been mapped to the new theme colors as follows: + +| Deprecated constant | Replacement | +| :--- | :--- | +| `ALARM_COLOR` | `COLOR_THEME_WARNING` | +| `BARGRAPH_BGCOLOR` | `COLOR_THEME_SECONDARY3` | +| `BARGRAPH1_COLOR` | `COLOR_THEME_SECONDARY1` | +| `BARGRAPH2_COLOR` | `COLOR_THEME_SECONDARY2` | +| `CURVE_AXIS_COLOR` | `COLOR_THEME_SECONDARY2` | +| `CURVE_COLOR` | `COLOR_THEME_SECONDARY1` | +| `CURVE_CURSOR_COLOR` | `COLOR_THEME_WARNING` | +| `HEADER_BGCOLOR` | `COLOR_THEME_FOCUS` | +| `HEADER_COLOR` | `COLOR_THEME_SECONDARY1` | +| `HEADER_CURRENT_BGCOLOR` | `COLOR_THEME_FOCUS` | +| `HEADER_ICON_BGCOLOR` | `COLOR_THEME_SECONDARY1` | +| `LINE_COLOR` | `COLOR_THEME_PRIMARY3` | +| `MAINVIEW_GRAPHICS_COLOR` | `COLOR_THEME_SECONDARY1` | +| `MAINVIEW_PANES_COLOR` | `COLOR_THEME_PRIMARY2` | +| `MENU_TITLE_BGCOLOR` | `COLOR_THEME_SECONDARY1` | +| `MENU_TITLE_COLOR` | `COLOR_THEME_PRIMARY2` | +| `MENU_TITLE_DISABLE_COLOR` | `COLOR_THEME_PRIMARY3` | +| `OVERLAY_COLOR` | `COLOR_THEME_PRIMARY1` | +| `SCROLLBOX_COLOR` | `COLOR_THEME_SECONDARY3` | +| `TEXT_BGCOLOR` | `COLOR_THEME_SECONDARY3` | +| `TEXT_COLOR` | `COLOR_THEME_SECONDARY1` | +| `TEXT_DISABLE_COLOR` | `COLOR_THEME_DISABLED` | +| `TEXT_INVERTED_BGCOLOR` | `COLOR_THEME_FOCUS` | +| `TEXT_INVERTED_COLOR` | `COLOR_THEME_PRIMARY2` | +| `TITLE_BGCOLOR` | `COLOR_THEME_SECONDARY1` | +| `TRIM_BGCOLOR` | `COLOR_THEME_FOCUS` | +| `TRIM_SHADOW_COLOR` | `COLOR_THEME_PRIMARY1` | +| `WARNING_COLOR` | `COLOR_THEME_WARNING` | diff --git a/website/md-docs/api-overview/constants/flags-and-pattern-constants.md b/website/md-docs/api-overview/constants/flags-and-pattern-constants.md new file mode 100644 index 000000000..e258e6c17 --- /dev/null +++ b/website/md-docs/api-overview/constants/flags-and-pattern-constants.md @@ -0,0 +1,43 @@ +--- +description: >- + Many of the lcd functions accept parameters named flags and patterns. The + names and their meanings are described below. +--- + +# Flags and Pattern Constants + +## lcd.drawText Flags + +| Name | Description | EdgeTX ver | Notes | +| :--- | :--- | :--- | :--- | +| `0` | normal font, default precision for numeric | 2.3 | | +| `XXLSIZE` | jumbo font | 2.3 | | +| `DBLSIZE` | double size font | 2.3 | | +| `MIDSIZE` | mid sized font | 2.3 | | +| `SMLSIZE` | small font | 2.3 | | +| `BOLD` | bold font | 2.3 | Only color displays. This is a font size on its own - cannot be combined with other font size flags. | +| `SHADOWED` | shadow font | 2.3 | Only color displays | +| `INVERS` | inverted display | 2.3 | | +| `BLINK` | blinking text | 2.3 | | +| `LEFT` | left justify | 2.3 | Default for most functions not related to bitmaps | +| `RIGHT` | right justify | 2.3 | | +| `CENTER` | center justify | 2.3 | Only color displays | +| `VCENTER` | center vertically | 2.5.0 | Only color displays | +| `PREC1` | single decimal place | 2.3 | display with one decimal place (number 386 is displayed as 38.6) | +| `PREC2` | two decimal places | 2.3 | display with one decimal place (number 386 is displayed as 3.86) | +| `GREY_DEFAULT` | grey fill | 2.3 | | +| `TIMEHOUR` | display hours | 2.3 | Only for lcd/drawTimer | + +## lcd drawing functions flags on B&W LCD radios + +| Name | Description | EdgeTX ver | Notes | +| :--- | :--- | :--- | :--- | +| `FORCE` | pixels will be black | 2.3 | | +| `ERASE` | pixels will be white | 2.3 | | + +## lcd.drawLine function patterns + +| Name | Description | EdgeTX ver | Notes | +| :--- | :--- | :--- | :--- | +| `SOLID` | lines will appear soild | 2.3 | | +| `DOTTED` | lines will appear dotted | 2.3 | | diff --git a/website/md-docs/api-overview/constants/key-event-constants.md b/website/md-docs/api-overview/constants/key-event-constants.md new file mode 100644 index 000000000..12876fbb4 --- /dev/null +++ b/website/md-docs/api-overview/constants/key-event-constants.md @@ -0,0 +1,93 @@ +--- +description: Key and virtual event constants passed to Lua script event handlers. +--- + +# Key Event Constants + +## `EVT_...` constants + +| Constant name | Meaning | +| --- | --- | +| `EVT_ENTER_FIRST` | ENTER key pressed | +| `EVT_ENTER_BREAK` | ENTER key released | +| `EVT_ENTER_LONG` | ENTER long press | +| `EVT_ENTER_REPT` | ENTER repeat while held | +| `EVT_MENU_FIRST` | MENU key pressed | +| `EVT_MENU_BREAK` | MENU key released | +| `EVT_MENU_LONG` | MENU long press | +| `EVT_MENU_REPT` | MENU repeat while held | +| `EVT_TELEM_FIRST` | TELE key pressed | +| `EVT_TELEM_BREAK` | TELE key released | +| `EVT_TELEM_LONG` | TELE long press | +| `EVT_TELEM_REPT` | TELE repeat while held | +| `EVT_MODEL_FIRST` | MODEL key pressed | +| `EVT_MODEL_BREAK` | MODEL key released | +| `EVT_MODEL_LONG` | MODEL long press | +| `EVT_MODEL_REPT` | MODEL repeat while held | +| `EVT_SYS_FIRST` | SYS key pressed | +| `EVT_SYS_BREAK` | SYS key released | +| `EVT_SYS_LONG` | SYS long press | +| `EVT_SYS_REPT` | SYS repeat while held | +| `EVT_UP_FIRST` | UP key pressed | +| `EVT_UP_BREAK` | UP key released | +| `EVT_UP_LONG` | UP long press | +| `EVT_UP_REPT` | UP repeat while held | +| `EVT_DOWN_FIRST` | DOWN key pressed | +| `EVT_DOWN_BREAK` | DOWN key released | +| `EVT_DOWN_LONG` | DOWN long press | +| `EVT_DOWN_REPT` | DOWN repeat while held | +| `EVT_LEFT_FIRST` | LEFT key pressed | +| `EVT_LEFT_BREAK` | LEFT key released | +| `EVT_LEFT_LONG` | LEFT long press | +| `EVT_LEFT_REPT` | LEFT repeat while held | +| `EVT_RIGHT_FIRST` | RIGHT key pressed | +| `EVT_RIGHT_BREAK` | RIGHT key released | +| `EVT_RIGHT_LONG` | RIGHT long press | +| `EVT_RIGHT_REPT` | RIGHT repeat while held | +| `EVT_PAGEUP_FIRST` | PAGE UP key pressed | +| `EVT_PAGEUP_BREAK` | PAGE UP key released | +| `EVT_PAGEUP_LONG` | PAGE UP long press | +| `EVT_PAGEUP_REPT` | PAGE UP repeat while held | +| `EVT_PAGEDN_FIRST` | PAGE DOWN key pressed | +| `EVT_PAGEDN_BREAK` | PAGE DOWN key released | +| `EVT_PAGEDN_LONG` | PAGE DOWN long/alternate page action | +| `EVT_PAGEDN_REPT` | PAGE DOWN repeat while held | +| `EVT_PAGE_FIRST` | PAGE key pressed on radios with a combined page key | +| `EVT_PAGE_BREAK` | PAGE key released on radios with a combined page key | +| `EVT_PAGE_LONG` | PAGE long press on radios with a combined page key | +| `EVT_PAGE_REPT` | PAGE repeat on radios with a combined page key | +| `EVT_PLUS_FIRST` | PLUS key pressed | +| `EVT_PLUS_BREAK` | PLUS key released | +| `EVT_PLUS_LONG` | PLUS long press | +| `EVT_PLUS_REPT` | PLUS repeat while held | +| `EVT_MINUS_FIRST` | MINUS key pressed | +| `EVT_MINUS_BREAK` | MINUS key released | +| `EVT_MINUS_LONG` | MINUS long press | +| `EVT_MINUS_REPT` | MINUS repeat while held | +| `EVT_SHIFT_FIRST` | SHIFT key pressed | +| `EVT_SHIFT_BREAK` | SHIFT key released | +| `EVT_SHIFT_LONG` | SHIFT long press | +| `EVT_SHIFT_REPT` | SHIFT repeat while held | +| `EVT_ROT_LEFT` | Rotary encoder rotated left | +| `EVT_ROT_RIGHT` | Rotary encoder rotated right | +| `EVT_EXIT_BREAK` | EXIT key released | + +## `EVT_VIRTUAL_...` constants + +| Constant name | Meaning | +| --- | --- | +| `EVT_VIRTUAL_PREV` | Previous field/navigation action | +| `EVT_VIRTUAL_PREV_REPT` | Previous field/navigation repeat | +| `EVT_VIRTUAL_NEXT` | Next field/navigation action | +| `EVT_VIRTUAL_NEXT_REPT` | Next field/navigation repeat | +| `EVT_VIRTUAL_DEC` | Decrease current value | +| `EVT_VIRTUAL_DEC_REPT` | Decrease current value repeatedly | +| `EVT_VIRTUAL_INC` | Increase current value | +| `EVT_VIRTUAL_INC_REPT` | Increase current value repeatedly | +| `EVT_VIRTUAL_PREV_PAGE` | Previous page action | +| `EVT_VIRTUAL_NEXT_PAGE` | Next page action | +| `EVT_VIRTUAL_MENU` | Open menu action | +| `EVT_VIRTUAL_MENU_LONG` | Long menu action | +| `EVT_VIRTUAL_ENTER` | Enter/confirm action | +| `EVT_VIRTUAL_ENTER_LONG` | Long enter/confirm action | +| `EVT_VIRTUAL_EXIT` | Exit/back action | diff --git a/lua-api-reference/constants/key_events.md b/website/md-docs/api-overview/constants/key_events.md similarity index 83% rename from lua-api-reference/constants/key_events.md rename to website/md-docs/api-overview/constants/key_events.md index 33f682306..ece069b22 100644 --- a/lua-api-reference/constants/key_events.md +++ b/website/md-docs/api-overview/constants/key_events.md @@ -22,14 +22,14 @@ 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)](../general-functions-less-than-greater-than-luadoc-begin-general/killevents.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/key-inputs/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` ## Constants -The `event` parameter in the [Telemetry](../../part\_i\_-\_script\_type\_overview/telemetry.md) and [One-Time](https://github.com/opentx/opentx-2-3-lua-reference-guide/tree/0d355d19f1961b689994cf78b84005864d33f9b5/one-time\_scripts.md) scripts run function actually carries two pieces of information: +The `event` parameter in the [Telemetry](../script-types/telemetry-scripts.md) and [One-Time](../script-types/one-time-scripts.md) scripts run function actually carries two pieces of information: * key number * type of event @@ -62,7 +62,7 @@ Radios with rotary encoder (X7 and Horus) have also: ## Virtual events -Given the large number of radios supported by OpenTX, and the large difference in keys available on those, a set of VIRTUAL KEYS has been defined and are mapped to best fit available hardware +Given the large number of radios supported by EdgeTX, and the large difference in keys available on those, a set of VIRTUAL KEYS has been defined and are mapped to best fit available hardware | Virtual Key Event Name | Comments | | :-----------------------: | :-------------------: | diff --git a/website/md-docs/api-overview/constants/logical-switch-function-constants.md b/website/md-docs/api-overview/constants/logical-switch-function-constants.md new file mode 100644 index 000000000..6bb5423a2 --- /dev/null +++ b/website/md-docs/api-overview/constants/logical-switch-function-constants.md @@ -0,0 +1,27 @@ +--- +description: These constants are used with logical switch functions. +--- + +# Logical Switch Function Constants + +| Constant name | Meaning | +| --- | --- | +| `LS_FUNC_NONE` | No function | +| `LS_FUNC_VEQUAL` | `a = x` | +| `LS_FUNC_VALMOSTEQUAL` | `a ~ x` | +| `LS_FUNC_VPOS` | `a > x` | +| `LS_FUNC_VNEG` | `a < x` | +| `LS_FUNC_RANGE` | Value within range | +| `LS_FUNC_APOS` | `a > |x|` | +| `LS_FUNC_ANEG` | `a < |x|` | +| `LS_FUNC_AND` | `AND` | +| `LS_FUNC_OR` | `OR` | +| `LS_FUNC_XOR` | `XOR` | +| `LS_FUNC_EDGE` | Edge | +| `LS_FUNC_EQUAL` | `a = b` | +| `LS_FUNC_GREATER` | `a > b` | +| `LS_FUNC_LESS` | `a < b` | +| `LS_FUNC_DIFFEGREATER` | `∆ ≥ x` | +| `LS_FUNC_ADIFFEGREATER` | `|∆| ≥ x` | +| `LS_FUNC_TIMER` | Timer | +| `LS_FUNC_STICKY` | Sticky | diff --git a/website/md-docs/api-overview/constants/lvgl-constants.md b/website/md-docs/api-overview/constants/lvgl-constants.md new file mode 100644 index 000000000..1a92d6314 --- /dev/null +++ b/website/md-docs/api-overview/constants/lvgl-constants.md @@ -0,0 +1,115 @@ +--- +description: LVGL-specific constants used for layout, pickers, scrolling, and object construction. +--- + +# LVGL Constants + +These constants are specific to the LVGL UI layer used on color-screen radios. They are most useful when building layouts, constraining picker controls, or creating objects dynamically. + +For the broader LVGL guide, see [Using LVGL Library](../../programming/core-concepts/lvgl-for-lua.md). For the constructor pages, see [Display LVGL](../../api-reference/display-lvgl/index.md). + +## Layout and Padding + +| Name | Description | +| --- | --- | +| `lvgl.FLOW_ROW` | Flex layout flow in rows. | +| `lvgl.FLOW_COLUMN` | Flex layout flow in columns. | +| `lvgl.PAD_TINY` | `2` pixel padding. | +| `lvgl.PAD_SMALL` | `4` pixel padding. | +| `lvgl.PAD_MEDIUM` | `6` pixel padding. | +| `lvgl.PAD_LARGE` | `8` pixel padding. | +| `lvgl.PAD_OUTLINE` | Padding needed around controls for the focus outline. | +| `lvgl.PAD_BORDER` | Default border padding around controls. | + +## Source Picker Filters + +These constants limit what can be selected by `lvgl.source`. + +| Name | Description | +| --- | --- | +| `lvgl.SRC_ALL` | Allow all source types and enable `Clear` and `Invert`. | +| `lvgl.SRC_INPUT` | Inputs. | +| `lvgl.SRC_STICK` | Analog sticks. | +| `lvgl.SRC_POT` | Pots and sliders. | +| `lvgl.SRC_SWITCH` | Switches. | +| `lvgl.SRC_CHANNEL` | Outputs. | +| `lvgl.SRC_TRIM` | Trims. | +| `lvgl.SRC_LOGICAL_SWITCH` | Logical switches. | +| `lvgl.SRC_GVAR` | Global variables. | +| `lvgl.SRC_LUA` | Lua mix-script outputs. | +| `lvgl.SRC_OTHER` | MIN, MAX, timers, battery, and other sources. | +| `lvgl.SRC_HELI` | Heli channels. | +| `lvgl.SRC_TRAINER` | Trainer channels. | +| `lvgl.SRC_TELEM` | Telemetry sensors. | +| `lvgl.SRC_CLEAR` | Controls the `Clear` button in the source chooser. | +| `lvgl.SRC_INVERT` | Controls the `Invert` button in the source chooser. | + +## Switch Picker Filters + +These constants limit what can be selected by `lvgl.switch`. + +| Name | Description | +| --- | --- | +| `lvgl.SW_ALL` | Allow all switch types and enable `Clear`. | +| `lvgl.SW_SWITCH` | Physical switches. | +| `lvgl.SW_TRIM` | Trims. | +| `lvgl.SW_LOGICAL_SWITCH` | Logical switches. | +| `lvgl.SW_FLIGHT_MODE` | Flight modes. | +| `lvgl.SW_TELEM` | Telemetry-driven switches. | +| `lvgl.SW_OTHER` | `ON`, `ONE`, trainer connected, radio activity, and similar sources. | +| `lvgl.SW_CLEAR` | Controls the `Clear` button in the switch chooser. | + +## Scrolling + +| Name | Description | +| --- | --- | +| `lvgl.SCROLL_OFF` | Disable scrolling; overflow is clipped. | +| `lvgl.SCROLL_HOR` | Horizontal scrolling only. | +| `lvgl.SCROLL_VER` | Vertical scrolling only. | +| `lvgl.SCROLL_ALL` | Horizontal and vertical scrolling. | + +## Screen and Page Layout + +These constants help scripts adapt to different screen sizes. The page-related values were added in EdgeTX `2.11.4`. + +| Name | Description | +| --- | --- | +| `lvgl.PAGE_BODY_HEIGHT` | Height of the body section inside an LVGL page. | +| `lvgl.UI_ELEMENT_HEIGHT` | Default height for common controls such as buttons, toggles, and sliders. | +| `lvgl.LCD_SCALE` | Scale factor relative to a `480x272` display. | +| `lvgl.PERCENT_SIZE` | Base value for percentage-based sizes and positions, used as `lvgl.PERCENT_SIZE + N`. | + +## Object Type Constants + +These constants can be used with `lvgl.build` instead of string type names. They were added in EdgeTX `2.11.4`. + +| Name | Equivalent to | +| --- | --- | +| `lvgl.LABEL` | `"label"` | +| `lvgl.RECTANGLE` | `"rectangle"` | +| `lvgl.CIRCLE` | `"circle"` | +| `lvgl.ARC` | `"arc"` | +| `lvgl.HLINE` | `"hline"` | +| `lvgl.VLINE` | `"vline"` | +| `lvgl.LINE` | `"line"` | +| `lvgl.TRIANGLE` | `"triangle"` | +| `lvgl.IMAGE` | `"image"` | +| `lvgl.QRCODE` | `"qrcode"` | +| `lvgl.BOX` | `"box"` | +| `lvgl.BUTTON` | `"button"` | +| `lvgl.MOMENTARY_BUTTON` | `"momentaryButton"` | +| `lvgl.TOGGLE` | `"toggle"` | +| `lvgl.TEXT_EDIT` | `"textEdit"` | +| `lvgl.NUMBER_EDIT` | `"numberEdit"` | +| `lvgl.CHOICE` | `"choice"` | +| `lvgl.SLIDER` | `"slider"` | +| `lvgl.VERTICAL_SLIDER` | `"verticalSlider"` | +| `lvgl.PAGE` | `"page"` | +| `lvgl.FONT` | `"font"` | +| `lvgl.ALIGN` | `"align"` | +| `lvgl.COLOR` | `"color"` | +| `lvgl.TIMER` | `"timer"` | +| `lvgl.SWITCH` | `"switch"` | +| `lvgl.SOURCE` | `"source"` | +| `lvgl.FILE` | `"file"` | +| `lvgl.SETTING` | `"setting"` | diff --git a/website/md-docs/api-overview/constants/screen-constants.md b/website/md-docs/api-overview/constants/screen-constants.md new file mode 100644 index 000000000..b1b51f24f --- /dev/null +++ b/website/md-docs/api-overview/constants/screen-constants.md @@ -0,0 +1,6 @@ +# Screen Constants + +| Constant name | Meaning | +| :--- | :--- | +| `LCD_W` | width in pixels | +| `LCD_H` | height in pixels | diff --git a/website/md-docs/api-overview/constants/special-character-constants.md b/website/md-docs/api-overview/constants/special-character-constants.md new file mode 100644 index 000000000..513f773ab --- /dev/null +++ b/website/md-docs/api-overview/constants/special-character-constants.md @@ -0,0 +1,25 @@ +--- +description: The radio's special characters can be used with the following text constants. +--- + +# Special Character Constants + +| Constant name | Meaning | +| --- | --- | +| `CHAR_RIGHT` | Right arrow symbol | +| `CHAR_LEFT` | Left arrow symbol | +| `CHAR_UP` | Up arrow symbol | +| `CHAR_DOWN` | Down arrow symbol | +| `CHAR_DELTA` | Delta/change symbol | +| `CHAR_STICK` | Stick input category symbol | +| `CHAR_POT` | Potentiometer category symbol | +| `CHAR_SLIDER` | Slider category symbol | +| `CHAR_SWITCH` | Switch category symbol | +| `CHAR_TRIM` | Trim category symbol | +| `CHAR_INPUT` | Input category symbol | +| `CHAR_FUNCTION` | Function/source category symbol | +| `CHAR_CYC` | Cyclic / heli source category symbol | +| `CHAR_TRAINER` | Trainer source category symbol | +| `CHAR_CHANNEL` | Channel/output category symbol | +| `CHAR_TELEMETRY` | Telemetry category symbol | +| `CHAR_LUA` | Lua source/category symbol | diff --git a/website/md-docs/api-overview/constants/special-function-constants.md b/website/md-docs/api-overview/constants/special-function-constants.md new file mode 100644 index 000000000..b0fa9227b --- /dev/null +++ b/website/md-docs/api-overview/constants/special-function-constants.md @@ -0,0 +1,34 @@ +--- +description: These constants determine the type of a Special Function. +--- + +# Special Function Constants + +| Constant name | Meaning | +| --- | --- | +| `FUNC_OVERRIDE_CHANNEL` | Override channel output | +| `FUNC_TRAINER` | Trainer mode action | +| `FUNC_INSTANT_TRIM` | Instant trim | +| `FUNC_RESET` | Reset selected value or state | +| `FUNC_SET_TIMER` | Set timer value | +| `FUNC_ADJUST_GVAR` | Adjust global variable | +| `FUNC_VOLUME` | Set volume source | +| `FUNC_SET_FAILSAFE` | Set failsafe | +| `FUNC_RANGECHECK` | Start range check | +| `FUNC_BIND` | Start bind mode | +| `FUNC_PLAY_SOUND` | Play sound | +| `FUNC_PLAY_TRACK` | Play audio track | +| `FUNC_PLAY_VALUE` | Play spoken value | +| `FUNC_PLAY_SCRIPT` | Play Lua script/function | +| `FUNC_BACKGND_MUSIC` | Background music | +| `FUNC_BACKGND_MUSIC_PAUSE` | Pause background music | +| `FUNC_VARIO` | Enable vario | +| `FUNC_HAPTIC` | Haptic feedback | +| `FUNC_LOGS` | Start logging | +| `FUNC_BACKLIGHT` | Backlight control | +| `FUNC_SCREENSHOT` | Take screenshot | +| `FUNC_RACING_MODE` | Racing mode | +| `FUNC_SET_SCREEN` | Change screen | +| `FUNC_DISABLE_AUDIO_AMP` | Disable audio amplifier | +| `FUNC_RGB_LED` | RGB LED control | +| `FUNC_TEST` | Test function | diff --git a/website/md-docs/api-overview/constants/touch-event-constants.md b/website/md-docs/api-overview/constants/touch-event-constants.md new file mode 100644 index 000000000..aeec4ba4b --- /dev/null +++ b/website/md-docs/api-overview/constants/touch-event-constants.md @@ -0,0 +1,35 @@ +--- +description: >- + In addition to the key events described in the previous section, radios with a + color touch screen also provide touch events to the widget scripts. +--- + +# Touch Event Constants + +The following touch events are passed in the `event` argument to the widget script `refresh` function \(when in full screen mode\), just like the key events. The following touch events are provided: + +| Touch event name | Description | +| :--- | :--- | +| `EVT_TOUCH_FIRST` | When the finger touches down on the screen | +| `EVT_TOUCH_TAP` | If the finger leaves the screen after a quick tap | +| `EVT_TOUCH_BREAK` | If the finger leaves the screen without tap or slide | +| `EVT_TOUCH_SLIDE` | Repeats while the finger is sliding on the screen | + +In addition to the above touch events a `touchState` table is passed to `refresh` with the following addional data fields: + +| `touchState` field | Description | +| :--- | :--- | +| `x`, `y` | Current touch point | +| `startX`, `startY` | Point where slide started | +| `slideX`, `slideY` | Movement since previous `EVT_TOUCH_SLIDE` event \(or start of slide\) | +| `swipeUp`, `swipeDown`, `swipeLeft`, `swipeRight` | The field is present and equal to `true` if a swipe event occurred in that direction | +| `tapCount` | Counts the number of consecutive taps | + +## Notes: + +* `touchState` is `nil` if `event` is not a touch event. This can be used to test if we have a touch event or a key event. +* Since Lua evaluates `nil` to `false` and everything else to `true`, `if touchState then` means we have a touch event. +* `x, y` are present for all touch events. +* `startX, startY, slideX, slideY` are only present with `EVT_TOUCH_SLIDE`. +* `swipeUp`, `swipeDown`, `swipeLeft`, `swipeRight` _may_ be present only with `EVT_TOUCH_SLIDE`. +* `tapCount` is zero for anything but `EVT_TOUCH_TAP`. diff --git a/website/md-docs/api-overview/constants/units.md b/website/md-docs/api-overview/constants/units.md new file mode 100644 index 000000000..f6dedd834 --- /dev/null +++ b/website/md-docs/api-overview/constants/units.md @@ -0,0 +1,37 @@ +# Units + +| Constant name | Unit | Index | +| :--- | :--- | :--- | +| `UNIT_RAW` | Raw unit \(no unit\) | 0 | +| `UNIT_VOLTS` | Volts | 1 | +| `UNIT_AMPS` | Amps | 2 | +| `UNIT_MILLIAMPS` | Milliamps | 3 | +| `UNIT_KTS` | Knots | 4 | +| `UNIT_METERS_PER_SECOND` | Meters per Second | 5 | +| `UNIT_FEET_PER_SECOND` | Feet per Second | 6 | +| `UNIT_KMH` | Kilometers per Hour | 7 | +| `UNIT_MPH` | Miles per Hour | 8 | +| `UNIT_METERS` | Meters | 9 | +| `UNIT_FEET` | Feet | 10 | +| `UNIT_CELSIUS` | Degrees Celsius | 11 | +| `UNIT_FAHRENHEIT` | Degrees Fahrenheit | 12 | +| `UNIT_PERCENT` | Percent | 13 | +| `UNIT_MAH` | Milliamp Hour | 14 | +| `UNIT_WATTS` | Watts | 15 | +| `UNIT_MILLIWATTS` | Milliwatts | 16 | +| `UNIT_DB` | dB | 17 | +| `UNIT_RPMS` | RPM | 18 | +| `UNIT_G` | G | 19 | +| `UNIT_DEGREE` | Degrees | 20 | +| `UNIT_RADIANS` | Radians | 21 | +| `UNIT_MILLILITERS` | Milliliters | 22 | +| `UNIT_FLOZ` | Fluid Ounces | 23 | +| `UNIT_MILLILITERS_PER_MINUTE` | Ml per minute | 24 | +| `UNIT_HOURS` | Hours | 35 | +| `UNIT_MINUTES` | Minutes | 36 | +| `UNIT_SECONDS` | Seconds | 37 | +| `UNIT_CELLS` | Virtual unit | 38 | +| `UNIT_DATETIME` | Virtual unit | 39 | +| `UNIT_GPS` | Virtual unit | 40 | +| `UNIT_BITFIELD` | Virtual unit | 41 | +| `UNIT_TEXT` | Virtual unit | 42 | diff --git a/website/md-docs/api-overview/constants/widget-options.md b/website/md-docs/api-overview/constants/widget-options.md new file mode 100644 index 000000000..1ce949119 --- /dev/null +++ b/website/md-docs/api-overview/constants/widget-options.md @@ -0,0 +1,39 @@ +# Widget Options Constants + +There are several option types that can be specified in the widget options table, which are exposed to the user via the Widget Settings menu. + +| Type | Description | +| :--- | :--- | +| `COLOR` | Displays a color picker, returns a color flag value | +| `BOOL` | Displays a toggle/checkbox, value toggles between 0 and 1 | +| `STRING` | Text input option, limited to 8 characters | +| `TIMER` | Choice option, lets you pick from available timers | +| `SOURCE` | Choice option, lets you pick from available sources (i.e. sticks, switches, LS) | +| `VALUE` | Numerical input option, can specify default, min and max value | +| `TEXT_SIZE` | Choice option, lets you pick from the available text sizes (i.e. small, large) | +| `ALIGNMENT` | Choice option, lets you pick from available alignment options (i.e. left, center, right) | + +!!! warning + + Maximum five `options` are allowed. + +!!! warning + + Option variable name's lenght **must be 10 characters or less and no spaces.** + +## Example + +```lua +-- Create a table with default options +-- Options can be changed by the user from the Widget Settings menu +-- Notice that each line is a table inside { } +local options = { + { "Source", SOURCE, 1 }, + -- BOOL is actually not a boolean, but toggles between 0 and 1 + { "Boolean", BOOL, 1 }, + { "Value", VALUE, 1, 0, 10}, + { "Color", COLOR, ORANGE }, + { "Text", STRING, "Max8chrs" } +} + +``` diff --git a/website/md-docs/api-overview/fonts.md b/website/md-docs/api-overview/fonts.md new file mode 100644 index 000000000..e503ca0f9 --- /dev/null +++ b/website/md-docs/api-overview/fonts.md @@ -0,0 +1,103 @@ +# Fonts + +## Taranis X7 & X9 series + +### English \(Default\) + +| Font Set | Height | Available Characters | +| :--- | :--- | :--- | +| XXLSIZE | 38px | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_22x38_num.png) | +| DBLSIZE | 16px | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_10x14.png) | +| MIDSIZE | 12px | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_08x10.png) | +| 0 Default | 8px | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_05x07.png) | +| SMLSIZE | 6px | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_04x06.png) | + +### Czech + +| Font Set | Available Characters | +| :--- | :--- | +| XXLSIZE | -- | +| DBLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_cz_10x14.png) | +| MIDSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_cz_08x10.png) | +| 0 Default | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_cz_05x07.png) | +| SMLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_cz_04x06.png) | + +### Finnish + +| Font Set | Available Characters | +| :--- | :--- | +| XXLSIZE | -- | +| DBLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_fi_10x14.png) | +| MIDSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_fi_08x10.png) | +| SMLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_fi_04x06.png) | +| 0 Default | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_fi_05x07.png) | + +### French + +| Font Set | Available Characters | +| :--- | :--- | +| XXLSIZE | -- | +| DBLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_fr_10x14.png) | +| MIDSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_fr_08x10.png) | +| 0 Default | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_fr_05x07.png) | +| SMLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_fr_04x06.png) | + +### German + +| Font Set | Available Characters | +| :--- | :--- | +| XXLSIZE | -- | +| DBLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_de_10x14.png) | +| MIDSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_de_08x10.png) | +| 0 Default | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_de_05x07.png) | +| SMLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_de_04x06.png) | + +### Italian + +| Font Set | Available Characters | +| :--- | :--- | +| XXLSIZE | -- | +| DBLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_it_10x14.png) | +| MIDSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_it_08x10.png) | +| 0 Default | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_it_05x07.png) | +| SMLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_it_04x06.png) | + +### Polish + +| Font Set | Available Characters | +| :--- | :--- | +| XXLSIZE | -- | +| DBLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_pl_10x14.png) | +| MIDSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_pl_08x10.png) | +| 0 Default | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_pl_05x07.png) | +| SMLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_pl_04x06.png) | + +### Portuguese + +| Font Set | Available Characters | +| :--- | :--- | +| XXLSIZE | -- | +| DBLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_pt_10x14.png) | +| MIDSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_pt_08x10.png) | +| 0 Default | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_pt_05x07.png) | +| SMLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_pt_04x06.png) | + +### Spanish + +| Font Set | Available Characters | +| :--- | :--- | +| XXLSIZE | -- | +| DBLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_es_10x14.png) | +| MIDSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_es_08x10.png) | +| 0 Default | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_es_05x07.png) | +| SMLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_es_04x06.png) | + +### Swedish + +| Font Set | Available Characters | +| :--- | :--- | +| XXLSIZE | -- | +| DBLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_se_10x14.png) | +| MIDSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_se_08x10.png) | +| 0 Default | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_se_05x07.png) | +| SMLSIZE | ![](https://raw.githubusercontent.com/EdgeTX/edgetx/main/radio/src/fonts/std/font_se_04x06.png) | diff --git a/website/md-docs/api-overview/internal-indexes/README.md b/website/md-docs/api-overview/internal-indexes/README.md new file mode 100644 index 000000000..2b7254728 --- /dev/null +++ b/website/md-docs/api-overview/internal-indexes/README.md @@ -0,0 +1,11 @@ +# Sources and Switches + +Reference tables for source names, source IDs, and switch positions used by the Lua API. + +## Sources + +- [Source List](source-list.md) + +## Switches + +- [Switch positions List](switch-positions-id.md) diff --git a/overview/internal-indexes/source-list.md b/website/md-docs/api-overview/internal-indexes/source-list.md similarity index 85% rename from overview/internal-indexes/source-list.md rename to website/md-docs/api-overview/internal-indexes/source-list.md index fbfa4f2fe..02d0bf2d3 100644 --- a/overview/internal-indexes/source-list.md +++ b/website/md-docs/api-overview/internal-indexes/source-list.md @@ -10,15 +10,12 @@ EdgeTX internal Source List contains every source available on particular radio Particular Source List ID is a integer number from 1 to whatever last source entry is used by EdgeTX developers during firmware implementation. Different Radios have different number of physical inputs that affects this list. Therefore for the same source type (ie LS04 - Logical switch number 4) **sourceListID** can have different value on particular radio model -{% hint style="info" %} -To avoid confusion wherever there is reference to Source List ID short-name **sourceListID** is used. -{% endhint %} +!!! info + To avoid confusion wherever there is reference to Source List ID short-name **sourceListID** is used. ## Source List Name -Source List name can also change due to firmware changes during development or user configuration (ie. assigning custom name to input). In current version of EdgeTX firmware Source List Name also may contain special visual symbols to indicate type source (see [Special Charactes Constants](../../lua-api-reference/constants/special-character-constants.md)). \ - +Source List name can also change due to firmware changes during development or user configuration (ie. assigning custom name to input). In current version of EdgeTX firmware Source List Name also may contain special visual symbols to indicate type source (see [Special Charactes Constants](../constants/special-character-constants.md)). -{% hint style="info" %} -To avoid confusion wherever there is reference to Source List Name short-name **sourceListName** is used. -{% endhint %} +!!! info + To avoid confusion wherever there is reference to Source List Name short-name **sourceListName** is used. diff --git a/overview/internal-indexes/switch-positions-id.md b/website/md-docs/api-overview/internal-indexes/switch-positions-id.md similarity index 100% rename from overview/internal-indexes/switch-positions-id.md rename to website/md-docs/api-overview/internal-indexes/switch-positions-id.md diff --git a/overview/lua-basics.md b/website/md-docs/api-overview/lua-basics.md similarity index 89% rename from overview/lua-basics.md rename to website/md-docs/api-overview/lua-basics.md index 7879998f7..acd0c8dfd 100644 --- a/overview/lua-basics.md +++ b/website/md-docs/api-overview/lua-basics.md @@ -52,7 +52,7 @@ The function is returned directly without being assigned to a variable name. The Likewise, the local variables that you declare outside the functions of your script can be used by all of the functions in your script, and they persist between function calls, but they are not visible to other scripts. -The [widget scripts](../part\_i\_-\_script\_type\_overview/widget\_scripts.md) are a little trickier, as you can register multiple instances of the same widget script, and all of these instances run within the same Lua closure. Therefore, local variables declared outside any functions in a widget script are shared among all of the instances of that script. But each call to the `create(...)` function returns a new `widget` list to the system. And since this list is unique to each instance, you can add private instance variables to it. +The [widget scripts](script-types/widget-scripts.md) are a little trickier, as you can register multiple instances of the same widget script, and all of these instances run within the same Lua closure. Therefore, local variables declared outside any functions in a widget script are shared among all of the instances of that script. But each call to the `create(...)` function returns a new `widget` list to the system. And since this list is unique to each instance, you can add private instance variables to it. ## Functions with Variable Number of Arguments diff --git a/website/md-docs/api-overview/script-types/README.md b/website/md-docs/api-overview/script-types/README.md new file mode 100644 index 000000000..1270812bf --- /dev/null +++ b/website/md-docs/api-overview/script-types/README.md @@ -0,0 +1,15 @@ +--- +description: >- + This section introduces the types of Lua scripts supported by EdgeTX and how + they may be used. +--- + +# Script Types + +| Script Type | Description | +| --- | --- | +| [One-Time Scripts](one-time-scripts.md) | Scripts launched on demand for tools, wizards, and other short-lived tasks that run until they finish or are closed. | +| [Telemetry Scripts](telemetry-scripts.md) | Background-capable screen scripts for radios with B&W displays, typically used to present custom telemetry pages. | +| [Widget Scripts](widget-scripts.md) | Persistent widget-based scripts for color LCD radios that extend main views and can render in widget zones or full-screen mode. | +| [Function Scripts](function-scripts.md) | Special Function helpers that run in response to configured switch states and are typically used for automation or announcements. | +| [Mixes Scripts](mixes-scripts.md) | Periodic processing scripts that transform model inputs into outputs for non-critical custom mixing logic. | diff --git a/overview/script-types/function-scripts.md b/website/md-docs/api-overview/script-types/function-scripts.md similarity index 81% rename from overview/script-types/function-scripts.md rename to website/md-docs/api-overview/script-types/function-scripts.md index 788a5aff0..935e0d51d 100644 --- a/overview/script-types/function-scripts.md +++ b/website/md-docs/api-overview/script-types/function-scripts.md @@ -11,58 +11,56 @@ Typical uses of Function scripts are: ## Execution & Lifetime -Function script is loded when model is selected.\ -\ +Function script is loded when model is selected. + Script executes until * it misbehaves (e.g. run-time error or low memory) * [One-time Script](one-time-scripts.md) is running. When One-time script finishes execution, Wigdet Script resumes execution. -{% hint style="warning" %} -Function scripts **DO NOT HAVE ACCESS TO LCD DISPLAY** -{% endhint %} +!!! warning + Function scripts **DO NOT HAVE ACCESS TO LCD DISPLAY** ## File Location -Function scripts are located on the SD card in the folder /SCRIPTS/FUNCTIONS/ +Function scripts are located on the SD card in the folder `/SCRIPTS/FUNCTIONS/` -{% hint style="warning" %} -File name length (without extension) **must be 6 characters or less** -{% endhint %} +!!! warning + File name length (without extension) **must be 6 characters or less** ## Interface -Every Function script must include a `return` statement at the end, defining its interface to EdgeTX. +Every Function script must include a `return` statement at the end, defining its interface to EdgeTX. This statement returns a table with the following fields: <table><thead><tr><th width="142.33333333333331">Field</th><th width="108">Type</th><th width="105" data-type="checkbox">Required</th><th>Desctiption</th></tr></thead><tbody><tr><td><strong>run</strong></td><td>function</td><td>true</td><td>This function is called periodicaly when <strong>switch</strong> assiociated the Special Function <strong>is ON</strong>. </td></tr></tbody></table> -_Parameters_\ +_Parameters_<br> _none_ -_Return values_\ +_Return values_<br> _none_ <table><thead><tr><th width="142.33333333333331">Field</th><th width="108">Type</th><th width="105" data-type="checkbox">Required</th><th>Desctiption</th></tr></thead><tbody><tr><td><strong>init</strong></td><td>function</td><td>false</td><td>This function is called once when Function script is loaded and executed for the first time</td></tr></tbody></table> -_Parameters_\ +_Parameters_<br> none -_Return Values_\ +_Return Values_<br> none <table><thead><tr><th width="142.33333333333331">Field</th><th width="108">Type</th><th width="105" data-type="checkbox">Required</th><th>Desctiption</th></tr></thead><tbody><tr><td><strong>background</strong></td><td>function</td><td>true</td><td>This function is called periodicaly when <strong>switch</strong> assiociated the Special Function <strong>is OFF</strong></td></tr></tbody></table> -_Parameters_\ +_Parameters_<br> none -_Return Values_\ -none\ +_Return Values_<br> +none ### Example diff --git a/website/md-docs/api-overview/script-types/mixes-scripts.md b/website/md-docs/api-overview/script-types/mixes-scripts.md new file mode 100644 index 000000000..b2776e162 --- /dev/null +++ b/website/md-docs/api-overview/script-types/mixes-scripts.md @@ -0,0 +1,161 @@ +# Mixes Scripts + +!!! danger + **Don't use Lua Mixes Scripts for controlling any aspect of your model that could cause a crash if the script stops executing!** + +## Purpose + +Mixes Scripts take one or more values as inputs, do some processing in Lua code, and output one or more values. Each model can have several Mixes Scripts associated with it, and these scripts are run periodically. They behave similarly to standard EdgeTX mixers, but at the same time they provide a much more flexible and powerful tool. + +Typical use cases: + +* replacement for complex mixes that are _not critical_ to model function +* complex processing of inputs and reaction to their current state and/or their history +* filtering of telemetry values + +## Execution & Lifetime + +Mixes script is loded when model is selected. + +Script executes until + +* it misbehaves (e.g. run-time error or low memory) +* [One-time Script](one-time-scripts.md) is running. When One-time script finishes execution, Wigdet Script resumes execution. + +!!! warning + ### Limitations + + * cannot update LCD screen or perform user input. + * should not exceed allowed run-time/ number of instructions. + * custom scripts are run with less priority than built-in mixes. Their execution period is around 30ms and is not guaranteed! + +!!! warning + If the script output is used as a `mixer source` , and the **script is killed** for whatever reason, then _the_ **whole mixer line is disabled**! + +!!! info + Mixes Scripts should be as short as possible, to avoid delays. It is also important to keep in mind that other loaded Telemetry and Function scripts can add to the response time, or worse: hang the system! + +!!! info + By default, the necessary compile time option `LUA_MIXER` to use Mixes Scripts is enabled for all radio targets from EdgeTX v2.11 onwards. + + + +## File Location + +Mixes scripts are located on SD card in folder `/SCRIPTS/MIXES/` + +!!! warning + File name length (without extension) **must be 6 characters or less** + + + +## Interface + +Every Mixes Script must include a `return` statement at the end, defining its interface to EdgeTX. This statement returns a table with the following fields: + +| table item | type | required | +| ---------- | -------- | -------- | +| **run** | function | yes | + +This function is called periodicaly when script is running. + +**Parameters**<br> +Variables matching those used in `input` table + +**Return values**<br> +Variables matching those used in `output` table + + +| table item | type | required | +| ---------- | -------- | -------- | +| **init** | function | no | + +This function is called once when Mixes Script is loaded and executed for the first time + +**Parameters**<br> +none + +**Return values**<br> +none + + +| table item | type | required | +| ---------- | ----- | -------- | +| **input** | table | yes | + +The input table defines what values are available as input(s) to custom scripts. + +There are two forms of input table entries + +**SOURCE** + +``` +{ "<name>", SOURCE } +``` + +SOURCE inputs provide the current value of a selected EdgeTX variable. The source must be selected by the user when the script is configured. Source can be any value that EdgeTX knows about (inputs, channels, telemetry values, switches, custom functions etc.).<br> +**Note:** the typical input range is -1024 thru +1024. Simply divide the input value by 10.24 to convert to a percentage from -100% to +100%. + +**VALUE** + +``` +{ "<name>", VALUE, <min>, <max>, <default> } +``` + +VALUE inputs provide a constant value that is set by the user when the script is configured. + +* _name_ - maximum length of 8 characters +* _min_ - minimum value of -128 +* _max_ - maximum value of 127 +* _default_ - must be within the valid range specified +* **Maximum of 6 inputs per script** + + + +| table item | type | required | +| ---------- | ----- | -------- | +| **output** | table | yes | + +The output table defines only name(s), as the actual values are returned by the script's run function. + +```lua +{ "<name1>", "<name2>" } +``` + +!!! info + Above names are only visible as source values on the radio screen when the script is running. If the model is edited in Companion, then the values show as `LUA1a` and `LUA1b` etc. + + + +### Examples + +Example of a Mixes Script using a SOURCE input and a VALUE input together. + +```lua +local my_input = + { + { "Strength", SOURCE}, -- user selects source (typically slider or knob) + { "Interval", VALUE, 0, 100, 0 } -- interval value, default = 0. + } + +local my_output = { "Val1", "Val2" } + +local function my_init() + -- Called once when the script is loaded +end + +local function my_run(Strength, Interval) -- Must match input table + local v1, v2 + -- Called periodically + return v1, v2 -- Must match output table +end + +return { input = my_input, output = my_output, run = my_run, init = my_init } +``` + +Example where Lua mix script is used to drive ailerons in some clever way, but control falls back to the standard aileron mix if script is killed. Second mixer line replaces the first one when the script is alive: + +``` +CH1 [I4]Ail Weight(+100%) + := LUA4b Weight(+100%) +``` diff --git a/website/md-docs/api-overview/script-types/one-time-scripts.md b/website/md-docs/api-overview/script-types/one-time-scripts.md new file mode 100644 index 000000000..87f4ea587 --- /dev/null +++ b/website/md-docs/api-overview/script-types/one-time-scripts.md @@ -0,0 +1,102 @@ +# One-Time Scripts + +## Purpose + +One-time scripts are used mainly to perform tasks that are not connected with flying. In example ELRS configuration LUA script. They do their task and are then terminated (by user or function) and unloaded. + +## Execution & Lifetime + +Script is executed when user selects "Execute" on a script file from SD card browser screen, or opens a Lua Tool, or creates a new model with a Wizard script. + +The script executes until: + +* it returns value different from 0 (except returning string that contains new script name to be executed) +* is forcefully closed by user by long press of EXIT key +* is forcefully closed by system if it misbehaves (e.g. run-time error or low + + memory) + +!!! danger + **Running a One-Time script will suspend execution of all other currently loaded Lua scripts (Custom, Telemetry, and Functions). They are automatically restarted once the One-Time script is finished. This is done to provide enough system resources to execute the One-Time script.** + +## File Location + +One-Time Scripts can be placed anywhere on SD card, however, the folder `/SCRIPTS/` is recommended. + +!!! info + If One-Time Script is placed in special folder `/SCRIPTS/TOOLS` it will be visible in EdgeTX RADIO>TOOLS tab + + To give this One-Time Script unique name place at the beginning of lua script line:<br> + `-- toolName = "TNS|ScriptName|TNE` + + Otherwise script's filename will be used to display in RADIO>TOOLS list. + +!!! info + Wizard scripts must be stored in the same subfolder of `/TEMPLATES/` with the same "first name" as the template file using it. Some Wizard scripts are just small scripts that load one of the common scripts located in `/SCRIPTS/WIZARD/`. + +## **Interface** + +Every script must include a `return` statement at the end, defining its interface to EdgeTX. This statement returns a table with the following fields: + +<table><thead><tr><th width="142.33333333333331">Field</th><th width="108">Type</th><th width="105" data-type="checkbox">Required</th><th>Desctiption</th></tr></thead><tbody><tr><td><strong>run</strong></td><td>function</td><td>true</td><td>Function is called periodicaly when script is running. </td></tr></tbody></table> + +_Parameters_ + +<table data-header-hidden><thead><tr><th width="145">Parameter</th><th>Decription</th></tr></thead><tbody><tr><td><strong>event</strong><br>number</td><td>Used to indicates which radio key has been pressed (see <a href="../constants/key-event-constants.md">Key Events</a>)</td></tr><tr><td><strong>touchState</strong><br>table</td><td>This parameter is only present when radio is equiped with touch interface and <code>event</code> is a touch event (see <a href="../constants/touch-event-constants.md">Touch State Events</a>).</td></tr></tbody></table> + +_Return values_ + +<table data-header-hidden><thead><tr><th width="140.33333333333331">Returns</th><th>Description</th></tr></thead><tbody><tr><td><strong>exit</strong><br>multi type</td><td><ul><li>if <code>exit</code> value is 0 (zero) script will continue to run</li></ul><ul><li>if <code>exit</code> value is non-zero script will be halted.</li></ul><ul><li>If <code>exit</code> value is a text string with the file path to a new Lua script, then the new script will be loaded and run.</li></ul></td></tr></tbody></table> + + + +<table><thead><tr><th width="142.33333333333331">Field</th><th width="108">Type</th><th width="105" data-type="checkbox">Required</th><th>Desctiption</th></tr></thead><tbody><tr><td><strong>init</strong></td><td>function</td><td>false</td><td>This function is called once when script is executed</td></tr></tbody></table> + +_Parameters_<br> +none + +_Return Values_<br> +none + + + +## Examples + +Simplest one-time LUA script + +```lua +local function my_run(event, touchState) + print("Script run executed") + return 0 +end + +return { run = my_run } +``` + +!!! info + Because 0 is returned all the time this script will continue running until user long press EXIT (RTN) key. + +*** + +One-Time LUA script with initialization and exit feature if user short press and release EXIT (RTN) key + +```lua +local exit = 0 + +local function my_run(event, touchState) + print("Script my_run function executed") + -- code to execute + if event == EVT_VIRTUAL_EXIT then + print("Script exit executed") + exit = 1 + end + return exit +end + +local function my_init() + print("Script my_init function executed") + -- code to execute +end + +return { run = my_run, init = my_init } +``` diff --git a/overview/script-types/telemetry-scripts.md b/website/md-docs/api-overview/script-types/telemetry-scripts.md similarity index 75% rename from overview/script-types/telemetry-scripts.md rename to website/md-docs/api-overview/script-types/telemetry-scripts.md index 0fb4590d2..631a69dd1 100644 --- a/overview/script-types/telemetry-scripts.md +++ b/website/md-docs/api-overview/script-types/telemetry-scripts.md @@ -4,15 +4,14 @@ Although they are named "Telemetry scripts" in fact they can be used to perform constant task while running in background. Telemetry scripts are mostly used for building customized screens that are avalilable to user directly from main screen using key shortcut. Each model can have up to three active scripts as configured on the model's Telemetry configuration page. The same script can be assigned to multiple models. -{% hint style="warning" %} -Telemetry scripts are only available on radios with B\&W LCD screens, such as e.g. FrSky Taranis models (including Xlite), Radiomaster TX12, Zorro, Boxer or Jumper T12.\ -Read more about <mark style="color:red;">\<radios></mark>. -{% endhint %} +!!! warning + Telemetry scripts are only available on radios with B&W LCD screens, such as e.g. FrSky Taranis models (including Xlite), Radiomaster TX12, Zorro, Boxer or Jumper T12.<br> + Read more about [supported radios](../../radios/README.md). ## Execution & Lifetime -Telemetry script is loaded and executed when model is selected.\ -\ +Telemetry script is loaded and executed when model is selected. + Script executes until: * it misbehaves (e.g. run-time error or low memory) @@ -20,44 +19,44 @@ Script executes until: ## File Location -Telemetry scripts are located on the SD card in the folder /SCRIPTS/TELEMETRY/. +Telemetry scripts are located on the SD card in the folder `/SCRIPTS/TELEMETRY/`. -{% hint style="warning" %} -Telemetry script file name length (without extension) **must be 6 characters or less** -{% endhint %} +!!! warning + Telemetry script file name length (without extension) **must be 6 characters or less** ## Interface -Every Telemetry script must include a `return` statement at the end, defining its interface to EdgeTX. \ +Every Telemetry script must include a `return` statement at the end, defining its interface to EdgeTX. + This statement returns a table with the following fields: <table><thead><tr><th width="142.33333333333331">Field</th><th width="108">Type</th><th width="105" data-type="checkbox">Required</th><th>Desctiption</th></tr></thead><tbody><tr><td><strong>run</strong></td><td>function</td><td>true</td><td>Function is called periodicaly when when telemetry screen is visible. </td></tr></tbody></table> _Parameters_ -<table data-header-hidden><thead><tr><th width="145">Parameter</th><th>Decription</th></tr></thead><tbody><tr><td><strong>event</strong><br>number</td><td>Used to indicates which radio key has been pressed (see <a href="../part_iii_-_opentx_lua_api_reference/constants/key_events.md">Key Events</a>)</td></tr></tbody></table> +<table data-header-hidden><thead><tr><th width="145">Parameter</th><th>Decription</th></tr></thead><tbody><tr><td><strong>event</strong><br>number</td><td>Used to indicates which radio key has been pressed (see <a href="../constants/key-event-constants.md">Key Events</a>)</td></tr></tbody></table> -_Return values_\ +_Return values_<br> _none_ <table><thead><tr><th width="142.33333333333331">Field</th><th width="108">Type</th><th width="105" data-type="checkbox">Required</th><th>Desctiption</th></tr></thead><tbody><tr><td><strong>init</strong></td><td>function</td><td>false</td><td>This function is called once when script is executed</td></tr></tbody></table> -_Parameters_\ +_Parameters_<br> none -_Return Values_\ +_Return Values_<br> none <table><thead><tr><th width="142.33333333333331">Field</th><th width="108">Type</th><th width="105" data-type="checkbox">Required</th><th>Desctiption</th></tr></thead><tbody><tr><td><strong>background</strong></td><td>function</td><td>false</td><td>This function is called periodically, both when the telemetry screen is visible and when it is not</td></tr></tbody></table> -_Parameters_\ +_Parameters_<br> none -_Return Values_\ +_Return Values_<br> none ### Examples @@ -77,4 +76,3 @@ end return { run = my_run, background = my_background, init = my_init } ``` - diff --git a/website/md-docs/api-overview/script-types/widget-scripts.md b/website/md-docs/api-overview/script-types/widget-scripts.md new file mode 100644 index 000000000..4bf475881 --- /dev/null +++ b/website/md-docs/api-overview/script-types/widget-scripts.md @@ -0,0 +1,189 @@ +# Widget Scripts + +## Purpose + +Widget scripts are available on radios equipped with color LCD. They are designed to run constantly in the background performing various tasks. Widget scripts are mostly used to extend EdgeTX functionality via _Widgets_ that are placed by the user on _Main Views_. They are the equivalent of Telemetry Scripts on radios equipped with B&W LCD. + +Most of the time, widget scripts show some info in a _Widget's zone_ in one of the user defined _Main Views_. They cannot receive direct input from the user via key events with exception of being displayed in so called _Full Screen mode_. Full screen mode can be entered by selecting the widget, pressing ENTER and selecting **Full screen** from the widget's contextual menu, ~~or by double tapping the widget on radios with a touch screen~~. Full screen mode can be exited by long pressing the EXIT (RTN) button, or by calling the Lua function `lcd.exitFullScreen()`. + +Each model can have up to nine Main Views, with up to 8 widgets per screen, depending on their size and layout. Each instance of a widget has its own _options_ table. + +!!! warning + Widget scripts are only available on radios with color LCD screens, such as e.g. FrSky X10 or X12, Radiomaster TX16S, Jumper T16 or T18, Flysky NV14, etc.<br> + Read more about [supported radios](../../radios/README.md). + +## Execution & Lifetime + +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 the 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/load-script.md) function to load code dynamically + +Script executes until: + +* it misbehaves (e.g. too long runtime, run-time error, or low memory) +* a One-Time script is running. When the One-Time script finishes execution, the Widget Script resumes execution. + +## File Location + +Widget scripts are located on the SD card, each one in their specific folder:<br> +`/WIDGETS/<folder name>/` + +!!! warning + Widget script folder name length **must be 8 characters or less** + +Widget script name is constant and has to be named **main.lua** + +!!! info + Example of proper Widget script placement to be registered by EdgeTX as a valid Widget script available to the user in the Widgets selection menu:<br> + `/WIDGETS/MYWGT/main.lua` + +!!! info + Try to use a unique folder name. In case of a naming clash, the previously installed widget will be overwritten. + +## Interface + +Every Widget Script must include a `return` statement at the end, defining its interface to EdgeTX. This statement returns a table with the following fields: + +| Field | Type | Required | Description | +| --- | --- | --- | --- | +| **name** | string | true | This variable holds a name that is displayed to the user as the Widget script's name in the available Widgets list. | + +!!! warning + The `name` length must be 10 **characters or less**. + +| Field | Type | Required | Description | +| --- | --- | --- | --- | +| **options** | table | false | Options table is used to store the Widget's options available to the EdgeTX user via the Widget's Settings menu.<br>To see valid options read [Widget Options Constants](../constants/widget-options.md). | + +!!! info + `options` table is passed to `create` function when invoked and then stored in Lua. Changing options table values while the Widget script is running has no effect. This table is designed to be changed via EdgeTX system menus. + +!!! info + If `options` is changed by the user in the Widget Settings menu, then `update` will be called with a new `options` table, unaffected by any changes made by Lua code to the old `options` table. + +| Field | Type | Required | Description | +| --- | --- | --- | --- | +| **create** | function | true | Function is called once when the widget instance is registered (started). | + +_Parameters_ + +| Parameter | Description | +| --- | --- | +| **zone**<br>table | This parameter will hold visible dimensions of Widget (height & width) | +| **options**<br>table | Initial options table as described above | + +_Return values_ + +| Returns | Description | +| --- | --- | +| **widget**<br>table | Create function will return a table that has to be later passed to `update`, `background`, and `refresh` functions, allowing access to the widget's unique variables. | + +!!! info + The size of the widget's zone area is as follows: + + * Full screen mode: `LCD_W` by `LCD_H` + * Not full screen mode: `zone.w` by `zone.h` (updated if screen options are changed) + +!!! info + If local variables are declared outside functions in the widget script, then they are shared between all instances of the widget. Therefore, local variables that are private for each instance should be added to the `widget` table in the `create` function before returning the `widget` table to EdgeTX. + +| Field | Type | Required | Description | +| --- | --- | --- | --- | +| **update** | function | false | This function is called when the Widget's Settings are changed by the user. It is mostly used to modify Widget Script variables or behaviour based on the options values entered by the user. | + +_Parameters_ + +| Parameter | Description | +| --- | --- | +| **widget**<br>table | Widget's table returned by the `create` function, described above. | +| **options**<br>table | Initial options table as described above | + +_Return values_<br> +_none_ + +| Field | Type | Required | Description | +| --- | --- | --- | --- | +| **background** | function | false | This function is called periodically when the widget instance is NOT VISIBLE. | + +_Parameters_ + +| Parameter | Description | +| --- | --- | +| **widget**<br>table | Widget's table returned by the `create` function, described above. | + +_Return values_<br> +_none_ + +| Field | Type | Required | Description | +| --- | --- | --- | --- | +| **refresh** | function | true | This function is called periodically when the widget instance IS VISIBLE. | + +_Parameters_ + +| Parameter | Description | +| --- | --- | +| **widget**<br>table | Widget's table returned by the `create` function, described above. | +| **event**<br>number | <ul><li>When the Widget Script is in full screen mode, then `event` is either 0, a [key event value](../constants/key-event-constants.md), or a [touch event value](../constants/touch-event-constants.md).</li><li>When the widget is not in full screen mode, then `event` is `nil`</li></ul>See [Key Events](../constants/key-event-constants.md). | +| **touchState**<br>table | This parameter is only present when the radio is equipped with a touch interface and `event` is a touch event.<br><ul><li>If `event` is a [touch event value](../constants/touch-event-constants.md), then `touchState` is a table. Otherwise, it is `nil`.</li><li>When the widget is not in full screen mode then `touchState` is `nil`</li></ul>See [Touch State Events](../constants/touch-event-constants.md). | + +_Return values_<br> +_none_ + +!!! info + if you want the `background` function to run when the widget is visible, then call it from the `refresh` function. + +### Examples + +```lua +local name = "WidgetName" + +-- Create a table with default options +-- Options can be changed by the user from the Widget Settings menu +-- Notice that each line is a table inside { } +local options = { + { "Source", SOURCE, 1 }, + -- BOOL is actually not a boolean, but toggles between 0 and 1 + { "Boolean", BOOL, 1 }, + { "Value", VALUE, 1, 0, 10}, + { "Color", COLOR, ORANGE }, + { "Text", STRING, "Max8chrs" } +} + +local function create(zone, options) + -- Runs one time when the widget instance is registered + -- Store zone and options in the widget table for later use + local widget = { + zone = zone, + options = options + } + -- Add local variables to the widget table, + -- unless you want to share with other instances! + widget.someVariable = 3 + -- Return widget table to EdgeTX + return widget +end + +local function update(widget, options) + -- Runs if options are changed from the Widget Settings menu + widget.options = options +end + +local function background(widget) + -- Runs periodically only when widget instance is not visible +end + +local function refresh(widget, event, touchState) + -- Runs periodically only when widget instance is visible + -- If full screen, then event is 0 or event value, otherwise nil +end + +return { + name = name, + options = options, + create = create, + update = update, + refresh = refresh, + background = background +} +``` diff --git a/website/md-docs/api-overview/version-libraries/README.md b/website/md-docs/api-overview/version-libraries/README.md new file mode 100644 index 000000000..3b61e83e9 --- /dev/null +++ b/website/md-docs/api-overview/version-libraries/README.md @@ -0,0 +1,22 @@ +# Lua version + +## Included libraries + +Up to version 2.10, EdgeTX uses Lua 5.2 (interpreter and compiler). From version 2.11 onward, it uses Lua 5.3. For the full language reference, see the [Lua 5.2 Reference Manual](https://www.lua.org/manual/5.2/manual.html) or the [Lua 5.3 Reference Manual](https://www.lua.org/manual/5.3/manual.html). + +!!! warning + Binary files `*.luac` compiled with Lua 5.2 are not compatible with the Lua 5.3 interpreter. If you distribute binary files, they must be recompiled. + +## Included standard libraries + +| Lua Standard Library | Support | +| ----------------------------------------------------------- | --------------------------------------- | +| [math](https://www.lua.org/manual/5.2/manual.html#6.6) | **Included** | +| [string](https://www.lua.org/manual/5.2/manual.html#6.4) | **Included** | +| [bit32](https://www.lua.org/manual/5.2/manual.html#6.7) | **Included** | +| [table](https://www.lua.org/manual/5.2/manual.html#6.5) | **Included on color LCD radios only** | +| [io](io-library.md) | **Partially included** | +| package | Not included | +| coroutine | Not included | +| os | Not included | +| debug | Not included | diff --git a/overview/version-libraries/io-library.md b/website/md-docs/api-overview/version-libraries/io-library.md similarity index 84% rename from overview/version-libraries/io-library.md rename to website/md-docs/api-overview/version-libraries/io-library.md index 5f0b574a2..ffea95350 100644 --- a/overview/version-libraries/io-library.md +++ b/website/md-docs/api-overview/version-libraries/io-library.md @@ -1,8 +1,8 @@ # io Library -Standard LUA [**io**](https://www.lua.org/manual/5.2/manual.html#6.8) library has been simplified and only a subset of functions and their functionality is available. +The standard Lua [**io**](https://www.lua.org/manual/5.2/manual.html#6.8) library has been simplified and only a subset of functions and their functionality is available. -## Available functions: +## Available functions * io.open() * io.close() diff --git a/website/md-docs/api-reference/audio-sound/flush-audio.md b/website/md-docs/api-reference/audio-sound/flush-audio.md new file mode 100644 index 000000000..cac49b609 --- /dev/null +++ b/website/md-docs/api-reference/audio-sound/flush-audio.md @@ -0,0 +1,31 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# flushAudio + +`flushAudio()` + +flushes audio queue + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/audio-sound/index.md b/website/md-docs/api-reference/audio-sound/index.md new file mode 100644 index 000000000..e65264bd3 --- /dev/null +++ b/website/md-docs/api-reference/audio-sound/index.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Audio-Sound + +Audio playback and haptic feedback helpers. + +<div class="api-grid"> +<a class="api-card" href="flush-audio/"> +<span class="api-card-title">flushAudio</span> +<span class="api-card-summary">flushes audio queue</span> +</a> +<a class="api-card" href="play-duration/"> +<span class="api-card-title">playDuration</span> +<span class="api-card-summary">Play a time value (text to speech)</span> +</a> +<a class="api-card" href="play-file/"> +<span class="api-card-title">playFile</span> +<span class="api-card-summary">Play a file from the SD card</span> +</a> +<a class="api-card" href="play-haptic/"> +<span class="api-card-title">playHaptic</span> +<span class="api-card-summary">Generate haptic feedback</span> +</a> +<a class="api-card" href="play-number/"> +<span class="api-card-title">playNumber</span> +<span class="api-card-summary">Play a numerical value (text to speech)</span> +</a> +<a class="api-card" href="play-tone/"> +<span class="api-card-title">playTone</span> +<span class="api-card-summary">Play a tone</span> +</a> +</div> diff --git a/website/md-docs/api-reference/audio-sound/play-duration.md b/website/md-docs/api-reference/audio-sound/play-duration.md new file mode 100644 index 000000000..fb069d35e --- /dev/null +++ b/website/md-docs/api-reference/audio-sound/play-duration.md @@ -0,0 +1,36 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# playDuration + +`playDuration(duration [, hourFormat [, volume]])` + +Play a time value (text to speech) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `duration` | yes | `integer` | number of seconds to play. Only integral part is used. | +| `hourFormat` | no | `integer` | <ul><li>`0 or not present` play format: minutes and seconds.</li><li>`!= 0` play format: hours, minutes and seconds. * @param volume (number):</li><li>(1..5) override radio settings Wav volume for the duration of file</li><li>omitting the parameter uses radio settings Wav volume</li></ul> | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.1.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/audio-sound/play-file.md b/website/md-docs/api-reference/audio-sound/play-file.md new file mode 100644 index 000000000..41deb77e8 --- /dev/null +++ b/website/md-docs/api-reference/audio-sound/play-file.md @@ -0,0 +1,36 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# playFile + +`playFile(filename [, volume])` + +Play a file from the SD card + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `filename` | yes | `string` | full path to wav file (i.e. "/SOUNDS/en/system/tada.wav") Introduced in 2.1.0: If you use a relative path, the current language is prepended<br>to the path (example: for English language: `/SOUNDS/en` is prepended) | +| `volume` | no | `integer` | <ul><li>(1..5) override radio settings Wav volume for the duration of file</li><li>omitting the parameter uses radio settings Wav volume</li></ul> | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/audio-sound/play-haptic.md b/website/md-docs/api-reference/audio-sound/play-haptic.md new file mode 100644 index 000000000..0ad8001f6 --- /dev/null +++ b/website/md-docs/api-reference/audio-sound/play-haptic.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# playHaptic + +`playHaptic(duration, pause [, flags])` + +Generate haptic feedback + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `duration` | yes | `integer` | length of the haptic feedback in milliseconds | +| `pause` | yes | `integer` | length of the silence after haptic feedback in milliseconds | +| `flags` | no | `integer` | <ul><li>`0 or not present` play with normal priority</li><li>`PLAY_NOW` play immediately</li></ul> | + +## Returns + +None. + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/audio-sound/play-number.md b/website/md-docs/api-reference/audio-sound/play-number.md new file mode 100644 index 000000000..787567f55 --- /dev/null +++ b/website/md-docs/api-reference/audio-sound/play-number.md @@ -0,0 +1,38 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# playNumber + +`playNumber(value, unit [, attributes [, volume]])` + +Play a numerical value (text to speech) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `value` | yes | `integer` | number to play. Value is interpreted as integer. | +| `unit` | yes | `integer` | unit identifier, see the Units reference for the full list | +| `attributes` | no | `integer` | possible values:<ul><li>`0 or not present` plays integral part of the number (for a number 123 it plays 123)</li><li>`PREC1` plays a number with one decimal place (for a number 123 it plays 12.3)</li><li>`PREC2` plays a number with two decimal places (for a number 123 it plays 1.23)</li></ul> | +| `volume` | no | `integer` | <ul><li>(1..5) override radio settings Wav volume for the duration of file</li><li>omitting the parameter uses radio settings Wav volume</li></ul> | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/audio-sound/play-tone.md b/website/md-docs/api-reference/audio-sound/play-tone.md new file mode 100644 index 000000000..d8f8c8734 --- /dev/null +++ b/website/md-docs/api-reference/audio-sound/play-tone.md @@ -0,0 +1,40 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# playTone + +`playTone(frequency, duration, pause [, flags [, freqIncr [, volume]]])` + +Play a tone + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `frequency` | yes | `integer` | tone frequency in Hz (from 150 to 15000) | +| `duration` | yes | `integer` | length of the tone in milliseconds | +| `pause` | yes | `integer` | length of the silence after the tone in milliseconds | +| `flags` | no | `integer` | <ul><li>`0 or not present` play with normal priority.</li><li>`PLAY_BACKGROUND` play in background (built in vario function uses this context)</li><li>`PLAY_NOW` play immediately</li></ul> | +| `freqIncr` | no | `integer` | positive number increases the tone pitch (frequency with time), negative number decreases it. The frequency changes every 10 milliseconds, the change is `freqIncr * 10Hz`.<br>The valid range is from -127 to 127. | +| `volume` | no | `integer` | <ul><li>(1..5) override radio settings Beep volume for the duration of file</li><li>omitting the parameter uses radio settings Beep volume</li></ul> | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.1.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/display-lcd/bitmap-get-size.md b/website/md-docs/api-reference/display-lcd/bitmap-get-size.md new file mode 100644 index 000000000..fa5179fdb --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/bitmap-get-size.md @@ -0,0 +1,40 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Bitmap.getSize + +`Bitmap.getSize(name)` + +Return width, height of a bitmap object + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `name` | yes | `pointer` | point to a bitmap previously opened with Bitmap.open() | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `width_in_pixels` | `integer` | width in pixels | +| `height_in_pixels` | `integer` | height in pixels | + +## Availability + +- Since: `2.2.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/bitmap-open.md b/website/md-docs/api-reference/display-lcd/bitmap-open.md new file mode 100644 index 000000000..f6b432b3b --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/bitmap-open.md @@ -0,0 +1,41 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Bitmap.open + +`Bitmap.open(name)` + +Loads a bitmap in memory, for later use with lcd.drawBitmap(). Bitmaps should be loaded only +once, returned object should be stored and used for drawing. If loading fails for whatever +reason the resulting bitmap object will have width and height set to zero. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `name` | yes | `string` | full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `bitmap` | `object` | a bitmap object that can be used with other bitmap functions | + +## Availability + +- Since: `2.2.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/bitmap-resize.md b/website/md-docs/api-reference/display-lcd/bitmap-resize.md new file mode 100644 index 000000000..f6ae6fe3f --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/bitmap-resize.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Bitmap.resize + +`Bitmap.resize(bitmap, width, height)` + +Return a resized bitmap object + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `bitmap` | yes | `pointer` | point to a bitmap previously opened with Bitmap.open() | +| `width` | yes | `integer` | the new bitmap width | +| `height` | yes | `integer` | the new bitmap height | + +## Returns + +None. + +## Availability + +- Since: `2.8.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/bitmap-to-mask.md b/website/md-docs/api-reference/display-lcd/bitmap-to-mask.md new file mode 100644 index 000000000..6dceeb986 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/bitmap-to-mask.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Bitmap.toMask + +`Bitmap.toMask(bitmap)` + +Return a 8bit bitmap mask that can be used with lcd.drawBitmapPattern() + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `bitmap` | yes | `pointer` | point to a bitmap previously opened with Bitmap.open() | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `a` | `unknown` | bitmap mask | + +## Availability + +- Since: `2.8.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/grey.md b/website/md-docs/api-reference/display-lcd/grey.md new file mode 100644 index 000000000..57213a789 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/grey.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# GREY + +`GREY()` + +Returns gray value which can be used in LCD functions + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | a value that represents amount of *greyness* (from 0 to 15) | + +## Availability + +- Since: `2.0.13` +- Radio support: `all` + +## Notes + +- Only available on Taranis + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/display-lcd/index.md b/website/md-docs/api-reference/display-lcd/index.md new file mode 100644 index 000000000..876f57d8b --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/index.md @@ -0,0 +1,203 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Display LCD + +Drawing, layout, color, and display helpers for LCD rendering. + +<div class="api-grid"> +<a class="api-card" href="bitmap-get-size/"> +<span class="api-card-title">Bitmap.getSize</span> +<span class="api-card-summary">Return width, height of a bitmap object</span> +</a> +<a class="api-card" href="bitmap-open/"> +<span class="api-card-title">Bitmap.open</span> +<span class="api-card-summary">Loads a bitmap in memory, for later use with lcd.drawBitmap().</span> +</a> +<a class="api-card" href="bitmap-resize/"> +<span class="api-card-title">Bitmap.resize</span> +<span class="api-card-summary">Return a resized bitmap object</span> +</a> +<a class="api-card" href="bitmap-to-mask/"> +<span class="api-card-title">Bitmap.toMask</span> +<span class="api-card-summary">Return a 8bit bitmap mask that can be used with lcd.drawBitmapPattern()</span> +</a> +<a class="api-card" href="grey/"> +<span class="api-card-title">GREY</span> +<span class="api-card-summary">Returns gray value which can be used in LCD functions</span> +</a> +<a class="api-card" href="lcd-rgb/"> +<span class="api-card-title">lcd.RGB</span> +<span class="api-card-summary">Returns a drawing flag with RGB color code</span> +</a> +<a class="api-card" href="lcd-clear/"> +<span class="api-card-title">lcd.clear</span> +<span class="api-card-summary">Clear the LCD screen</span> +</a> +<a class="api-card" href="lcd-draw-annulus/"> +<span class="api-card-title">lcd.drawAnnulus</span> +<span class="api-card-summary">Draw an arc</span> +</a> +<a class="api-card" href="lcd-draw-arc/"> +<span class="api-card-title">lcd.drawArc</span> +<span class="api-card-summary">Draw an arc</span> +</a> +<a class="api-card" href="lcd-draw-bitmap/"> +<span class="api-card-title">lcd.drawBitmap</span> +<span class="api-card-summary">Displays a bitmap at (x,y)</span> +</a> +<a class="api-card" href="lcd-draw-bitmap-pattern/"> +<span class="api-card-title">lcd.drawBitmapPattern</span> +<span class="api-card-summary">Displays a bitmap pattern at (x,y)</span> +</a> +<a class="api-card" href="lcd-draw-bitmap-pattern-pie/"> +<span class="api-card-title">lcd.drawBitmapPatternPie</span> +<span class="api-card-summary">Displays a bitmap pattern pie at (x,y)</span> +</a> +<a class="api-card" href="lcd-draw-channel/"> +<span class="api-card-title">lcd.drawChannel</span> +<span class="api-card-summary">Display a telemetry value at (x,y)</span> +</a> +<a class="api-card" href="lcd-draw-circle/"> +<span class="api-card-title">lcd.drawCircle</span> +<span class="api-card-summary">Draw a circle at (x, y) of specified radius</span> +</a> +<a class="api-card" href="lcd-draw-combobox/"> +<span class="api-card-title">lcd.drawCombobox</span> +<span class="api-card-summary">Draw a combo box</span> +</a> +<a class="api-card" href="lcd-draw-filled-circle/"> +<span class="api-card-title">lcd.drawFilledCircle</span> +<span class="api-card-summary">Draw a filled circle at (x, y) of specified radius</span> +</a> +<a class="api-card" href="lcd-draw-filled-rectangle/"> +<span class="api-card-title">lcd.drawFilledRectangle</span> +<span class="api-card-summary">Draw a solid rectangle from top left corner (x,y) of specified width and height</span> +</a> +<a class="api-card" href="lcd-draw-filled-triangle/"> +<span class="api-card-title">lcd.drawFilledTriangle</span> +<span class="api-card-summary">Draw a filled triangle</span> +</a> +<a class="api-card" href="lcd-draw-gauge/"> +<span class="api-card-title">lcd.drawGauge</span> +<span class="api-card-summary">Draw a simple gauge that is filled based upon fill value</span> +</a> +<a class="api-card" href="lcd-draw-hud-rectangle/"> +<span class="api-card-title">lcd.drawHudRectangle</span> +<span class="api-card-summary">Draw a rectangle in perspective</span> +</a> +<a class="api-card" href="lcd-draw-line/"> +<span class="api-card-title">lcd.drawLine</span> +<span class="api-card-summary">Draw a straight line on LCD</span> +</a> +<a class="api-card" href="lcd-draw-line-with-clipping/"> +<span class="api-card-title">lcd.drawLineWithClipping</span> +<span class="api-card-summary">Draw a line only inside a rectangle</span> +</a> +<a class="api-card" href="lcd-draw-number/"> +<span class="api-card-title">lcd.drawNumber</span> +<span class="api-card-summary">Display a number at (x,y)</span> +</a> +<a class="api-card" href="lcd-draw-pie/"> +<span class="api-card-title">lcd.drawPie</span> +<span class="api-card-summary">Draw a pie slice</span> +</a> +<a class="api-card" href="lcd-draw-pixmap/"> +<span class="api-card-title">lcd.drawPixmap</span> +<span class="api-card-summary">Draw a bitmap at (x,y)</span> +</a> +<a class="api-card" href="lcd-draw-point/"> +<span class="api-card-title">lcd.drawPoint</span> +<span class="api-card-summary">Draw a single pixel at (x,y) position</span> +</a> +<a class="api-card" href="lcd-draw-rectangle/"> +<span class="api-card-title">lcd.drawRectangle</span> +<span class="api-card-summary">Draw a rectangle from top left corner (x,y) of specified width and height</span> +</a> +<a class="api-card" href="lcd-draw-screen-title/"> +<span class="api-card-title">lcd.drawScreenTitle</span> +<span class="api-card-summary">Draw a title bar</span> +</a> +<a class="api-card" href="lcd-draw-source/"> +<span class="api-card-title">lcd.drawSource</span> +<span class="api-card-summary">Displays the name of the corresponding input as defined by the source at (x,y)</span> +</a> +<a class="api-card" href="lcd-draw-switch/"> +<span class="api-card-title">lcd.drawSwitch</span> +<span class="api-card-summary">Draw a text representation of switch at (x,y)</span> +</a> +<a class="api-card" href="lcd-draw-text/"> +<span class="api-card-title">lcd.drawText</span> +<span class="api-card-summary">Draw a text beginning at (x,y)</span> +</a> +<a class="api-card" href="lcd-draw-text-lines/"> +<span class="api-card-title">lcd.drawTextLines</span> +<span class="api-card-summary">Draw text inside rectangle (x,y,w,h) with line breaks</span> +</a> +<a class="api-card" href="lcd-draw-timer/"> +<span class="api-card-title">lcd.drawTimer</span> +<span class="api-card-summary">Display a value formatted as time at (x,y)</span> +</a> +<a class="api-card" href="lcd-draw-triangle/"> +<span class="api-card-title">lcd.drawTriangle</span> +<span class="api-card-summary">Draw a triangle</span> +</a> +<a class="api-card" href="lcd-exit-full-screen/"> +<span class="api-card-title">lcd.exitFullScreen</span> +<span class="api-card-summary">Exit full screen widget mode.</span> +</a> +<a class="api-card" href="lcd-get-color/"> +<span class="api-card-title">lcd.getColor</span> +<span class="api-card-summary">Get the color value from flags</span> +</a> +<a class="api-card" href="lcd-get-last-left-pos/"> +<span class="api-card-title">lcd.getLastLeftPos</span> +<span class="api-card-summary">Returns the leftmost x position from previous drawtext or drawNumber output</span> +</a> +<a class="api-card" href="lcd-get-last-pos/"> +<span class="api-card-title">lcd.getLastPos</span> +<span class="api-card-summary">Returns the rightmost x position from previous output</span> +</a> +<a class="api-card" href="lcd-get-last-right-pos/"> +<span class="api-card-title">lcd.getLastRightPos</span> +<span class="api-card-summary">Returns the rightest x position from previous drawtext or drawNumber output</span> +</a> +<a class="api-card" href="lcd-invert-rect/"> +<span class="api-card-title">lcd.invertRect</span> +<span class="api-card-summary">Invert a rectangle zone from top left corner (x,y) of specified width and height</span> +</a> +<a class="api-card" href="lcd-refresh/"> +<span class="api-card-title">lcd.refresh</span> +<span class="api-card-summary">Refresh the LCD screen</span> +</a> +<a class="api-card" href="lcd-reset-backlight-timeout/"> +<span class="api-card-title">lcd.resetBacklightTimeout</span> +<span class="api-card-summary">Reset the backlight timeout</span> +</a> +<a class="api-card" href="lcd-set-color/"> +<span class="api-card-title">lcd.setColor</span> +<span class="api-card-summary">Change an indexed color (theme colors and CUSTOM_COLOR).</span> +</a> +<a class="api-card" href="lcd-size-text/"> +<span class="api-card-title">lcd.sizeText</span> +<span class="api-card-summary">Get the width and height of a text string drawn with flags</span> +</a> +<a class="api-card" href="popup-confirmation/"> +<span class="api-card-title">popupConfirmation</span> +<span class="api-card-summary">Raises a pop-up on screen that asks for confirmation</span> +</a> +<a class="api-card" href="popup-input/"> +<span class="api-card-title">popupInput</span> +<span class="api-card-summary">Raises a pop-up on screen that allows uses input</span> +</a> +<a class="api-card" href="popup-warning/"> +<span class="api-card-title">popupWarning</span> +<span class="api-card-summary">Raises a pop-up on screen that shows a warning</span> +</a> +</div> diff --git a/website/md-docs/api-reference/display-lcd/lcd-clear.md b/website/md-docs/api-reference/display-lcd/lcd-clear.md new file mode 100644 index 000000000..431e04106 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-clear.md @@ -0,0 +1,38 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.clear + +`lcd.clear([color])` + +Clear the LCD screen + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `color` | no | `unknown` | | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Notes + +- This function only works in stand-alone and telemetry scripts. + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-annulus.md b/website/md-docs/api-reference/display-lcd/lcd-draw-annulus.md new file mode 100644 index 000000000..82079fa60 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-annulus.md @@ -0,0 +1,43 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawAnnulus + +`lcd.drawAnnulus(x, y, r1, r2, start, end [, flags])` + +Draw an arc + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | coordinates of the center | +| `y` | yes | `integer` | coordinates of the center | +| `r1` | yes | `integer` | radii of the inside and outside of the annulus | +| `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 the Lcd functions overview | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-arc.md b/website/md-docs/api-reference/display-lcd/lcd-draw-arc.md new file mode 100644 index 000000000..a1e4629db --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-arc.md @@ -0,0 +1,42 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawArc + +`lcd.drawArc(x, y, r, start, end [, flags])` + +Draw an arc + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | coordinates of the center | +| `y` | yes | `integer` | coordinates of the center | +| `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 the Lcd functions overview | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-bitmap-pattern-pie.md b/website/md-docs/api-reference/display-lcd/lcd-draw-bitmap-pattern-pie.md new file mode 100644 index 000000000..d9e45921a --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-bitmap-pattern-pie.md @@ -0,0 +1,42 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawBitmapPatternPie + +`lcd.drawBitmapPatternPie(bitmap, x, y, startAngle, endAngle [, flags])` + +Displays a bitmap pattern pie at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `bitmap` | yes | `pointer` | point to a bitmap previously opened with Bitmap.open() | +| `x` | yes | `integer` | starting coordinates | +| `y` | yes | `integer` | starting coordinates | +| `startAngle` | yes | `unknown` | Start angle | +| `endAngle` | yes | `unknown` | End angle | +| `flags` | no | `integer` | please see the Lcd functions overview | + +## Returns + +None. + +## Availability + +- Since: `2.8.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-bitmap-pattern.md b/website/md-docs/api-reference/display-lcd/lcd-draw-bitmap-pattern.md new file mode 100644 index 000000000..7981c1783 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-bitmap-pattern.md @@ -0,0 +1,40 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawBitmapPattern + +`lcd.drawBitmapPattern(bitmap, x, y [, flags])` + +Displays a bitmap pattern at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `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 the Lcd functions overview | + +## Returns + +None. + +## Availability + +- Since: `2.8.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-bitmap.md b/website/md-docs/api-reference/display-lcd/lcd-draw-bitmap.md new file mode 100644 index 000000000..25f052d26 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-bitmap.md @@ -0,0 +1,58 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawBitmap + +`lcd.drawBitmap(bitmap, x, y [, scale])` + +Displays a bitmap at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `bitmap` | yes | `pointer` | point to a bitmap previously opened with Bitmap.open() | +| `x` | yes | `integer` | starting coordinates | +| `y` | yes | `integer` | starting coordinates | +| `scale` | no | `integer` | scale in %, 50 divides size by two, 100 is unchanged, 200 doubles size. Omitting scale draws image in 1:1 scale and is faster than specifying 100 for scale. | + +## Returns + +None. + +## Availability + +- Since: `2.2.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` + +## Extended Description + +`lcd.drawBitmap` is a good example of the split between generated API truth and richer authored guidance. The syntax, parameter list, and availability belong in upstream source annotations. Practical usage notes and examples can stay here in an overlay file. + +## Examples + +```lua +local bmp = Bitmap.open("/IMAGES/logo.png") +if bmp then + lcd.drawBitmap(bmp, 10, 12, 100) +end +``` + +## Related Topics + +- `Bitmap.open` +- `Bitmap.getSize` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-channel.md b/website/md-docs/api-reference/display-lcd/lcd-draw-channel.md new file mode 100644 index 000000000..ed6838a9a --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-channel.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawChannel + +`lcd.drawChannel(x, y, source, flags)` + +Display a telemetry value at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `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 the Lcd functions overview | + +## Returns + +None. + +## Availability + +- Since: `2.0.6` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-circle.md b/website/md-docs/api-reference/display-lcd/lcd-draw-circle.md new file mode 100644 index 000000000..af1effc23 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-circle.md @@ -0,0 +1,40 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawCircle + +`lcd.drawCircle(x, y, r [, flags])` + +Draw a circle at (x, y) of specified radius + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | center position | +| `y` | yes | `integer` | center position | +| `r` | yes | `integer` | radius in pixels | +| `flags` | no | `integer` | please see the Lcd functions overview | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-combobox.md b/website/md-docs/api-reference/display-lcd/lcd-draw-combobox.md new file mode 100644 index 000000000..884cc3610 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-combobox.md @@ -0,0 +1,42 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawCombobox + +`lcd.drawCombobox(x, y, w, list, idx [, flags])` + +Draw a combo box + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | top left corner position | +| `y` | yes | `integer` | top left corner position | +| `w` | yes | `integer` | width of combo box in pixels | +| `list` | yes | `table` | combo box elements, each element is a string | +| `idx` | yes | `integer` | index of entry to highlight | +| `flags` | no | `integer` | drawing flags, the flags can not be combined:<ul><li>`BLINK` combo box is expanded</li><li>`INVERS` combo box collapsed, text inversed</li><li>`0 or not present` combo box collapsed, text normal</li></ul> | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` + +## Notes + +- Only available on Taranis + +## Source + +`radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-filled-circle.md b/website/md-docs/api-reference/display-lcd/lcd-draw-filled-circle.md new file mode 100644 index 000000000..24e47d7fa --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-filled-circle.md @@ -0,0 +1,40 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawFilledCircle + +`lcd.drawFilledCircle(x, y, r [, flags])` + +Draw a filled circle at (x, y) of specified radius + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | center position | +| `y` | yes | `integer` | center position | +| `r` | yes | `integer` | radius in pixels | +| `flags` | no | `integer` | please see the Lcd functions overview | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-filled-rectangle.md b/website/md-docs/api-reference/display-lcd/lcd-draw-filled-rectangle.md new file mode 100644 index 000000000..ecc8b325c --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-filled-rectangle.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawFilledRectangle + +`lcd.drawFilledRectangle(x, y, w, h [, flags [, opacity]])` + +Draw a solid rectangle from top left corner (x,y) of specified width and height + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | top left corner position | +| `y` | yes | `integer` | top left corner position | +| `w` | yes | `integer` | width in pixels | +| `h` | yes | `integer` | height in pixels | +| `flags` | no | `integer` | please see the Lcd functions overview | +| `opacity` | no | `integer` | opacity defaults to 0 (only on radios with color display) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-filled-triangle.md b/website/md-docs/api-reference/display-lcd/lcd-draw-filled-triangle.md new file mode 100644 index 000000000..6b4799d1b --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-filled-triangle.md @@ -0,0 +1,43 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawFilledTriangle + +`lcd.drawFilledTriangle(x1, y1, x2, y2, x3, y3 [, flags])` + +Draw a filled triangle + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x1` | yes | `integer` | coordinates of the three vertices | +| `y1` | yes | `integer` | coordinates of the three vertices | +| `x2` | yes | `integer` | coordinates of the three vertices | +| `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 the Lcd functions overview | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-gauge.md b/website/md-docs/api-reference/display-lcd/lcd-draw-gauge.md new file mode 100644 index 000000000..addd2de78 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-gauge.md @@ -0,0 +1,40 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawGauge + +`lcd.drawGauge(x, y, w, h, fill, maxfill [, flags])` + +Draw a simple gauge that is filled based upon fill value + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | top left corner position | +| `y` | yes | `integer` | top left corner position | +| `w` | yes | `integer` | width in pixels | +| `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 the Lcd functions overview | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-hud-rectangle.md b/website/md-docs/api-reference/display-lcd/lcd-draw-hud-rectangle.md new file mode 100644 index 000000000..90e356bae --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-hud-rectangle.md @@ -0,0 +1,43 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawHudRectangle + +`lcd.drawHudRectangle(pitch, roll, xmin, xmax, ymin, ymax [, flags])` + +Draw a rectangle in perspective + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `pitch` | yes | `integer` | pitch and roll to define the orientation of the rectangle | +| `roll` | yes | `integer` | pitch and roll to define the orientation of the rectangle | +| `xmin` | yes | `integer` | the limits of the rectangle | +| `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 the Lcd functions overview | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-line-with-clipping.md b/website/md-docs/api-reference/display-lcd/lcd-draw-line-with-clipping.md new file mode 100644 index 000000000..46129fb9b --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-line-with-clipping.md @@ -0,0 +1,46 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawLineWithClipping + +`lcd.drawLineWithClipping(x1, y1, x2, y2, xmin, xmax, ymin, ymax, pattern [, flags])` + +Draw a line only inside a rectangle + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x1` | yes | `integer` | coordinates of the start and end of the unclipped line | +| `y1` | yes | `integer` | coordinates of the start and end of the unclipped line | +| `x2` | yes | `integer` | coordinates of the start and end of the unclipped line | +| `y2` | yes | `integer` | coordinates of the start and end of the unclipped line | +| `xmin` | yes | `integer` | the limits of the rectangle inside which the line is drawn | +| `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 the Lcd functions overview | +| `flags` | no | `integer` | please see the Lcd functions overview | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-line.md b/website/md-docs/api-reference/display-lcd/lcd-draw-line.md new file mode 100644 index 000000000..b603aa4fe --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-line.md @@ -0,0 +1,44 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawLine + +`lcd.drawLine(x1, y1, x2, y2, pattern, [flags])` + +Draw a straight line on LCD + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x1` | yes | `integer` | starting coordinate | +| `y1` | yes | `integer` | starting coordinate | +| `x2` | yes | `integer` | end coordinate | +| `y2` | yes | `integer` | end coordinate | +| `pattern` | yes | `unknown` | SOLID or DOTTED | +| `flags` | no | `integer` | lcdflags | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Notes + +- If the start or the end of the line is outside the LCD dimensions, then the +whole line will not be drawn (starting from OpenTX 2.1.5) + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-number.md b/website/md-docs/api-reference/display-lcd/lcd-draw-number.md new file mode 100644 index 000000000..a6c2dd2ab --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-number.md @@ -0,0 +1,38 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawNumber + +`lcd.drawNumber(x, y, value [, flags [, inversColor]])` + +Display a number at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | starting coordinate | +| `y` | yes | `integer` | starting coordinate | +| `value` | yes | `integer` | value to display | +| `flags` | no | `integer` | please see the Lcd functions overview | +| `inversColor` | no | `unknown` | overrides the inverse text color for INVERS | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-pie.md b/website/md-docs/api-reference/display-lcd/lcd-draw-pie.md new file mode 100644 index 000000000..547d1c885 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-pie.md @@ -0,0 +1,42 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawPie + +`lcd.drawPie(x, y, r, start, end [, flags])` + +Draw a pie slice + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | coordinates of the center | +| `y` | yes | `integer` | coordinates of the center | +| `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 the Lcd functions overview | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-pixmap.md b/website/md-docs/api-reference/display-lcd/lcd-draw-pixmap.md new file mode 100644 index 000000000..eb74163c7 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-pixmap.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawPixmap + +`lcd.drawPixmap(x, y, name)` + +Draw a bitmap at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | starting coordinates | +| `y` | yes | `integer` | starting coordinates | +| `name` | yes | `string` | full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` + +## Notes + +- Maximum image size is [display width / 2] x [display height] pixels. + +## Source + +`radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-point.md b/website/md-docs/api-reference/display-lcd/lcd-draw-point.md new file mode 100644 index 000000000..9bcaea87e --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-point.md @@ -0,0 +1,42 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawPoint + +`lcd.drawPoint(x, y, [flags])` + +Draw a single pixel at (x,y) position + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | x position | +| `y` | yes | `integer` | y position | +| `flags` | no | `integer` | please see the Lcd functions overview | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Notes + +- Taranis has an LCD display width of 212 pixels and height of 64 pixels. +Position (0,0) is at top left. Y axis is negative, top line is 0, +bottom line is 63. Drawing on an existing black pixel produces white pixel (TODO check this!) + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-rectangle.md b/website/md-docs/api-reference/display-lcd/lcd-draw-rectangle.md new file mode 100644 index 000000000..199319f7e --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-rectangle.md @@ -0,0 +1,40 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawRectangle + +`lcd.drawRectangle(x, y, w, h [, flags [, t [, opacity]]])` + +Draw a rectangle from top left corner (x,y) of specified width and height + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | top left corner position | +| `y` | yes | `integer` | top left corner position | +| `w` | yes | `integer` | width in pixels | +| `h` | yes | `integer` | height in pixels | +| `flags` | no | `integer` | please see the Lcd functions overview | +| `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) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-screen-title.md b/website/md-docs/api-reference/display-lcd/lcd-draw-screen-title.md new file mode 100644 index 000000000..a3955a4a5 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-screen-title.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawScreenTitle + +`lcd.drawScreenTitle(title, page, pages)` + +Draw a title bar + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `title` | yes | `string` | text for the title | +| `page` | yes | `integer` | page number | +| `pages` | yes | `integer` | total number of pages. Only used as indicator on the right side of title bar. (i.e. idx=2, cnt=5, display `2/5`) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` + +## Notes + +- Only available on Taranis + +## Source + +`radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-source.md b/website/md-docs/api-reference/display-lcd/lcd-draw-source.md new file mode 100644 index 000000000..dd7c3d3f8 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-source.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawSource + +`lcd.drawSource(x, y, source [, flags])` + +Displays the name of the corresponding input as defined by the source at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | starting coordinate | +| `y` | yes | `integer` | starting coordinate | +| `source` | yes | `integer` | source index | +| `flags` | no | `integer` | please see the Lcd functions overview | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-switch.md b/website/md-docs/api-reference/display-lcd/lcd-draw-switch.md new file mode 100644 index 000000000..ef398c935 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-switch.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawSwitch + +`lcd.drawSwitch(x, y, switch, flags)` + +Draw a text representation of switch at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `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 the Lcd functions overview, only SMLSIZE, BLINK and INVERS. | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-text-lines.md b/website/md-docs/api-reference/display-lcd/lcd-draw-text-lines.md new file mode 100644 index 000000000..5cfacc928 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-text-lines.md @@ -0,0 +1,44 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawTextLines + +`lcd.drawTextLines(x, y, w, h, text [, flags])` + +Draw text inside rectangle (x,y,w,h) with line breaks + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | starting coordinate | +| `y` | yes | `integer` | starting coordinate | +| `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 the Lcd functions overview for drawing flags and colors, and the Appendix for available characters in each font set. RIGHT, CENTER and VCENTER are not implemented. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `x,y` | `integer` | point where text drawing ended | + +## Availability + +- Since: `2.5.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-text.md b/website/md-docs/api-reference/display-lcd/lcd-draw-text.md new file mode 100644 index 000000000..d2812c60c --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-text.md @@ -0,0 +1,38 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawText + +`lcd.drawText(x, y, text [, flags [, inversColor]])` + +Draw a text beginning at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | starting coordinate | +| `y` | yes | `integer` | starting coordinate | +| `text` | yes | `string` | text to display | +| `flags` | no | `integer` | please see the Lcd functions overview for drawing flags and colors, and the Appendix for available characters in each font set. | +| `inversColor` | no | `unknown` | overrides the inverse text color for INVERS | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-timer.md b/website/md-docs/api-reference/display-lcd/lcd-draw-timer.md new file mode 100644 index 000000000..6a276af49 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-timer.md @@ -0,0 +1,38 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawTimer + +`lcd.drawTimer(x, y, value [, flags [, inversColor]])` + +Display a value formatted as time at (x,y) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | starting coordinate | +| `y` | yes | `integer` | starting coordinate | +| `value` | yes | `integer` | time in seconds | +| `flags` | no | `integer` | please see the Lcd functions overview | +| `inversColor` | no | `unknown` | overrides the inverse text color for INVERS | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-draw-triangle.md b/website/md-docs/api-reference/display-lcd/lcd-draw-triangle.md new file mode 100644 index 000000000..a0393a217 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-draw-triangle.md @@ -0,0 +1,43 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.drawTriangle + +`lcd.drawTriangle(x1, y1, x2, y2, x3, y3 [, flags])` + +Draw a triangle + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x1` | yes | `integer` | coordinates of the three vertices | +| `y1` | yes | `integer` | coordinates of the three vertices | +| `x2` | yes | `integer` | coordinates of the three vertices | +| `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 the Lcd functions overview | + +## Returns + +None. + +## Availability + +- Since: `2.4.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-exit-full-screen.md b/website/md-docs/api-reference/display-lcd/lcd-exit-full-screen.md new file mode 100644 index 000000000..e351a6679 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-exit-full-screen.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.exitFullScreen + +`lcd.exitFullScreen()` + +Exit full screen widget mode. + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.5.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-get-color.md b/website/md-docs/api-reference/display-lcd/lcd-get-color.md new file mode 100644 index 000000000..69f0bbb49 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-get-color.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.getColor + +`lcd.getColor(flags)` + +Get the color value from flags + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `flags` | yes | `integer` | please see the Lcd functions overview | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `color` | `integer` | only the RGB565 color value of the input | + +## Availability + +- Since: `2.3.11` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-get-last-left-pos.md b/website/md-docs/api-reference/display-lcd/lcd-get-last-left-pos.md new file mode 100644 index 000000000..0f1b96ba4 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-get-last-left-pos.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.getLastLeftPos + +`lcd.getLastLeftPos()` + +Returns the leftmost x position from previous drawtext or drawNumber output + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `number` | `integer` | x position | + +## Availability + +- Since: `2.2.0` +- Radio support: `bw-lcd` + +## Notes + +- Only available on Taranis + +## Source + +`radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-get-last-pos.md b/website/md-docs/api-reference/display-lcd/lcd-get-last-pos.md new file mode 100644 index 000000000..eb76a99c0 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-get-last-pos.md @@ -0,0 +1,38 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.getLastPos + +`lcd.getLastPos()` + +Returns the rightmost x position from previous output + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `number` | `integer` | x position | + +## Availability + +- Since: `2.0.0` +- Radio support: `bw-lcd` + +## Notes + +- Only available on Taranis +- For added clarity, it is recommended to use lcd.getLastRightPos() + +## Source + +`radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-get-last-right-pos.md b/website/md-docs/api-reference/display-lcd/lcd-get-last-right-pos.md new file mode 100644 index 000000000..e94d4c3df --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-get-last-right-pos.md @@ -0,0 +1,38 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.getLastRightPos + +`lcd.getLastRightPos()` + +Returns the rightest x position from previous drawtext or drawNumber output + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `number` | `integer` | x position | + +## Availability + +- Since: `2.2.0` +- Radio support: `bw-lcd` + +## Notes + +- Only available on Taranis +- This is strictly equivalent to former lcd.getLastPos() + +## Source + +`radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-invert-rect.md b/website/md-docs/api-reference/display-lcd/lcd-invert-rect.md new file mode 100644 index 000000000..e34dd9ef1 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-invert-rect.md @@ -0,0 +1,41 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.invertRect + +`lcd.invertRect(x, y, w, h [, flags])` + +Invert a rectangle zone from top left corner (x,y) of specified width and height + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | top left corner position | +| `y` | yes | `integer` | top left corner position | +| `w` | yes | `integer` | width in pixels | +| `h` | yes | `integer` | height in pixels | +| `flags` | no | `integer` | please see the Lcd functions overview | + +## Returns + +None. + +## Availability + +- Since: `2.8.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-refresh.md b/website/md-docs/api-reference/display-lcd/lcd-refresh.md new file mode 100644 index 000000000..27d668782 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-refresh.md @@ -0,0 +1,36 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.refresh + +`lcd.refresh()` + +Refresh the LCD screen + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.2.0` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Notes + +- This function only works in stand-alone and telemetry scripts. + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-reset-backlight-timeout.md b/website/md-docs/api-reference/display-lcd/lcd-reset-backlight-timeout.md new file mode 100644 index 000000000..6d47609e8 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-reset-backlight-timeout.md @@ -0,0 +1,32 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.resetBacklightTimeout + +`lcd.resetBacklightTimeout()` + +Reset the backlight timeout + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.3.6` +- Radio support: `bw-lcd` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-rgb.md b/website/md-docs/api-reference/display-lcd/lcd-rgb.md new file mode 100644 index 000000000..68e87e518 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-rgb.md @@ -0,0 +1,42 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.RGB + +`lcd.RGB(r, g, b | rgb)` + +Returns a drawing flag with RGB color code + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `r` | yes | `integer` | a number between 0 and 255 that expresses the amount of red in the color | +| `g` | yes | `integer` | a number between 0 and 255 that expresses the amount of green in the color | +| `b` | yes | `integer` | a number between 0 and 255 that expresses the amount of blue in the color | +| `rgb` | yes | `integer` | a number between 0 and 0xFFFFFF that expresses the RGB value (0xFF000=RED, 0x00FF00=GREEN, 0x0000FF=BLUE) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `flag` | `integer` | with RGB565 color | + +## Availability + +- Since: `2.2.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display. Use *either* lcd.RGB(r,g,b) *or* lcd.RGB(rgb) + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-set-color.md b/website/md-docs/api-reference/display-lcd/lcd-set-color.md new file mode 100644 index 000000000..a0813c426 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-set-color.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.setColor + +`lcd.setColor(colorIndex, color)` + +Change an indexed color (theme colors and CUSTOM_COLOR). Please see the Lcd functions overview for indexed color constants + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.2.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/lcd-size-text.md b/website/md-docs/api-reference/display-lcd/lcd-size-text.md new file mode 100644 index 000000000..ec9da94cc --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/lcd-size-text.md @@ -0,0 +1,40 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd.sizeText + +`lcd.sizeText(text [, flags])` + +Get the width and height of a text string drawn with flags + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `text` | yes | `string` | | +| `flags` | no | `integer` | please see the Lcd functions overview | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `w,h` | `integer` | width and height of the text | + +## Availability + +- Since: `2.5.0` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_colorlcd.cpp` diff --git a/website/md-docs/api-reference/display-lcd/popup-confirmation.md b/website/md-docs/api-reference/display-lcd/popup-confirmation.md new file mode 100644 index 000000000..4d7ed2586 --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/popup-confirmation.md @@ -0,0 +1,41 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# popupConfirmation + +`popupConfirmation(title, event)` + +Raises a pop-up on screen that asks for confirmation + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `title` | yes | `string` | title to display | +| `message` | yes | `string` | text to display | +| `event` | yes | `integer` | the event variable that is passed in from the Run function (key pressed) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `"CANCEL"` | `unknown` | user pushed EXIT key | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Notes + +- Use only from stand-alone and telemetry scripts. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/display-lcd/popup-input.md b/website/md-docs/api-reference/display-lcd/popup-input.md new file mode 100644 index 000000000..faf5e464e --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/popup-input.md @@ -0,0 +1,45 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# popupInput + +`popupInput(title, event, input, min, max)` + +Raises a pop-up on screen that allows uses input + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `title` | yes | `string` | text to display | +| `event` | yes | `integer` | the event variable that is passed in from the Run function (key pressed) | +| `input` | yes | `integer` | value that can be adjusted by the +/- keys | +| `min` | yes | `integer` | min value that input can reach (by pressing the - key) | +| `max` | yes | `integer` | max value that input can reach | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | result of the input adjustment | +| `"OK"` | `unknown` | user pushed ENT key | +| `"CANCEL"` | `unknown` | user pushed EXIT key | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Notes + +- Use only from stand-alone and telemetry scripts. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/display-lcd/popup-warning.md b/website/md-docs/api-reference/display-lcd/popup-warning.md new file mode 100644 index 000000000..0710502da --- /dev/null +++ b/website/md-docs/api-reference/display-lcd/popup-warning.md @@ -0,0 +1,40 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# popupWarning + +`popupWarning(title, event)` + +Raises a pop-up on screen that shows a warning + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `title` | yes | `string` | text to display | +| `event` | yes | `integer` | the event variable that is passed in from the Run function (key pressed) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `"CANCEL"` | `unknown` | user pushed EXIT key | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Notes + +- Use only from stand-alone and telemetry scripts. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/index.md b/website/md-docs/api-reference/display-lvgl/index.md new file mode 100644 index 000000000..d4c93ad18 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/index.md @@ -0,0 +1,195 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Display LVGL + +LVGL bindings and UI helpers for display-oriented Lua scripts. + +<div class="api-grid"> +<a class="api-card" href="lvgl-align/"> +<span class="api-card-title">lvgl.align</span> +<span class="api-card-summary">Display a button showing a text alignment name.</span> +</a> +<a class="api-card" href="lvgl-arc/"> +<span class="api-card-title">lvgl.arc</span> +<span class="api-card-summary">Display an arc.</span> +</a> +<a class="api-card" href="lvgl-box/"> +<span class="api-card-title">lvgl.box</span> +<span class="api-card-summary">Create a container for managing object layout.</span> +</a> +<a class="api-card" href="lvgl-build/"> +<span class="api-card-title">lvgl.build</span> +<span class="api-card-summary">Build a complex UI in a single operation from a table of object definitions.</span> +</a> +<a class="api-card" href="lvgl-button/"> +<span class="api-card-title">lvgl.button</span> +<span class="api-card-summary">Add a text button using the EdgeTX style.</span> +</a> +<a class="api-card" href="lvgl-choice/"> +<span class="api-card-title">lvgl.choice</span> +<span class="api-card-summary">Display a button showing an option value.</span> +</a> +<a class="api-card" href="lvgl-circle/"> +<span class="api-card-title">lvgl.circle</span> +<span class="api-card-summary">Display a solid or outlined circle.</span> +</a> +<a class="api-card" href="lvgl-clear/"> +<span class="api-card-title">lvgl.clear</span> +<span class="api-card-summary">Delete LVGL objects.</span> +</a> +<a class="api-card" href="lvgl-close/"> +<span class="api-card-title">lvgl.close</span> +<span class="api-card-summary">Close an LVGL object that represents a closable container or dialog.</span> +</a> +<a class="api-card" href="lvgl-color/"> +<span class="api-card-title">lvgl.color</span> +<span class="api-card-summary">Display a button showing a color swatch.</span> +</a> +<a class="api-card" href="lvgl-confirm/"> +<span class="api-card-title">lvgl.confirm</span> +<span class="api-card-summary">Display a Yes/No confirmation dialog box.</span> +</a> +<a class="api-card" href="lvgl-dialog/"> +<span class="api-card-title">lvgl.dialog</span> +<span class="api-card-summary">Display a dialog box.</span> +</a> +<a class="api-card" href="lvgl-disable/"> +<span class="api-card-title">lvgl.disable</span> +<span class="api-card-summary">Disable interaction for an LVGL control object.</span> +</a> +<a class="api-card" href="lvgl-enable/"> +<span class="api-card-title">lvgl.enable</span> +<span class="api-card-summary">Enable interaction for an LVGL control object.</span> +</a> +<a class="api-card" href="lvgl-exit-full-screen/"> +<span class="api-card-title">lvgl.exitFullScreen</span> +<span class="api-card-summary">If the script is running in full screen mode, return it to normal mode.</span> +</a> +<a class="api-card" href="lvgl-file/"> +<span class="api-card-title">lvgl.file</span> +<span class="api-card-summary">Display a button showing a filename.</span> +</a> +<a class="api-card" href="lvgl-font/"> +<span class="api-card-title">lvgl.font</span> +<span class="api-card-summary">Display a button showing a font name.</span> +</a> +<a class="api-card" href="lvgl-get-context/"> +<span class="api-card-title">lvgl.getContext</span> +<span class="api-card-summary">For a widget script, returns the local instance table created by (and returned from) the script's `create()` function.</span> +</a> +<a class="api-card" href="lvgl-get-scroll-pos/"> +<span class="api-card-title">lvgl.getScrollPos</span> +<span class="api-card-summary">Get the current scroll position of a container object.</span> +</a> +<a class="api-card" href="lvgl-hide/"> +<span class="api-card-title">lvgl.hide</span> +<span class="api-card-summary">Hide an LVGL object.</span> +</a> +<a class="api-card" href="lvgl-hline/"> +<span class="api-card-title">lvgl.hline</span> +<span class="api-card-summary">Display a horizontal line.</span> +</a> +<a class="api-card" href="lvgl-image/"> +<span class="api-card-title">lvgl.image</span> +<span class="api-card-summary">Display an image, centered in the frame `(x, y, w, h)`.</span> +</a> +<a class="api-card" href="lvgl-is-app-mode/"> +<span class="api-card-title">lvgl.isAppMode</span> +<span class="api-card-summary">Test if the script is running in App Mode.</span> +</a> +<a class="api-card" href="lvgl-is-full-screen/"> +<span class="api-card-title">lvgl.isFullScreen</span> +<span class="api-card-summary">Test if the script is running in full screen mode.</span> +</a> +<a class="api-card" href="lvgl-label/"> +<span class="api-card-title">lvgl.label</span> +<span class="api-card-summary">Display a text label.</span> +</a> +<a class="api-card" href="lvgl-line/"> +<span class="api-card-title">lvgl.line</span> +<span class="api-card-summary">Display one or more connected line segments.</span> +</a> +<a class="api-card" href="lvgl-menu/"> +<span class="api-card-title">lvgl.menu</span> +<span class="api-card-summary">Open a popup menu with multiple options to choose from, using EdgeTX styling.</span> +</a> +<a class="api-card" href="lvgl-message/"> +<span class="api-card-title">lvgl.message</span> +<span class="api-card-summary">Display a message dialog box.</span> +</a> +<a class="api-card" href="lvgl-momentary-button/"> +<span class="api-card-title">lvgl.momentaryButton</span> +<span class="api-card-summary">Add a momentary text button using the EdgeTX style.</span> +</a> +<a class="api-card" href="lvgl-number-edit/"> +<span class="api-card-title">lvgl.numberEdit</span> +<span class="api-card-summary">Add a number edit box using the EdgeTX style.</span> +</a> +<a class="api-card" href="lvgl-page/"> +<span class="api-card-title">lvgl.page</span> +<span class="api-card-summary">Create a page layout for a One-Time script using EdgeTX styling: a header with title/sub-title lines and a back...</span> +</a> +<a class="api-card" href="lvgl-qrcode/"> +<span class="api-card-title">lvgl.qrcode</span> +<span class="api-card-summary">Display a QR code.</span> +</a> +<a class="api-card" href="lvgl-rectangle/"> +<span class="api-card-title">lvgl.rectangle</span> +<span class="api-card-summary">Display a rectangle.</span> +</a> +<a class="api-card" href="lvgl-set/"> +<span class="api-card-title">lvgl.set</span> +<span class="api-card-summary">Update the settings of an existing LVGL object.</span> +</a> +<a class="api-card" href="lvgl-setting/"> +<span class="api-card-title">lvgl.setting</span> +<span class="api-card-summary">Create a container for a single row of a settings page, automatically padded for controls such as...</span> +</a> +<a class="api-card" href="lvgl-show/"> +<span class="api-card-title">lvgl.show</span> +<span class="api-card-summary">Show an LVGL object.</span> +</a> +<a class="api-card" href="lvgl-slider/"> +<span class="api-card-title">lvgl.slider</span> +<span class="api-card-summary">Add a horizontal slider using the EdgeTX style.</span> +</a> +<a class="api-card" href="lvgl-source/"> +<span class="api-card-title">lvgl.source</span> +<span class="api-card-summary">Display a button showing a source name.</span> +</a> +<a class="api-card" href="lvgl-switch/"> +<span class="api-card-title">lvgl.switch</span> +<span class="api-card-summary">Display a button showing a switch name.</span> +</a> +<a class="api-card" href="lvgl-text-edit/"> +<span class="api-card-title">lvgl.textEdit</span> +<span class="api-card-summary">Add a text edit box using the EdgeTX style.</span> +</a> +<a class="api-card" href="lvgl-timer/"> +<span class="api-card-title">lvgl.timer</span> +<span class="api-card-summary">Display a button showing a timer name.</span> +</a> +<a class="api-card" href="lvgl-toggle/"> +<span class="api-card-title">lvgl.toggle</span> +<span class="api-card-summary">Add a toggle switch using the EdgeTX style.</span> +</a> +<a class="api-card" href="lvgl-triangle/"> +<span class="api-card-title">lvgl.triangle</span> +<span class="api-card-summary">Display a filled triangle.</span> +</a> +<a class="api-card" href="lvgl-vertical-slider/"> +<span class="api-card-title">lvgl.verticalSlider</span> +<span class="api-card-summary">Add a vertical slider using the EdgeTX style.</span> +</a> +<a class="api-card" href="lvgl-vline/"> +<span class="api-card-title">lvgl.vline</span> +<span class="api-card-summary">Display a vertical line.</span> +</a> +</div> diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-align.md b/website/md-docs/api-reference/display-lvgl/lvgl-align.md new file mode 100644 index 000000000..59e53c11f --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-align.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.align + +`lvgl.align([parent, ]params)` + +Display a button showing a text alignment name. Tapping it opens a popup menu to choose an alignment from, using EdgeTX styling. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>get</code></td><td><code>function</code></td><td>called on every refresh cycle to keep the displayed value in sync, to get the currently selected alignment, defaults to nil</td></tr><tr><td><code>set</code></td><td><code>function</code></td><td>called when the user taps an alignment in the popup; passed the selected alignment value, defaults to nil</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-arc.md b/website/md-docs/api-reference/display-lvgl/lvgl-arc.md new file mode 100644 index 000000000..7ce719bef --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-arc.md @@ -0,0 +1,38 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.arc + +`lvgl.arc([parent, ]params)` + +Display an arc. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>thickness</code></td><td><code>number</code></td><td>width of the arc's line, defaults to 1</td></tr><tr><td><code>radius</code></td><td><code>number or function</code></td><td>radius of the arc, defaults to 0</td></tr><tr><td><code>startAngle</code></td><td><code>number or function</code></td><td>starting angle in degrees (0-360), 0 is 3 o'clock, defaults to 0</td></tr><tr><td><code>endAngle</code></td><td><code>number or function</code></td><td>ending angle in degrees, defaults to 360</td></tr><tr><td><code>opacity</code></td><td><code>number or function</code></td><td>opacity from 0 (transparent) to 255 (opaque), defaults to 255</td></tr><tr><td><code>rounded</code></td><td><code>boolean</code></td><td>if true the ends of the arc are rounded, defaults to false</td></tr><tr><td><code>bgColor</code></td><td><code>color or function</code></td><td>color of the background arc, not used by default</td></tr><tr><td><code>bgOpacity</code></td><td><code>number or function</code></td><td>opacity of the background arc, defaults to 0 (not visible)</td></tr><tr><td><code>bgStartAngle</code></td><td><code>number or function</code></td><td>starting angle of the background arc in degrees, defaults to 0</td></tr><tr><td><code>bgEndAngle</code></td><td><code>number or function</code></td><td>ending angle of the background arc in degrees, defaults to 360</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Arc objects have two elements, a foreground arc and a background arc. By default the background arc is not shown -- to show it, set both `bgColor` and `bgOpacity`. + @notice If `opacity` or `bgOpacity` is less than 255 and `rounded` is true, the ends of the arc will not draw correctly. This is an LVGL limitation. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-box.md b/website/md-docs/api-reference/display-lvgl/lvgl-box.md new file mode 100644 index 000000000..fa80a4f6a --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-box.md @@ -0,0 +1,40 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.box + +`lvgl.box([parent, ]params)` + +Create a container for managing object layout. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>flexFlow</code></td><td><code>lvgl.FLOW_COLUMN or lvgl.FLOW_ROW</code></td><td>enables flex layout for this box, not used by default</td></tr><tr><td><code>flexPad</code></td><td><code>number</code></td><td>padding between rows/columns when flex layout is used; recommend using <code>lvgl.PAD_xxx</code> values, defaults to <code>PAD_OUTLINE</code></td></tr><tr><td><code>scrollBar</code></td><td><code>boolean</code></td><td>enables/disables scroll bars, defaults to true</td></tr><tr><td><code>scrollDir</code></td><td><code>lvgl.SCROLL_xx</code></td><td>allowed scroll directions when child objects extend past the box bounds (stand alone scripts only), defaults to <code>lvgl.SCROLL_ALL</code></td></tr><tr><td><code>scrolled</code></td><td><code>function</code></td><td>called when the box content is scrolled; passed <code>x</code>, <code>y</code> of the current scroll position, defaults to nil</td></tr><tr><td><code>scrollTo</code></td><td><code>function</code></td><td>overrides the box scroll position; must return <code>x</code>, <code>y</code> to scroll to, defaults to nil</td></tr><tr><td><code>align</code></td><td><code>alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER</code></td><td>) alignment used with flex layouts (added in 2.11.4); avoid combining an alignment with a scrollbar on the same axis, defaults to <code>CENTER | VTOP</code></td></tr><tr><td><code>borderPad</code></td><td><code>number or table</code></td><td>border padding around the container edges; a single number applies to all sides, or a table <code>{left=?, right=?, top=?, bottom=?}</code> (added in 2.11.5), defaults to <code>PAD_OUTLINE</code> if <code>flexFlow</code> is set, otherwise 0</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- The box is a helper for managing screen layouts. + @notice When adding controls such as button/toggle/textEdit, leave enough space around them for the focus outline. + @notice In a stand alone tool script, the box automatically adds scroll bars if child objects fall outside its boundaries; for widgets, out-of-bounds children are clipped instead. + @notice `scrollBar`, `scrollDir`, `scrolled`, and `scrollTo` were added in 2.11.2. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-build.md b/website/md-docs/api-reference/display-lvgl/lvgl-build.md new file mode 100644 index 000000000..b0ddc2641 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-build.md @@ -0,0 +1,38 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.build + +`lvgl.build([parent, ]params)` + +Build a complex UI in a single operation from a table of object definitions. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the built objects to; if omitted they attach to the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td>a table of tables, each defining one LVGL object:</td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td><code>string or type constant</code></td><td>mandatory, selects the kind of object to create, e.g. <code>"rectangle"</code> or <code>lvgl.RECTANGLE</code>; named type constants (e.g. <code>lvgl.RECTANGLE</code>) added in 2.11.4, string names work in all versions</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td>optional name used to look up this object in the returned table, defaults to an empty string</td></tr><tr><td><code>children</code></td><td><code>table</code></td><td>optional nested table of the same shape, to create child objects</td></tr></tbody></table><ul class="lua-nested-field-notes"><li>any other key accepted by the constructor function for the chosen <code>type</code></li></ul></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | named LVGL objects (only entries whose definition included a `name` are included) | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Objects can be nested via `children`, another table of tables using the same shape as the top-level `params`. +@notice Very large or deeply nested tables may fail to compile to `.luac` -- if a script works from `.lua` but fails from `.luac`, split the call into multiple smaller `lvgl.build()` calls. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-button.md b/website/md-docs/api-reference/display-lvgl/lvgl-button.md new file mode 100644 index 000000000..25ddb6e82 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-button.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.button + +`lvgl.button([parent, ]params)` + +Add a text button using the EdgeTX style. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>text</code></td><td><code>string or function</code></td><td>text displayed in the button, defaults to an empty string</td></tr><tr><td><code>press</code></td><td><code>function</code></td><td>called when the user taps the button, after releasing ENTER or the screen; may optionally return a non-zero integer to display the button in the checked state, defaults to nil</td></tr><tr><td><code>longpress</code></td><td><code>function</code></td><td>called on a long tap; may optionally return a non-zero integer to display the button in the checked state, defaults to nil</td></tr><tr><td><code>active</code></td><td><code>function</code></td><td>sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td></tr><tr><td><code>checked</code></td><td><code>boolean</code></td><td>sets the initial checked state; can be updated with <code>lvgl.set()</code>, defaults to false</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>background color, defaults to the EdgeTX button style PRIMARY2 theme color</td></tr><tr><td><code>textColor</code></td><td><code>color or function</code></td><td>text color, defaults to the EdgeTX button style SECONDARY1 theme color</td></tr><tr><td><code>cornerRadius</code></td><td><code>number</code></td><td>radius for the button's corners, defaults to the EdgeTX button style radius</td></tr><tr><td><code>font</code></td><td><code>font value or function</code></td><td>sets the font size, e.g. <code>MIDSIZE</code>, <code>DBLSIZE</code>; defaults to <code>STDSIZE</code></td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-choice.md b/website/md-docs/api-reference/display-lvgl/lvgl-choice.md new file mode 100644 index 000000000..5544bdbf4 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-choice.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.choice + +`lvgl.choice([parent, ]params)` + +Display a button showing an option value. Tapping it opens a popup menu of options to choose from, using EdgeTX styling. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>text displayed in the popup menu's header, defaults to an empty string</td></tr><tr><td><code>values</code></td><td><code>table</code></td><td>simple table of option strings shown in the popup; can be changed via <code>lvgl.set()</code> since 2.11.6, defaults to an empty list</td></tr><tr><td><code>get</code></td><td><code>function</code></td><td>called on every refresh cycle to keep the displayed value in sync, to get the index of the currently selected option (1..number of values), defaults to nil</td></tr><tr><td><code>set</code></td><td><code>function</code></td><td>called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil</td></tr><tr><td><code>active</code></td><td><code>function</code></td><td>sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td></tr><tr><td><code>filter</code></td><td><code>function</code></td><td>called for each option when the popup opens, passed the option's index; return true to show it, false to hide it, defaults to nil</td></tr><tr><td><code>popupWidth</code></td><td><code>number</code></td><td>width of the popup window, defaults to 0 (use default width)</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-circle.md b/website/md-docs/api-reference/display-lvgl/lvgl-circle.md new file mode 100644 index 000000000..362248b8d --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-circle.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.circle + +`lvgl.circle([parent, ]params)` + +Display a solid or outlined circle. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>thickness</code></td><td><code>number</code></td><td>width of the border line, defaults to 1</td></tr><tr><td><code>filled</code></td><td><code>boolean</code></td><td>if true the circle is filled with <code>color</code>, defaults to false</td></tr><tr><td><code>radius</code></td><td><code>number or function</code></td><td>radius of the circle, defaults to 0</td></tr><tr><td><code>opacity</code></td><td><code>number or function</code></td><td>opacity from 0 (transparent) to 255 (opaque), defaults to 255</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-clear.md b/website/md-docs/api-reference/display-lvgl/lvgl-clear.md new file mode 100644 index 000000000..4ded05471 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-clear.md @@ -0,0 +1,40 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.clear + +`lvgl.clear([parent])` + +Delete LVGL objects. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object whose children should be deleted; if omitted, the entire script UI is deleted | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- If `parent` is not set, the entire script UI is deleted -- use this when the UI changes dramatically (e.g. widget size changes). +@notice If `parent` is set, only its child LVGL objects are deleted -- use this to remove and replace a specific set of objects. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-close.md b/website/md-docs/api-reference/display-lvgl/lvgl-close.md new file mode 100644 index 000000000..204995520 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-close.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.close + +`lvgl.close(obj)` + +Close an LVGL object that represents a closable container or dialog. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `obj` | yes | `object` | LVGL object previously created by the `lvgl` library | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-color.md b/website/md-docs/api-reference/display-lvgl/lvgl-color.md new file mode 100644 index 000000000..13c937018 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-color.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.color + +`lvgl.color([parent, ]params)` + +Display a button showing a color swatch. Tapping it opens the color picker dialog, using EdgeTX styling. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>get</code></td><td><code>function</code></td><td>called once when the object is created, to get the initial color, defaults to nil</td></tr><tr><td><code>set</code></td><td><code>function</code></td><td>called when the user picks a color; passed the selected color value, defaults to nil</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects a color. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-confirm.md b/website/md-docs/api-reference/display-lvgl/lvgl-confirm.md new file mode 100644 index 000000000..3b3418ce2 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-confirm.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.confirm + +`lvgl.confirm(params)` + +Display a Yes/No confirmation dialog box. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>title</code></td><td><code>string</code></td><td>text displayed in the dialog's header, defaults to an empty string</td></tr><tr><td><code>message</code></td><td><code>string</code></td><td>text displayed in the dialog's body, defaults to an empty string</td></tr><tr><td><code>confirm</code></td><td><code>function</code></td><td>called when the user taps Yes, defaults to nil</td></tr><tr><td><code>cancel</code></td><td><code>function</code></td><td>called when the user taps No, defaults to nil</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.confirm` -- only the settings listed above apply. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-dialog.md b/website/md-docs/api-reference/display-lvgl/lvgl-dialog.md new file mode 100644 index 000000000..76241e09b --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-dialog.md @@ -0,0 +1,38 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.dialog + +`lvgl.dialog(params)` + +Display a dialog box. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>title</code></td><td><code>string</code></td><td>text displayed in the dialog's header, defaults to an empty string</td></tr><tr><td><code>close</code></td><td><code>function</code></td><td>called when the dialog is closed, defaults to nil</td></tr><tr><td><code>flexFlow</code></td><td><code>lvgl.FLOW_COLUMN or lvgl.FLOW_ROW</code></td><td>enables flex layout for this box, not used by default</td></tr><tr><td><code>flexPad</code></td><td><code>number</code></td><td>padding between rows/columns when flex layout is used, defaults to <code>PAD_OUTLINE</code></td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.dialog` -- only the settings listed above apply. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-disable.md b/website/md-docs/api-reference/display-lvgl/lvgl-disable.md new file mode 100644 index 000000000..53b05fde2 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-disable.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.disable + +`lvgl.disable(obj)` + +Disable interaction for an LVGL control object. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `obj` | yes | `object` | LVGL object previously created by the `lvgl` library | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-enable.md b/website/md-docs/api-reference/display-lvgl/lvgl-enable.md new file mode 100644 index 000000000..55d6da34c --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-enable.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.enable + +`lvgl.enable(obj)` + +Enable interaction for an LVGL control object. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `obj` | yes | `object` | LVGL object previously created by the `lvgl` library | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-exit-full-screen.md b/website/md-docs/api-reference/display-lvgl/lvgl-exit-full-screen.md new file mode 100644 index 000000000..7249a1def --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-exit-full-screen.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.exitFullScreen + +`lvgl.exitFullScreen()` + +If the script is running in full screen mode, return it to normal mode. + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-file.md b/website/md-docs/api-reference/display-lvgl/lvgl-file.md new file mode 100644 index 000000000..814f4ae18 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-file.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.file + +`lvgl.file([parent, ]params)` + +Display a button showing a filename. Tapping it opens a popup file picker, using EdgeTX styling. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>title</code></td><td><code>string</code></td><td>text displayed in the popup's header, defaults to an empty string</td></tr><tr><td><code>get</code></td><td><code>function</code></td><td>called when the popup is opened, and after the selection changes, to get the currently selected filename; must return a string, defaults to nil</td></tr><tr><td><code>set</code></td><td><code>function</code></td><td>called when the user picks a file; passed the selected filename (without path), defaults to nil</td></tr><tr><td><code>active</code></td><td><code>function</code></td><td>sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td></tr><tr><td><code>folder</code></td><td><code>string</code></td><td>SD card folder to browse for files, defaults to nil</td></tr><tr><td><code>extension</code></td><td><code>string</code></td><td>extension filter, e.g. <code>.png</code> or concatenated <code>.png.bmp</code> to match multiple, defaults to nil (no filter)</td></tr><tr><td><code>hideExtension</code></td><td><code>boolean</code></td><td>if true, the extension is stripped before <code>set</code> is called and hidden in the picker list, defaults to false</td></tr><tr><td><code>maxLen</code></td><td><code>number</code></td><td>maximum filename length (measured after <code>hideExtension</code> stripping, if set); files with longer names are not shown in the picker list, defaults to 255</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user picks a file. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-font.md b/website/md-docs/api-reference/display-lvgl/lvgl-font.md new file mode 100644 index 000000000..83dec6a7d --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-font.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.font + +`lvgl.font([parent, ]params)` + +Display a button showing a font name. Tapping it opens a popup menu to choose a font from, using EdgeTX styling. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>get</code></td><td><code>function</code></td><td>called on every refresh cycle to keep the displayed value in sync, to get the currently selected font, defaults to nil</td></tr><tr><td><code>set</code></td><td><code>function</code></td><td>called when the user taps a font in the popup; passed the selected font value, defaults to nil</td></tr><tr><td><code>active</code></td><td><code>function</code></td><td>sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-get-context.md b/website/md-docs/api-reference/display-lvgl/lvgl-get-context.md new file mode 100644 index 000000000..ca8b7e73c --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-get-context.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.getContext + +`lvgl.getContext()` + +For a widget script, returns the local instance table created by (and returned from) the script's `create()` function. + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | the widget instance's local data table, or nil for stand alone tool scripts | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-get-scroll-pos.md b/website/md-docs/api-reference/display-lvgl/lvgl-get-scroll-pos.md new file mode 100644 index 000000000..c427144e7 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-get-scroll-pos.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.getScrollPos + +`lvgl.getScrollPos(parent)` + +Get the current scroll position of a container object. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | yes | `object` | LVGL container object (e.g. `box`, `rectangle`, or `page`) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `number,` | `unknown` | number the X and Y scroll position of the container's top-left corner | + +## Availability + +- Since: `2.11.2` +- Radio support: `color-lcd` + +## Notes + +- Only applies to container objects such as `box`, `rectangle`, and `page`. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-hide.md b/website/md-docs/api-reference/display-lvgl/lvgl-hide.md new file mode 100644 index 000000000..f8de6b4ff --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-hide.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.hide + +`lvgl.hide(parent)` + +Hide an LVGL object. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | yes | `object` | LVGL object to hide | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- The `visible` setting function can also be used to dynamically show and hide objects. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-hline.md b/website/md-docs/api-reference/display-lvgl/lvgl-hline.md new file mode 100644 index 000000000..aefab90b0 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-hline.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.hline + +`lvgl.hline([parent, ]params)` + +Display a horizontal line. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>rounded</code></td><td><code>boolean</code></td><td>if true the line's end caps are rounded, defaults to false</td></tr><tr><td><code>opacity</code></td><td><code>number or function</code></td><td>opacity from 0 (transparent) to 255 (opaque), defaults to 255</td></tr><tr><td><code>dashGap</code></td><td><code>number</code></td><td>gap size for dashed lines, defaults to 0</td></tr><tr><td><code>dashWidth</code></td><td><code>number</code></td><td>dash size for dashed lines, defaults to 0; both <code>dashGap</code> and <code>dashWidth</code> must be > 0 to draw dashed lines</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-image.md b/website/md-docs/api-reference/display-lvgl/lvgl-image.md new file mode 100644 index 000000000..c13282082 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-image.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.image + +`lvgl.image([parent, ]params)` + +Display an image, centered in the frame `(x, y, w, h)`. Images can be scaled to fit entirely within the frame or to fill it completely. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>file</code></td><td><code>string</code></td><td>full path to the image file on the SD card, defaults to an empty string</td></tr><tr><td><code>fill</code></td><td><code>boolean</code></td><td>if true the image is scaled to completely fill the frame (may be cropped); if false it is scaled to fit entirely within the frame (may have empty borders), defaults to false</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- `w` and `h` are required. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-is-app-mode.md b/website/md-docs/api-reference/display-lvgl/lvgl-is-app-mode.md new file mode 100644 index 000000000..2bc002051 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-is-app-mode.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.isAppMode + +`lvgl.isAppMode()` + +Test if the script is running in App Mode. + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `boolean` | true if running in App Mode, false otherwise | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-is-full-screen.md b/website/md-docs/api-reference/display-lvgl/lvgl-is-full-screen.md new file mode 100644 index 000000000..132ebe334 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-is-full-screen.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.isFullScreen + +`lvgl.isFullScreen()` + +Test if the script is running in full screen mode. + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `boolean` | true if running in full screen mode, false otherwise | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Always returns true for stand alone tool scripts. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-label.md b/website/md-docs/api-reference/display-lvgl/lvgl-label.md new file mode 100644 index 000000000..77a81ad48 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-label.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.label + +`lvgl.label([parent, ]params)` + +Display a text label. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>text</code></td><td><code>string or function</code></td><td>text to display, defaults to an empty string</td></tr><tr><td><code>font</code></td><td><code>font value or function</code></td><td>sets the font size, e.g. <code>MIDSIZE</code>, <code>DBLSIZE</code>; defaults to <code>STDSIZE</code></td></tr><tr><td><code>align</code></td><td><code>text alignment value or function</code></td><td>sets the text justification, e.g. <code>RIGHT</code>, <code>VCENTER</code>; defaults to <code>LEFT</code>. <code>RIGHT</code>/<code>CENTER</code> require <code>w</code> to be set. <code>LEFT</code>/<code>RIGHT</code>/<code>CENTER</code> align text horizontally within the label's bounding box <code>(x,y,w,h)</code>; <code>VCENTER</code>/<code>VTOP</code>/<code>VBOTTOM</code> align the label's bounding box vertically within the parent object</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-line.md b/website/md-docs/api-reference/display-lvgl/lvgl-line.md new file mode 100644 index 000000000..5733d335b --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-line.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.line + +`lvgl.line([parent, ]params)` + +Display one or more connected line segments. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>rounded</code></td><td><code>boolean</code></td><td>if true the line's end caps are rounded, defaults to false</td></tr><tr><td><code>thickness</code></td><td><code>number</code></td><td>thickness of each line segment, defaults to 1</td></tr><tr><td><code>opacity</code></td><td><code>number or function</code></td><td>opacity from 0 (transparent) to 255 (opaque), defaults to 255</td></tr><tr><td><code>pts</code></td><td><code>table or function</code></td><td>table of points, each a <code>{x, y}</code> pair; at least two points are required, defaults to nil</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-menu.md b/website/md-docs/api-reference/display-lvgl/lvgl-menu.md new file mode 100644 index 000000000..242862a36 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-menu.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.menu + +`lvgl.menu(params)` + +Open a popup menu with multiple options to choose from, using EdgeTX styling. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>title</code></td><td><code>string</code></td><td>text displayed in the popup's header, defaults to an empty string</td></tr><tr><td><code>values</code></td><td><code>table</code></td><td>simple table of option strings shown in the popup, defaults to an empty list</td></tr><tr><td><code>get</code></td><td><code>function</code></td><td>called when the popup is opened, to get the index of the currently selected option (1..number of values), defaults to nil</td></tr><tr><td><code>set</code></td><td><code>function</code></td><td>called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.11.1` +- Radio support: `color-lcd` + +## Notes + +- The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.menu` -- only the settings listed above apply. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-message.md b/website/md-docs/api-reference/display-lvgl/lvgl-message.md new file mode 100644 index 000000000..ef0fca335 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-message.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.message + +`lvgl.message(params)` + +Display a message dialog box. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>title</code></td><td><code>string</code></td><td>text displayed in the dialog's header, defaults to an empty string</td></tr><tr><td><code>message</code></td><td><code>string</code></td><td>text displayed in the dialog's body, defaults to an empty string</td></tr><tr><td><code>details</code></td><td><code>string</code></td><td>additional text displayed in the dialog's body, defaults to an empty string</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.message` -- only the settings listed above apply. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-momentary-button.md b/website/md-docs/api-reference/display-lvgl/lvgl-momentary-button.md new file mode 100644 index 000000000..5c4257c61 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-momentary-button.md @@ -0,0 +1,38 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.momentaryButton + +`lvgl.momentaryButton([parent, ]params)` + +Add a momentary text button using the EdgeTX style. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>text</code></td><td><code>string or function</code></td><td>text displayed in the button, defaults to an empty string</td></tr><tr><td><code>press</code></td><td><code>function</code></td><td>called immediately when the user first taps the button or presses ENTER, defaults to nil</td></tr><tr><td><code>release</code></td><td><code>function</code></td><td>called when the user releases ENTER or stops touching the screen, defaults to nil</td></tr><tr><td><code>active</code></td><td><code>function</code></td><td>sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>background color, defaults to the EdgeTX button style PRIMARY2 theme color</td></tr><tr><td><code>textColor</code></td><td><code>color or function</code></td><td>text color, defaults to the EdgeTX button style SECONDARY1 theme color</td></tr><tr><td><code>cornerRadius</code></td><td><code>number</code></td><td>radius for the button's corners, defaults to the EdgeTX button style radius</td></tr><tr><td><code>font</code></td><td><code>font value or function</code></td><td>sets the font size, e.g. <code>MIDSIZE</code>, <code>DBLSIZE</code>; defaults to <code>STDSIZE</code></td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice Unlike `lvgl.button`, `press` fires immediately on tap/press rather than on release. The button shows the checked state until ENTER is released or the screen is no longer touched. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-number-edit.md b/website/md-docs/api-reference/display-lvgl/lvgl-number-edit.md new file mode 100644 index 000000000..36310c913 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-number-edit.md @@ -0,0 +1,38 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.numberEdit + +`lvgl.numberEdit([parent, ]params)` + +Add a number edit box using the EdgeTX style. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>get</code></td><td><code>function</code></td><td>called to get the current value to display, defaults to nil</td></tr><tr><td><code>set</code></td><td><code>function</code></td><td>called for every change to the number while editing; passed the new value, defaults to nil</td></tr><tr><td><code>edited</code></td><td><code>function</code></td><td>called after the user finishes editing; passed the final value (added in 2.11.5), defaults to nil</td></tr><tr><td><code>active</code></td><td><code>function</code></td><td>sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td></tr><tr><td><code>min</code></td><td><code>number</code></td><td>minimum allowed value, defaults to -1024</td></tr><tr><td><code>max</code></td><td><code>number</code></td><td>maximum allowed value, defaults to 1024</td></tr><tr><td><code>display</code></td><td><code>function</code></td><td>overrides how the value is displayed; passed the current value, must return a string, defaults to nil</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice Use `set` to react to every change during editing, or `edited` to only react to the final value once editing is complete. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-page.md b/website/md-docs/api-reference/display-lvgl/lvgl-page.md new file mode 100644 index 000000000..f8af450bc --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-page.md @@ -0,0 +1,41 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.page + +`lvgl.page(params)` + +Create a page layout for a One-Time script using EdgeTX styling: a header with title/sub-title lines and a back button in the top-left corner. Should be created as the top-level LVGL object, with all other objects added as its children. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>title</code></td><td><code>string or function</code></td><td>title text in the header; function support added in 2.11.4, defaults to an empty string</td></tr><tr><td><code>subtitle</code></td><td><code>string or function</code></td><td>sub-title text in the header; function support added in 2.11.4, defaults to an empty string</td></tr><tr><td><code>icon</code></td><td><code>string</code></td><td>full path to a 30x30 grey-scale mask image for the back button icon (white = transparent, black = opaque); defaults to the EdgeTX logo icon</td></tr><tr><td><code>back</code></td><td><code>function</code></td><td>called when RTN is pressed, or when the back button is tapped -- the top-left header button if <code>backButton</code> is not set, otherwise a second button on the top-right, defaults to nil</td></tr><tr><td><code>menu</code></td><td><code>function</code></td><td>called when the top-left header button is tapped, but only if <code>backButton</code> is set to true -- in that case <code>back</code> moves to a second button on the top-right, defaults to nil</td></tr><tr><td><code>prevButton</code></td><td><code>table</code></td><td>adds a prev navigation button; table has a <code>press</code> function and optional <code>active</code> function (added in 2.11.4), defaults to nil</td></tr><tr><td><code>nextButton</code></td><td><code>table</code></td><td>adds a next navigation button; table has a <code>press</code> function and optional <code>active</code> function (added in 2.11.4), defaults to nil</td></tr><tr><td><code>flexFlow</code></td><td><code>lvgl.FLOW_COLUMN or lvgl.FLOW_ROW</code></td><td>enables flex layout for this page, not used by default</td></tr><tr><td><code>flexPad</code></td><td><code>number</code></td><td>padding between rows/columns when flex layout is used, defaults to <code>PAD_OUTLINE</code></td></tr><tr><td><code>scrollBar</code></td><td><code>boolean</code></td><td>enables/disables scroll bars, defaults to true</td></tr><tr><td><code>scrollDir</code></td><td><code>lvgl.SCROLL_xx</code></td><td>allowed scroll directions when child objects extend past the page bounds (stand alone scripts only), defaults to <code>lvgl.SCROLL_ALL</code></td></tr><tr><td><code>scrolled</code></td><td><code>function</code></td><td>called when the page content is scrolled; passed <code>x</code>, <code>y</code> of the current scroll position, defaults to nil</td></tr><tr><td><code>scrollTo</code></td><td><code>function</code></td><td>overrides the page scroll position; must return <code>x</code>, <code>y</code> to scroll to, defaults to nil</td></tr><tr><td><code>align</code></td><td><code>alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER</code></td><td>) alignment used with flex layouts (added in 2.11.4), defaults to <code>CENTER | VTOP</code></td></tr><tr><td><code>backButton</code></td><td><code>boolean</code></td><td>if true, adds a second header button on the top-right calling <code>back</code>, and repurposes the top-left button to call <code>menu</code> instead (added in 2.11.4), defaults to false</td></tr><tr><td><code>borderPad</code></td><td><code>number or table</code></td><td>border padding around the container edges; a single number applies to all sides, or a table <code>{left=?, right=?, top=?, bottom=?}</code> (added in 2.11.5), defaults to <code>PAD_OUTLINE</code> if <code>flexFlow</code> is set, otherwise 0</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.page` -- only the settings listed above apply. + @notice The page automatically adds scroll bars if child objects fall outside its boundaries. + @notice `scrollBar`, `scrollDir`, `scrolled`, and `scrollTo` were added in 2.11.2. + @notice The PAGE keys are not automatically mapped to `prevButton`/`nextButton` -- the script's `run` function must detect and handle them itself. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-qrcode.md b/website/md-docs/api-reference/display-lvgl/lvgl-qrcode.md new file mode 100644 index 000000000..ae88501f3 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-qrcode.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.qrcode + +`lvgl.qrcode([parent, ]params)` + +Display a QR code. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>data</code></td><td><code>string</code></td><td>URL or other content to encode, defaults to an empty string</td></tr><tr><td><code>bgColor</code></td><td><code>color</code></td><td>background color for the QR code image, defaults to <code>COLOR_THEME_SECONDARY3</code></td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-rectangle.md b/website/md-docs/api-reference/display-lvgl/lvgl-rectangle.md new file mode 100644 index 000000000..fa296cce7 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-rectangle.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.rectangle + +`lvgl.rectangle([parent, ]params)` + +Display a rectangle. Based on `lvgl.box`, so all `lvgl.box` settings also apply. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>thickness</code></td><td><code>number</code></td><td>width of the border line, defaults to 1</td></tr><tr><td><code>filled</code></td><td><code>boolean or function</code></td><td>if true the rectangle is filled with <code>color</code>, defaults to false (function support added in 2.11.4)</td></tr><tr><td><code>rounded</code></td><td><code>number</code></td><td>if greater than 0, rounds the corners with this radius; must be >= <code>thickness</code> if set, defaults to 0</td></tr><tr><td><code>opacity</code></td><td><code>number or function</code></td><td>opacity from 0 (transparent) to 255 (opaque), defaults to 255</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- When used in a stand alone tool script, the rectangle automatically adds scroll bars if any child objects are placed outside its boundaries. For widgets, child objects outside the bounds are clipped instead. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-set.md b/website/md-docs/api-reference/display-lvgl/lvgl-set.md new file mode 100644 index 000000000..9ac41c897 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-set.md @@ -0,0 +1,36 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.set + +`lvgl.set(parent, params)` + +Update the settings of an existing LVGL object. Can also be used to change settings that have no dedicated update function (e.g. rectangle thickness). Can also be called as `parent:set(params)`. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | yes | `object` | LVGL object to update; unlike the constructor functions, this parameter is required, not optional | +| `params` | yes | `table` | settings to update; use the same keys documented for the object's constructor function | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-setting.md b/website/md-docs/api-reference/display-lvgl/lvgl-setting.md new file mode 100644 index 000000000..b661f80ba --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-setting.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.setting + +`lvgl.setting([parent, ]params)` + +Create a container for a single row of a settings page, automatically padded for controls such as toggle/textEdit/button. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>title</code></td><td><code>string or function</code></td><td>text displayed on the left; function support added in 2.11.6, defaults to an empty string</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-show.md b/website/md-docs/api-reference/display-lvgl/lvgl-show.md new file mode 100644 index 000000000..1a9e01ff8 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-show.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.show + +`lvgl.show(parent)` + +Show an LVGL object. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | yes | `object` | LVGL object to show | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- The `visible` setting function can also be used to dynamically show and hide objects. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-slider.md b/website/md-docs/api-reference/display-lvgl/lvgl-slider.md new file mode 100644 index 000000000..60e5cd86d --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-slider.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.slider + +`lvgl.slider([parent, ]params)` + +Add a horizontal slider using the EdgeTX style. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>min</code></td><td><code>number</code></td><td>minimum value at the left end of the range, defaults to 0</td></tr><tr><td><code>max</code></td><td><code>number</code></td><td>maximum value at the right end of the range, defaults to 100</td></tr><tr><td><code>get</code></td><td><code>function</code></td><td>called to get the current knob value; should return a value between <code>min</code> and <code>max</code> inclusive, defaults to nil</td></tr><tr><td><code>set</code></td><td><code>function</code></td><td>called when the user moves the knob; passed the new value, defaults to nil</td></tr><tr><td><code>active</code></td><td><code>function</code></td><td>sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-source.md b/website/md-docs/api-reference/display-lvgl/lvgl-source.md new file mode 100644 index 000000000..08a542ca8 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-source.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.source + +`lvgl.source([parent, ]params)` + +Display a button showing a source name. Tapping it opens the source-select popup, using EdgeTX styling. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>get</code></td><td><code>function</code></td><td>called on every refresh cycle to keep the displayed value in sync, to get the currently selected source, defaults to nil</td></tr><tr><td><code>set</code></td><td><code>function</code></td><td>called when the user picks a source; passed the selected source value, defaults to nil</td></tr><tr><td><code>filter</code></td><td><code>number</code></td><td>controls which source types the user can pick; combine <code>lvgl.SRC_xxx</code> constants to build a custom filter, defaults to <code>lvgl.SRC_ALL</code></td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-switch.md b/website/md-docs/api-reference/display-lvgl/lvgl-switch.md new file mode 100644 index 000000000..864085bce --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-switch.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.switch + +`lvgl.switch([parent, ]params)` + +Display a button showing a switch name. Tapping it opens the switch-select popup, using EdgeTX styling. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>get</code></td><td><code>function</code></td><td>called on every refresh cycle to keep the displayed value in sync, to get the currently selected switch, defaults to nil</td></tr><tr><td><code>set</code></td><td><code>function</code></td><td>called when the user picks a switch; passed the selected switch value, defaults to nil</td></tr><tr><td><code>active</code></td><td><code>function</code></td><td>sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td></tr><tr><td><code>filter</code></td><td><code>number</code></td><td>controls which switch types the user can pick; combine <code>lvgl.SW_xxx</code> constants to build a custom filter, defaults to <code>lvgl.SW_ALL</code></td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-text-edit.md b/website/md-docs/api-reference/display-lvgl/lvgl-text-edit.md new file mode 100644 index 000000000..6009bfdf3 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-text-edit.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.textEdit + +`lvgl.textEdit([parent, ]params)` + +Add a text edit box using the EdgeTX style. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>value</code></td><td><code>string or function</code></td><td>text to edit; if a function, the text can be changed by both script and user, defaults to an empty string</td></tr><tr><td><code>length</code></td><td><code>number</code></td><td>maximum editable text length, 1 to 128, defaults to 32</td></tr><tr><td><code>set</code></td><td><code>function</code></td><td>called when the user edits the text; passed the new string content, defaults to nil</td></tr><tr><td><code>active</code></td><td><code>function</code></td><td>sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-timer.md b/website/md-docs/api-reference/display-lvgl/lvgl-timer.md new file mode 100644 index 000000000..902d21455 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-timer.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.timer + +`lvgl.timer([parent, ]params)` + +Display a button showing a timer name. Tapping it opens a popup menu to choose a timer from, using EdgeTX styling. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>get</code></td><td><code>function</code></td><td>called on every refresh cycle to keep the displayed value in sync, to get the currently selected timer, defaults to nil</td></tr><tr><td><code>set</code></td><td><code>function</code></td><td>called when the user taps a timer in the popup; passed the selected timer value, defaults to nil</td></tr><tr><td><code>active</code></td><td><code>function</code></td><td>sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-toggle.md b/website/md-docs/api-reference/display-lvgl/lvgl-toggle.md new file mode 100644 index 000000000..f2e9641e5 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-toggle.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.toggle + +`lvgl.toggle([parent, ]params)` + +Add a toggle switch using the EdgeTX style. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>get</code></td><td><code>function</code></td><td>called to get the current state; must return a boolean or number (0/false = off, 1/true = on), defaults to nil</td></tr><tr><td><code>set</code></td><td><code>function</code></td><td>called when the user interacts with the switch; passed a single number, 0 = off, 1 = on, defaults to nil</td></tr><tr><td><code>active</code></td><td><code>function</code></td><td>sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-triangle.md b/website/md-docs/api-reference/display-lvgl/lvgl-triangle.md new file mode 100644 index 000000000..5e451846f --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-triangle.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.triangle + +`lvgl.triangle([parent, ]params)` + +Display a filled triangle. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>opacity</code></td><td><code>number or function</code></td><td>opacity from 0 (transparent) to 255 (opaque), defaults to 255</td></tr><tr><td><code>pts</code></td><td><code>table or function</code></td><td>table of exactly three points, each a <code>{x, y}</code> pair, defaults to nil</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Unlike the line-drawing objects, LVGL has no built-in triangle primitive. The drawing method used is simple and does not anti-alias. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-vertical-slider.md b/website/md-docs/api-reference/display-lvgl/lvgl-vertical-slider.md new file mode 100644 index 000000000..20b811b04 --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-vertical-slider.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.verticalSlider + +`lvgl.verticalSlider([parent, ]params)` + +Add a vertical slider using the EdgeTX style. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>min</code></td><td><code>number</code></td><td>minimum value at the bottom end of the range, defaults to 0</td></tr><tr><td><code>max</code></td><td><code>number</code></td><td>maximum value at the top end of the range, defaults to 100</td></tr><tr><td><code>get</code></td><td><code>function</code></td><td>called to get the current knob value; should return a value between <code>min</code> and <code>max</code> inclusive, defaults to nil</td></tr><tr><td><code>set</code></td><td><code>function</code></td><td>called when the user moves the knob; passed the new value, defaults to nil</td></tr><tr><td><code>active</code></td><td><code>function</code></td><td>sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/display-lvgl/lvgl-vline.md b/website/md-docs/api-reference/display-lvgl/lvgl-vline.md new file mode 100644 index 000000000..4f535ce6d --- /dev/null +++ b/website/md-docs/api-reference/display-lvgl/lvgl-vline.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl.vline + +`lvgl.vline([parent, ]params)` + +Display a vertical line. + +## Parameters + +<table><thead><tr><th>Name</th><th>Req</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>parent</code></td><td>no</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td></tr><tr><td><code>params</code></td><td>yes</td><td><code>table</code></td><td></td></tr><tr class="lua-nested-field-row"><td colspan="4"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>x</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>y</code></td><td><code>number</code></td><td>position relative to the top-left of the parent</td></tr><tr><td><code>w</code></td><td><code>number</code></td><td>width</td></tr><tr><td><code>h</code></td><td><code>number</code></td><td>height</td></tr><tr><td><code>color</code></td><td><code>color or function</code></td><td>primary color for the object</td></tr><tr><td><code>pos</code></td><td><code>function</code></td><td>dynamic position callback returning <code>x, y</code></td></tr><tr><td><code>size</code></td><td><code>function</code></td><td>dynamic size callback returning <code>w, h</code></td></tr><tr><td><code>visible</code></td><td><code>function</code></td><td>dynamic visibility callback</td></tr><tr><td><code>floating</code></td><td><code>boolean</code></td><td>keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false</td></tr><tr><td><code>rounded</code></td><td><code>boolean</code></td><td>if true the line's end caps are rounded, defaults to false</td></tr><tr><td><code>opacity</code></td><td><code>number or function</code></td><td>opacity from 0 (transparent) to 255 (opaque), defaults to 255</td></tr><tr><td><code>dashGap</code></td><td><code>number</code></td><td>gap size for dashed lines, defaults to 0</td></tr><tr><td><code>dashWidth</code></td><td><code>number</code></td><td>dash size for dashed lines, defaults to 0; both <code>dashGap</code> and <code>dashWidth</code> must be > 0 to draw dashed lines</td></tr></tbody></table></td></tr></tbody></table> + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +## Availability + +- Since: `2.11.0` +- Radio support: `color-lcd` + +## Source + +`radio/src/lua/api_colorlcd_lvgl.cpp` diff --git a/website/md-docs/api-reference/filesystem/chdir.md b/website/md-docs/api-reference/filesystem/chdir.md new file mode 100644 index 000000000..4541ce084 --- /dev/null +++ b/website/md-docs/api-reference/filesystem/chdir.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# chdir + +`chdir(directory)` + +Change the working directory + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `directory` | yes | `string` | New working directory | + +## Returns + +None. + +## Availability + +- Since: `2.3.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_filesystem.cpp` diff --git a/website/md-docs/api-reference/filesystem/del.md b/website/md-docs/api-reference/filesystem/del.md new file mode 100644 index 000000000..7e1a62ea5 --- /dev/null +++ b/website/md-docs/api-reference/filesystem/del.md @@ -0,0 +1,31 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# del + +`del(file or directory)` + +Returns FRESULT (e.g. 0=OK, 4=File not found, 5=Path not found, 6=Path invalid) + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.9.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_filesystem.cpp` diff --git a/website/md-docs/api-reference/filesystem/dir.md b/website/md-docs/api-reference/filesystem/dir.md new file mode 100644 index 000000000..bdc5d5ec0 --- /dev/null +++ b/website/md-docs/api-reference/filesystem/dir.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# dir + +`dir(directory)` + +Return an iterator listing all the files and directories name in a directory + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `directory` | yes | `string` | Working directory | + +## Returns + +None. + +## Availability + +- Since: `2.5.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_filesystem.cpp` diff --git a/website/md-docs/api-reference/filesystem/fstat.md b/website/md-docs/api-reference/filesystem/fstat.md new file mode 100644 index 000000000..bb38ee6f2 --- /dev/null +++ b/website/md-docs/api-reference/filesystem/fstat.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# fstat + +`fstat(path)` + +Checks the existence of file or directory. + If not exist, return nil. + If exist, return the object information. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `path` | yes | `string` | path to the object | + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>table</code></td><td>object info, table elements:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>size</code></td><td><code>number</code></td><td>file size</td></tr><tr><td><code>attrib</code></td><td><code>number</code></td><td>file attribute flags</td></tr><tr><td><code>time</code></td><td><code>table</code></td><td>table with last time modified date and times, table elements:</td></tr><tr><td><code>year</code></td><td><code>number</code></td><td>year</td></tr><tr><td><code>mon</code></td><td><code>number</code></td><td>month</td></tr><tr><td><code>day</code></td><td><code>number</code></td><td>day of month</td></tr><tr><td><code>hour</code></td><td><code>number</code></td><td>hours</td></tr><tr><td><code>hour12</code></td><td><code>number</code></td><td>hours in US format</td></tr><tr><td><code>min</code></td><td><code>number</code></td><td>minutes</td></tr><tr><td><code>sec</code></td><td><code>number</code></td><td>seconds</td></tr><tr><td><code>suffix</code></td><td><code>text</code></td><td>am or pm</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `2.5.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_filesystem.cpp` diff --git a/website/md-docs/api-reference/filesystem/index.md b/website/md-docs/api-reference/filesystem/index.md new file mode 100644 index 000000000..ae525a079 --- /dev/null +++ b/website/md-docs/api-reference/filesystem/index.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Filesystem + +File and directory access for scripts. + +<div class="api-grid"> +<a class="api-card" href="chdir/"> +<span class="api-card-title">chdir</span> +<span class="api-card-summary">Change the working directory</span> +</a> +<a class="api-card" href="del/"> +<span class="api-card-title">del</span> +<span class="api-card-summary">Returns FRESULT (e.g.</span> +</a> +<a class="api-card" href="dir/"> +<span class="api-card-title">dir</span> +<span class="api-card-summary">Return an iterator listing all the files and directories name in a directory</span> +</a> +<a class="api-card" href="fstat/"> +<span class="api-card-title">fstat</span> +<span class="api-card-summary">Checks the existence of file or directory.</span> +</a> +<a class="api-card" href="mkdir/"> +<span class="api-card-title">mkdir</span> +<span class="api-card-summary">Create a directory</span> +</a> +<a class="api-card" href="rename/"> +<span class="api-card-title">rename</span> +<span class="api-card-summary">Rename a file or directory If the file or directory is being moved to a new parent directory, then the new parent...</span> +</a> +</div> diff --git a/website/md-docs/api-reference/filesystem/mkdir.md b/website/md-docs/api-reference/filesystem/mkdir.md new file mode 100644 index 000000000..94d69222f --- /dev/null +++ b/website/md-docs/api-reference/filesystem/mkdir.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# mkdir + +`mkdir(directory)` + +Create a directory + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `directory` | yes | `string` | Directory to create | + +## Returns + +None. + +## Availability + +- Since: `2.11.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_filesystem.cpp` diff --git a/website/md-docs/api-reference/filesystem/rename.md b/website/md-docs/api-reference/filesystem/rename.md new file mode 100644 index 000000000..34e2871f6 --- /dev/null +++ b/website/md-docs/api-reference/filesystem/rename.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# rename + +`rename(from_path, to_path)` + +Rename a file or directory + If the file or directory is being moved to a new parent directory, then the new parent + directory must already exist. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `from_path` | yes | `string` | Current path to rename @param to_path (string) Path to rename to | + +## Returns + +None. + +## Availability + +- Since: `2.11.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_filesystem.cpp` diff --git a/website/md-docs/api-reference/index.md b/website/md-docs/api-reference/index.md new file mode 100644 index 000000000..41cb2e59e --- /dev/null +++ b/website/md-docs/api-reference/index.md @@ -0,0 +1,92 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Generated API Reference + +This section is generated from the normalized API model and grouped with the same user-facing topic names used in the 2.11 docs. + +## [Display LCD](display-lcd/index.md) + +- `47` APIs +- Drawing, layout, color, and display helpers for LCD rendering. + +## [Display LVGL](display-lvgl/index.md) + +- `45` APIs +- LVGL bindings and UI helpers for display-oriented Lua scripts. + +## [Model Functions](model-functions/index.md) + +- `39` APIs +- Model data access and editing APIs. + +## [Filesystem](filesystem/index.md) + +- `6` APIs +- File and directory access for scripts. + +## [Serial Ports](serial-ports/index.md) + +- `5` APIs +- Serial transport configuration and I/O. + +## [Radio Hardware](radio-hardware/index.md) + +- `7` APIs +- Hardware-facing APIs and low-level device controls. + +## [System](system/index.md) + +- `5` APIs +- General runtime, device, and system-level helpers. + +## [Inputs](key-inputs/index.md) + +- `5` APIs +- Key and stick related helpers for interactive scripts. + +## [Lua Scripts](lua-scripts/index.md) + +- `1` APIs +- Script lifecycle helpers and interactive popups. + +## [Time](time/index.md) + +- `5` APIs +- Date, clock, and timer helpers. + +## [Audio-Sound](audio-sound/index.md) + +- `6` APIs +- Audio playback and haptic feedback helpers. + +## [Telemetry](telemetry/index.md) + +- `7` APIs +- Telemetry value access, injection, and protocol helpers. + +## [RF module](rf-module/index.md) + +- `5` APIs +- RF link and module transport helpers. + +## [Sources](sources/index.md) + +- `6` APIs +- Source identification and value lookup for telemetry and other data sources. + +## [Switches](switches/index.md) + +- `7` APIs +- Switch identification, value lookup, and sticky-switch helpers. + +## [Variables](variables/index.md) + +- `2` APIs +- Shared-memory variables exposed to scripts. diff --git a/website/md-docs/api-reference/key-inputs/default-channel.md b/website/md-docs/api-reference/key-inputs/default-channel.md new file mode 100644 index 000000000..00746925b --- /dev/null +++ b/website/md-docs/api-reference/key-inputs/default-channel.md @@ -0,0 +1,36 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# defaultChannel + +`defaultChannel(stick)` + +Get channel assigned to stick. See Default Channel Order in General Settings + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `stick` | yes | `integer` | stick number (from 0 to 3) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | channel assigned to this stick (from 0 to 3) | +| `-` | `nil` | stick not found | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/key-inputs/default-stick.md b/website/md-docs/api-reference/key-inputs/default-stick.md new file mode 100644 index 000000000..cacbc27ba --- /dev/null +++ b/website/md-docs/api-reference/key-inputs/default-stick.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# defaultStick + +`defaultStick(channel)` + +Get stick that is assigned to a channel. See Default Channel Order in General Settings. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `channel` | yes | `integer` | channel number (0 means CH1) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | Stick assigned to this channel (from 0 to 3) | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/key-inputs/get-rot-enc-mode.md b/website/md-docs/api-reference/key-inputs/get-rot-enc-mode.md new file mode 100644 index 000000000..c61ce9a3f --- /dev/null +++ b/website/md-docs/api-reference/key-inputs/get-rot-enc-mode.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getRotEncMode + +`getRotEncMode()` + +Return rotary encoder mode + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | in list: Normal = 0, Both V and H inverted = 1, V-N = 2, V-A = 3 return 0 on radio without rotary encoder | + +## Availability + +- Since: `2.8.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/key-inputs/get-rot-enc-speed.md b/website/md-docs/api-reference/key-inputs/get-rot-enc-speed.md new file mode 100644 index 000000000..8a59c5aa7 --- /dev/null +++ b/website/md-docs/api-reference/key-inputs/get-rot-enc-speed.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getRotEncSpeed + +`getRotEncSpeed()` + +Return rotary encoder current speed + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | in list: ROTENC_LOWSPEED, ROTENC_MIDSPEED, ROTENC_HIGHSPEED returns ROTENC_LOWSPEED on radio without rotary encoder | + +## Availability + +- Since: `2.3.10` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/key-inputs/index.md b/website/md-docs/api-reference/key-inputs/index.md new file mode 100644 index 000000000..64a13038e --- /dev/null +++ b/website/md-docs/api-reference/key-inputs/index.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Inputs + +Key and stick related helpers for interactive scripts. + +<div class="api-grid"> +<a class="api-card" href="default-channel/"> +<span class="api-card-title">defaultChannel</span> +<span class="api-card-summary">Get channel assigned to stick.</span> +</a> +<a class="api-card" href="default-stick/"> +<span class="api-card-title">defaultStick</span> +<span class="api-card-summary">Get stick that is assigned to a channel.</span> +</a> +<a class="api-card" href="get-rot-enc-mode/"> +<span class="api-card-title">getRotEncMode</span> +<span class="api-card-summary">Return rotary encoder mode</span> +</a> +<a class="api-card" href="get-rot-enc-speed/"> +<span class="api-card-title">getRotEncSpeed</span> +<span class="api-card-summary">Return rotary encoder current speed</span> +</a> +<a class="api-card" href="kill-events/"> +<span class="api-card-title">killEvents</span> +<span class="api-card-summary">Stops key state machine.</span> +</a> +</div> diff --git a/website/md-docs/api-reference/key-inputs/kill-events.md b/website/md-docs/api-reference/key-inputs/kill-events.md new file mode 100644 index 000000000..7ce15c3e0 --- /dev/null +++ b/website/md-docs/api-reference/key-inputs/kill-events.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# killEvents + +`killEvents(key)` + +Stops key state machine. See [Key Events](../../api-overview/constants/key-event-constants.md) for the detailed description. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `key` | yes | `integer` | key to be killed, can also include event type (only the key part is used) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/lua-scripts/index.md b/website/md-docs/api-reference/lua-scripts/index.md new file mode 100644 index 000000000..75704bb18 --- /dev/null +++ b/website/md-docs/api-reference/lua-scripts/index.md @@ -0,0 +1,19 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Lua Scripts + +Script lifecycle helpers and interactive popups. + +<div class="api-grid"> +<a class="api-card" href="load-script/"> +<span class="api-card-title">loadScript</span> +<span class="api-card-summary">Load a Lua script file.</span> +</a> +</div> diff --git a/website/md-docs/api-reference/lua-scripts/load-script.md b/website/md-docs/api-reference/lua-scripts/load-script.md new file mode 100644 index 000000000..b2311b525 --- /dev/null +++ b/website/md-docs/api-reference/lua-scripts/load-script.md @@ -0,0 +1,67 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# loadScript + +`loadScript(file [, mode], [,env])` + +Load a Lua script file. This is similar to Lua's own [loadfile()](https://www.lua.org/manual/5.2/manual.html#pdf-loadfile) +API method, but it uses OpenTx's optional pre-compilation feature to save memory and time during load. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `file` | yes | `string` | Full path and file name of script. The file extension is optional and ignored (see `mode` param to control which extension will be used). However, if an extension is specified, it should be ".lua" (or ".luac"), otherwise it is treated<br>as part of the file name and the .lua/.luac will be appended to that. | +| `mode` | no | `string` | (optional) Controls whether to force loading the text (.lua) or pre-compiled binary (.luac) version of the script. By default ETX will load the newest version and compile a new binary if necessary (overwriting any<br>existing .luac version of the same script, and stripping some debug info like line numbers).<br>You can use `mode` to control the loading behavior more specifically. Possible values are:<ul><li>`b` only binary.</li><li>`t` only text.</li><li>`T` (default on simulator) prefer text but load binary if that is the only version available.</li><li>`bt` (default on radio) either binary or text, whichever is newer (binary preferred when timestamps are equal).</li><li>Add `x` to avoid automatic compilation of source file to .luac version. Eg: "tx", "bx", or "btx".</li><li>Add `c` to force compilation of source file to .luac version (even if existing version is newer than source file). Eg: "tc" or "btc" (forces "t", overrides "x").</li><li>Add `d` to keep extra debug info in the compiled binary. Eg: "td", "btd", or "tcd" (no effect with just "b" or with "x").</li></ul> | +| `env` | no | `integer` | See documentation for Lua function loadfile(). | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `function|nil` | The loaded script, or `nil` if there was an error (e.g. file not found or syntax error). | +| `-` | `string|nil` | Error message(s), if any. Blank if no error occurred. | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Notes + +- Note that you will get an error if you specify `mode` as "b" or "t" and that specific version of the file does not exist (eg. no .luac file when "b" is used). + Also note that `mode` is NOT passed on to Lua's loader function, so unlike with loadfile() the actual file content is not checked (as if no mode or "bt" were passed to loadfile()). + +## Source + +`radio/src/lua/api_general.cpp` + +## Extended Description + +`loadScript` fills a similar role to Lua's `loadfile()`, but it adds EdgeTX-specific handling for `.lua` and `.luac` files. On radio targets, that usually means better load-time performance and lower runtime overhead when a compiled version is available. + +Use the short summary from source annotations as the API-level definition. Keep the deeper usage guidance here, where it can evolve without expanding the firmware-source comment block. + +Typical reasons to use `loadScript` directly: + +- load reusable helper modules from the SD card +- control whether text or precompiled bytecode is preferred +- handle `nil, errmsg` returns explicitly when a script is missing or invalid + +## Examples + +```lua +local chunk, errmsg = loadScript("/SCRIPTS/TOOLS/demo.lua") +if not chunk then + return errmsg +end + +local mod = chunk() +``` diff --git a/website/md-docs/api-reference/model-functions/get-flight-mode.md b/website/md-docs/api-reference/model-functions/get-flight-mode.md new file mode 100644 index 000000000..22533f9ab --- /dev/null +++ b/website/md-docs/api-reference/model-functions/get-flight-mode.md @@ -0,0 +1,36 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getFlightMode + +`getFlightMode(mode)` + +Return flight mode data. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `mode` | yes | `integer` | flight mode number to return (0 - 8). If mode parameter is not specified (or contains invalid value), then the current flight mode data is returned. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `current_flight_mode_number_0_8` | `integer` | (current) flight mode number (0 - 8) | +| `current_flight_mode_name` | `string` | (current) flight mode name | + +## Availability + +- Since: `2.1.7` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/model-functions/get-output-value.md b/website/md-docs/api-reference/model-functions/get-output-value.md new file mode 100644 index 000000000..d509ecb0a --- /dev/null +++ b/website/md-docs/api-reference/model-functions/get-output-value.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getOutputValue + +`getOutputValue(outputIndex)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `outputIndex` | yes | `integer` | identifying the output channel number 0 for CH1, up to MAX_OUTPUT_CHANNELS - 1. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | current output value (number). Zero is returned for:<ul><li>non-existing outputs</li></ul> | + +## Availability + +- Since: `2.8.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/model-functions/index.md b/website/md-docs/api-reference/model-functions/index.md new file mode 100644 index 000000000..2ffd6c227 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/index.md @@ -0,0 +1,171 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Model Functions + +Model data access and editing APIs. + +<div class="api-grid"> +<a class="api-card" href="get-flight-mode/"> +<span class="api-card-title">getFlightMode</span> +<span class="api-card-summary">Return flight mode data.</span> +</a> +<a class="api-card" href="get-output-value/"> +<span class="api-card-title">getOutputValue</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="model-default-inputs/"> +<span class="api-card-title">model.defaultInputs</span> +<span class="api-card-summary">Set all inputs to defaults</span> +</a> +<a class="api-card" href="model-delete-flight-modes/"> +<span class="api-card-title">model.deleteFlightModes</span> +<span class="api-card-summary">Clear all flightModes</span> +</a> +<a class="api-card" href="model-delete-input/"> +<span class="api-card-title">model.deleteInput</span> +<span class="api-card-summary">Delete line from specified input</span> +</a> +<a class="api-card" href="model-delete-inputs/"> +<span class="api-card-title">model.deleteInputs</span> +<span class="api-card-summary">Delete all Inputs</span> +</a> +<a class="api-card" href="model-delete-mix/"> +<span class="api-card-title">model.deleteMix</span> +<span class="api-card-summary">Delete mixer line from specified Channel</span> +</a> +<a class="api-card" href="model-delete-mixes/"> +<span class="api-card-title">model.deleteMixes</span> +<span class="api-card-summary">Remove all mixers</span> +</a> +<a class="api-card" href="model-get-curve/"> +<span class="api-card-title">model.getCurve</span> +<span class="api-card-summary">Get Curve parameters</span> +</a> +<a class="api-card" href="model-get-custom-function/"> +<span class="api-card-title">model.getCustomFunction</span> +<span class="api-card-summary">Get Custom Function parameters</span> +</a> +<a class="api-card" href="model-get-flight-mode/"> +<span class="api-card-title">model.getFlightMode</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="model-get-global-variable/"> +<span class="api-card-title">model.getGlobalVariable</span> +<span class="api-card-summary">Return current global variable value</span> +</a> +<a class="api-card" href="model-get-global-variable-details/"> +<span class="api-card-title">model.getGlobalVariableDetails</span> +<span class="api-card-summary">Returns details about a Global Variable, but not values</span> +</a> +<a class="api-card" href="model-get-info/"> +<span class="api-card-title">model.getInfo</span> +<span class="api-card-summary">Get current Model information</span> +</a> +<a class="api-card" href="model-get-input/"> +<span class="api-card-title">model.getInput</span> +<span class="api-card-summary">Return input data for given input and line number</span> +</a> +<a class="api-card" href="model-get-inputs-count/"> +<span class="api-card-title">model.getInputsCount</span> +<span class="api-card-summary">Return number of lines for given input</span> +</a> +<a class="api-card" href="model-get-logical-switch/"> +<span class="api-card-title">model.getLogicalSwitch</span> +<span class="api-card-summary">Get Logical Switch parameters</span> +</a> +<a class="api-card" href="model-get-mix/"> +<span class="api-card-title">model.getMix</span> +<span class="api-card-summary">Get configuration for specified Mix</span> +</a> +<a class="api-card" href="model-get-mixes-count/"> +<span class="api-card-title">model.getMixesCount</span> +<span class="api-card-summary">Get the number of Mixer lines that the specified Channel has</span> +</a> +<a class="api-card" href="model-get-module/"> +<span class="api-card-title">model.getModule</span> +<span class="api-card-summary">Get RF module parameters</span> +</a> +<a class="api-card" href="model-get-output/"> +<span class="api-card-title">model.getOutput</span> +<span class="api-card-summary">Get servo parameters</span> +</a> +<a class="api-card" href="model-get-sensor/"> +<span class="api-card-title">model.getSensor</span> +<span class="api-card-summary">Get Telemetry Sensor parameters</span> +</a> +<a class="api-card" href="model-get-swash-ring/"> +<span class="api-card-title">model.getSwashRing</span> +<span class="api-card-summary">Get heli swash parameters</span> +</a> +<a class="api-card" href="model-get-timer/"> +<span class="api-card-title">model.getTimer</span> +<span class="api-card-summary">Get model timer parameters</span> +</a> +<a class="api-card" href="model-insert-input/"> +<span class="api-card-title">model.insertInput</span> +<span class="api-card-summary">Insert an Input at specified line</span> +</a> +<a class="api-card" href="model-insert-mix/"> +<span class="api-card-title">model.insertMix</span> +<span class="api-card-summary">Insert a mixer line into Channel</span> +</a> +<a class="api-card" href="model-reset-sensor/"> +<span class="api-card-title">model.resetSensor</span> +<span class="api-card-summary">Reset Telemetry Sensor parameters</span> +</a> +<a class="api-card" href="model-reset-timer/"> +<span class="api-card-title">model.resetTimer</span> +<span class="api-card-summary">Reset model timer to a startup value</span> +</a> +<a class="api-card" href="model-set-curve/"> +<span class="api-card-title">model.setCurve</span> +<span class="api-card-summary">Set Curve parameters</span> +</a> +<a class="api-card" href="model-set-custom-function/"> +<span class="api-card-title">model.setCustomFunction</span> +<span class="api-card-summary">Set Custom Function parameters</span> +</a> +<a class="api-card" href="model-set-flight-mode/"> +<span class="api-card-title">model.setFlightMode</span> +<span class="api-card-summary">Set Flight mode parameters</span> +</a> +<a class="api-card" href="model-set-global-variable/"> +<span class="api-card-title">model.setGlobalVariable</span> +<span class="api-card-summary">Sets current global variable value.</span> +</a> +<a class="api-card" href="model-set-global-variable-details/"> +<span class="api-card-title">model.setGlobalVariableDetails</span> +<span class="api-card-summary">Sets details about a Global Variable, but not values</span> +</a> +<a class="api-card" href="model-set-info/"> +<span class="api-card-title">model.setInfo</span> +<span class="api-card-summary">Set the current Model information</span> +</a> +<a class="api-card" href="model-set-logical-switch/"> +<span class="api-card-title">model.setLogicalSwitch</span> +<span class="api-card-summary">Set Logical Switch parameters</span> +</a> +<a class="api-card" href="model-set-module/"> +<span class="api-card-title">model.setModule</span> +<span class="api-card-summary">Set RF module parameters</span> +</a> +<a class="api-card" href="model-set-output/"> +<span class="api-card-title">model.setOutput</span> +<span class="api-card-summary">Set servo parameters</span> +</a> +<a class="api-card" href="model-set-swash-ring/"> +<span class="api-card-title">model.setSwashRing</span> +<span class="api-card-summary">Set heli swash parameters</span> +</a> +<a class="api-card" href="model-set-timer/"> +<span class="api-card-title">model.setTimer</span> +<span class="api-card-summary">Set model timer parameters</span> +</a> +</div> diff --git a/website/md-docs/api-reference/model-functions/model-default-inputs.md b/website/md-docs/api-reference/model-functions/model-default-inputs.md new file mode 100644 index 000000000..1cdb0af72 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-default-inputs.md @@ -0,0 +1,31 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.defaultInputs + +`model.defaultInputs()` + +Set all inputs to defaults + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-delete-flight-modes.md b/website/md-docs/api-reference/model-functions/model-delete-flight-modes.md new file mode 100644 index 000000000..3ce83adaa --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-delete-flight-modes.md @@ -0,0 +1,31 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.deleteFlightModes + +`model.deleteFlightModes()` + +Clear all flightModes + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.3.10` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-delete-input.md b/website/md-docs/api-reference/model-functions/model-delete-input.md new file mode 100644 index 000000000..d609ad01c --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-delete-input.md @@ -0,0 +1,34 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.deleteInput + +`model.deleteInput(input, line)` + +Delete line from specified input + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `input` | yes | `integer` | input number (use 0 for Input1) | +| `line` | yes | `integer` | input line (use 0 for first line) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-delete-inputs.md b/website/md-docs/api-reference/model-functions/model-delete-inputs.md new file mode 100644 index 000000000..1af5870e7 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-delete-inputs.md @@ -0,0 +1,31 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.deleteInputs + +`model.deleteInputs()` + +Delete all Inputs + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-delete-mix.md b/website/md-docs/api-reference/model-functions/model-delete-mix.md new file mode 100644 index 000000000..115fdc934 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-delete-mix.md @@ -0,0 +1,34 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.deleteMix + +`model.deleteMix(channel, line)` + +Delete mixer line from specified Channel + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `channel` | yes | `integer` | channel number (use 0 for CH1) | +| `line` | yes | `integer` | mix number (use 0 for first line(mix)) | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-delete-mixes.md b/website/md-docs/api-reference/model-functions/model-delete-mixes.md new file mode 100644 index 000000000..2946b9893 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-delete-mixes.md @@ -0,0 +1,31 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.deleteMixes + +`model.deleteMixes()` + +Remove all mixers + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-get-curve.md b/website/md-docs/api-reference/model-functions/model-get-curve.md new file mode 100644 index 000000000..c2891b9cc --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-get-curve.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.getCurve + +`model.getCurve(curve)` + +Get Curve parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `curve` | yes | `integer` | curve number (use 0 for Curve1) | + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>nil</code></td><td>requested curve does not exist</td></tr><tr><td><code>-</code></td><td><code>table</code></td><td>curve data:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td><code>string</code></td><td>name</td></tr><tr><td><code>type</code></td><td><code>number</code></td><td>type</td></tr><tr><td><code>smooth</code></td><td><code>boolean</code></td><td>smooth</td></tr><tr><td><code>points</code></td><td><code>number</code></td><td>number of points</td></tr><tr><td><code>y</code></td><td><code>table</code></td><td>table of Y values:</td></tr><tr><td><code>key</code></td><td>-</td><td>is point number (zero based)</td></tr><tr><td><code>value</code></td><td>-</td><td>is y value</td></tr><tr><td><code>x</code></td><td><code>table</code></td><td><strong>only included for custom curve type</strong>:</td></tr><tr><td><code>key</code></td><td>-</td><td>is point number (zero based)</td></tr><tr><td><code>value</code></td><td>-</td><td>is x value</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `2.0.12` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-get-custom-function.md b/website/md-docs/api-reference/model-functions/model-get-custom-function.md new file mode 100644 index 000000000..cc6d612aa --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-get-custom-function.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.getCustomFunction + +`model.getCustomFunction(function)` + +Get Custom Function parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `function` | yes | `integer` | custom function number (use 0 for CF1) | + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>nil</code></td><td>requested custom function does not exist</td></tr><tr><td><code>-</code></td><td><code>table</code></td><td>custom function data:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>switch</code></td><td><code>number</code></td><td>switch index</td></tr><tr><td><code>func</code></td><td><code>number</code></td><td>function index</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td>Name of track to play (only returned only returned if action is play track, sound or script)</td></tr><tr><td><code>value</code></td><td><code>number</code></td><td>value (only returned only returned if action is <strong>not</strong> play track, sound or script)</td></tr><tr><td><code>mode</code></td><td><code>number</code></td><td>mode (only returned only returned if action is <strong>not</strong> play track, sound or script)</td></tr><tr><td><code>param</code></td><td><code>number</code></td><td>parameter (only returned only returned if action is <strong>not</strong> play track, sound or script)</td></tr><tr><td><code>active</code></td><td><code>number</code></td><td>0 = disabled, 1 = enabled</td></tr><tr><td><code>repetition</code></td><td><code>number</code></td><td>-1 to 60, range and meaning depend on function</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-get-flight-mode.md b/website/md-docs/api-reference/model-functions/model-get-flight-mode.md new file mode 100644 index 000000000..0d46ca2eb --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-get-flight-mode.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.getFlightMode + +`model.getFlightMode(index)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | flight mode number (use 0 for FM0) | + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>nil</code></td><td>requested input or line does not exist</td></tr><tr><td><code>-</code></td><td><code>table</code></td><td>input data:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td><code>string</code></td><td>input line name</td></tr><tr><td><code>switch</code></td><td><code>number</code></td><td>input switch index</td></tr><tr><td><code>fadeIn</code></td><td><code>number</code></td><td>fade in value (in 0.1s)</td></tr><tr><td><code>fadeOut</code></td><td><code>number</code></td><td>fade out value (in 0.1s)</td></tr><tr><td><code>trimsValues</code></td><td><code>table</code></td><td>table of trim values:</td></tr><tr><td><code>key</code></td><td>-</td><td>is trim number (zero based)</td></tr><tr><td><code>value</code></td><td>-</td><td>is trim value</td></tr><tr><td><code>trimsModes</code></td><td><code>table</code></td><td>table of trim mode:</td></tr><tr><td><code>key</code></td><td>-</td><td>is trim number (zero based)</td></tr><tr><td><code>value</code></td><td>-</td><td>is trim mode</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `2.3.10` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-get-global-variable-details.md b/website/md-docs/api-reference/model-functions/model-get-global-variable-details.md new file mode 100644 index 000000000..9e4c08e1d --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-get-global-variable-details.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.getGlobalVariableDetails + +`model.getGlobalVariableDetails(index)` + +Returns details about a Global Variable, but not values + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | zero based global variable index, use 0 for GV1, 8 for GV9 | + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>table</code></td><td>details of the global variable:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td><code>string</code></td><td>global variable name</td></tr><tr><td><code>min</code></td><td><code>number</code></td><td>minimum value</td></tr><tr><td><code>max</code></td><td><code>number</code></td><td>maximum value</td></tr><tr><td><code>prec</code></td><td><code>number</code></td><td>precision</td></tr><tr><td><code>unit</code></td><td><code>number</code></td><td>unit</td></tr><tr><td><code>popup</code></td><td><code>boolean</code></td><td>show popup - if exists</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `2.11.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-get-global-variable.md b/website/md-docs/api-reference/model-functions/model-get-global-variable.md new file mode 100644 index 000000000..c19290a74 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-get-global-variable.md @@ -0,0 +1,41 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.getGlobalVariable + +`model.getGlobalVariable(index, flight_mode)` + +Return current global variable value + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | zero based global variable index, use 0 for GV1, 8 for GV9 | +| `flight_mode` | yes | `integer` | Flight mode number (0 = FM0, 8 = FM8) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested global variable does not exist | +| `-` | `integer` | current value of global variable | + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Notes + +- a simple warning or notice + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-get-info.md b/website/md-docs/api-reference/model-functions/model-get-info.md new file mode 100644 index 000000000..44b6eefeb --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-get-info.md @@ -0,0 +1,31 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.getInfo + +`model.getInfo()` + +Get current Model information + +## Parameters + +None. + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>table</code></td><td>model information:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td><code>string</code></td><td>model name</td></tr><tr><td><code>extendedLimits</code></td><td><code>boolean</code></td><td>extended limits enabled</td></tr><tr><td><code>jitterFilter</code></td><td><code>number</code></td><td>model level ADC filter</td></tr><tr><td><code>bitmap</code></td><td><code>string</code></td><td>bitmap name (not present on X7)</td></tr><tr><td><code>filename</code></td><td><code>string</code></td><td>model filename</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `2.0.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-get-input.md b/website/md-docs/api-reference/model-functions/model-get-input.md new file mode 100644 index 000000000..bf2bdb745 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-get-input.md @@ -0,0 +1,34 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.getInput + +`model.getInput(input, line)` + +Return input data for given input and line number + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `input` | yes | `integer` | input number (use 0 for Input1) | +| `line` | yes | `integer` | input line (use 0 for first line) | + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>nil</code></td><td>requested input or line does not exist</td></tr><tr><td><code>-</code></td><td><code>table</code></td><td>input data:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td><code>string</code></td><td>input line name</td></tr><tr><td><code>inputName</code></td><td><code>string</code></td><td>input input name</td></tr><tr><td><code>source</code></td><td><code>number</code></td><td>input source index</td></tr><tr><td><code>scale</code></td><td><code>number</code></td><td>input scaling (for telemetry)</td></tr><tr><td><code>weight</code></td><td><code>number</code></td><td>input weight</td></tr><tr><td><code>offset</code></td><td><code>number</code></td><td>input offset</td></tr><tr><td><code>switch</code></td><td><code>number</code></td><td>input switch index</td></tr><tr><td><code>curveType</code></td><td><code>number</code></td><td>curve type (function, expo, custom curve)</td></tr><tr><td><code>curveValue</code></td><td><code>number</code></td><td>curve index</td></tr><tr><td><code>carryTrim</code></td><td>-</td><td>deprecated, please use trimSource instead. WARNING: carryTrim was getting negative values (carryTrim = - trimSource)</td></tr><tr><td><code>trimSource</code></td><td><code>number</code></td><td>a positive number representing trim source</td></tr><tr><td><code>side</code></td><td><code>number</code></td><td>input side (positive, negative or all)</td></tr><tr><td><code>flightModes</code></td><td><code>number</code></td><td>bit-mask of active flight modes</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-get-inputs-count.md b/website/md-docs/api-reference/model-functions/model-get-inputs-count.md new file mode 100644 index 000000000..df8870070 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-get-inputs-count.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.getInputsCount + +`model.getInputsCount(input)` + +Return number of lines for given input + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `input` | yes | `integer` | input number (use 0 for Input1) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | number of configured lines for given input | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-get-logical-switch.md b/website/md-docs/api-reference/model-functions/model-get-logical-switch.md new file mode 100644 index 000000000..5f2ca3ef7 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-get-logical-switch.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.getLogicalSwitch + +`model.getLogicalSwitch(switch)` + +Get Logical Switch parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `switch` | yes | `integer` | logical switch number (use 0 for LS1) | + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>nil</code></td><td>requested logical switch does not exist</td></tr><tr><td><code>-</code></td><td><code>table</code></td><td>logical switch data:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>func</code></td><td><code>number</code></td><td>function index</td></tr><tr><td><code>v1</code></td><td><code>number</code></td><td>V1 value (index)</td></tr><tr><td><code>v2</code></td><td><code>number</code></td><td>V2 value (index or value)</td></tr><tr><td><code>v3</code></td><td><code>number</code></td><td>V3 value (index or value)</td></tr><tr><td><code>and</code></td><td><code>number</code></td><td>AND switch index</td></tr><tr><td><code>delay</code></td><td><code>number</code></td><td>delay (time in 1/10 s)</td></tr><tr><td><code>duration</code></td><td><code>number</code></td><td>duration (time in 1/10 s)</td></tr><tr><td><code>state</code></td><td><code>boolean</code></td><td>current state of the logical switch</td></tr><tr><td><code>persistent</code></td><td><code>boolean</code></td><td>if true then the state is persistent across reboot of the radio</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-get-mix.md b/website/md-docs/api-reference/model-functions/model-get-mix.md new file mode 100644 index 000000000..ebfcd58ba --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-get-mix.md @@ -0,0 +1,34 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.getMix + +`model.getMix(channel, line)` + +Get configuration for specified Mix + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `channel` | yes | `integer` | channel number (use 0 for CH1) | +| `line` | yes | `integer` | mix number (use 0 for first line(mix)) | + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>nil</code></td><td>requested channel or line does not exist</td></tr><tr><td><code>-</code></td><td><code>table</code></td><td>mix data:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td><code>string</code></td><td>mix line name</td></tr><tr><td><code>source</code></td><td><code>number</code></td><td>source index</td></tr><tr><td><code>weight</code></td><td><code>number</code></td><td>weight value (-512 to 511) or source (>= 1024 or <= -1024)</td></tr><tr><td><code>offset</code></td><td><code>number</code></td><td>offset value (-512 to 511) or source (>= 1024 or <= -1024)</td></tr><tr><td><code>switch</code></td><td><code>number</code></td><td>switch index</td></tr><tr><td><code>multiplex</code></td><td><code>number</code></td><td>multiplex (0 = ADD, 1 = MULTIPLY, 2 = REPLACE)</td></tr><tr><td><code>curveType</code></td><td><code>number</code></td><td>curve type (function, expo, custom curve)</td></tr><tr><td><code>curveValue</code></td><td><code>number</code></td><td>curve index</td></tr><tr><td><code>flightModes</code></td><td><code>number</code></td><td>bit-mask of active flight modes</td></tr><tr><td><code>carryTrim</code></td><td><code>boolean</code></td><td>carry trim</td></tr><tr><td><code>mixWarn</code></td><td><code>number</code></td><td>warning (0 = off, 1 = 1 beep, .. 3 = 3 beeps)</td></tr><tr><td><code>delayPrec</code></td><td>-</td><td>precision of delay up/down (1 or 10)</td></tr><tr><td><code>delayUp</code></td><td><code>number</code></td><td>delay up (time in 1/10 s)</td></tr><tr><td><code>delayDown</code></td><td><code>number</code></td><td>delay down</td></tr><tr><td><code>speedPrec</code></td><td>-</td><td>precision of speed up/down (1 or 10)</td></tr><tr><td><code>speedUp</code></td><td><code>number</code></td><td>speed up</td></tr><tr><td><code>speedDown</code></td><td><code>number</code></td><td>speed down</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-get-mixes-count.md b/website/md-docs/api-reference/model-functions/model-get-mixes-count.md new file mode 100644 index 000000000..7656dc88f --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-get-mixes-count.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.getMixesCount + +`model.getMixesCount(channel)` + +Get the number of Mixer lines that the specified Channel has + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `channel` | yes | `integer` | channel number (use 0 for CH1) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | number of mixes for requested channel | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-get-module.md b/website/md-docs/api-reference/model-functions/model-get-module.md new file mode 100644 index 000000000..bead6a51a --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-get-module.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.getModule + +`model.getModule(index)` + +Get RF module parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | module index (0 for internal, 1 for external) | + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>nil</code></td><td>requested module does not exist</td></tr><tr><td><code>-</code></td><td><code>table</code></td><td>module parameters:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>subType</code></td><td><code>number</code></td><td>protocol index</td></tr><tr><td><code>modelId</code></td><td><code>number</code></td><td>receiver number</td></tr><tr><td><code>firstChannel</code></td><td><code>number</code></td><td>start channel (0 is CH1)</td></tr><tr><td><code>channelsCount</code></td><td><code>number</code></td><td>number of channels sent to module</td></tr><tr><td><code>Type</code></td><td><code>number</code></td><td>module type</td></tr><tr><td><code>protocol</code></td><td><code>number</code></td><td>protocol number (Multi only)</td></tr><tr><td><code>subProtocol</code></td><td><code>number</code></td><td>sub-protocol number (Multi only)</td></tr><tr><td><code>channelsOrder</code></td><td><code>number</code></td><td>first 4 channels expected order (Multi only)</td></tr><tr><td><code>channelsOrder</code></td><td><code>number</code></td><td>first 4 channels expected order (DSMP only)</td></tr></tbody></table><ul class="lua-nested-field-notes"><li>if the module type is Multi additional information are available</li><li>if the module type is LemonDSMP additional info is available</li></ul></td></tr></tbody></table> + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-get-output.md b/website/md-docs/api-reference/model-functions/model-get-output.md new file mode 100644 index 000000000..c92d05b03 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-get-output.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.getOutput + +`model.getOutput(index)` + +Get servo parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | output number (use 0 for CH1) | + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>nil</code></td><td>requested output does not exist</td></tr><tr><td><code>-</code></td><td><code>table</code></td><td>output parameters:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td><code>string</code></td><td>name</td></tr><tr><td><code>min</code></td><td><code>number</code></td><td>Minimum % * 10</td></tr><tr><td><code>max</code></td><td><code>number</code></td><td>Maximum % * 10</td></tr><tr><td><code>offset</code></td><td><code>number</code></td><td>Subtrim * 10</td></tr><tr><td><code>ppmCenter</code></td><td><code>number</code></td><td>offset from PPM Center. 0 = 1500</td></tr><tr><td><code>symetrical</code></td><td><code>number</code></td><td>linear Subtrim 0 = Off, 1 = On</td></tr><tr><td><code>revert</code></td><td><code>number</code></td><td>irection 0 = ­­­---, 1 = INV</td></tr></tbody></table><ul class="lua-nested-field-notes"><li><code>curve</code></li><li>(number) Curve number (0 for Curve1)</li><li>or <code>nil</code> if no curve set</li></ul></td></tr></tbody></table> + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-get-sensor.md b/website/md-docs/api-reference/model-functions/model-get-sensor.md new file mode 100644 index 000000000..e95791608 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-get-sensor.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.getSensor + +`model.getSensor(sensor)` + +Get Telemetry Sensor parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sensor` | yes | `integer` | sensor number (use 0 for sensor 1) | + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>nil</code></td><td>requested sensor does not exist</td></tr><tr><td><code>-</code></td><td><code>table</code></td><td>with sensor data:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td><code>number</code></td><td>0 = custom, 1 = calculated</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td>Name</td></tr><tr><td><code>unit</code></td><td><code>number</code></td><td>See list of units in the appendix of the OpenTX Lua Reference Guide</td></tr><tr><td><code>prec</code></td><td><code>number</code></td><td>Number of decimals</td></tr><tr><td><code>id</code></td><td><code>number</code></td><td>Only custom sensors</td></tr><tr><td><code>instance</code></td><td><code>number</code></td><td>Only custom sensors</td></tr><tr><td><code>formula</code></td><td><code>number</code></td><td>Only calculated sensors. 0 = Add etc. see list of formula choices in Companion popup</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `2.3.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-get-swash-ring.md b/website/md-docs/api-reference/model-functions/model-get-swash-ring.md new file mode 100644 index 000000000..e91958c76 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-get-swash-ring.md @@ -0,0 +1,31 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.getSwashRing + +`model.getSwashRing()` + +Get heli swash parameters + +## Parameters + +None. + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>table</code></td><td>with heli swash parameters:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td><code>number</code></td><td>0=---, 1=120, 2=120X, 3=140, 4=90</td></tr><tr><td><code>value</code></td><td><code>number</code></td><td>swash ring value (normally 0)</td></tr><tr><td><code>collectiveSource</code></td><td><code>number</code></td><td>source index</td></tr><tr><td><code>aileronSource</code></td><td><code>number</code></td><td>source index</td></tr><tr><td><code>elevatorSource</code></td><td><code>number</code></td><td>source index</td></tr><tr><td><code>collectiveWeight</code></td><td><code>value</code></td><td>-100 to 100</td></tr><tr><td><code>aileronWeight</code></td><td><code>value</code></td><td>-100 to 100</td></tr><tr><td><code>elevatorWeight</code></td><td><code>value</code></td><td>-100 to 100</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `2.8.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-get-timer.md b/website/md-docs/api-reference/model-functions/model-get-timer.md new file mode 100644 index 000000000..af558b9d2 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-get-timer.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.getTimer + +`model.getTimer(timer)` + +Get model timer parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `timer` | yes | `integer` | timer index (0 for Timer 1) | + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>nil</code></td><td>requested timer does not exist</td></tr><tr><td><code>-</code></td><td><code>table</code></td><td>timer parameters:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>mode</code></td><td><code>number</code></td><td>timer trigger source: off, abs, stk, stk%, sw/!sw, !m_sw/!m_sw</td></tr><tr><td><code>start</code></td><td><code>number</code></td><td>start value [seconds], 0 for up timer, 0> down timer</td></tr><tr><td><code>value</code></td><td><code>number</code></td><td>current value [seconds]</td></tr><tr><td><code>countdownBeep</code></td><td><code>number</code></td><td>countdown beep (0­ = silent, 1 =­ beeps, 2­ = voice)</td></tr><tr><td><code>minuteBeep</code></td><td><code>boolean</code></td><td>minute beep</td></tr><tr><td><code>persistent</code></td><td><code>number</code></td><td>persistent timer</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td>timer name</td></tr><tr><td><code>showElapsed</code></td><td><code>boolean</code></td><td>show elapsed</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-insert-input.md b/website/md-docs/api-reference/model-functions/model-insert-input.md new file mode 100644 index 000000000..6d44c9c74 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-insert-input.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.insertInput + +`model.insertInput(input, line, value)` + +Insert an Input at specified line + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `input` | yes | `integer` | input number (use 0 for Input1) | +| `line` | yes | `integer` | input line (use 0 for first line) | +| `value` | yes | `table` | input data, see model.getInput() | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-insert-mix.md b/website/md-docs/api-reference/model-functions/model-insert-mix.md new file mode 100644 index 000000000..7966f264a --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-insert-mix.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.insertMix + +`model.insertMix(channel, line, value)` + +Insert a mixer line into Channel + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `channel` | yes | `integer` | channel number (use 0 for CH1) | +| `line` | yes | `integer` | mix number (use 0 for first line(mix)) | +| `value` | yes | `table` | see model.getMix() for table format | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-reset-sensor.md b/website/md-docs/api-reference/model-functions/model-reset-sensor.md new file mode 100644 index 000000000..e129a5244 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-reset-sensor.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.resetSensor + +`model.resetSensor(sensor)` + +Reset Telemetry Sensor parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sensor` | yes | `integer` | sensor number (use 0 for sensor 1) | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | | + +## Availability + +- Since: `2.3.11` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-reset-timer.md b/website/md-docs/api-reference/model-functions/model-reset-timer.md new file mode 100644 index 000000000..b360b459a --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-reset-timer.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.resetTimer + +`model.resetTimer(timer)` + +Reset model timer to a startup value + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `timer` | yes | `integer` | timer index (0 for Timer 1) | + +## Returns + +None. + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-set-curve.md b/website/md-docs/api-reference/model-functions/model-set-curve.md new file mode 100644 index 000000000..9656230cb --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-set-curve.md @@ -0,0 +1,36 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.setCurve + +`model.setCurve(curve, params)` + +Set Curve parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `curve` | yes | `integer` | curve number (use 0 for Curve1) | +| `params` | yes | `integer` | see model.getCurve return format for table format. setCurve uses standard lua array indexing and arrays start at index 1 | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `0` | `integer` | <ul><li>Everything okay 1 - Wrong number of points 2 - Invalid Curve number 3 - Cuve does not fit anymore 4 - point of out of index 5 - x value not monotonically increasing 6 - y value not in range [-100;100] 7 - extra values for y are set 8 - extra values for x are set</li></ul> | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-set-custom-function.md b/website/md-docs/api-reference/model-functions/model-set-custom-function.md new file mode 100644 index 000000000..907491150 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-set-custom-function.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.setCustomFunction + +`model.setCustomFunction(function, value)` + +Set Custom Function parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `function` | yes | `integer` | custom function number (use 0 for CF1) | +| `value` | yes | `table` | custom function parameters, see model.getCustomFunction() for table format | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-set-flight-mode.md b/website/md-docs/api-reference/model-functions/model-set-flight-mode.md new file mode 100644 index 000000000..b1640c052 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-set-flight-mode.md @@ -0,0 +1,34 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.setFlightMode + +`model.setFlightMode(index, params)` + +Set Flight mode parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | flight mode number (use 0 for FM0) | +| `params` | yes | `unknown` | see model.getFlightMode return format for table format. | + +## Returns + +None. + +## Availability + +- Since: `2.3.10` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-set-global-variable-details.md b/website/md-docs/api-reference/model-functions/model-set-global-variable-details.md new file mode 100644 index 000000000..f753bb01a --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-set-global-variable-details.md @@ -0,0 +1,36 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.setGlobalVariableDetails + +`model.setGlobalVariableDetails(index, params)` + +Sets details about a Global Variable, but not values + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | zero based global variable index, use 0 for GV1, 8 for GV9 | +| `params` | yes | `table` | see model.getGlobalVariableDetails(index) return format for table format | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.11.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-set-global-variable.md b/website/md-docs/api-reference/model-functions/model-set-global-variable.md new file mode 100644 index 000000000..d0e7d6569 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-set-global-variable.md @@ -0,0 +1,41 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.setGlobalVariable + +`model.setGlobalVariable(index, flight_mode, value)` + +Sets current global variable value. See also model.getGlobalVariable() + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | zero based global variable index, use 0 for GV1, 8 for GV9 | +| `flight_mode` | yes | `integer` | Flight mode number (0 = FM0, 8 = FM8) | +| `value` | yes | `unknown` | new value for global variable. Permitted range is from -1024 to 1024. | + +## Returns + +None. + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Notes + +- Global variable can only store integer values, +any floating point value is converted into integer value +by truncating everything behind a floating point. + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-set-info.md b/website/md-docs/api-reference/model-functions/model-set-info.md new file mode 100644 index 000000000..b0916d1fa --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-set-info.md @@ -0,0 +1,38 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.setInfo + +`model.setInfo(value)` + +Set the current Model information + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `value` | yes | `unknown` | model information data, see model.getInfo() | + +## Returns + +None. + +## Availability + +- Since: `2.0.6` +- Radio support: `all` + +## Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-set-logical-switch.md b/website/md-docs/api-reference/model-functions/model-set-logical-switch.md new file mode 100644 index 000000000..e25685fb1 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-set-logical-switch.md @@ -0,0 +1,41 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.setLogicalSwitch + +`model.setLogicalSwitch(switch, value)` + +Set Logical Switch parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `switch` | yes | `integer` | logical switch number (use 0 for LS1) | +| `value` | yes | `table` | see model.getLogicalSwitch() for table format | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. +- To set the `and` member (which is Lua keyword) +use the following syntax: `model.setLogicalSwitch(30, {func=4,v1=1,v2=-99, ["and"]=24})` + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-set-module.md b/website/md-docs/api-reference/model-functions/model-set-module.md new file mode 100644 index 000000000..9382c0e5a --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-set-module.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.setModule + +`model.setModule(index, value)` + +Set RF module parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | module index (0 for internal, 1 for external) | +| `value` | yes | `unknown` | module parameters, see model.getModule() | + +## Returns + +None. + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-set-output.md b/website/md-docs/api-reference/model-functions/model-set-output.md new file mode 100644 index 000000000..4d2320dbb --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-set-output.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.setOutput + +`model.setOutput(index, value)` + +Set servo parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | channel number (use 0 for CH1) | +| `value` | yes | `table` | servo parameters, see model.getOutput() for table format | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-set-swash-ring.md b/website/md-docs/api-reference/model-functions/model-set-swash-ring.md new file mode 100644 index 000000000..c6e638775 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-set-swash-ring.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.setSwashRing + +`model.setSwashRing(params)` + +Set heli swash parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `params` | yes | `table` | swash ring parameters, see model.getSwashRing() for table format | + +## Returns + +None. + +## Availability + +- Since: `2.8.0` +- Radio support: `all` + +## Notes + +- If a parameter is missing, then that parameter remains unchanged. + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/model-functions/model-set-timer.md b/website/md-docs/api-reference/model-functions/model-set-timer.md new file mode 100644 index 000000000..fcb5428a4 --- /dev/null +++ b/website/md-docs/api-reference/model-functions/model-set-timer.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model.setTimer + +`model.setTimer(timer, value)` + +Set model timer parameters + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `timer` | yes | `integer` | timer index (0 for Timer 1) | +| `value` | yes | `unknown` | timer parameters, see model.getTimer() | + +## Returns + +None. + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. + +## Source + +`radio/src/lua/api_model.cpp` diff --git a/website/md-docs/api-reference/module-Bitmap.md b/website/md-docs/api-reference/module-Bitmap.md new file mode 100644 index 000000000..d7f46377a --- /dev/null +++ b/website/md-docs/api-reference/module-Bitmap.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Bitmap + +`4` APIs in this module. + +[Back to API overview](index.md) | [Open review dashboard](review.md) + +<div class="api-grid"> +<a class="api-card" href="../display-lcd/bitmap-get-size/"> +<span class="api-card-title">Bitmap.getSize</span> +<span class="api-card-summary">Return width, height of a bitmap object</span> +</a> +<a class="api-card" href="../display-lcd/bitmap-open/"> +<span class="api-card-title">Bitmap.open</span> +<span class="api-card-summary">Loads a bitmap in memory, for later use with lcd.drawBitmap().</span> +</a> +<a class="api-card" href="../display-lcd/bitmap-resize/"> +<span class="api-card-title">Bitmap.resize</span> +<span class="api-card-summary">Return a resized bitmap object</span> +</a> +<a class="api-card" href="../display-lcd/bitmap-to-mask/"> +<span class="api-card-title">Bitmap.toMask</span> +<span class="api-card-summary">Return a 8bit bitmap mask that can be used with lcd.drawBitmapPattern()</span> +</a> +</div> diff --git a/website/md-docs/api-reference/module-lcd.md b/website/md-docs/api-reference/module-lcd.md new file mode 100644 index 000000000..ee7174e0b --- /dev/null +++ b/website/md-docs/api-reference/module-lcd.md @@ -0,0 +1,179 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lcd + +`39` APIs in this module. + +[Back to API overview](index.md) | [Open review dashboard](review.md) + +<div class="api-grid"> +<a class="api-card" href="../display-lcd/lcd-rgb/"> +<span class="api-card-title">lcd.RGB</span> +<span class="api-card-summary">Returns a drawing flag with RGB color code</span> +</a> +<a class="api-card" href="../display-lcd/lcd-clear/"> +<span class="api-card-title">lcd.clear</span> +<span class="api-card-summary">Clear the LCD screen</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-annulus/"> +<span class="api-card-title">lcd.drawAnnulus</span> +<span class="api-card-summary">Draw an arc</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-arc/"> +<span class="api-card-title">lcd.drawArc</span> +<span class="api-card-summary">Draw an arc</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-bitmap/"> +<span class="api-card-title">lcd.drawBitmap</span> +<span class="api-card-summary">Displays a bitmap at (x,y)</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-bitmap-pattern/"> +<span class="api-card-title">lcd.drawBitmapPattern</span> +<span class="api-card-summary">Displays a bitmap pattern at (x,y)</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-bitmap-pattern-pie/"> +<span class="api-card-title">lcd.drawBitmapPatternPie</span> +<span class="api-card-summary">Displays a bitmap pattern pie at (x,y)</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-channel/"> +<span class="api-card-title">lcd.drawChannel</span> +<span class="api-card-summary">Display a telemetry value at (x,y)</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-circle/"> +<span class="api-card-title">lcd.drawCircle</span> +<span class="api-card-summary">Draw a circle at (x, y) of specified radius</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-combobox/"> +<span class="api-card-title">lcd.drawCombobox</span> +<span class="api-card-summary">Draw a combo box</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-filled-circle/"> +<span class="api-card-title">lcd.drawFilledCircle</span> +<span class="api-card-summary">Draw a filled circle at (x, y) of specified radius</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-filled-rectangle/"> +<span class="api-card-title">lcd.drawFilledRectangle</span> +<span class="api-card-summary">Draw a solid rectangle from top left corner (x,y) of specified width and height</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-filled-triangle/"> +<span class="api-card-title">lcd.drawFilledTriangle</span> +<span class="api-card-summary">Draw a filled triangle</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-gauge/"> +<span class="api-card-title">lcd.drawGauge</span> +<span class="api-card-summary">Draw a simple gauge that is filled based upon fill value</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-hud-rectangle/"> +<span class="api-card-title">lcd.drawHudRectangle</span> +<span class="api-card-summary">Draw a rectangle in perspective</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-line/"> +<span class="api-card-title">lcd.drawLine</span> +<span class="api-card-summary">Draw a straight line on LCD</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-line-with-clipping/"> +<span class="api-card-title">lcd.drawLineWithClipping</span> +<span class="api-card-summary">Draw a line only inside a rectangle</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-number/"> +<span class="api-card-title">lcd.drawNumber</span> +<span class="api-card-summary">Display a number at (x,y)</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-pie/"> +<span class="api-card-title">lcd.drawPie</span> +<span class="api-card-summary">Draw a pie slice</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-pixmap/"> +<span class="api-card-title">lcd.drawPixmap</span> +<span class="api-card-summary">Draw a bitmap at (x,y)</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-point/"> +<span class="api-card-title">lcd.drawPoint</span> +<span class="api-card-summary">Draw a single pixel at (x,y) position</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-rectangle/"> +<span class="api-card-title">lcd.drawRectangle</span> +<span class="api-card-summary">Draw a rectangle from top left corner (x,y) of specified width and height</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-screen-title/"> +<span class="api-card-title">lcd.drawScreenTitle</span> +<span class="api-card-summary">Draw a title bar</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-source/"> +<span class="api-card-title">lcd.drawSource</span> +<span class="api-card-summary">Displays the name of the corresponding input as defined by the source at (x,y)</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-switch/"> +<span class="api-card-title">lcd.drawSwitch</span> +<span class="api-card-summary">Draw a text representation of switch at (x,y)</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-text/"> +<span class="api-card-title">lcd.drawText</span> +<span class="api-card-summary">Draw a text beginning at (x,y)</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-text-lines/"> +<span class="api-card-title">lcd.drawTextLines</span> +<span class="api-card-summary">Draw text inside rectangle (x,y,w,h) with line breaks</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-timer/"> +<span class="api-card-title">lcd.drawTimer</span> +<span class="api-card-summary">Display a value formatted as time at (x,y)</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../display-lcd/lcd-draw-triangle/"> +<span class="api-card-title">lcd.drawTriangle</span> +<span class="api-card-summary">Draw a triangle</span> +</a> +<a class="api-card" href="../display-lcd/lcd-exit-full-screen/"> +<span class="api-card-title">lcd.exitFullScreen</span> +<span class="api-card-summary">Exit full screen widget mode.</span> +</a> +<a class="api-card" href="../display-lcd/lcd-get-color/"> +<span class="api-card-title">lcd.getColor</span> +<span class="api-card-summary">Get the color value from flags</span> +</a> +<a class="api-card" href="../display-lcd/lcd-get-last-left-pos/"> +<span class="api-card-title">lcd.getLastLeftPos</span> +<span class="api-card-summary">Returns the leftmost x position from previous drawtext or drawNumber output</span> +</a> +<a class="api-card" href="../display-lcd/lcd-get-last-pos/"> +<span class="api-card-title">lcd.getLastPos</span> +<span class="api-card-summary">Returns the rightmost x position from previous output</span> +</a> +<a class="api-card" href="../display-lcd/lcd-get-last-right-pos/"> +<span class="api-card-title">lcd.getLastRightPos</span> +<span class="api-card-summary">Returns the rightest x position from previous drawtext or drawNumber output</span> +</a> +<a class="api-card" href="../display-lcd/lcd-invert-rect/"> +<span class="api-card-title">lcd.invertRect</span> +<span class="api-card-summary">Invert a rectangle zone from top left corner (x,y) of specified width and height</span> +</a> +<a class="api-card" href="../display-lcd/lcd-refresh/"> +<span class="api-card-title">lcd.refresh</span> +<span class="api-card-summary">Refresh the LCD screen</span> +</a> +<a class="api-card" href="../display-lcd/lcd-reset-backlight-timeout/"> +<span class="api-card-title">lcd.resetBacklightTimeout</span> +<span class="api-card-summary">Reset the backlight timeout</span> +</a> +<a class="api-card" href="../display-lcd/lcd-set-color/"> +<span class="api-card-title">lcd.setColor</span> +<span class="api-card-summary">Change an indexed color (theme colors and CUSTOM_COLOR).</span> +</a> +<a class="api-card" href="../display-lcd/lcd-size-text/"> +<span class="api-card-title">lcd.sizeText</span> +<span class="api-card-summary">Get the width and height of a text string drawn with flags</span> +</a> +</div> diff --git a/website/md-docs/api-reference/module-lvgl.md b/website/md-docs/api-reference/module-lvgl.md new file mode 100644 index 000000000..51fb1e237 --- /dev/null +++ b/website/md-docs/api-reference/module-lvgl.md @@ -0,0 +1,197 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# lvgl + +`45` APIs in this module. + +[Back to API overview](index.md) | [Open review dashboard](review.md) + +<div class="api-grid"> +<a class="api-card" href="../display-lvgl/lvgl-align/"> +<span class="api-card-title">lvgl.align</span> +<span class="api-card-summary">Display a button showing a text alignment name.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-arc/"> +<span class="api-card-title">lvgl.arc</span> +<span class="api-card-summary">Display an arc.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-box/"> +<span class="api-card-title">lvgl.box</span> +<span class="api-card-summary">Create a container for managing object layout.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-build/"> +<span class="api-card-title">lvgl.build</span> +<span class="api-card-summary">Build a complex UI in a single operation from a table of object definitions.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-button/"> +<span class="api-card-title">lvgl.button</span> +<span class="api-card-summary">Add a text button using the EdgeTX style.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-choice/"> +<span class="api-card-title">lvgl.choice</span> +<span class="api-card-summary">Display a button showing an option value.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-circle/"> +<span class="api-card-title">lvgl.circle</span> +<span class="api-card-summary">Display a solid or outlined circle.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-clear/"> +<span class="api-card-title">lvgl.clear</span> +<span class="api-card-summary">Delete LVGL objects.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-close/"> +<span class="api-card-title">lvgl.close</span> +<span class="api-card-summary">Close an LVGL object that represents a closable container or dialog.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-color/"> +<span class="api-card-title">lvgl.color</span> +<span class="api-card-summary">Display a button showing a color swatch.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-confirm/"> +<span class="api-card-title">lvgl.confirm</span> +<span class="api-card-summary">Display a Yes/No confirmation dialog box.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-dialog/"> +<span class="api-card-title">lvgl.dialog</span> +<span class="api-card-summary">Display a dialog box.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-disable/"> +<span class="api-card-title">lvgl.disable</span> +<span class="api-card-summary">Disable interaction for an LVGL control object.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-enable/"> +<span class="api-card-title">lvgl.enable</span> +<span class="api-card-summary">Enable interaction for an LVGL control object.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-exit-full-screen/"> +<span class="api-card-title">lvgl.exitFullScreen</span> +<span class="api-card-summary">If the script is running in full screen mode, return it to normal mode.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-file/"> +<span class="api-card-title">lvgl.file</span> +<span class="api-card-summary">Display a button showing a filename.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-font/"> +<span class="api-card-title">lvgl.font</span> +<span class="api-card-summary">Display a button showing a font name.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-get-context/"> +<span class="api-card-title">lvgl.getContext</span> +<span class="api-card-summary">For a widget script, returns the local instance table created by (and returned from) the script's `create()` function.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-get-scroll-pos/"> +<span class="api-card-title">lvgl.getScrollPos</span> +<span class="api-card-summary">Get the current scroll position of a container object.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-hide/"> +<span class="api-card-title">lvgl.hide</span> +<span class="api-card-summary">Hide an LVGL object.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-hline/"> +<span class="api-card-title">lvgl.hline</span> +<span class="api-card-summary">Display a horizontal line.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-image/"> +<span class="api-card-title">lvgl.image</span> +<span class="api-card-summary">Display an image, centered in the frame `(x, y, w, h)`.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-is-app-mode/"> +<span class="api-card-title">lvgl.isAppMode</span> +<span class="api-card-summary">Test if the script is running in App Mode.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-is-full-screen/"> +<span class="api-card-title">lvgl.isFullScreen</span> +<span class="api-card-summary">Test if the script is running in full screen mode.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-label/"> +<span class="api-card-title">lvgl.label</span> +<span class="api-card-summary">Display a text label.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-line/"> +<span class="api-card-title">lvgl.line</span> +<span class="api-card-summary">Display one or more connected line segments.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-menu/"> +<span class="api-card-title">lvgl.menu</span> +<span class="api-card-summary">Open a popup menu with multiple options to choose from, using EdgeTX styling.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-message/"> +<span class="api-card-title">lvgl.message</span> +<span class="api-card-summary">Display a message dialog box.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-momentary-button/"> +<span class="api-card-title">lvgl.momentaryButton</span> +<span class="api-card-summary">Add a momentary text button using the EdgeTX style.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-number-edit/"> +<span class="api-card-title">lvgl.numberEdit</span> +<span class="api-card-summary">Add a number edit box using the EdgeTX style.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-page/"> +<span class="api-card-title">lvgl.page</span> +<span class="api-card-summary">Create a page layout for a One-Time script using EdgeTX styling: a header with title/sub-title lines and a back...</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-qrcode/"> +<span class="api-card-title">lvgl.qrcode</span> +<span class="api-card-summary">Display a QR code.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-rectangle/"> +<span class="api-card-title">lvgl.rectangle</span> +<span class="api-card-summary">Display a rectangle.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-set/"> +<span class="api-card-title">lvgl.set</span> +<span class="api-card-summary">Update the settings of an existing LVGL object.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-setting/"> +<span class="api-card-title">lvgl.setting</span> +<span class="api-card-summary">Create a container for a single row of a settings page, automatically padded for controls such as...</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-show/"> +<span class="api-card-title">lvgl.show</span> +<span class="api-card-summary">Show an LVGL object.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-slider/"> +<span class="api-card-title">lvgl.slider</span> +<span class="api-card-summary">Add a horizontal slider using the EdgeTX style.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-source/"> +<span class="api-card-title">lvgl.source</span> +<span class="api-card-summary">Display a button showing a source name.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-switch/"> +<span class="api-card-title">lvgl.switch</span> +<span class="api-card-summary">Display a button showing a switch name.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-text-edit/"> +<span class="api-card-title">lvgl.textEdit</span> +<span class="api-card-summary">Add a text edit box using the EdgeTX style.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-timer/"> +<span class="api-card-title">lvgl.timer</span> +<span class="api-card-summary">Display a button showing a timer name.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-toggle/"> +<span class="api-card-title">lvgl.toggle</span> +<span class="api-card-summary">Add a toggle switch using the EdgeTX style.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-triangle/"> +<span class="api-card-title">lvgl.triangle</span> +<span class="api-card-summary">Display a filled triangle.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-vertical-slider/"> +<span class="api-card-title">lvgl.verticalSlider</span> +<span class="api-card-summary">Add a vertical slider using the EdgeTX style.</span> +</a> +<a class="api-card" href="../display-lvgl/lvgl-vline/"> +<span class="api-card-title">lvgl.vline</span> +<span class="api-card-summary">Display a vertical line.</span> +</a> +</div> diff --git a/website/md-docs/api-reference/module-model.md b/website/md-docs/api-reference/module-model.md new file mode 100644 index 000000000..310e12011 --- /dev/null +++ b/website/md-docs/api-reference/module-model.md @@ -0,0 +1,171 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# model + +`37` APIs in this module. + +[Back to API overview](index.md) | [Open review dashboard](review.md) + +<div class="api-grid"> +<a class="api-card" href="../model-functions/model-default-inputs/"> +<span class="api-card-title">model.defaultInputs</span> +<span class="api-card-summary">Set all inputs to defaults</span> +</a> +<a class="api-card" href="../model-functions/model-delete-flight-modes/"> +<span class="api-card-title">model.deleteFlightModes</span> +<span class="api-card-summary">Clear all flightModes</span> +</a> +<a class="api-card" href="../model-functions/model-delete-input/"> +<span class="api-card-title">model.deleteInput</span> +<span class="api-card-summary">Delete line from specified input</span> +</a> +<a class="api-card" href="../model-functions/model-delete-inputs/"> +<span class="api-card-title">model.deleteInputs</span> +<span class="api-card-summary">Delete all Inputs</span> +</a> +<a class="api-card" href="../model-functions/model-delete-mix/"> +<span class="api-card-title">model.deleteMix</span> +<span class="api-card-summary">Delete mixer line from specified Channel</span> +</a> +<a class="api-card" href="../model-functions/model-delete-mixes/"> +<span class="api-card-title">model.deleteMixes</span> +<span class="api-card-summary">Remove all mixers</span> +</a> +<a class="api-card" href="../model-functions/model-get-curve/"> +<span class="api-card-title">model.getCurve</span> +<span class="api-card-summary">Get Curve parameters</span> +</a> +<a class="api-card" href="../model-functions/model-get-custom-function/"> +<span class="api-card-title">model.getCustomFunction</span> +<span class="api-card-summary">Get Custom Function parameters</span> +</a> +<a class="api-card" href="../model-functions/model-get-flight-mode/"> +<span class="api-card-title">model.getFlightMode</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../model-functions/model-get-global-variable/"> +<span class="api-card-title">model.getGlobalVariable</span> +<span class="api-card-summary">Return current global variable value</span> +</a> +<a class="api-card" href="../model-functions/model-get-global-variable-details/"> +<span class="api-card-title">model.getGlobalVariableDetails</span> +<span class="api-card-summary">Returns details about a Global Variable, but not values</span> +</a> +<a class="api-card" href="../model-functions/model-get-info/"> +<span class="api-card-title">model.getInfo</span> +<span class="api-card-summary">Get current Model information</span> +</a> +<a class="api-card" href="../model-functions/model-get-input/"> +<span class="api-card-title">model.getInput</span> +<span class="api-card-summary">Return input data for given input and line number</span> +</a> +<a class="api-card" href="../model-functions/model-get-inputs-count/"> +<span class="api-card-title">model.getInputsCount</span> +<span class="api-card-summary">Return number of lines for given input</span> +</a> +<a class="api-card" href="../model-functions/model-get-logical-switch/"> +<span class="api-card-title">model.getLogicalSwitch</span> +<span class="api-card-summary">Get Logical Switch parameters</span> +</a> +<a class="api-card" href="../model-functions/model-get-mix/"> +<span class="api-card-title">model.getMix</span> +<span class="api-card-summary">Get configuration for specified Mix</span> +</a> +<a class="api-card" href="../model-functions/model-get-mixes-count/"> +<span class="api-card-title">model.getMixesCount</span> +<span class="api-card-summary">Get the number of Mixer lines that the specified Channel has</span> +</a> +<a class="api-card" href="../model-functions/model-get-module/"> +<span class="api-card-title">model.getModule</span> +<span class="api-card-summary">Get RF module parameters</span> +</a> +<a class="api-card" href="../model-functions/model-get-output/"> +<span class="api-card-title">model.getOutput</span> +<span class="api-card-summary">Get servo parameters</span> +</a> +<a class="api-card" href="../model-functions/model-get-sensor/"> +<span class="api-card-title">model.getSensor</span> +<span class="api-card-summary">Get Telemetry Sensor parameters</span> +</a> +<a class="api-card" href="../model-functions/model-get-swash-ring/"> +<span class="api-card-title">model.getSwashRing</span> +<span class="api-card-summary">Get heli swash parameters</span> +</a> +<a class="api-card" href="../model-functions/model-get-timer/"> +<span class="api-card-title">model.getTimer</span> +<span class="api-card-summary">Get model timer parameters</span> +</a> +<a class="api-card" href="../model-functions/model-insert-input/"> +<span class="api-card-title">model.insertInput</span> +<span class="api-card-summary">Insert an Input at specified line</span> +</a> +<a class="api-card" href="../model-functions/model-insert-mix/"> +<span class="api-card-title">model.insertMix</span> +<span class="api-card-summary">Insert a mixer line into Channel</span> +</a> +<a class="api-card" href="../model-functions/model-reset-sensor/"> +<span class="api-card-title">model.resetSensor</span> +<span class="api-card-summary">Reset Telemetry Sensor parameters</span> +</a> +<a class="api-card" href="../model-functions/model-reset-timer/"> +<span class="api-card-title">model.resetTimer</span> +<span class="api-card-summary">Reset model timer to a startup value</span> +</a> +<a class="api-card" href="../model-functions/model-set-curve/"> +<span class="api-card-title">model.setCurve</span> +<span class="api-card-summary">Set Curve parameters</span> +</a> +<a class="api-card" href="../model-functions/model-set-custom-function/"> +<span class="api-card-title">model.setCustomFunction</span> +<span class="api-card-summary">Set Custom Function parameters</span> +</a> +<a class="api-card" href="../model-functions/model-set-flight-mode/"> +<span class="api-card-title">model.setFlightMode</span> +<span class="api-card-summary">Set Flight mode parameters</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../model-functions/model-set-global-variable/"> +<span class="api-card-title">model.setGlobalVariable</span> +<span class="api-card-summary">Sets current global variable value.</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../model-functions/model-set-global-variable-details/"> +<span class="api-card-title">model.setGlobalVariableDetails</span> +<span class="api-card-summary">Sets details about a Global Variable, but not values</span> +<span class="api-card-badge">unknown_return_type</span> +</a> +<a class="api-card" href="../model-functions/model-set-info/"> +<span class="api-card-title">model.setInfo</span> +<span class="api-card-summary">Set the current Model information</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../model-functions/model-set-logical-switch/"> +<span class="api-card-title">model.setLogicalSwitch</span> +<span class="api-card-summary">Set Logical Switch parameters</span> +</a> +<a class="api-card" href="../model-functions/model-set-module/"> +<span class="api-card-title">model.setModule</span> +<span class="api-card-summary">Set RF module parameters</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../model-functions/model-set-output/"> +<span class="api-card-title">model.setOutput</span> +<span class="api-card-summary">Set servo parameters</span> +</a> +<a class="api-card" href="../model-functions/model-set-swash-ring/"> +<span class="api-card-title">model.setSwashRing</span> +<span class="api-card-summary">Set heli swash parameters</span> +</a> +<a class="api-card" href="../model-functions/model-set-timer/"> +<span class="api-card-title">model.setTimer</span> +<span class="api-card-summary">Set model timer parameters</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +</div> diff --git a/website/md-docs/api-reference/module-runtime.md b/website/md-docs/api-reference/module-runtime.md new file mode 100644 index 000000000..76d0f3ea1 --- /dev/null +++ b/website/md-docs/api-reference/module-runtime.md @@ -0,0 +1,328 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# runtime + +`73` APIs in this module. + +[Back to API overview](index.md) | [Open review dashboard](review.md) + +<div class="api-grid"> +<a class="api-card" href="../display-lcd/grey/"> +<span class="api-card-title">GREY</span> +<span class="api-card-summary">Returns gray value which can be used in LCD functions</span> +</a> +<a class="api-card" href="../rf-module/access-telemetry-push/"> +<span class="api-card-title">accessTelemetryPush</span> +<span class="api-card-summary">This functions allows for sending SPORT / ACCESS telemetry data toward the receiver, and more generally, to anything...</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../radio-hardware/apply-rgbled-colors/"> +<span class="api-card-title">applyRGBLedColors</span> +<span class="api-card-summary">Apply RGB led colors previously defined by setRGBLedColor</span> +</a> +<a class="api-card" href="../filesystem/chdir/"> +<span class="api-card-title">chdir</span> +<span class="api-card-summary">Change the working directory</span> +</a> +<a class="api-card" href="../telemetry/crossfire-telemetry-pop/"> +<span class="api-card-title">crossfireTelemetryPop</span> +<span class="api-card-summary">Pops a received Crossfire Telemetry packet from the queue.</span> +</a> +<a class="api-card" href="../rf-module/crossfire-telemetry-push/"> +<span class="api-card-title">crossfireTelemetryPush</span> +<span class="api-card-summary">This functions allows for sending telemetry data toward the TBS Crossfire link.</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../key-inputs/default-channel/"> +<span class="api-card-title">defaultChannel</span> +<span class="api-card-summary">Get channel assigned to stick.</span> +</a> +<a class="api-card" href="../key-inputs/default-stick/"> +<span class="api-card-title">defaultStick</span> +<span class="api-card-summary">Get stick that is assigned to a channel.</span> +</a> +<a class="api-card" href="../filesystem/del/"> +<span class="api-card-title">del</span> +<span class="api-card-summary">Returns FRESULT (e.g.</span> +</a> +<a class="api-card" href="../filesystem/dir/"> +<span class="api-card-title">dir</span> +<span class="api-card-summary">Return an iterator listing all the files and directories name in a directory</span> +</a> +<a class="api-card" href="../audio-sound/flush-audio/"> +<span class="api-card-title">flushAudio</span> +<span class="api-card-summary">flushes audio queue</span> +</a> +<a class="api-card" href="../filesystem/fstat/"> +<span class="api-card-title">fstat</span> +<span class="api-card-summary">Checks the existence of file or directory.</span> +</a> +<a class="api-card" href="../system/get-available-memory/"> +<span class="api-card-title">getAvailableMemory</span> +<span class="api-card-summary">Get available memory remaining in the Heap for Lua.</span> +</a> +<a class="api-card" href="../time/get-date-time/"> +<span class="api-card-title">getDateTime</span> +<span class="api-card-summary">Return current system date and time that is kept by the RTC unit</span> +</a> +<a class="api-card" href="../sources/get-field-info/"> +<span class="api-card-title">getFieldInfo</span> +<span class="api-card-summary">Return detailed information about field (source)</span> +</a> +<a class="api-card" href="../model-functions/get-flight-mode/"> +<span class="api-card-title">getFlightMode</span> +<span class="api-card-summary">Return flight mode data.</span> +</a> +<a class="api-card" href="../system/get-general-settings/"> +<span class="api-card-title">getGeneralSettings</span> +<span class="api-card-summary">Returns (some of) the general radio settings</span> +</a> +<a class="api-card" href="../time/get-global-timer/"> +<span class="api-card-title">getGlobalTimer</span> +<span class="api-card-summary">Returns radio timers</span> +</a> +<a class="api-card" href="../switches/get-logical-switch-value/"> +<span class="api-card-title">getLogicalSwitchValue</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../model-functions/get-output-value/"> +<span class="api-card-title">getOutputValue</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../telemetry/get-ras/"> +<span class="api-card-title">getRAS</span> +<span class="api-card-summary">Return the RAS value or nil if no valid hardware found</span> +</a> +<a class="api-card" href="../telemetry/get-rssi/"> +<span class="api-card-title">getRSSI</span> +<span class="api-card-summary">Get RSSI value as well as low and critical RSSI alarm levels (in dB)</span> +<span class="api-card-badge">unknown_return_type</span> +</a> +<a class="api-card" href="../key-inputs/get-rot-enc-mode/"> +<span class="api-card-title">getRotEncMode</span> +<span class="api-card-summary">Return rotary encoder mode</span> +</a> +<a class="api-card" href="../key-inputs/get-rot-enc-speed/"> +<span class="api-card-title">getRotEncSpeed</span> +<span class="api-card-summary">Return rotary encoder current speed</span> +</a> +<a class="api-card" href="../time/get-rtc-time/"> +<span class="api-card-title">getRtcTime</span> +<span class="api-card-summary">Return current RTC system date as unix timstamp (in seconds since 1.</span> +</a> +<a class="api-card" href="../variables/get-shm-var/"> +<span class="api-card-title">getShmVar</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../sources/get-source-index/"> +<span class="api-card-title">getSourceIndex</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../sources/get-source-name/"> +<span class="api-card-title">getSourceName</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../sources/get-source-value/"> +<span class="api-card-title">getSourceValue</span> +<span class="api-card-summary">Returns the value of a source.</span> +<span class="api-card-badge">unknown_return_type</span> +</a> +<a class="api-card" href="../radio-hardware/get-stick-mode/"> +<span class="api-card-title">getStickMode</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../switches/get-switch-index/"> +<span class="api-card-title">getSwitchIndex</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../switches/get-switch-info/"> +<span class="api-card-title">getSwitchInfo</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../switches/get-switch-name/"> +<span class="api-card-title">getSwitchName</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../switches/get-switch-value/"> +<span class="api-card-title">getSwitchValue</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../time/get-time/"> +<span class="api-card-title">getTime</span> +<span class="api-card-summary">Return the time since the radio was started in multiple of 10ms</span> +</a> +<a class="api-card" href="../telemetry/get-trainer-status/"> +<span class="api-card-title">getTrainerStatus</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../radio-hardware/get-tx-gps/"> +<span class="api-card-title">getTxGPS</span> +<span class="api-card-summary">Return the internal GPS position or nil if no valid hardware found</span> +</a> +<a class="api-card" href="../system/get-usage/"> +<span class="api-card-title">getUsage</span> +<span class="api-card-summary">Get percent of already used Lua instructions in current script execution cycle.</span> +</a> +<a class="api-card" href="../sources/get-value/"> +<span class="api-card-title">getValue</span> +<span class="api-card-summary">Returns the value of a source.</span> +</a> +<a class="api-card" href="../system/get-version/"> +<span class="api-card-title">getVersion</span> +<span class="api-card-summary">Return OpenTX version</span> +</a> +<a class="api-card" href="../telemetry/ghost-telemetry-pop/"> +<span class="api-card-title">ghostTelemetryPop</span> +<span class="api-card-summary">Pops a received Ghost Telemetry packet from the queue.</span> +</a> +<a class="api-card" href="../rf-module/ghost-telemetry-push/"> +<span class="api-card-title">ghostTelemetryPush</span> +<span class="api-card-summary">This functions allows for sending telemetry data toward the Ghost link.</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../key-inputs/kill-events/"> +<span class="api-card-title">killEvents</span> +<span class="api-card-summary">Stops key state machine.</span> +</a> +<a class="api-card" href="../lua-scripts/load-script/"> +<span class="api-card-title">loadScript</span> +<span class="api-card-summary">Load a Lua script file.</span> +</a> +<a class="api-card" href="../filesystem/mkdir/"> +<span class="api-card-title">mkdir</span> +<span class="api-card-summary">Create a directory</span> +</a> +<a class="api-card" href="../rf-module/multi-buffer/"> +<span class="api-card-title">multiBuffer</span> +<span class="api-card-summary">This function reads/writes the Multi protocol buffer to interact with a protocol.</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../audio-sound/play-duration/"> +<span class="api-card-title">playDuration</span> +<span class="api-card-summary">Play a time value (text to speech)</span> +<span class="api-card-badge">unknown_return_type</span> +</a> +<a class="api-card" href="../audio-sound/play-file/"> +<span class="api-card-title">playFile</span> +<span class="api-card-summary">Play a file from the SD card</span> +<span class="api-card-badge">unknown_return_type</span> +</a> +<a class="api-card" href="../audio-sound/play-haptic/"> +<span class="api-card-title">playHaptic</span> +<span class="api-card-summary">Generate haptic feedback</span> +</a> +<a class="api-card" href="../audio-sound/play-number/"> +<span class="api-card-title">playNumber</span> +<span class="api-card-summary">Play a numerical value (text to speech)</span> +<span class="api-card-badge">unknown_return_type</span> +</a> +<a class="api-card" href="../audio-sound/play-tone/"> +<span class="api-card-title">playTone</span> +<span class="api-card-summary">Play a tone</span> +<span class="api-card-badge">unknown_return_type</span> +</a> +<a class="api-card" href="../display-lcd/popup-confirmation/"> +<span class="api-card-title">popupConfirmation</span> +<span class="api-card-summary">Raises a pop-up on screen that asks for confirmation</span> +<span class="api-card-badge">unknown_return_type</span> +</a> +<a class="api-card" href="../display-lcd/popup-input/"> +<span class="api-card-title">popupInput</span> +<span class="api-card-summary">Raises a pop-up on screen that allows uses input</span> +<span class="api-card-badge">unknown_return_type</span> +</a> +<a class="api-card" href="../display-lcd/popup-warning/"> +<span class="api-card-title">popupWarning</span> +<span class="api-card-summary">Raises a pop-up on screen that shows a warning</span> +<span class="api-card-badge">unknown_return_type</span> +</a> +<a class="api-card" href="../filesystem/rename/"> +<span class="api-card-title">rename</span> +<span class="api-card-summary">Rename a file or directory If the file or directory is being moved to a new parent directory, then the new parent...</span> +</a> +<a class="api-card" href="../time/reset-global-timer/"> +<span class="api-card-title">resetGlobalTimer</span> +<span class="api-card-summary">Resets the radio global timer to 0.</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../system/screenshot/"> +<span class="api-card-title">screenshot</span> +<span class="api-card-summary">Takes a screenshot, which is saved to the SCREENSHOTS folder on the radio SD card.</span> +<span class="api-card-badge">unknown_return_type</span> +</a> +<a class="api-card" href="../serial-ports/serial-get-power/"> +<span class="api-card-title">serialGetPower</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../serial-ports/serial-read/"> +<span class="api-card-title">serialRead</span> +<span class="api-card-summary">Needs summary review</span> +<span class="api-card-badge">unknown_return_type</span> +</a> +<a class="api-card" href="../serial-ports/serial-set-power/"> +<span class="api-card-title">serialSetPower</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../serial-ports/serial-write/"> +<span class="api-card-title">serialWrite</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../radio-hardware/set-cfsled-color/"> +<span class="api-card-title">setCFSLedColor</span> +<span class="api-card-summary">Overrides the LED color for a custom function switch</span> +</a> +<a class="api-card" href="../radio-hardware/set-imu-x/"> +<span class="api-card-title">setIMU_X</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../radio-hardware/set-imu-y/"> +<span class="api-card-title">setIMU_Y</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../radio-hardware/set-rgbled-color/"> +<span class="api-card-title">setRGBLedColor</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../serial-ports/set-serial-baudrate/"> +<span class="api-card-title">setSerialBaudrate</span> +<span class="api-card-summary">Needs summary review</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../variables/set-shm-var/"> +<span class="api-card-title">setShmVar</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../switches/set-sticky-switch/"> +<span class="api-card-title">setStickySwitch</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../telemetry/set-telemetry-value/"> +<span class="api-card-title">setTelemetryValue</span> +<span class="api-card-summary">Needs summary review</span> +<span class="api-card-badge">unknown_return_type / unknown_param_type</span> +</a> +<a class="api-card" href="../sources/sources/"> +<span class="api-card-title">sources</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="../telemetry/sport-telemetry-pop/"> +<span class="api-card-title">sportTelemetryPop</span> +<span class="api-card-summary">Pops a received SPORT packet from the queue.</span> +</a> +<a class="api-card" href="../rf-module/sport-telemetry-push/"> +<span class="api-card-title">sportTelemetryPush</span> +<span class="api-card-summary">This functions allows for sending SPORT telemetry data toward the receiver, and more generally, to anything...</span> +<span class="api-card-badge">unknown_param_type</span> +</a> +<a class="api-card" href="../switches/switches/"> +<span class="api-card-title">switches</span> +<span class="api-card-summary">Needs summary review</span> +</a> +</div> diff --git a/website/md-docs/api-reference/radio-hardware/apply-rgbled-colors.md b/website/md-docs/api-reference/radio-hardware/apply-rgbled-colors.md new file mode 100644 index 000000000..176095ff7 --- /dev/null +++ b/website/md-docs/api-reference/radio-hardware/apply-rgbled-colors.md @@ -0,0 +1,31 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# applyRGBLedColors + +`applyRGBLedColors()` + +Apply RGB led colors previously defined by setRGBLedColor + +## Parameters + +None. + +## Returns + +None. + +## Availability + +- Since: `2.10` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/radio-hardware/get-stick-mode.md b/website/md-docs/api-reference/radio-hardware/get-stick-mode.md new file mode 100644 index 000000000..58b7cc7b2 --- /dev/null +++ b/website/md-docs/api-reference/radio-hardware/get-stick-mode.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getStickMode + +`getStickMode()` + + + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | a 1 to 4 value corresponding to radio stick mode | + +## Availability + +- Since: `3.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/radio-hardware/get-tx-gps.md b/website/md-docs/api-reference/radio-hardware/get-tx-gps.md new file mode 100644 index 000000000..2e7ba35ef --- /dev/null +++ b/website/md-docs/api-reference/radio-hardware/get-tx-gps.md @@ -0,0 +1,31 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getTxGPS + +`getTxGPS()` + +Return the internal GPS position or nil if no valid hardware found + +## Parameters + +None. + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>table</code></td><td>representing the current radio position</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>lat</code></td><td><code>number</code></td><td>internal GPS latitude, positive is North</td></tr><tr><td><code>lon</code></td><td><code>number</code></td><td>internal GPS longitude, positive is East</td></tr><tr><td><code>numsat</code></td><td><code>number</code></td><td>current number of sats locked in by the GPS sensor</td></tr><tr><td><code>fix</code></td><td><code>boolean</code></td><td>fix status</td></tr><tr><td><code>alt</code></td><td><code>number</code></td><td>internal GPS altitude in 0.1m</td></tr><tr><td><code>speed</code></td><td><code>number</code></td><td>internal GPSspeed in 0.1m/s</td></tr><tr><td><code>heading</code></td><td><code>number</code></td><td>internal GPS ground course estimation in degrees * 10</td></tr><tr><td><code>hdop</code></td><td><code>number</code></td><td>internal GPS horizontal dilution of precision</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `2.2.2` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/radio-hardware/index.md b/website/md-docs/api-reference/radio-hardware/index.md new file mode 100644 index 000000000..e6430a08d --- /dev/null +++ b/website/md-docs/api-reference/radio-hardware/index.md @@ -0,0 +1,43 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Radio Hardware + +Hardware-facing APIs and low-level device controls. + +<div class="api-grid"> +<a class="api-card" href="apply-rgbled-colors/"> +<span class="api-card-title">applyRGBLedColors</span> +<span class="api-card-summary">Apply RGB led colors previously defined by setRGBLedColor</span> +</a> +<a class="api-card" href="get-stick-mode/"> +<span class="api-card-title">getStickMode</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="get-tx-gps/"> +<span class="api-card-title">getTxGPS</span> +<span class="api-card-summary">Return the internal GPS position or nil if no valid hardware found</span> +</a> +<a class="api-card" href="set-cfsled-color/"> +<span class="api-card-title">setCFSLedColor</span> +<span class="api-card-summary">Overrides the LED color for a custom function switch</span> +</a> +<a class="api-card" href="set-imu-x/"> +<span class="api-card-title">setIMU_X</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="set-imu-y/"> +<span class="api-card-title">setIMU_Y</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="set-rgbled-color/"> +<span class="api-card-title">setRGBLedColor</span> +<span class="api-card-summary">Needs summary review</span> +</a> +</div> diff --git a/website/md-docs/api-reference/radio-hardware/set-cfsled-color.md b/website/md-docs/api-reference/radio-hardware/set-cfsled-color.md new file mode 100644 index 000000000..74603d6c2 --- /dev/null +++ b/website/md-docs/api-reference/radio-hardware/set-cfsled-color.md @@ -0,0 +1,36 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# setCFSLedColor + +`setCFSLedColor(id, rvalue, bvalue, cvalue)` + +Overrides the LED color for a custom function switch + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `string` | identifying a custom function switch name | +| `rvalue` | yes | `integer` | value of red channel | +| `bvalue` | yes | `integer` | value of green channel | +| `cvalue` | yes | `integer` | value of blue channel | + +## Returns + +None. + +## Availability + +- Since: `3.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/radio-hardware/set-imu-x.md b/website/md-docs/api-reference/radio-hardware/set-imu-x.md new file mode 100644 index 000000000..96df8a5da --- /dev/null +++ b/website/md-docs/api-reference/radio-hardware/set-imu-x.md @@ -0,0 +1,34 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# setIMU_X + +`setIMU_X(offset, range)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `offset` | yes | `integer` | offset in angular degree. -1 to offset to current X position | +| `range` | yes | `integer` | range in angular degree. 180° max.90 means min/max value will be reached at 45° from offset position | + +## Returns + +None. + +## Availability + +- Since: `3.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/radio-hardware/set-imu-y.md b/website/md-docs/api-reference/radio-hardware/set-imu-y.md new file mode 100644 index 000000000..dbd4ee9a5 --- /dev/null +++ b/website/md-docs/api-reference/radio-hardware/set-imu-y.md @@ -0,0 +1,34 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# setIMU_Y + +`setIMU_Y(offset, range)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `offset` | yes | `integer` | offset in angular degree. -1 to offset to current Y position | +| `range` | yes | `integer` | range in angular degree, 180° max. 90 means min/max value will be reached at 45° from offset position | + +## Returns + +None. + +## Availability + +- Since: `3.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/radio-hardware/set-rgbled-color.md b/website/md-docs/api-reference/radio-hardware/set-rgbled-color.md new file mode 100644 index 000000000..404186384 --- /dev/null +++ b/website/md-docs/api-reference/radio-hardware/set-rgbled-color.md @@ -0,0 +1,36 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# setRGBLedColor + +`setRGBLedColor(id, rvalue, bvalue, cvalue)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `integer` | identifying a led in the led chain | +| `rvalue` | yes | `integer` | value of red channel | +| `bvalue` | yes | `integer` | value of green channel | +| `cvalue` | yes | `integer` | value of blue channel | + +## Returns + +None. + +## Availability + +- Since: `2.10` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/review-bitmap-get-size.md b/website/md-docs/api-reference/review-bitmap-get-size.md new file mode 100644 index 000000000..fafd5a1f9 --- /dev/null +++ b/website/md-docs/api-reference/review-bitmap-get-size.md @@ -0,0 +1,108 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: Bitmap.getSize + +[Back to dashboard](review.md) | [Open API page](display-lcd/bitmap-get-size.md) + +## Snapshot + +- Module: `Bitmap` +- Current symbol: `Bitmap.getSize` +- Doc id: `bitmap.get-size` +- Source: `radio/src/lua/api_colorlcd.cpp:546` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="Bitmap.getSize"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>name</code></td><td>param</td><td><code>pointer</code></td><td>point to a bitmap previously opened with Bitmap.open()</td><td><select data-field-kind="param" data-field-name="name" data-current-type="pointer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="name" data-custom-type="true" /></td></tr> +<tr><td><code>width_in_pixels</code></td><td>return</td><td><code>integer</code></td><td>width in pixels</td><td><select data-field-kind="return" data-field-name="width_in_pixels" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="width_in_pixels" data-custom-type="true" /></td></tr> +<tr><td><code>height_in_pixels</code></td><td>return</td><td><code>integer</code></td><td>height in pixels</td><td><select data-field-kind="return" data-field-name="height_in_pixels" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="height_in_pixels" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "Bitmap.getSize", "symbol": "Bitmap.getSize", "summary": "Return width, height of a bitmap object", "parameters": [{"name": "name", "type": "pointer", "required": true, "description": "point to a bitmap previously opened with Bitmap.open()"}], "returns": [{"name": "width_in_pixels", "type": "integer", "description": "width in pixels"}, {"name": "height_in_pixels", "type": "integer", "description": "height in pixels"}], "notes": ["Only available on radios with color display"], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function Bitmap.getSize(name) + +Return width, height of a bitmap object + +@param bitmap (pointer) point to a bitmap previously opened with Bitmap.open() + +@retval multiple returns 2 values: + * (number) width in pixels + * (number) height in pixels + +@notice Only available on radios with color display + +@status current Introduced in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return width, height of a bitmap object + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `name` | yes | `pointer` | point to a bitmap previously opened with Bitmap.open() | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `width_in_pixels` | `integer` | width in pixels | +| `height_in_pixels` | `integer` | height in pixels | + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function Bitmap.getSize([name]) + +Return width, height of a bitmap object + +@param name (pointer) point to a bitmap previously opened with Bitmap.open() + +@retval width_in_pixels (integer) width in pixels + +@retval height_in_pixels (integer) height in pixels + +@notice Only available on radios with color display + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-bitmap-open.md b/website/md-docs/api-reference/review-bitmap-open.md new file mode 100644 index 000000000..fb099f466 --- /dev/null +++ b/website/md-docs/api-reference/review-bitmap-open.md @@ -0,0 +1,113 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: Bitmap.open + +[Back to dashboard](review.md) | [Open API page](display-lcd/bitmap-open.md) + +## Snapshot + +- Module: `Bitmap` +- Current symbol: `Bitmap.open` +- Doc id: `bitmap.open` +- Source: `radio/src/lua/api_colorlcd.cpp:488` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="Bitmap.open"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>name</code></td><td>param</td><td><code>string</code></td><td>full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”)</td><td><select data-field-kind="param" data-field-name="name" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="name" data-custom-type="true" /></td></tr> +<tr><td><code>bitmap</code></td><td>return</td><td><code>object</code></td><td>a bitmap object that can be used with other bitmap functions</td><td><select data-field-kind="return" data-field-name="bitmap" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="bitmap" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "Bitmap.open", "symbol": "Bitmap.open", "summary": "Loads a bitmap in memory, for later use with lcd.drawBitmap(). Bitmaps should be loaded only\nonce, returned object should be stored and used for drawing. If loading fails for whatever\nreason the resulting bitmap object will have width and height set to zero.", "parameters": [{"name": "name", "type": "string", "required": true, "description": "full path to the bitmap on SD card (i.e. \u201c/IMAGES/test.bmp\u201d)"}], "returns": [{"name": "bitmap", "type": "object", "description": "a bitmap object that can be used with other bitmap functions"}], "notes": ["Only available on radios with color display"], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function Bitmap.open(name) + +Loads a bitmap in memory, for later use with lcd.drawBitmap(). Bitmaps should be loaded only +once, returned object should be stored and used for drawing. If loading fails for whatever +reason the resulting bitmap object will have width and height set to zero. + +Bitmap loading can fail if: + * File is not found or contains invalid image + * System is low on memory + * Combined memory usage of all Lua script bitmaps exceeds certain value + +@param name (string) full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) + +@retval bitmap (object) a bitmap object that can be used with other bitmap functions + +@notice Only available on radios with color display + +@status current Introduced in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Loads a bitmap in memory, for later use with lcd.drawBitmap(). Bitmaps should be loaded only +once, returned object should be stored and used for drawing. If loading fails for whatever +reason the resulting bitmap object will have width and height set to zero. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `name` | yes | `string` | full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `bitmap` | `object` | a bitmap object that can be used with other bitmap functions | + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function Bitmap.open([name]) + +Loads a bitmap in memory, for later use with lcd.drawBitmap(). Bitmaps should be loaded only +once, returned object should be stored and used for drawing. If loading fails for whatever +reason the resulting bitmap object will have width and height set to zero. + +@param name (string) full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) + +@retval bitmap (object) a bitmap object that can be used with other bitmap functions + +@notice Only available on radios with color display + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-bitmap-resize.md b/website/md-docs/api-reference/review-bitmap-resize.md new file mode 100644 index 000000000..1a102fe81 --- /dev/null +++ b/website/md-docs/api-reference/review-bitmap-resize.md @@ -0,0 +1,107 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: Bitmap.resize + +[Back to dashboard](review.md) | [Open API page](display-lcd/bitmap-resize.md) + +## Snapshot + +- Module: `Bitmap` +- Current symbol: `Bitmap.resize` +- Doc id: `bitmap.resize` +- Source: `radio/src/lua/api_colorlcd.cpp:575` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="Bitmap.resize"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>bitmap</code></td><td>param</td><td><code>pointer</code></td><td>point to a bitmap previously opened with Bitmap.open()</td><td><select data-field-kind="param" data-field-name="bitmap" data-current-type="pointer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="bitmap" data-custom-type="true" /></td></tr> +<tr><td><code>width</code></td><td>param</td><td><code>integer</code></td><td>the new bitmap width</td><td><select data-field-kind="param" data-field-name="width" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="width" data-custom-type="true" /></td></tr> +<tr><td><code>height</code></td><td>param</td><td><code>integer</code></td><td>the new bitmap height</td><td><select data-field-kind="param" data-field-name="height" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="height" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "Bitmap.resize", "symbol": "Bitmap.resize", "summary": "Return a resized bitmap object", "parameters": [{"name": "bitmap", "type": "pointer", "required": true, "description": "point to a bitmap previously opened with Bitmap.open()"}, {"name": "width", "type": "integer", "required": true, "description": "the new bitmap width"}, {"name": "height", "type": "integer", "required": true, "description": "the new bitmap height"}], "returns": [], "notes": ["Only available on radios with color display"], "since": "2.8.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function Bitmap.resize(bitmap, width, height) + +Return a resized bitmap object + +@param bitmap (pointer) point to a bitmap previously opened with Bitmap.open() + +@param width (number) the new bitmap width + +@param height (number) the new bitmap height + +@notice Only available on radios with color display + +@status current Introduced in 2.8.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return a resized bitmap object + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `bitmap` | yes | `pointer` | point to a bitmap previously opened with Bitmap.open() | +| `width` | yes | `integer` | the new bitmap width | +| `height` | yes | `integer` | the new bitmap height | + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function Bitmap.resize([bitmap, width, height]) + +Return a resized bitmap object + +@param bitmap (pointer) point to a bitmap previously opened with Bitmap.open() + +@param width (integer) the new bitmap width + +@param height (integer) the new bitmap height + +@notice Only available on radios with color display + +@status current Introduced in 2.8.0 +~~~~ diff --git a/website/md-docs/api-reference/review-bitmap-to-mask.md b/website/md-docs/api-reference/review-bitmap-to-mask.md new file mode 100644 index 000000000..eeada737b --- /dev/null +++ b/website/md-docs/api-reference/review-bitmap-to-mask.md @@ -0,0 +1,103 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: Bitmap.toMask + +[Back to dashboard](review.md) | [Open API page](display-lcd/bitmap-to-mask.md) + +## Snapshot + +- Module: `Bitmap` +- Current symbol: `Bitmap.toMask` +- Doc id: `bitmap.to-mask` +- Source: `radio/src/lua/api_colorlcd.cpp:626` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: a + +## Decide + +- Unknown returns to decide: `a` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="Bitmap.toMask"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>bitmap</code></td><td>param</td><td><code>pointer</code></td><td>point to a bitmap previously opened with Bitmap.open()</td><td><select data-field-kind="param" data-field-name="bitmap" data-current-type="pointer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="bitmap" data-custom-type="true" /></td></tr> +<tr><td><code>a</code></td><td>return</td><td><code>unknown</code></td><td>bitmap mask</td><td><select data-field-kind="return" data-field-name="a" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="a" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "Bitmap.toMask", "symbol": "Bitmap.toMask", "summary": "Return a 8bit bitmap mask that can be used with lcd.drawBitmapPattern()", "parameters": [{"name": "bitmap", "type": "pointer", "required": true, "description": "point to a bitmap previously opened with Bitmap.open()"}], "returns": [{"name": "a", "type": "unknown", "description": "bitmap mask"}], "notes": ["Only available on radios with color display"], "since": "2.8.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function Bitmap.toMask(bitmap) + +Return a 8bit bitmap mask that can be used with lcd.drawBitmapPattern() + +@param bitmap (pointer) point to a bitmap previously opened with Bitmap.open() + +@retval a bitmap mask + +@notice Only available on radios with color display + +@status current Introduced in 2.8.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return a 8bit bitmap mask that can be used with lcd.drawBitmapPattern() + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `bitmap` | yes | `pointer` | point to a bitmap previously opened with Bitmap.open() | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `a` | `unknown` | bitmap mask | + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function Bitmap.toMask([bitmap]) + +Return a 8bit bitmap mask that can be used with lcd.drawBitmapPattern() + +@param bitmap (pointer) point to a bitmap previously opened with Bitmap.open() + +@retval a (TODO) bitmap mask + +@notice Only available on radios with color display + +@status current Introduced in 2.8.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-clear.md b/website/md-docs/api-reference/review-lcd-clear.md new file mode 100644 index 000000000..ce8595e45 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-clear.md @@ -0,0 +1,96 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.clear + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-clear.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.clear` +- Doc id: `lcd.clear` +- Source: `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:57` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: color + +## Decide + +- Unknown params to decide: `color` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.clear"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>color</code></td><td>param</td><td><code>unknown</code></td><td></td><td><select data-field-kind="param" data-field-name="color" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="color" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.clear", "symbol": "lcd.clear", "summary": "Clear the LCD screen", "parameters": [{"name": "color", "type": "unknown", "required": false, "description": ""}], "returns": [], "notes": ["This function only works in stand-alone and telemetry scripts."], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.clear([color]) + +Clear the LCD screen + +@param color (optional, only on color screens) + +@status current Introduced in 2.0.0, `color` parameter introduced in 2.2.0 RC12 + +@notice This function only works in stand-alone and telemetry scripts. +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Clear the LCD screen + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `color` | no | `unknown` | | + +#### Returns + +None. + +#### Notes + +- This function only works in stand-alone and telemetry scripts. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.clear([color]) + +Clear the LCD screen + +@param color (TODO) + +@notice This function only works in stand-alone and telemetry scripts. + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-annulus.md b/website/md-docs/api-reference/review-lcd-draw-annulus.md new file mode 100644 index 000000000..c477b3800 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-annulus.md @@ -0,0 +1,125 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawAnnulus + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-annulus.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawAnnulus` +- Doc id: `lcd.draw-annulus` +- Source: `radio/src/lua/api_colorlcd.cpp:1218` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawAnnulus"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the center</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the center</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>r1</code></td><td>param</td><td><code>integer</code></td><td>radii of the inside and outside of the annulus</td><td><select data-field-kind="param" data-field-name="r1" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="r1" data-custom-type="true" /></td></tr> +<tr><td><code>r2</code></td><td>param</td><td><code>integer</code></td><td>radii of the inside and outside of the annulus</td><td><select data-field-kind="param" data-field-name="r2" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="r2" data-custom-type="true" /></td></tr> +<tr><td><code>start</code></td><td>param</td><td><code>integer</code></td><td>start and end of the annulus</td><td><select data-field-kind="param" data-field-name="start" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="start" data-custom-type="true" /></td></tr> +<tr><td><code>end</code></td><td>param</td><td><code>integer</code></td><td>start and end of the annulus</td><td><select data-field-kind="param" data-field-name="end" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="end" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawAnnulus", "symbol": "lcd.drawAnnulus", "summary": "Draw an arc", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "coordinates of the center"}, {"name": "y", "type": "integer", "required": true, "description": "coordinates of the center"}, {"name": "r1", "type": "integer", "required": true, "description": "radii of the inside and outside of the annulus"}, {"name": "r2", "type": "integer", "required": true, "description": "radii of the inside and outside of the annulus"}, {"name": "start", "type": "integer", "required": true, "description": "start and end of the annulus"}, {"name": "end", "type": "integer", "required": true, "description": "start and end of the annulus"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}], "returns": [], "notes": ["Only available on radios with color display"], "since": "2.4.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawAnnulus(x, y, r1, r2, start, end [, flags]) + +Draw an arc + +@param x,y (positive numbers) coordinates of the center + +@param r1,r2 (positive numbers) radii of the inside and outside of the annulus + +@param start,end (positive numbers) start and end of the annulus + +@param flags (optional) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw an arc + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | coordinates of the center | +| `y` | yes | `integer` | coordinates of the center | +| `r1` | yes | `integer` | radii of the inside and outside of the annulus | +| `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 the Lcd functions overview | + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawAnnulus([x, y, r1, r2, start, end, flags]) + +Draw an arc + +@param x (integer) coordinates of the center + +@param y (integer) coordinates of the center + +@param r1 (integer) radii of the inside and outside of the annulus + +@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 the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-arc.md b/website/md-docs/api-reference/review-lcd-draw-arc.md new file mode 100644 index 000000000..46add6f80 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-arc.md @@ -0,0 +1,121 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawArc + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-arc.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawArc` +- Doc id: `lcd.draw-arc` +- Source: `radio/src/lua/api_colorlcd.cpp:1146` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawArc"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the center</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the center</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>r</code></td><td>param</td><td><code>integer</code></td><td>radius</td><td><select data-field-kind="param" data-field-name="r" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="r" data-custom-type="true" /></td></tr> +<tr><td><code>start</code></td><td>param</td><td><code>integer</code></td><td>start and end of the arc</td><td><select data-field-kind="param" data-field-name="start" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="start" data-custom-type="true" /></td></tr> +<tr><td><code>end</code></td><td>param</td><td><code>integer</code></td><td>start and end of the arc</td><td><select data-field-kind="param" data-field-name="end" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="end" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawArc", "symbol": "lcd.drawArc", "summary": "Draw an arc", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "coordinates of the center"}, {"name": "y", "type": "integer", "required": true, "description": "coordinates of the center"}, {"name": "r", "type": "integer", "required": true, "description": "radius"}, {"name": "start", "type": "integer", "required": true, "description": "start and end of the arc"}, {"name": "end", "type": "integer", "required": true, "description": "start and end of the arc"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}], "returns": [], "notes": ["Only available on radios with color display"], "since": "2.4.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawArc(x, y, r, start, end [, flags]) + +Draw an arc + +@param x,y (positive numbers) coordinates of the center + +@param r (positive number) radius + +@param start,end (positive numbers) start and end of the arc + +@param flags (optional) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw an arc + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | coordinates of the center | +| `y` | yes | `integer` | coordinates of the center | +| `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 the Lcd functions overview | + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawArc([x, y, r, start, end, flags]) + +Draw an arc + +@param x (integer) coordinates of the center + +@param y (integer) coordinates of the center + +@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 the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-bitmap-pattern-pie.md b/website/md-docs/api-reference/review-lcd-draw-bitmap-pattern-pie.md new file mode 100644 index 000000000..05f2a1cc0 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-bitmap-pattern-pie.md @@ -0,0 +1,124 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawBitmapPatternPie + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-bitmap-pattern-pie.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawBitmapPatternPie` +- Doc id: `lcd.draw-bitmap-pattern-pie` +- Source: `radio/src/lua/api_colorlcd.cpp:743` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: startAngle, endAngle + +## Decide + +- Unknown params to decide: `startAngle, endAngle` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawBitmapPatternPie"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>bitmap</code></td><td>param</td><td><code>pointer</code></td><td>point to a bitmap previously opened with Bitmap.open()</td><td><select data-field-kind="param" data-field-name="bitmap" data-current-type="pointer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="bitmap" data-custom-type="true" /></td></tr> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>starting coordinates</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>starting coordinates</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>startAngle</code></td><td>param</td><td><code>unknown</code></td><td>Start angle</td><td><select data-field-kind="param" data-field-name="startAngle" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="startAngle" data-custom-type="true" /></td></tr> +<tr><td><code>endAngle</code></td><td>param</td><td><code>unknown</code></td><td>End angle</td><td><select data-field-kind="param" data-field-name="endAngle" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="endAngle" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawBitmapPatternPie", "symbol": "lcd.drawBitmapPatternPie", "summary": "Displays a bitmap pattern pie at (x,y)", "parameters": [{"name": "bitmap", "type": "pointer", "required": true, "description": "point to a bitmap previously opened with Bitmap.open()"}, {"name": "x", "type": "integer", "required": true, "description": "starting coordinates"}, {"name": "y", "type": "integer", "required": true, "description": "starting coordinates"}, {"name": "startAngle", "type": "unknown", "required": true, "description": "Start angle"}, {"name": "endAngle", "type": "unknown", "required": true, "description": "End angle"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}], "returns": [], "notes": ["Only available on radios with color display"], "since": "2.8.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawBitmapPatternPie(bitmap, x, y, startAngle, endAngle [, flags]) + +Displays a bitmap pattern pie at (x,y) + +@param bitmap (pointer) point to a bitmap previously opened with Bitmap.open() + +@param x,y (positive numbers) starting coordinates + +@param startAngle Start angle + +@param endAngle End angle + +@param flags (optional) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.8.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Displays a bitmap pattern pie at (x,y) + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `bitmap` | yes | `pointer` | point to a bitmap previously opened with Bitmap.open() | +| `x` | yes | `integer` | starting coordinates | +| `y` | yes | `integer` | starting coordinates | +| `startAngle` | yes | `unknown` | Start angle | +| `endAngle` | yes | `unknown` | End angle | +| `flags` | no | `integer` | please see the Lcd functions overview | + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawBitmapPatternPie([bitmap, x, y, startAngle, endAngle, flags]) + +Displays a bitmap pattern pie at (x,y) + +@param bitmap (pointer) point to a bitmap previously opened with Bitmap.open() + +@param x (integer) starting coordinates + +@param y (integer) starting coordinates + +@param startAngle (TODO) Start angle + +@param endAngle (TODO) End angle + +@param flags (integer) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.8.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-bitmap-pattern.md b/website/md-docs/api-reference/review-lcd-draw-bitmap-pattern.md new file mode 100644 index 000000000..79f7f997a --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-bitmap-pattern.md @@ -0,0 +1,111 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawBitmapPattern + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-bitmap-pattern.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawBitmapPattern` +- Doc id: `lcd.draw-bitmap-pattern` +- Source: `radio/src/lua/api_colorlcd.cpp:710` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawBitmapPattern"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>bitmap</code></td><td>param</td><td><code>pointer</code></td><td>point to a bitmap previously opened with Bitmap.open()</td><td><select data-field-kind="param" data-field-name="bitmap" data-current-type="pointer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="bitmap" data-custom-type="true" /></td></tr> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>starting coordinates</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>starting coordinates</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawBitmapPattern", "symbol": "lcd.drawBitmapPattern", "summary": "Displays a bitmap pattern at (x,y)", "parameters": [{"name": "bitmap", "type": "pointer", "required": true, "description": "point to a bitmap previously opened with Bitmap.open()"}, {"name": "x", "type": "integer", "required": true, "description": "starting coordinates"}, {"name": "y", "type": "integer", "required": true, "description": "starting coordinates"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}], "returns": [], "notes": ["Only available on radios with color display"], "since": "2.8.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawBitmapPattern(bitmap, x, y [, flags]) + +Displays a bitmap pattern at (x,y) + +@param bitmap (pointer) point to a bitmap previously opened with Bitmap.open() + +@param x,y (positive numbers) starting coordinates + +@param flags (optional) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.8.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Displays a bitmap pattern at (x,y) + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `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 the Lcd functions overview | + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawBitmapPattern([bitmap, x, y, flags]) + +Displays a bitmap pattern at (x,y) + +@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 the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.8.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-bitmap.md b/website/md-docs/api-reference/review-lcd-draw-bitmap.md new file mode 100644 index 000000000..43d001e6c --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-bitmap.md @@ -0,0 +1,112 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawBitmap + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-bitmap.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawBitmap` +- Doc id: `lcd.draw-bitmap` +- Source: `radio/src/lua/api_colorlcd.cpp:671` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawBitmap"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>bitmap</code></td><td>param</td><td><code>pointer</code></td><td>point to a bitmap previously opened with Bitmap.open()</td><td><select data-field-kind="param" data-field-name="bitmap" data-current-type="pointer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="bitmap" data-custom-type="true" /></td></tr> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>starting coordinates</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>starting coordinates</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>scale</code></td><td>param</td><td><code>integer</code></td><td>scale in %, 50 divides size by two, 100 is unchanged, 200 doubles size. Omitting scale draws image in 1:1 scale and is faster than specifying 100 for scale.</td><td><select data-field-kind="param" data-field-name="scale" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="scale" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawBitmap", "symbol": "lcd.drawBitmap", "summary": "Displays a bitmap at (x,y)", "parameters": [{"name": "bitmap", "type": "pointer", "required": true, "description": "point to a bitmap previously opened with Bitmap.open()"}, {"name": "x", "type": "integer", "required": true, "description": "starting coordinates"}, {"name": "y", "type": "integer", "required": true, "description": "starting coordinates"}, {"name": "scale", "type": "integer", "required": false, "description": "scale in %, 50 divides size by two, 100 is unchanged, 200 doubles size. Omitting scale draws image in 1:1 scale and is faster than specifying 100 for scale."}], "returns": [], "notes": ["Only available on radios with color display"], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawBitmap(bitmap, x, y [, scale]) + +Displays a bitmap at (x,y) + +@param bitmap (pointer) point to a bitmap previously opened with Bitmap.open() + +@param x,y (positive numbers) starting coordinates + +@param scale (positive numbers) scale in %, 50 divides size by two, 100 is unchanged, 200 doubles size. +Omitting scale draws image in 1:1 scale and is faster than specifying 100 for scale. + +@notice Only available on radios with color display + +@status current Introduced in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Displays a bitmap at (x,y) + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `bitmap` | yes | `pointer` | point to a bitmap previously opened with Bitmap.open() | +| `x` | yes | `integer` | starting coordinates | +| `y` | yes | `integer` | starting coordinates | +| `scale` | no | `integer` | scale in %, 50 divides size by two, 100 is unchanged, 200 doubles size. Omitting scale draws image in 1:1 scale and is faster than specifying 100 for scale. | + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawBitmap([bitmap, x, y, scale]) + +Displays a bitmap at (x,y) + +@param bitmap (pointer) point to a bitmap previously opened with Bitmap.open() + +@param x (integer) starting coordinates + +@param y (integer) starting coordinates + +@param scale (integer) scale in %, 50 divides size by two, 100 is unchanged, 200 doubles size. Omitting scale draws image in 1:1 scale and is faster than specifying 100 for scale. + +@notice Only available on radios with color display + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-channel.md b/website/md-docs/api-reference/review-lcd-draw-channel.md new file mode 100644 index 000000000..41ddc4b49 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-channel.md @@ -0,0 +1,108 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawChannel + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-channel.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawChannel` +- Doc id: `lcd.draw-channel` +- Source: `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:390` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawChannel"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>starting coordinate</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>starting coordinate</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>source</code></td><td>param</td><td><code>integer|string</code></td><td>can be a source identifier (number) or a source name (string). See getValue()</td><td><select data-field-kind="param" data-field-name="source" data-current-type="integer|string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="source" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawChannel", "symbol": "lcd.drawChannel", "summary": "Display a telemetry value at (x,y)", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "starting coordinate"}, {"name": "y", "type": "integer", "required": true, "description": "starting coordinate"}, {"name": "source", "type": "integer|string", "required": true, "description": "can be a source identifier (number) or a source name (string). See getValue()"}, {"name": "flags", "type": "integer", "required": true, "description": "please see the Lcd functions overview"}], "returns": [], "notes": [], "since": "2.0.6"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawChannel(x, y, source, flags) + +Display a telemetry value at (x,y) + +@param x,y (positive numbers) starting coordinate + +@param source can be a source identifier (number) or a source name (string). +See getValue() + +@param flags (optional) please see the Lcd functions overview + +@status current Introduced in 2.0.6, changed in 2.1.0 (only telemetry sources are valid) +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a telemetry value at (x,y) + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `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 the Lcd functions overview | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawChannel([x, y, source, flags]) + +Display a telemetry value at (x,y) + +@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 the Lcd functions overview + +@status current Introduced in 2.0.6 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-circle.md b/website/md-docs/api-reference/review-lcd-draw-circle.md new file mode 100644 index 000000000..ec6a75a8f --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-circle.md @@ -0,0 +1,111 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawCircle + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-circle.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawCircle` +- Doc id: `lcd.draw-circle` +- Source: `radio/src/lua/api_colorlcd.cpp:1018` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawCircle"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>center position</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>center position</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>r</code></td><td>param</td><td><code>integer</code></td><td>radius in pixels</td><td><select data-field-kind="param" data-field-name="r" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="r" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawCircle", "symbol": "lcd.drawCircle", "summary": "Draw a circle at (x, y) of specified radius", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "center position"}, {"name": "y", "type": "integer", "required": true, "description": "center position"}, {"name": "r", "type": "integer", "required": true, "description": "radius in pixels"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}], "returns": [], "notes": ["Only available on radios with color display"], "since": "2.4.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawCircle(x, y, r [, flags]) + +Draw a circle at (x, y) of specified radius + +@param x,y (positive numbers) center position + +@param r (number) radius in pixels + +@param flags (optional) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a circle at (x, y) of specified radius + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | center position | +| `y` | yes | `integer` | center position | +| `r` | yes | `integer` | radius in pixels | +| `flags` | no | `integer` | please see the Lcd functions overview | + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawCircle([x, y, r, flags]) + +Draw a circle at (x, y) of specified radius + +@param x (integer) center position + +@param y (integer) center position + +@param r (integer) radius in pixels + +@param flags (integer) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-combobox.md b/website/md-docs/api-reference/review-lcd-draw-combobox.md new file mode 100644 index 000000000..88f7529a2 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-combobox.md @@ -0,0 +1,132 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawCombobox + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-combobox.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawCombobox` +- Doc id: `lcd.draw-combobox` +- Source: `radio/src/lua/api_stdlcd.cpp:555` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawCombobox"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>top left corner position</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>top left corner position</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>w</code></td><td>param</td><td><code>integer</code></td><td>width of combo box in pixels</td><td><select data-field-kind="param" data-field-name="w" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="w" data-custom-type="true" /></td></tr> +<tr><td><code>list</code></td><td>param</td><td><code>table</code></td><td>combo box elements, each element is a string</td><td><select data-field-kind="param" data-field-name="list" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="list" data-custom-type="true" /></td></tr> +<tr><td><code>idx</code></td><td>param</td><td><code>integer</code></td><td>index of entry to highlight</td><td><select data-field-kind="param" data-field-name="idx" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="idx" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>drawing flags, the flags can not be combined: +* `BLINK` combo box is expanded + * `INVERS` combo box collapsed, text inversed + * `0 or not present` combo box collapsed, text normal</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawCombobox", "symbol": "lcd.drawCombobox", "summary": "Draw a combo box", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "top left corner position"}, {"name": "y", "type": "integer", "required": true, "description": "top left corner position"}, {"name": "w", "type": "integer", "required": true, "description": "width of combo box in pixels"}, {"name": "list", "type": "table", "required": true, "description": "combo box elements, each element is a string"}, {"name": "idx", "type": "integer", "required": true, "description": "index of entry to highlight"}, {"name": "flags", "type": "integer", "required": false, "description": "drawing flags, the flags can not be combined:\n* `BLINK` combo box is expanded\n * `INVERS` combo box collapsed, text inversed\n * `0 or not present` combo box collapsed, text normal"}], "returns": [], "notes": ["Only available on Taranis"], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawCombobox(x, y, w, list, idx [, flags]) + +Draw a combo box + +@param x,y (positive numbers) top left corner position + +@param w (number) width of combo box in pixels + +@param list (table) combo box elements, each element is a string + +@param idx (integer) index of entry to highlight + +@param flags (unsigned number) drawing flags, the flags can not be combined: + * `BLINK` combo box is expanded + * `INVERS` combo box collapsed, text inversed + * `0 or not present` combo box collapsed, text normal + +@notice Only available on Taranis + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a combo box + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | top left corner position | +| `y` | yes | `integer` | top left corner position | +| `w` | yes | `integer` | width of combo box in pixels | +| `list` | yes | `table` | combo box elements, each element is a string | +| `idx` | yes | `integer` | index of entry to highlight | +| `flags` | no | `integer` | drawing flags, the flags can not be combined: * `BLINK` combo box is expanded * `INVERS` combo box collapsed, text inversed * `0 or not present` combo box collapsed, text normal | + +#### Returns + +None. + +#### Notes + +- Only available on Taranis + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawCombobox([x, y, w, list, idx, flags]) + +Draw a combo box + +@param x (integer) top left corner position + +@param y (integer) top left corner position + +@param w (integer) width of combo box in pixels + +@param list (table) combo box elements, each element is a string + +@param idx (integer) index of entry to highlight + +@param flags (integer) drawing flags, the flags can not be combined: +* `BLINK` combo box is expanded + * `INVERS` combo box collapsed, text inversed + * `0 or not present` combo box collapsed, text normal + +@notice Only available on Taranis + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-filled-circle.md b/website/md-docs/api-reference/review-lcd-draw-filled-circle.md new file mode 100644 index 000000000..b3a2d1a11 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-filled-circle.md @@ -0,0 +1,111 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawFilledCircle + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-filled-circle.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawFilledCircle` +- Doc id: `lcd.draw-filled-circle` +- Source: `radio/src/lua/api_colorlcd.cpp:1049` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawFilledCircle"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>center position</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>center position</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>r</code></td><td>param</td><td><code>integer</code></td><td>radius in pixels</td><td><select data-field-kind="param" data-field-name="r" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="r" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawFilledCircle", "symbol": "lcd.drawFilledCircle", "summary": "Draw a filled circle at (x, y) of specified radius", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "center position"}, {"name": "y", "type": "integer", "required": true, "description": "center position"}, {"name": "r", "type": "integer", "required": true, "description": "radius in pixels"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}], "returns": [], "notes": ["Only available on radios with color display"], "since": "2.4.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawFilledCircle(x, y, r [, flags]) + +Draw a filled circle at (x, y) of specified radius + +@param x,y (positive numbers) center position + +@param r (number) radius in pixels + +@param flags (optional) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a filled circle at (x, y) of specified radius + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | center position | +| `y` | yes | `integer` | center position | +| `r` | yes | `integer` | radius in pixels | +| `flags` | no | `integer` | please see the Lcd functions overview | + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawFilledCircle([x, y, r, flags]) + +Draw a filled circle at (x, y) of specified radius + +@param x (integer) center position + +@param y (integer) center position + +@param r (integer) radius in pixels + +@param flags (integer) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-filled-rectangle.md b/website/md-docs/api-reference/review-lcd-draw-filled-rectangle.md new file mode 100644 index 000000000..e66ae0158 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-filled-rectangle.md @@ -0,0 +1,119 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawFilledRectangle + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-filled-rectangle.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawFilledRectangle` +- Doc id: `lcd.draw-filled-rectangle` +- Source: `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:820` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawFilledRectangle"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>top left corner position</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>top left corner position</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>w</code></td><td>param</td><td><code>integer</code></td><td>width in pixels</td><td><select data-field-kind="param" data-field-name="w" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="w" data-custom-type="true" /></td></tr> +<tr><td><code>h</code></td><td>param</td><td><code>integer</code></td><td>height in pixels</td><td><select data-field-kind="param" data-field-name="h" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="h" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +<tr><td><code>opacity</code></td><td>param</td><td><code>integer</code></td><td>opacity defaults to 0 (only on radios with color display)</td><td><select data-field-kind="param" data-field-name="opacity" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="opacity" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawFilledRectangle", "symbol": "lcd.drawFilledRectangle", "summary": "Draw a solid rectangle from top left corner (x,y) of specified width and height", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "top left corner position"}, {"name": "y", "type": "integer", "required": true, "description": "top left corner position"}, {"name": "w", "type": "integer", "required": true, "description": "width in pixels"}, {"name": "h", "type": "integer", "required": true, "description": "height in pixels"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}, {"name": "opacity", "type": "integer", "required": false, "description": "opacity defaults to 0 (only on radios with color display)"}], "returns": [], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawFilledRectangle(x, y, w, h [, flags [, opacity]]) + +Draw a solid rectangle from top left corner (x,y) of specified width and height + +@param x,y (positive numbers) top left corner position + +@param w (number) width in pixels + +@param h (number) height in pixels + +@param flags (optional) please see the Lcd functions overview + +@param opacity (number) opacity defaults to 0 (only on radios with color display) + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a solid rectangle from top left corner (x,y) of specified width and height + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | top left corner position | +| `y` | yes | `integer` | top left corner position | +| `w` | yes | `integer` | width in pixels | +| `h` | yes | `integer` | height in pixels | +| `flags` | no | `integer` | please see the Lcd functions overview | +| `opacity` | no | `integer` | opacity defaults to 0 (only on radios with color display) | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawFilledRectangle([x, y, w, h, flags, opacity]) + +Draw a solid rectangle from top left corner (x,y) of specified width and height + +@param x (integer) top left corner position + +@param y (integer) top left corner position + +@param w (integer) width in pixels + +@param h (integer) height in pixels + +@param flags (integer) please see the Lcd functions overview + +@param opacity (integer) opacity defaults to 0 (only on radios with color display) + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-filled-triangle.md b/website/md-docs/api-reference/review-lcd-draw-filled-triangle.md new file mode 100644 index 000000000..9eebb8e22 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-filled-triangle.md @@ -0,0 +1,121 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawFilledTriangle + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-filled-triangle.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawFilledTriangle` +- Doc id: `lcd.draw-filled-triangle` +- Source: `radio/src/lua/api_colorlcd.cpp:1114` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawFilledTriangle"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x1</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the three vertices</td><td><select data-field-kind="param" data-field-name="x1" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x1" data-custom-type="true" /></td></tr> +<tr><td><code>y1</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the three vertices</td><td><select data-field-kind="param" data-field-name="y1" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y1" data-custom-type="true" /></td></tr> +<tr><td><code>x2</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the three vertices</td><td><select data-field-kind="param" data-field-name="x2" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x2" data-custom-type="true" /></td></tr> +<tr><td><code>y2</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the three vertices</td><td><select data-field-kind="param" data-field-name="y2" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y2" data-custom-type="true" /></td></tr> +<tr><td><code>x3</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the three vertices</td><td><select data-field-kind="param" data-field-name="x3" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x3" data-custom-type="true" /></td></tr> +<tr><td><code>y3</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the three vertices</td><td><select data-field-kind="param" data-field-name="y3" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y3" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawFilledTriangle", "symbol": "lcd.drawFilledTriangle", "summary": "Draw a filled triangle", "parameters": [{"name": "x1", "type": "integer", "required": true, "description": "coordinates of the three vertices"}, {"name": "y1", "type": "integer", "required": true, "description": "coordinates of the three vertices"}, {"name": "x2", "type": "integer", "required": true, "description": "coordinates of the three vertices"}, {"name": "y2", "type": "integer", "required": true, "description": "coordinates of the three vertices"}, {"name": "x3", "type": "integer", "required": true, "description": "coordinates of the three vertices"}, {"name": "y3", "type": "integer", "required": true, "description": "coordinates of the three vertices"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}], "returns": [], "notes": ["Only available on radios with color display"], "since": "2.4.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawFilledTriangle(x1, y1, x2, y2, x3, y3 [, flags]) + +Draw a filled triangle + +@param x1,y1,x2,y2,x3,y3 (positive numbers) coordinates of the three vertices + +@param flags (optional) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a filled triangle + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x1` | yes | `integer` | coordinates of the three vertices | +| `y1` | yes | `integer` | coordinates of the three vertices | +| `x2` | yes | `integer` | coordinates of the three vertices | +| `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 the Lcd functions overview | + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawFilledTriangle([x1, y1, x2, y2, x3, y3, flags]) + +Draw a filled triangle + +@param x1 (integer) coordinates of the three vertices + +@param y1 (integer) coordinates of the three vertices + +@param x2 (integer) coordinates of the three vertices + +@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 the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-gauge.md b/website/md-docs/api-reference/review-lcd-draw-gauge.md new file mode 100644 index 000000000..3311fd666 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-gauge.md @@ -0,0 +1,125 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawGauge + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-gauge.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawGauge` +- Doc id: `lcd.draw-gauge` +- Source: `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:892` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawGauge"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>top left corner position</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>top left corner position</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>w</code></td><td>param</td><td><code>integer</code></td><td>width in pixels</td><td><select data-field-kind="param" data-field-name="w" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="w" data-custom-type="true" /></td></tr> +<tr><td><code>h</code></td><td>param</td><td><code>integer</code></td><td>height in pixels</td><td><select data-field-kind="param" data-field-name="h" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="h" data-custom-type="true" /></td></tr> +<tr><td><code>fill</code></td><td>param</td><td><code>integer</code></td><td>amount of fill to apply</td><td><select data-field-kind="param" data-field-name="fill" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="fill" data-custom-type="true" /></td></tr> +<tr><td><code>maxfill</code></td><td>param</td><td><code>integer</code></td><td>total value of fill</td><td><select data-field-kind="param" data-field-name="maxfill" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="maxfill" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawGauge", "symbol": "lcd.drawGauge", "summary": "Draw a simple gauge that is filled based upon fill value", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "top left corner position"}, {"name": "y", "type": "integer", "required": true, "description": "top left corner position"}, {"name": "w", "type": "integer", "required": true, "description": "width in pixels"}, {"name": "h", "type": "integer", "required": true, "description": "height in pixels"}, {"name": "fill", "type": "integer", "required": true, "description": "amount of fill to apply"}, {"name": "maxfill", "type": "integer", "required": true, "description": "total value of fill"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}], "returns": [], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawGauge(x, y, w, h, fill, maxfill [, flags]) + +Draw a simple gauge that is filled based upon fill value + +@param x,y (positive numbers) top left corner position + +@param w (number) width in pixels + +@param h (number) height in pixels + +@param fill (number) amount of fill to apply + +@param maxfill (number) total value of fill + +@param flags (optional) please see the Lcd functions overview + +@status current Introduced in 2.0.0, changed in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a simple gauge that is filled based upon fill value + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | top left corner position | +| `y` | yes | `integer` | top left corner position | +| `w` | yes | `integer` | width in pixels | +| `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 the Lcd functions overview | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawGauge([x, y, w, h, fill, maxfill, flags]) + +Draw a simple gauge that is filled based upon fill value + +@param x (integer) top left corner position + +@param y (integer) top left corner position + +@param w (integer) width in pixels + +@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 the Lcd functions overview + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-hud-rectangle.md b/website/md-docs/api-reference/review-lcd-draw-hud-rectangle.md new file mode 100644 index 000000000..abca69e38 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-hud-rectangle.md @@ -0,0 +1,123 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawHudRectangle + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-hud-rectangle.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawHudRectangle` +- Doc id: `lcd.draw-hud-rectangle` +- Source: `radio/src/lua/api_colorlcd.cpp:1366` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawHudRectangle"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>pitch</code></td><td>param</td><td><code>integer</code></td><td>pitch and roll to define the orientation of the rectangle</td><td><select data-field-kind="param" data-field-name="pitch" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="pitch" data-custom-type="true" /></td></tr> +<tr><td><code>roll</code></td><td>param</td><td><code>integer</code></td><td>pitch and roll to define the orientation of the rectangle</td><td><select data-field-kind="param" data-field-name="roll" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="roll" data-custom-type="true" /></td></tr> +<tr><td><code>xmin</code></td><td>param</td><td><code>integer</code></td><td>the limits of the rectangle</td><td><select data-field-kind="param" data-field-name="xmin" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="xmin" data-custom-type="true" /></td></tr> +<tr><td><code>xmax</code></td><td>param</td><td><code>integer</code></td><td>the limits of the rectangle</td><td><select data-field-kind="param" data-field-name="xmax" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="xmax" data-custom-type="true" /></td></tr> +<tr><td><code>ymin</code></td><td>param</td><td><code>integer</code></td><td>the limits of the rectangle</td><td><select data-field-kind="param" data-field-name="ymin" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="ymin" data-custom-type="true" /></td></tr> +<tr><td><code>ymax</code></td><td>param</td><td><code>integer</code></td><td>the limits of the rectangle</td><td><select data-field-kind="param" data-field-name="ymax" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="ymax" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawHudRectangle", "symbol": "lcd.drawHudRectangle", "summary": "Draw a rectangle in perspective", "parameters": [{"name": "pitch", "type": "integer", "required": true, "description": "pitch and roll to define the orientation of the rectangle"}, {"name": "roll", "type": "integer", "required": true, "description": "pitch and roll to define the orientation of the rectangle"}, {"name": "xmin", "type": "integer", "required": true, "description": "the limits of the rectangle"}, {"name": "xmax", "type": "integer", "required": true, "description": "the limits of the rectangle"}, {"name": "ymin", "type": "integer", "required": true, "description": "the limits of the rectangle"}, {"name": "ymax", "type": "integer", "required": true, "description": "the limits of the rectangle"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}], "returns": [], "notes": ["Only available on radios with color display"], "since": "2.4.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawHudRectangle(pitch, roll, xmin, xmax, ymin, ymax [, flags]) + +Draw a rectangle in perspective + +@param pitch,roll (positive numbers) pitch and roll to define the orientation of the rectangle + +@param xmin,xmax,ymin,ymax (positive numbers) the limits of the rectangle + +@param flags (optional) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a rectangle in perspective + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `pitch` | yes | `integer` | pitch and roll to define the orientation of the rectangle | +| `roll` | yes | `integer` | pitch and roll to define the orientation of the rectangle | +| `xmin` | yes | `integer` | the limits of the rectangle | +| `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 the Lcd functions overview | + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawHudRectangle([pitch, roll, xmin, xmax, ymin, ymax, flags]) + +Draw a rectangle in perspective + +@param pitch (integer) pitch and roll to define the orientation of the rectangle + +@param roll (integer) pitch and roll to define the orientation of the rectangle + +@param xmin (integer) the limits of the rectangle + +@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 the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-line-with-clipping.md b/website/md-docs/api-reference/review-lcd-draw-line-with-clipping.md new file mode 100644 index 000000000..7d786675f --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-line-with-clipping.md @@ -0,0 +1,137 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawLineWithClipping + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-line-with-clipping.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawLineWithClipping` +- Doc id: `lcd.draw-line-with-clipping` +- Source: `radio/src/lua/api_colorlcd.cpp:1254` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawLineWithClipping"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x1</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the start and end of the unclipped line</td><td><select data-field-kind="param" data-field-name="x1" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x1" data-custom-type="true" /></td></tr> +<tr><td><code>y1</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the start and end of the unclipped line</td><td><select data-field-kind="param" data-field-name="y1" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y1" data-custom-type="true" /></td></tr> +<tr><td><code>x2</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the start and end of the unclipped line</td><td><select data-field-kind="param" data-field-name="x2" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x2" data-custom-type="true" /></td></tr> +<tr><td><code>y2</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the start and end of the unclipped line</td><td><select data-field-kind="param" data-field-name="y2" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y2" data-custom-type="true" /></td></tr> +<tr><td><code>xmin</code></td><td>param</td><td><code>integer</code></td><td>the limits of the rectangle inside which the line is drawn</td><td><select data-field-kind="param" data-field-name="xmin" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="xmin" data-custom-type="true" /></td></tr> +<tr><td><code>xmax</code></td><td>param</td><td><code>integer</code></td><td>the limits of the rectangle inside which the line is drawn</td><td><select data-field-kind="param" data-field-name="xmax" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="xmax" data-custom-type="true" /></td></tr> +<tr><td><code>ymin</code></td><td>param</td><td><code>integer</code></td><td>the limits of the rectangle inside which the line is drawn</td><td><select data-field-kind="param" data-field-name="ymin" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="ymin" data-custom-type="true" /></td></tr> +<tr><td><code>ymax</code></td><td>param</td><td><code>integer</code></td><td>the limits of the rectangle inside which the line is drawn</td><td><select data-field-kind="param" data-field-name="ymax" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="ymax" data-custom-type="true" /></td></tr> +<tr><td><code>pattern</code></td><td>param</td><td><code>FORCE</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="pattern" data-current-type="FORCE"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="pattern" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawLineWithClipping", "symbol": "lcd.drawLineWithClipping", "summary": "Draw a line only inside a rectangle", "parameters": [{"name": "x1", "type": "integer", "required": true, "description": "coordinates of the start and end of the unclipped line"}, {"name": "y1", "type": "integer", "required": true, "description": "coordinates of the start and end of the unclipped line"}, {"name": "x2", "type": "integer", "required": true, "description": "coordinates of the start and end of the unclipped line"}, {"name": "y2", "type": "integer", "required": true, "description": "coordinates of the start and end of the unclipped line"}, {"name": "xmin", "type": "integer", "required": true, "description": "the limits of the rectangle inside which the line is drawn"}, {"name": "xmax", "type": "integer", "required": true, "description": "the limits of the rectangle inside which the line is drawn"}, {"name": "ymin", "type": "integer", "required": true, "description": "the limits of the rectangle inside which the line is drawn"}, {"name": "ymax", "type": "integer", "required": true, "description": "the limits of the rectangle inside which the line is drawn"}, {"name": "pattern", "type": "FORCE", "required": true, "description": "please see the Lcd functions overview"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}], "returns": [], "notes": ["Only available on radios with color display"], "since": "2.4.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawLineWithClipping(x1, y1, x2, y2, xmin, xmax, ymin, ymax, pattern [, flags]) + +Draw a line only inside a rectangle + +@param x1,y1,x2,y1 (positive numbers) coordinates of the start and end of the unclipped line + +@param xmin,xmax,ymin,ymax (positive numbers) the limits of the rectangle inside which the line is drawn + +@param pattern (FORCE, ERASE, DOTTED) please see the Lcd functions overview + +@param flags (optional) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a line only inside a rectangle + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x1` | yes | `integer` | coordinates of the start and end of the unclipped line | +| `y1` | yes | `integer` | coordinates of the start and end of the unclipped line | +| `x2` | yes | `integer` | coordinates of the start and end of the unclipped line | +| `y2` | yes | `integer` | coordinates of the start and end of the unclipped line | +| `xmin` | yes | `integer` | the limits of the rectangle inside which the line is drawn | +| `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 the Lcd functions overview | +| `flags` | no | `integer` | please see the Lcd functions overview | + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawLineWithClipping([x1, y1, x2, y2, xmin, xmax, ymin, ymax, pattern, flags]) + +Draw a line only inside a rectangle + +@param x1 (integer) coordinates of the start and end of the unclipped line + +@param y1 (integer) coordinates of the start and end of the unclipped line + +@param x2 (integer) coordinates of the start and end of the unclipped line + +@param y2 (integer) coordinates of the start and end of the unclipped line + +@param xmin (integer) the limits of the rectangle inside which the line is drawn + +@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 the Lcd functions overview + +@param flags (integer) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-line.md b/website/md-docs/api-reference/review-lcd-draw-line.md new file mode 100644 index 000000000..1cbcafd2f --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-line.md @@ -0,0 +1,125 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawLine + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-line.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawLine` +- Doc id: `lcd.draw-line` +- Source: `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:125` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: pattern + +## Decide + +- Unknown params to decide: `pattern` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawLine"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x1</code></td><td>param</td><td><code>integer</code></td><td>starting coordinate</td><td><select data-field-kind="param" data-field-name="x1" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x1" data-custom-type="true" /></td></tr> +<tr><td><code>y1</code></td><td>param</td><td><code>integer</code></td><td>starting coordinate</td><td><select data-field-kind="param" data-field-name="y1" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y1" data-custom-type="true" /></td></tr> +<tr><td><code>x2</code></td><td>param</td><td><code>integer</code></td><td>end coordinate</td><td><select data-field-kind="param" data-field-name="x2" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x2" data-custom-type="true" /></td></tr> +<tr><td><code>y2</code></td><td>param</td><td><code>integer</code></td><td>end coordinate</td><td><select data-field-kind="param" data-field-name="y2" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y2" data-custom-type="true" /></td></tr> +<tr><td><code>pattern</code></td><td>param</td><td><code>unknown</code></td><td>SOLID or DOTTED</td><td><select data-field-kind="param" data-field-name="pattern" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="pattern" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>lcdflags</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawLine", "symbol": "lcd.drawLine", "summary": "Draw a straight line on LCD", "parameters": [{"name": "x1", "type": "integer", "required": true, "description": "starting coordinate"}, {"name": "y1", "type": "integer", "required": true, "description": "starting coordinate"}, {"name": "x2", "type": "integer", "required": true, "description": "end coordinate"}, {"name": "y2", "type": "integer", "required": true, "description": "end coordinate"}, {"name": "pattern", "type": "unknown", "required": true, "description": "SOLID or DOTTED"}, {"name": "flags", "type": "integer", "required": false, "description": "lcdflags"}], "returns": [], "notes": ["If the start or the end of the line is outside the LCD dimensions, then the\nwhole line will not be drawn (starting from OpenTX 2.1.5)"], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawLine(x1, y1, x2, y2, pattern, [flags]) + +Draw a straight line on LCD + +@param x1,y1 (positive numbers) starting coordinate + +@param x2,y2 (positive numbers) end coordinate + +@param pattern SOLID or DOTTED + +@param flags (optional) lcdflags + +@notice If the start or the end of the line is outside the LCD dimensions, then the +whole line will not be drawn (starting from OpenTX 2.1.5) + +@status current Introduced in 2.0.0, flags introduced in 2.3.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a straight line on LCD + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x1` | yes | `integer` | starting coordinate | +| `y1` | yes | `integer` | starting coordinate | +| `x2` | yes | `integer` | end coordinate | +| `y2` | yes | `integer` | end coordinate | +| `pattern` | yes | `unknown` | SOLID or DOTTED | +| `flags` | no | `integer` | lcdflags | + +#### Returns + +None. + +#### Notes + +- If the start or the end of the line is outside the LCD dimensions, then the +whole line will not be drawn (starting from OpenTX 2.1.5) + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawLine([x1, y1, x2, y2, pattern, flags]) + +Draw a straight line on LCD + +@param x1 (integer) starting coordinate + +@param y1 (integer) starting coordinate + +@param x2 (integer) end coordinate + +@param y2 (integer) end coordinate + +@param pattern (TODO) SOLID or DOTTED + +@param flags (integer) lcdflags + +@notice If the start or the end of the line is outside the LCD dimensions, then the +whole line will not be drawn (starting from OpenTX 2.1.5) + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-number.md b/website/md-docs/api-reference/review-lcd-draw-number.md new file mode 100644 index 000000000..b6ef1252d --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-number.md @@ -0,0 +1,117 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawNumber + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-number.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawNumber` +- Doc id: `lcd.draw-number` +- Source: `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:365` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: inversColor + +## Decide + +- Unknown params to decide: `inversColor` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawNumber"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>starting coordinate</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>starting coordinate</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>param</td><td><code>integer</code></td><td>value to display</td><td><select data-field-kind="param" data-field-name="value" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +<tr><td><code>inversColor</code></td><td>param</td><td><code>unknown</code></td><td>overrides the inverse text color for INVERS</td><td><select data-field-kind="param" data-field-name="inversColor" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="inversColor" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawNumber", "symbol": "lcd.drawNumber", "summary": "Display a number at (x,y)", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "starting coordinate"}, {"name": "y", "type": "integer", "required": true, "description": "starting coordinate"}, {"name": "value", "type": "integer", "required": true, "description": "value to display"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}, {"name": "inversColor", "type": "unknown", "required": false, "description": "overrides the inverse text color for INVERS"}], "returns": [], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawNumber(x, y, value [, flags]) + +Display a number at (x,y) + +@param x,y (positive numbers) starting coordinate + +@param value (number) value to display + +@param flags (unsigned number) drawing flags: + * `0 or not specified` display with no decimal (like abs()) + * `PREC1` display with one decimal place (number 386 is displayed as 38.6) + * `PREC2` display with tow decimal places (number 386 is displayed as 3.86) + * other general LCD flag also apply + * `SHADOWED` Horus only, apply a shadow effect + +@status current Introduced in 2.0.0, `SHADOWED` introduced in 2.2.1 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a number at (x,y) + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | starting coordinate | +| `y` | yes | `integer` | starting coordinate | +| `value` | yes | `integer` | value to display | +| `flags` | no | `integer` | please see the Lcd functions overview | +| `inversColor` | no | `unknown` | overrides the inverse text color for INVERS | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawNumber([x, y, value, flags, inversColor]) + +Display a number at (x,y) + +@param x (integer) starting coordinate + +@param y (integer) starting coordinate + +@param value (integer) value to display + +@param flags (integer) please see the Lcd functions overview + +@param inversColor (TODO) overrides the inverse text color for INVERS + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-pie.md b/website/md-docs/api-reference/review-lcd-draw-pie.md new file mode 100644 index 000000000..2664dc609 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-pie.md @@ -0,0 +1,121 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawPie + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-pie.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawPie` +- Doc id: `lcd.draw-pie` +- Source: `radio/src/lua/api_colorlcd.cpp:1182` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawPie"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the center</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the center</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>r</code></td><td>param</td><td><code>integer</code></td><td>radius</td><td><select data-field-kind="param" data-field-name="r" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="r" data-custom-type="true" /></td></tr> +<tr><td><code>start</code></td><td>param</td><td><code>integer</code></td><td>start and end of the pie slice</td><td><select data-field-kind="param" data-field-name="start" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="start" data-custom-type="true" /></td></tr> +<tr><td><code>end</code></td><td>param</td><td><code>integer</code></td><td>start and end of the pie slice</td><td><select data-field-kind="param" data-field-name="end" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="end" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawPie", "symbol": "lcd.drawPie", "summary": "Draw a pie slice", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "coordinates of the center"}, {"name": "y", "type": "integer", "required": true, "description": "coordinates of the center"}, {"name": "r", "type": "integer", "required": true, "description": "radius"}, {"name": "start", "type": "integer", "required": true, "description": "start and end of the pie slice"}, {"name": "end", "type": "integer", "required": true, "description": "start and end of the pie slice"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}], "returns": [], "notes": ["Only available on radios with color display"], "since": "2.4.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawPie(x, y, r, start, end [, flags]) + +Draw a pie slice + +@param x,y (positive numbers) coordinates of the center + +@param r (positive number) radius + +@param start,end (positive numbers) start and end of the pie slice + +@param flags (optional) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a pie slice + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | coordinates of the center | +| `y` | yes | `integer` | coordinates of the center | +| `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 the Lcd functions overview | + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawPie([x, y, r, start, end, flags]) + +Draw a pie slice + +@param x (integer) coordinates of the center + +@param y (integer) coordinates of the center + +@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 the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-pixmap.md b/website/md-docs/api-reference/review-lcd-draw-pixmap.md new file mode 100644 index 000000000..844a3f542 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-pixmap.md @@ -0,0 +1,105 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawPixmap + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-pixmap.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawPixmap` +- Doc id: `lcd.draw-pixmap` +- Source: `radio/src/lua/api_stdlcd.cpp:388` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawPixmap"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>starting coordinates</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>starting coordinates</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>name</code></td><td>param</td><td><code>string</code></td><td>full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”)</td><td><select data-field-kind="param" data-field-name="name" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="name" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawPixmap", "symbol": "lcd.drawPixmap", "summary": "Draw a bitmap at (x,y)", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "starting coordinates"}, {"name": "y", "type": "integer", "required": true, "description": "starting coordinates"}, {"name": "name", "type": "string", "required": true, "description": "full path to the bitmap on SD card (i.e. \u201c/IMAGES/test.bmp\u201d)"}], "returns": [], "notes": ["Maximum image size is [display width / 2] x [display height] pixels."], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawPixmap(x, y, name) + +Draw a bitmap at (x,y) + +@param x,y (positive numbers) starting coordinates + +@param name (string) full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) + +@notice Maximum image size is [display width / 2] x [display height] pixels. + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a bitmap at (x,y) + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | starting coordinates | +| `y` | yes | `integer` | starting coordinates | +| `name` | yes | `string` | full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) | + +#### Returns + +None. + +#### Notes + +- Maximum image size is [display width / 2] x [display height] pixels. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawPixmap([x, y, name]) + +Draw a bitmap at (x,y) + +@param x (integer) starting coordinates + +@param y (integer) starting coordinates + +@param name (string) full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) + +@notice Maximum image size is [display width / 2] x [display height] pixels. + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-point.md b/website/md-docs/api-reference/review-lcd-draw-point.md new file mode 100644 index 000000000..5990a1a93 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-point.md @@ -0,0 +1,113 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawPoint + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-point.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawPoint` +- Doc id: `lcd.draw-point` +- Source: `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:92` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawPoint"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>x position</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>y position</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawPoint", "symbol": "lcd.drawPoint", "summary": "Draw a single pixel at (x,y) position", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "x position"}, {"name": "y", "type": "integer", "required": true, "description": "y position"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}], "returns": [], "notes": ["Taranis has an LCD display width of 212 pixels and height of 64 pixels.\nPosition (0,0) is at top left. Y axis is negative, top line is 0,\nbottom line is 63. Drawing on an existing black pixel produces white pixel (TODO check this!)"], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawPoint(x, y, [flags]) + +Draw a single pixel at (x,y) position + +@param x (positive number) x position + +@param y (positive number) y position + +@param flags (optional) please see the Lcd functions overview + +@notice Taranis has an LCD display width of 212 pixels and height of 64 pixels. +Position (0,0) is at top left. Y axis is negative, top line is 0, +bottom line is 63. Drawing on an existing black pixel produces white pixel (TODO check this!) + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a single pixel at (x,y) position + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | x position | +| `y` | yes | `integer` | y position | +| `flags` | no | `integer` | please see the Lcd functions overview | + +#### Returns + +None. + +#### Notes + +- Taranis has an LCD display width of 212 pixels and height of 64 pixels. +Position (0,0) is at top left. Y axis is negative, top line is 0, +bottom line is 63. Drawing on an existing black pixel produces white pixel (TODO check this!) + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawPoint([x, y, flags]) + +Draw a single pixel at (x,y) position + +@param x (integer) x position + +@param y (integer) y position + +@param flags (integer) please see the Lcd functions overview + +@notice Taranis has an LCD display width of 212 pixels and height of 64 pixels. +Position (0,0) is at top left. Y axis is negative, top line is 0, +bottom line is 63. Drawing on an existing black pixel produces white pixel (TODO check this!) + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-rectangle.md b/website/md-docs/api-reference/review-lcd-draw-rectangle.md new file mode 100644 index 000000000..1c1fcaba9 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-rectangle.md @@ -0,0 +1,125 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawRectangle + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-rectangle.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawRectangle` +- Doc id: `lcd.draw-rectangle` +- Source: `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:782` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawRectangle"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>top left corner position</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>top left corner position</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>w</code></td><td>param</td><td><code>integer</code></td><td>width in pixels</td><td><select data-field-kind="param" data-field-name="w" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="w" data-custom-type="true" /></td></tr> +<tr><td><code>h</code></td><td>param</td><td><code>integer</code></td><td>height in pixels</td><td><select data-field-kind="param" data-field-name="h" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="h" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +<tr><td><code>t</code></td><td>param</td><td><code>integer</code></td><td>thickness in pixels, defaults to 1 (only on radios with color display)</td><td><select data-field-kind="param" data-field-name="t" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="t" data-custom-type="true" /></td></tr> +<tr><td><code>opacity</code></td><td>param</td><td><code>integer</code></td><td>opacity defaults to 0 (only on radios with color display)</td><td><select data-field-kind="param" data-field-name="opacity" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="opacity" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawRectangle", "symbol": "lcd.drawRectangle", "summary": "Draw a rectangle from top left corner (x,y) of specified width and height", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "top left corner position"}, {"name": "y", "type": "integer", "required": true, "description": "top left corner position"}, {"name": "w", "type": "integer", "required": true, "description": "width in pixels"}, {"name": "h", "type": "integer", "required": true, "description": "height in pixels"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}, {"name": "t", "type": "integer", "required": false, "description": "thickness in pixels, defaults to 1 (only on radios with color display)"}, {"name": "opacity", "type": "integer", "required": false, "description": "opacity defaults to 0 (only on radios with color display)"}], "returns": [], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawRectangle(x, y, w, h [, flags [, t [, opacity]]]) + +Draw a rectangle from top left corner (x,y) of specified width and height + +@param x,y (positive numbers) top left corner position + +@param w (number) width in pixels + +@param h (number) height in pixels + +@param flags (optional) please see the Lcd functions overview + +@param t (number) thickness in pixels, defaults to 1 (only on radios with color display) + +@param opacity (number) opacity defaults to 0 (only on radios with color display) + +@status current Introduced in 2.0.0, changed in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a rectangle from top left corner (x,y) of specified width and height + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | top left corner position | +| `y` | yes | `integer` | top left corner position | +| `w` | yes | `integer` | width in pixels | +| `h` | yes | `integer` | height in pixels | +| `flags` | no | `integer` | please see the Lcd functions overview | +| `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) | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawRectangle([x, y, w, h, flags, t, opacity]) + +Draw a rectangle from top left corner (x,y) of specified width and height + +@param x (integer) top left corner position + +@param y (integer) top left corner position + +@param w (integer) width in pixels + +@param h (integer) height in pixels + +@param flags (integer) please see the Lcd functions overview + +@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) + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-screen-title.md b/website/md-docs/api-reference/review-lcd-draw-screen-title.md new file mode 100644 index 000000000..56ae04c49 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-screen-title.md @@ -0,0 +1,108 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawScreenTitle + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-screen-title.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawScreenTitle` +- Doc id: `lcd.draw-screen-title` +- Source: `radio/src/lua/api_stdlcd.cpp:522` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawScreenTitle"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>title</code></td><td>param</td><td><code>string</code></td><td>text for the title</td><td><select data-field-kind="param" data-field-name="title" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="title" data-custom-type="true" /></td></tr> +<tr><td><code>page</code></td><td>param</td><td><code>integer</code></td><td>page number</td><td><select data-field-kind="param" data-field-name="page" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="page" data-custom-type="true" /></td></tr> +<tr><td><code>pages</code></td><td>param</td><td><code>integer</code></td><td>total number of pages. Only used as indicator on the right side of title bar. (i.e. idx=2, cnt=5, display `2/5`)</td><td><select data-field-kind="param" data-field-name="pages" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="pages" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawScreenTitle", "symbol": "lcd.drawScreenTitle", "summary": "Draw a title bar", "parameters": [{"name": "title", "type": "string", "required": true, "description": "text for the title"}, {"name": "page", "type": "integer", "required": true, "description": "page number"}, {"name": "pages", "type": "integer", "required": true, "description": "total number of pages. Only used as indicator on the right side of title bar. (i.e. idx=2, cnt=5, display `2/5`)"}], "returns": [], "notes": ["Only available on Taranis"], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawScreenTitle(title, page, pages) + +Draw a title bar + +@param title (string) text for the title + +@param page (number) page number + +@param pages (number) total number of pages. Only used as indicator on +the right side of title bar. (i.e. idx=2, cnt=5, display `2/5`) + +@notice Only available on Taranis + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a title bar + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `title` | yes | `string` | text for the title | +| `page` | yes | `integer` | page number | +| `pages` | yes | `integer` | total number of pages. Only used as indicator on the right side of title bar. (i.e. idx=2, cnt=5, display `2/5`) | + +#### Returns + +None. + +#### Notes + +- Only available on Taranis + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawScreenTitle([title, page, pages]) + +Draw a title bar + +@param title (string) text for the title + +@param page (integer) page number + +@param pages (integer) total number of pages. Only used as indicator on the right side of title bar. (i.e. idx=2, cnt=5, display `2/5`) + +@notice Only available on Taranis + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-source.md b/website/md-docs/api-reference/review-lcd-draw-source.md new file mode 100644 index 000000000..31cc3453d --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-source.md @@ -0,0 +1,107 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawSource + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-source.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawSource` +- Doc id: `lcd.draw-source` +- Source: `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:460` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawSource"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>starting coordinate</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>starting coordinate</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>source</code></td><td>param</td><td><code>integer</code></td><td>source index</td><td><select data-field-kind="param" data-field-name="source" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="source" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawSource", "symbol": "lcd.drawSource", "summary": "Displays the name of the corresponding input as defined by the source at (x,y)", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "starting coordinate"}, {"name": "y", "type": "integer", "required": true, "description": "starting coordinate"}, {"name": "source", "type": "integer", "required": true, "description": "source index"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}], "returns": [], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawSource(x, y, source [, flags]) + +Displays the name of the corresponding input as defined by the source at (x,y) + +@param x,y (positive numbers) starting coordinate + +@param source (number) source index + +@param flags (optional) please see the Lcd functions overview + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Displays the name of the corresponding input as defined by the source at (x,y) + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | starting coordinate | +| `y` | yes | `integer` | starting coordinate | +| `source` | yes | `integer` | source index | +| `flags` | no | `integer` | please see the Lcd functions overview | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawSource([x, y, source, flags]) + +Displays the name of the corresponding input as defined by the source at (x,y) + +@param x (integer) starting coordinate + +@param y (integer) starting coordinate + +@param source (integer) source index + +@param flags (integer) please see the Lcd functions overview + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-switch.md b/website/md-docs/api-reference/review-lcd-draw-switch.md new file mode 100644 index 000000000..74effa6da --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-switch.md @@ -0,0 +1,108 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawSwitch + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-switch.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawSwitch` +- Doc id: `lcd.draw-switch` +- Source: `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:431` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawSwitch"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>starting coordinate</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>starting coordinate</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>switch</code></td><td>param</td><td><code>integer</code></td><td>number of switch to display, negative number displays negated switch</td><td><select data-field-kind="param" data-field-name="switch" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="switch" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview, only SMLSIZE, BLINK and INVERS.</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawSwitch", "symbol": "lcd.drawSwitch", "summary": "Draw a text representation of switch at (x,y)", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "starting coordinate"}, {"name": "y", "type": "integer", "required": true, "description": "starting coordinate"}, {"name": "switch", "type": "integer", "required": true, "description": "number of switch to display, negative number displays negated switch"}, {"name": "flags", "type": "integer", "required": true, "description": "please see the Lcd functions overview, only SMLSIZE, BLINK and INVERS."}], "returns": [], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawSwitch(x, y, switch, flags) + +Draw a text representation of switch at (x,y) + +@param x,y (positive numbers) starting coordinate + +@param switch (number) number of switch to display, negative number +displays negated switch + +@param flags (optional) please see the Lcd functions overview, only SMLSIZE, BLINK and INVERS. + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a text representation of switch at (x,y) + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `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 the Lcd functions overview, only SMLSIZE, BLINK and INVERS. | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawSwitch([x, y, switch, flags]) + +Draw a text representation of switch at (x,y) + +@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 the Lcd functions overview, only SMLSIZE, BLINK and INVERS. + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-text-lines.md b/website/md-docs/api-reference/review-lcd-draw-text-lines.md new file mode 100644 index 000000000..b1c507f64 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-text-lines.md @@ -0,0 +1,128 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawTextLines + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-text-lines.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawTextLines` +- Doc id: `lcd.draw-text-lines` +- Source: `radio/src/lua/api_colorlcd.cpp:271` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawTextLines"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>starting coordinate</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>starting coordinate</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>w</code></td><td>param</td><td><code>integer</code></td><td>width and height of bounding rectangle</td><td><select data-field-kind="param" data-field-name="w" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="w" data-custom-type="true" /></td></tr> +<tr><td><code>h</code></td><td>param</td><td><code>integer</code></td><td>width and height of bounding rectangle</td><td><select data-field-kind="param" data-field-name="h" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="h" data-custom-type="true" /></td></tr> +<tr><td><code>text</code></td><td>param</td><td><code>string</code></td><td>text to display</td><td><select data-field-kind="param" data-field-name="text" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="text" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview for drawing flags and colors, and the Appendix for available characters in each font set. RIGHT, CENTER and VCENTER are not implemented.</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +<tr><td><code>x,y</code></td><td>return</td><td><code>integer</code></td><td>point where text drawing ended</td><td><select data-field-kind="return" data-field-name="x,y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="x,y" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawTextLines", "symbol": "lcd.drawTextLines", "summary": "Draw text inside rectangle (x,y,w,h) with line breaks", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "starting coordinate"}, {"name": "y", "type": "integer", "required": true, "description": "starting coordinate"}, {"name": "w", "type": "integer", "required": true, "description": "width and height of bounding rectangle"}, {"name": "h", "type": "integer", "required": true, "description": "width and height of bounding rectangle"}, {"name": "text", "type": "string", "required": true, "description": "text to display"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview for drawing flags and colors, and the Appendix for available characters in each font set. RIGHT, CENTER and VCENTER are not implemented."}], "returns": [{"name": "x,y", "type": "integer", "description": "point where text drawing ended"}], "notes": ["Only available on radios with color display"], "since": "2.5.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawTextLines(x, y, w, h, text [, flags]) + +Draw text inside rectangle (x,y,w,h) with line breaks + +@param x,y (positive numbers) starting coordinate + +@param w,h (positive numbers) width and height of bounding rectangle + +@param text (string) text to display + +@param flags (optional) please see the Lcd functions overview for drawing flags and colors, and the Appendix for available characters in each font set. RIGHT, CENTER and VCENTER are not implemented. + +@retval x,y (integers) point where text drawing ended + +@notice Only available on radios with color display + +@status current Introduced in 2.5.0, return x,y added in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw text inside rectangle (x,y,w,h) with line breaks + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | starting coordinate | +| `y` | yes | `integer` | starting coordinate | +| `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 the Lcd functions overview for drawing flags and colors, and the Appendix for available characters in each font set. RIGHT, CENTER and VCENTER are not implemented. | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `x,y` | `integer` | point where text drawing ended | + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawTextLines([x, y, w, h, text, flags]) + +Draw text inside rectangle (x,y,w,h) with line breaks + +@param x (integer) starting coordinate + +@param y (integer) starting coordinate + +@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 the Lcd functions overview for drawing flags and colors, and the Appendix for available characters in each font set. RIGHT, CENTER and VCENTER are not implemented. + +@retval x,y (integer) point where text drawing ended + +@notice Only available on radios with color display + +@status current Introduced in 2.5.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-text.md b/website/md-docs/api-reference/review-lcd-draw-text.md new file mode 100644 index 000000000..3d5153131 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-text.md @@ -0,0 +1,122 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawText + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-text.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawText` +- Doc id: `lcd.draw-text` +- Source: `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:224` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: inversColor + +## Decide + +- Unknown params to decide: `inversColor` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawText"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>starting coordinate</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>starting coordinate</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>text</code></td><td>param</td><td><code>string</code></td><td>text to display</td><td><select data-field-kind="param" data-field-name="text" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="text" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview for drawing flags and colors, and the Appendix for available characters in each font set.</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +<tr><td><code>inversColor</code></td><td>param</td><td><code>unknown</code></td><td>overrides the inverse text color for INVERS</td><td><select data-field-kind="param" data-field-name="inversColor" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="inversColor" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawText", "symbol": "lcd.drawText", "summary": "Draw a text beginning at (x,y)", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "starting coordinate"}, {"name": "y", "type": "integer", "required": true, "description": "starting coordinate"}, {"name": "text", "type": "string", "required": true, "description": "text to display"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview for drawing flags and colors, and the Appendix for available characters in each font set."}, {"name": "inversColor", "type": "unknown", "required": false, "description": "overrides the inverse text color for INVERS"}], "returns": [], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawText(x, y, text [, flags]) + +Draw a text beginning at (x,y) + +@param x,y (positive numbers) starting coordinate + +@param text (string) text to display + +@param flags (unsigned number) drawing flags. All values can be +combined together using the + character. ie BLINK + DBLSIZE. +See the [Appendix](../appendix/fonts.md) for available characters in each font set. + * `0 or not specified` normal font + * `XXLSIZE` jumbo sized font + * `DBLSIZE` double size font + * `MIDSIZE` mid sized font + * `SMLSIZE` small font + * `INVERS` inverted display + * `BLINK` blinking text + * `SHADOWED` Horus only, apply a shadow effect + +@status current Introduced in 2.0.0, `SHADOWED` introduced in 2.2.1 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a text beginning at (x,y) + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | starting coordinate | +| `y` | yes | `integer` | starting coordinate | +| `text` | yes | `string` | text to display | +| `flags` | no | `integer` | please see the Lcd functions overview for drawing flags and colors, and the Appendix for available characters in each font set. | +| `inversColor` | no | `unknown` | overrides the inverse text color for INVERS | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawText([x, y, text, flags, inversColor]) + +Draw a text beginning at (x,y) + +@param x (integer) starting coordinate + +@param y (integer) starting coordinate + +@param text (string) text to display + +@param flags (integer) please see the Lcd functions overview for drawing flags and colors, and the Appendix for available characters in each font set. + +@param inversColor (TODO) overrides the inverse text color for INVERS + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-timer.md b/website/md-docs/api-reference/review-lcd-draw-timer.md new file mode 100644 index 000000000..e38a6c3d5 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-timer.md @@ -0,0 +1,116 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawTimer + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-timer.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawTimer` +- Doc id: `lcd.draw-timer` +- Source: `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:338` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: inversColor + +## Decide + +- Unknown params to decide: `inversColor` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawTimer"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>starting coordinate</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>starting coordinate</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>param</td><td><code>integer</code></td><td>time in seconds</td><td><select data-field-kind="param" data-field-name="value" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +<tr><td><code>inversColor</code></td><td>param</td><td><code>unknown</code></td><td>overrides the inverse text color for INVERS</td><td><select data-field-kind="param" data-field-name="inversColor" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="inversColor" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawTimer", "symbol": "lcd.drawTimer", "summary": "Display a value formatted as time at (x,y)", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "starting coordinate"}, {"name": "y", "type": "integer", "required": true, "description": "starting coordinate"}, {"name": "value", "type": "integer", "required": true, "description": "time in seconds"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}, {"name": "inversColor", "type": "unknown", "required": false, "description": "overrides the inverse text color for INVERS"}], "returns": [], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawTimer(x, y, value [, flags]) + +Display a value formatted as time at (x,y) + +@param x,y (positive numbers) starting coordinate + +@param value (number) time in seconds + +@param flags (unsigned number) drawing flags: + * `0 or not specified` normal representation (minutes and seconds) + * `TIMEHOUR` display hours + * other general LCD flag also apply + * `SHADOWED` Horus only, apply a shadow effect + +@status current Introduced in 2.0.0, `SHADOWED` introduced in 2.2.1 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a value formatted as time at (x,y) + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | starting coordinate | +| `y` | yes | `integer` | starting coordinate | +| `value` | yes | `integer` | time in seconds | +| `flags` | no | `integer` | please see the Lcd functions overview | +| `inversColor` | no | `unknown` | overrides the inverse text color for INVERS | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawTimer([x, y, value, flags, inversColor]) + +Display a value formatted as time at (x,y) + +@param x (integer) starting coordinate + +@param y (integer) starting coordinate + +@param value (integer) time in seconds + +@param flags (integer) please see the Lcd functions overview + +@param inversColor (TODO) overrides the inverse text color for INVERS + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-draw-triangle.md b/website/md-docs/api-reference/review-lcd-draw-triangle.md new file mode 100644 index 000000000..3e705d7be --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-draw-triangle.md @@ -0,0 +1,121 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.drawTriangle + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-draw-triangle.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.drawTriangle` +- Doc id: `lcd.draw-triangle` +- Source: `radio/src/lua/api_colorlcd.cpp:1080` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.drawTriangle"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x1</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the three vertices</td><td><select data-field-kind="param" data-field-name="x1" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x1" data-custom-type="true" /></td></tr> +<tr><td><code>y1</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the three vertices</td><td><select data-field-kind="param" data-field-name="y1" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y1" data-custom-type="true" /></td></tr> +<tr><td><code>x2</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the three vertices</td><td><select data-field-kind="param" data-field-name="x2" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x2" data-custom-type="true" /></td></tr> +<tr><td><code>y2</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the three vertices</td><td><select data-field-kind="param" data-field-name="y2" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y2" data-custom-type="true" /></td></tr> +<tr><td><code>x3</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the three vertices</td><td><select data-field-kind="param" data-field-name="x3" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x3" data-custom-type="true" /></td></tr> +<tr><td><code>y3</code></td><td>param</td><td><code>integer</code></td><td>coordinates of the three vertices</td><td><select data-field-kind="param" data-field-name="y3" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y3" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.drawTriangle", "symbol": "lcd.drawTriangle", "summary": "Draw a triangle", "parameters": [{"name": "x1", "type": "integer", "required": true, "description": "coordinates of the three vertices"}, {"name": "y1", "type": "integer", "required": true, "description": "coordinates of the three vertices"}, {"name": "x2", "type": "integer", "required": true, "description": "coordinates of the three vertices"}, {"name": "y2", "type": "integer", "required": true, "description": "coordinates of the three vertices"}, {"name": "x3", "type": "integer", "required": true, "description": "coordinates of the three vertices"}, {"name": "y3", "type": "integer", "required": true, "description": "coordinates of the three vertices"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}], "returns": [], "notes": ["Only available on radios with color display"], "since": "2.4.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.drawTriangle(x1, y1, x2, y2, x3, y3 [, flags]) + +Draw a triangle + +@param x1,y1,x2,y2,x3,y3 (positive numbers) coordinates of the three vertices + +@param flags (optional) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Draw a triangle + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x1` | yes | `integer` | coordinates of the three vertices | +| `y1` | yes | `integer` | coordinates of the three vertices | +| `x2` | yes | `integer` | coordinates of the three vertices | +| `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 the Lcd functions overview | + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.drawTriangle([x1, y1, x2, y2, x3, y3, flags]) + +Draw a triangle + +@param x1 (integer) coordinates of the three vertices + +@param y1 (integer) coordinates of the three vertices + +@param x2 (integer) coordinates of the three vertices + +@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 the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.4.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-exit-full-screen.md b/website/md-docs/api-reference/review-lcd-exit-full-screen.md new file mode 100644 index 000000000..939ea2ae1 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-exit-full-screen.md @@ -0,0 +1,79 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.exitFullScreen + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-exit-full-screen.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.exitFullScreen` +- Doc id: `lcd.exit-full-screen` +- Source: `radio/src/lua/api_colorlcd.cpp:1400` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +No fields to edit. + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.exitFullScreen() + +Exit full screen widget mode. + +@notice Only available on radios with color display + +@status current Introduced in 2.5.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Exit full screen widget mode. + +#### Parameters + +None. + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.exitFullScreen() + +Exit full screen widget mode. + +@notice Only available on radios with color display + +@status current Introduced in 2.5.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-get-color.md b/website/md-docs/api-reference/review-lcd-get-color.md new file mode 100644 index 000000000..06e8e7d32 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-get-color.md @@ -0,0 +1,102 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.getColor + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-get-color.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.getColor` +- Doc id: `lcd.get-color` +- Source: `radio/src/lua/api_colorlcd.cpp:955` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.getColor"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +<tr><td><code>color</code></td><td>return</td><td><code>integer</code></td><td>only the RGB565 color value of the input</td><td><select data-field-kind="return" data-field-name="color" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="color" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.getColor", "symbol": "lcd.getColor", "summary": "Get the color value from flags", "parameters": [{"name": "flags", "type": "integer", "required": true, "description": "please see the Lcd functions overview"}], "returns": [{"name": "color", "type": "integer", "description": "only the RGB565 color value of the input"}], "notes": ["Only available on radios with color display"], "since": "2.3.11"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.getColor(flags) + +Get the color value from flags + +@param flags (flags) please see the Lcd functions overview + +@retval color (flag) only the RGB565 color value of the input + +@notice Only available on radios with color display + +@status current Introduced in 2.3.11 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get the color value from flags + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `flags` | yes | `integer` | please see the Lcd functions overview | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `color` | `integer` | only the RGB565 color value of the input | + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.getColor([flags]) + +Get the color value from flags + +@param flags (integer) please see the Lcd functions overview + +@retval color (integer) only the RGB565 color value of the input + +@notice Only available on radios with color display + +@status current Introduced in 2.3.11 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-get-last-left-pos.md b/website/md-docs/api-reference/review-lcd-get-last-left-pos.md new file mode 100644 index 000000000..13ab582d6 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-get-last-left-pos.md @@ -0,0 +1,95 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.getLastLeftPos + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-get-last-left-pos.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.getLastLeftPos` +- Doc id: `lcd.get-last-left-pos` +- Source: `radio/src/lua/api_stdlcd.cpp:188` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.getLastLeftPos"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>number</code></td><td>return</td><td><code>integer</code></td><td>x position</td><td><select data-field-kind="return" data-field-name="number" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="number" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.getLastLeftPos", "symbol": "lcd.getLastLeftPos", "summary": "Returns the leftmost x position from previous drawtext or drawNumber output", "parameters": [], "returns": [{"name": "number", "type": "integer", "description": "x position"}], "notes": ["Only available on Taranis"], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.getLastLeftPos() + +Returns the leftmost x position from previous drawtext or drawNumber output + +@retval number (integer) x position + +@notice Only available on Taranis + +@status current Introduced in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Returns the leftmost x position from previous drawtext or drawNumber output + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `number` | `integer` | x position | + +#### Notes + +- Only available on Taranis + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.getLastLeftPos() + +Returns the leftmost x position from previous drawtext or drawNumber output + +@retval number (integer) x position + +@notice Only available on Taranis + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-get-last-pos.md b/website/md-docs/api-reference/review-lcd-get-last-pos.md new file mode 100644 index 000000000..fe8fb3b4d --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-get-last-pos.md @@ -0,0 +1,100 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.getLastPos + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-get-last-pos.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.getLastPos` +- Doc id: `lcd.get-last-pos` +- Source: `radio/src/lua/api_stdlcd.cpp:154` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.getLastPos"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>number</code></td><td>return</td><td><code>integer</code></td><td>x position</td><td><select data-field-kind="return" data-field-name="number" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="number" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.getLastPos", "symbol": "lcd.getLastPos", "summary": "Returns the rightmost x position from previous output", "parameters": [], "returns": [{"name": "number", "type": "integer", "description": "x position"}], "notes": ["Only available on Taranis", "For added clarity, it is recommended to use lcd.getLastRightPos()"], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.getLastPos() + +Returns the rightmost x position from previous output + +@retval number (integer) x position + +@notice Only available on Taranis + +@notice For added clarity, it is recommended to use lcd.getLastRightPos() + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Returns the rightmost x position from previous output + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `number` | `integer` | x position | + +#### Notes + +- Only available on Taranis +- For added clarity, it is recommended to use lcd.getLastRightPos() + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.getLastPos() + +Returns the rightmost x position from previous output + +@retval number (integer) x position + +@notice Only available on Taranis + +@notice For added clarity, it is recommended to use lcd.getLastRightPos() + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-get-last-right-pos.md b/website/md-docs/api-reference/review-lcd-get-last-right-pos.md new file mode 100644 index 000000000..e25da50f0 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-get-last-right-pos.md @@ -0,0 +1,100 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.getLastRightPos + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-get-last-right-pos.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.getLastRightPos` +- Doc id: `lcd.get-last-right-pos` +- Source: `radio/src/lua/api_stdlcd.cpp:168` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.getLastRightPos"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>number</code></td><td>return</td><td><code>integer</code></td><td>x position</td><td><select data-field-kind="return" data-field-name="number" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="number" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.getLastRightPos", "symbol": "lcd.getLastRightPos", "summary": "Returns the rightest x position from previous drawtext or drawNumber output", "parameters": [], "returns": [{"name": "number", "type": "integer", "description": "x position"}], "notes": ["Only available on Taranis", "This is strictly equivalent to former lcd.getLastPos()"], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.getLastRightPos() + +Returns the rightest x position from previous drawtext or drawNumber output + +@retval number (integer) x position + +@notice Only available on Taranis + +@notice This is strictly equivalent to former lcd.getLastPos() + +@status current Introduced in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Returns the rightest x position from previous drawtext or drawNumber output + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `number` | `integer` | x position | + +#### Notes + +- Only available on Taranis +- This is strictly equivalent to former lcd.getLastPos() + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.getLastRightPos() + +Returns the rightest x position from previous drawtext or drawNumber output + +@retval number (integer) x position + +@notice Only available on Taranis + +@notice This is strictly equivalent to former lcd.getLastPos() + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-invert-rect.md b/website/md-docs/api-reference/review-lcd-invert-rect.md new file mode 100644 index 000000000..ab529dc41 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-invert-rect.md @@ -0,0 +1,117 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.invertRect + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-invert-rect.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.invertRect` +- Doc id: `lcd.invert-rect` +- Source: `radio/src/lua/api_colorlcd.cpp:857` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.invertRect"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>x</code></td><td>param</td><td><code>integer</code></td><td>top left corner position</td><td><select data-field-kind="param" data-field-name="x" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="x" data-custom-type="true" /></td></tr> +<tr><td><code>y</code></td><td>param</td><td><code>integer</code></td><td>top left corner position</td><td><select data-field-kind="param" data-field-name="y" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="y" data-custom-type="true" /></td></tr> +<tr><td><code>w</code></td><td>param</td><td><code>integer</code></td><td>width in pixels</td><td><select data-field-kind="param" data-field-name="w" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="w" data-custom-type="true" /></td></tr> +<tr><td><code>h</code></td><td>param</td><td><code>integer</code></td><td>height in pixels</td><td><select data-field-kind="param" data-field-name="h" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="h" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.invertRect", "symbol": "lcd.invertRect", "summary": "Invert a rectangle zone from top left corner (x,y) of specified width and height", "parameters": [{"name": "x", "type": "integer", "required": true, "description": "top left corner position"}, {"name": "y", "type": "integer", "required": true, "description": "top left corner position"}, {"name": "w", "type": "integer", "required": true, "description": "width in pixels"}, {"name": "h", "type": "integer", "required": true, "description": "height in pixels"}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}], "returns": [], "notes": ["Only available on radios with color display"], "since": "2.8.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.invertRect(x, y, w, h [, flags]) + +Invert a rectangle zone from top left corner (x,y) of specified width and height + +@param x,y (positive numbers) top left corner position + +@param w (number) width in pixels + +@param h (number) height in pixels + +@param flags (optional) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.8.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Invert a rectangle zone from top left corner (x,y) of specified width and height + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `x` | yes | `integer` | top left corner position | +| `y` | yes | `integer` | top left corner position | +| `w` | yes | `integer` | width in pixels | +| `h` | yes | `integer` | height in pixels | +| `flags` | no | `integer` | please see the Lcd functions overview | + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.invertRect([x, y, w, h, flags]) + +Invert a rectangle zone from top left corner (x,y) of specified width and height + +@param x (integer) top left corner position + +@param y (integer) top left corner position + +@param w (integer) width in pixels + +@param h (integer) height in pixels + +@param flags (integer) please see the Lcd functions overview + +@notice Only available on radios with color display + +@status current Introduced in 2.8.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-refresh.md b/website/md-docs/api-reference/review-lcd-refresh.md new file mode 100644 index 000000000..dede60b4b --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-refresh.md @@ -0,0 +1,80 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.refresh + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-refresh.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.refresh` +- Doc id: `lcd.refresh` +- Source: `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:39` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +No fields to edit. + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.refresh() + +Refresh the LCD screen + +From 2.4.0 on color LCDs, this is done automatically when the screen +needs to be refreshed (on events and depending on refresh period). + +@status current Only used on non-color LCDs. +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Refresh the LCD screen + +#### Parameters + +None. + +#### Returns + +None. + +#### Notes + +- This function only works in stand-alone and telemetry scripts. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.refresh() + +Refresh the LCD screen + +@notice This function only works in stand-alone and telemetry scripts. + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-reset-backlight-timeout.md b/website/md-docs/api-reference/review-lcd-reset-backlight-timeout.md new file mode 100644 index 000000000..adfaea16d --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-reset-backlight-timeout.md @@ -0,0 +1,75 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.resetBacklightTimeout + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-reset-backlight-timeout.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.resetBacklightTimeout` +- Doc id: `lcd.reset-backlight-timeout` +- Source: `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:76` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +No fields to edit. + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.resetBacklightTimeout() + +Reset the backlight timeout + +@status current Introduced in 2.3.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Reset the backlight timeout + +#### Parameters + +None. + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.resetBacklightTimeout() + +Reset the backlight timeout + +@status current Introduced in 2.3.6 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-rgb.md b/website/md-docs/api-reference/review-lcd-rgb.md new file mode 100644 index 000000000..645a57ff2 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-rgb.md @@ -0,0 +1,120 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.RGB + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-rgb.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.RGB` +- Doc id: `lcd.rgb` +- Source: `radio/src/lua/api_colorlcd.cpp:981` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.RGB"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>r</code></td><td>param</td><td><code>integer</code></td><td>a number between 0 and 255 that expresses the amount of red in the color</td><td><select data-field-kind="param" data-field-name="r" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="r" data-custom-type="true" /></td></tr> +<tr><td><code>g</code></td><td>param</td><td><code>integer</code></td><td>a number between 0 and 255 that expresses the amount of green in the color</td><td><select data-field-kind="param" data-field-name="g" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="g" data-custom-type="true" /></td></tr> +<tr><td><code>b</code></td><td>param</td><td><code>integer</code></td><td>a number between 0 and 255 that expresses the amount of blue in the color</td><td><select data-field-kind="param" data-field-name="b" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="b" data-custom-type="true" /></td></tr> +<tr><td><code>rgb</code></td><td>param</td><td><code>integer</code></td><td>a number between 0 and 0xFFFFFF that expresses the RGB value (0xFF000=RED, 0x00FF00=GREEN, 0x0000FF=BLUE)</td><td><select data-field-kind="param" data-field-name="rgb" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="rgb" data-custom-type="true" /></td></tr> +<tr><td><code>flag</code></td><td>return</td><td><code>integer</code></td><td>with RGB565 color</td><td><select data-field-kind="return" data-field-name="flag" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="flag" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.RGB", "symbol": "lcd.RGB", "summary": "Returns a drawing flag with RGB color code", "parameters": [{"name": "r", "type": "integer", "required": true, "description": "a number between 0 and 255 that expresses the amount of red in the color"}, {"name": "g", "type": "integer", "required": true, "description": "a number between 0 and 255 that expresses the amount of green in the color"}, {"name": "b", "type": "integer", "required": true, "description": "a number between 0 and 255 that expresses the amount of blue in the color"}, {"name": "rgb", "type": "integer", "required": true, "description": "a number between 0 and 0xFFFFFF that expresses the RGB value (0xFF000=RED, 0x00FF00=GREEN, 0x0000FF=BLUE)"}], "returns": [{"name": "flag", "type": "integer", "description": "with RGB565 color"}], "notes": ["Only available on radios with color display. Use *either* lcd.RGB(r,g,b) *or* lcd.RGB(rgb)"], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.RGB(r, g, b | rgb) + +Returns a drawing flag with RGB color code + +@param r (integer) a number between 0 and 255 that expresses the amount of red in the color + +@param g (integer) a number between 0 and 255 that expresses the amount of green in the color + +@param b (integer) a number between 0 and 255 that expresses the amount of blue in the color + +@param rgb (integer) a number between 0 and 0xFFFFFF that expresses the RGB value (0xFF000=RED, 0x00FF00=GREEN, 0x0000FF=BLUE) + +@retval flag with RGB565 color + +@notice Only available on radios with color display. Use *either* lcd.RGB(r,g,b) *or* lcd.RGB(rgb) + +@status current Introduced in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Returns a drawing flag with RGB color code + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `r` | yes | `integer` | a number between 0 and 255 that expresses the amount of red in the color | +| `g` | yes | `integer` | a number between 0 and 255 that expresses the amount of green in the color | +| `b` | yes | `integer` | a number between 0 and 255 that expresses the amount of blue in the color | +| `rgb` | yes | `integer` | a number between 0 and 0xFFFFFF that expresses the RGB value (0xFF000=RED, 0x00FF00=GREEN, 0x0000FF=BLUE) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `flag` | `integer` | with RGB565 color | + +#### Notes + +- Only available on radios with color display. Use *either* lcd.RGB(r,g,b) *or* lcd.RGB(rgb) + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.RGB([r, g, b, rgb]) + +Returns a drawing flag with RGB color code + +@param r (integer) a number between 0 and 255 that expresses the amount of red in the color + +@param g (integer) a number between 0 and 255 that expresses the amount of green in the color + +@param b (integer) a number between 0 and 255 that expresses the amount of blue in the color + +@param rgb (integer) a number between 0 and 0xFFFFFF that expresses the RGB value (0xFF000=RED, 0x00FF00=GREEN, 0x0000FF=BLUE) + +@retval flag (integer) with RGB565 color + +@notice Only available on radios with color display. Use *either* lcd.RGB(r,g,b) *or* lcd.RGB(rgb) + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-set-color.md b/website/md-docs/api-reference/review-lcd-set-color.md new file mode 100644 index 000000000..88eb0bfa0 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-set-color.md @@ -0,0 +1,81 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.setColor + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-set-color.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.setColor` +- Doc id: `lcd.set-color` +- Source: `radio/src/lua/api_colorlcd.cpp:932` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +No fields to edit. + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.setColor(colorIndex, color) + +Change an indexed color (theme colors and CUSTOM_COLOR). Please see the Lcd functions overview for indexed color constants + +Please notice that changing theme colors affects not only other Lua widgets, but the entire radio interface. + +@notice Only available on radios with color display + +@status current Introduced in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Change an indexed color (theme colors and CUSTOM_COLOR). Please see the Lcd functions overview for indexed color constants + +#### Parameters + +None. + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.setColor() + +Change an indexed color (theme colors and CUSTOM_COLOR). Please see the Lcd functions overview for indexed color constants + +@notice Only available on radios with color display + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lcd-size-text.md b/website/md-docs/api-reference/review-lcd-size-text.md new file mode 100644 index 000000000..6a7cefb65 --- /dev/null +++ b/website/md-docs/api-reference/review-lcd-size-text.md @@ -0,0 +1,108 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lcd.sizeText + +[Back to dashboard](review.md) | [Open API page](display-lcd/lcd-size-text.md) + +## Snapshot + +- Module: `lcd` +- Current symbol: `lcd.sizeText` +- Doc id: `lcd.size-text` +- Source: `radio/src/lua/api_colorlcd.cpp:247` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lcd.sizeText"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>text</code></td><td>param</td><td><code>string</code></td><td></td><td><select data-field-kind="param" data-field-name="text" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="text" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>please see the Lcd functions overview</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +<tr><td><code>w,h</code></td><td>return</td><td><code>integer</code></td><td>width and height of the text</td><td><select data-field-kind="return" data-field-name="w,h" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="w,h" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lcd.sizeText", "symbol": "lcd.sizeText", "summary": "Get the width and height of a text string drawn with flags", "parameters": [{"name": "text", "type": "string", "required": true, "description": ""}, {"name": "flags", "type": "integer", "required": false, "description": "please see the Lcd functions overview"}], "returns": [{"name": "w,h", "type": "integer", "description": "width and height of the text"}], "notes": ["Only available on radios with color display"], "since": "2.5.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lcd.sizeText(text [, flags]) + +Get the width and height of a text string drawn with flags + +@param text (string) + +@param flags (optional) please see the Lcd functions overview + +@retval w,h (integers) width and height of the text + +@notice Only available on radios with color display + +@status current Introduced in 2.5.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get the width and height of a text string drawn with flags + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `text` | yes | `string` | | +| `flags` | no | `integer` | please see the Lcd functions overview | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `w,h` | `integer` | width and height of the text | + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lcd.sizeText([text, flags]) + +Get the width and height of a text string drawn with flags + +@param text (string) + +@param flags (integer) please see the Lcd functions overview + +@retval w,h (integer) width and height of the text + +@notice Only available on radios with color display + +@status current Introduced in 2.5.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-align.md b/website/md-docs/api-reference/review-lvgl-align.md new file mode 100644 index 000000000..1dafa4250 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-align.md @@ -0,0 +1,145 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.align + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-align.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.align` +- Doc id: `lvgl.align` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:1048` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.align"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected alignment, defaults to nil + * `set` (function) called when the user taps an alignment in the popup; passed the selected alignment value, defaults to nil</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.align", "symbol": "lvgl.align", "summary": "Display a button showing a text alignment name. Tapping it opens a popup menu to choose an alignment from, using EdgeTX styling.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected alignment, defaults to nil\n * `set` (function) called when the user taps an alignment in the popup; passed the selected alignment value, defaults to nil"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.align([parent, ]params) + + Display a button showing a text alignment name. Tapping it opens a popup menu to choose an alignment from, using EdgeTX styling. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected alignment, defaults to nil + * `set` (function) called when the user taps an alignment in the popup; passed the selected alignment value, defaults to nil + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a button showing a text alignment name. Tapping it opens a popup menu to choose an alignment from, using EdgeTX styling. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected alignment, defaults to nil * `set` (function) called when the user taps an alignment in the popup; passed the selected alignment value, defaults to nil | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.align([parent, params]) + +Display a button showing a text alignment name. Tapping it opens a popup menu to choose an alignment from, using EdgeTX styling. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected alignment, defaults to nil + * `set` (function) called when the user taps an alignment in the popup; passed the selected alignment value, defaults to nil + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-arc.md b/website/md-docs/api-reference/review-lvgl-arc.md new file mode 100644 index 000000000..2dd39585b --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-arc.md @@ -0,0 +1,168 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.arc + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-arc.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.arc` +- Doc id: `lvgl.arc` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:765` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.arc"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `thickness` (number) width of the arc's line, defaults to 1 + * `radius` (number or function) radius of the arc, defaults to 0 + * `startAngle` (number or function) starting angle in degrees (0-360), 0 is 3 o'clock, defaults to 0 + * `endAngle` (number or function) ending angle in degrees, defaults to 360 + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + * `rounded` (boolean) if true the ends of the arc are rounded, defaults to false + * `bgColor` (color or function) color of the background arc, not used by default + * `bgOpacity` (number or function) opacity of the background arc, defaults to 0 (not visible) + * `bgStartAngle` (number or function) starting angle of the background arc in degrees, defaults to 0 + * `bgEndAngle` (number or function) ending angle of the background arc in degrees, defaults to 360</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.arc", "symbol": "lvgl.arc", "summary": "Display an arc.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `thickness` (number) width of the arc's line, defaults to 1\n * `radius` (number or function) radius of the arc, defaults to 0\n * `startAngle` (number or function) starting angle in degrees (0-360), 0 is 3 o'clock, defaults to 0\n * `endAngle` (number or function) ending angle in degrees, defaults to 360\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n * `rounded` (boolean) if true the ends of the arc are rounded, defaults to false\n * `bgColor` (color or function) color of the background arc, not used by default\n * `bgOpacity` (number or function) opacity of the background arc, defaults to 0 (not visible)\n * `bgStartAngle` (number or function) starting angle of the background arc in degrees, defaults to 0\n * `bgEndAngle` (number or function) ending angle of the background arc in degrees, defaults to 360"}], "returns": [{"name": "", "type": "table", "description": "LVGL object"}], "notes": ["Arc objects have two elements, a foreground arc and a background arc. By default the background arc is not shown -- to show it, set both `bgColor` and `bgOpacity`.\n @notice If `opacity` or `bgOpacity` is less than 255 and `rounded` is true, the ends of the arc will not draw correctly. This is an LVGL limitation."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.arc([parent, ]params) + + Display an arc. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + `w`, `h`, and `size` should not be used with `lvgl.arc` -- use `radius` instead. + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `thickness` (number) width of the arc's line, defaults to 1 + * `radius` (number or function) radius of the arc, defaults to 0 + * `startAngle` (number or function) starting angle in degrees (0-360), 0 is 3 o'clock, defaults to 0 + * `endAngle` (number or function) ending angle in degrees, defaults to 360 + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + * `rounded` (boolean) if true the ends of the arc are rounded, defaults to false + * `bgColor` (color or function) color of the background arc, not used by default + * `bgOpacity` (number or function) opacity of the background arc, defaults to 0 (not visible) + * `bgStartAngle` (number or function) starting angle of the background arc in degrees, defaults to 0 + * `bgEndAngle` (number or function) ending angle of the background arc in degrees, defaults to 360 + + @retval table LVGL object + + @notice Arc objects have two elements, a foreground arc and a background arc. By default the background arc is not shown -- to show it, set both `bgColor` and `bgOpacity`. + @notice If `opacity` or `bgOpacity` is less than 255 and `rounded` is true, the ends of the arc will not draw correctly. This is an LVGL limitation. + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display an arc. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `thickness` (number) width of the arc's line, defaults to 1 * `radius` (number or function) radius of the arc, defaults to 0 * `startAngle` (number or function) starting angle in degrees (0-360), 0 is 3 o'clock, defaults to 0 * `endAngle` (number or function) ending angle in degrees, defaults to 360 * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 * `rounded` (boolean) if true the ends of the arc are rounded, defaults to false * `bgColor` (color or function) color of the background arc, not used by default * `bgOpacity` (number or function) opacity of the background arc, defaults to 0 (not visible) * `bgStartAngle` (number or function) starting angle of the background arc in degrees, defaults to 0 * `bgEndAngle` (number or function) ending angle of the background arc in degrees, defaults to 360 | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +#### Notes + +- Arc objects have two elements, a foreground arc and a background arc. By default the background arc is not shown -- to show it, set both `bgColor` and `bgOpacity`. + @notice If `opacity` or `bgOpacity` is less than 255 and `rounded` is true, the ends of the arc will not draw correctly. This is an LVGL limitation. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.arc([parent, params]) + +Display an arc. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `thickness` (number) width of the arc's line, defaults to 1 + * `radius` (number or function) radius of the arc, defaults to 0 + * `startAngle` (number or function) starting angle in degrees (0-360), 0 is 3 o'clock, defaults to 0 + * `endAngle` (number or function) ending angle in degrees, defaults to 360 + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + * `rounded` (boolean) if true the ends of the arc are rounded, defaults to false + * `bgColor` (color or function) color of the background arc, not used by default + * `bgOpacity` (number or function) opacity of the background arc, defaults to 0 (not visible) + * `bgStartAngle` (number or function) starting angle of the background arc in degrees, defaults to 0 + * `bgEndAngle` (number or function) ending angle of the background arc in degrees, defaults to 360 + +@retval (table) LVGL object + +@notice Arc objects have two elements, a foreground arc and a background arc. By default the background arc is not shown -- to show it, set both `bgColor` and `bgOpacity`. + @notice If `opacity` or `bgOpacity` is less than 255 and `rounded` is true, the ends of the arc will not draw correctly. This is an LVGL limitation. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-box.md b/website/md-docs/api-reference/review-lvgl-box.md new file mode 100644 index 000000000..9ed5677df --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-box.md @@ -0,0 +1,166 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.box + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-box.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.box` +- Doc id: `lvgl.box` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:1185` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.box"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default + * `flexPad` (number) padding between rows/columns when flex layout is used; recommend using `lvgl.PAD_xxx` values, defaults to `PAD_OUTLINE` + * `scrollBar` (boolean) enables/disables scroll bars, defaults to true + * `scrollDir` (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the box bounds (stand alone scripts only), defaults to `lvgl.SCROLL_ALL` + * `scrolled` (function) called when the box content is scrolled; passed `x`, `y` of the current scroll position, defaults to nil + * `scrollTo` (function) overrides the box scroll position; must return `x`, `y` to scroll to, defaults to nil + * `align` (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4); avoid combining an alignment with a scrollbar on the same axis, defaults to `CENTER | VTOP` + * `borderPad` (number or table) border padding around the container edges; a single number applies to all sides, or a table `{left=?, right=?, top=?, bottom=?}` (added in 2.11.5), defaults to `PAD_OUTLINE` if `flexFlow` is set, otherwise 0</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.box", "symbol": "lvgl.box", "summary": "Create a container for managing object layout.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default\n * `flexPad` (number) padding between rows/columns when flex layout is used; recommend using `lvgl.PAD_xxx` values, defaults to `PAD_OUTLINE`\n * `scrollBar` (boolean) enables/disables scroll bars, defaults to true\n * `scrollDir` (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the box bounds (stand alone scripts only), defaults to `lvgl.SCROLL_ALL`\n * `scrolled` (function) called when the box content is scrolled; passed `x`, `y` of the current scroll position, defaults to nil\n * `scrollTo` (function) overrides the box scroll position; must return `x`, `y` to scroll to, defaults to nil\n * `align` (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4); avoid combining an alignment with a scrollbar on the same axis, defaults to `CENTER | VTOP`\n * `borderPad` (number or table) border padding around the container edges; a single number applies to all sides, or a table `{left=?, right=?, top=?, bottom=?}` (added in 2.11.5), defaults to `PAD_OUTLINE` if `flexFlow` is set, otherwise 0"}], "returns": [{"name": "", "type": "table", "description": "LVGL object"}], "notes": ["The box is a helper for managing screen layouts.\n @notice When adding controls such as button/toggle/textEdit, leave enough space around them for the focus outline.\n @notice In a stand alone tool script, the box automatically adds scroll bars if child objects fall outside its boundaries; for widgets, out-of-bounds children are clipped instead.\n @notice `scrollBar`, `scrollDir`, `scrolled`, and `scrollTo` were added in 2.11.2."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.box([parent, ]params) + + Create a container for managing object layout. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default + * `flexPad` (number) padding between rows/columns when flex layout is used; recommend using `lvgl.PAD_xxx` values, defaults to `PAD_OUTLINE` + * `scrollBar` (boolean) enables/disables scroll bars, defaults to true + * `scrollDir` (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the box bounds (stand alone scripts only), defaults to `lvgl.SCROLL_ALL` + * `scrolled` (function) called when the box content is scrolled; passed `x`, `y` of the current scroll position, defaults to nil + * `scrollTo` (function) overrides the box scroll position; must return `x`, `y` to scroll to, defaults to nil + * `align` (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4); avoid combining an alignment with a scrollbar on the same axis, defaults to `CENTER | VTOP` + * `borderPad` (number or table) border padding around the container edges; a single number applies to all sides, or a table `{left=?, right=?, top=?, bottom=?}` (added in 2.11.5), defaults to `PAD_OUTLINE` if `flexFlow` is set, otherwise 0 + + @retval table LVGL object + + @notice The box is a helper for managing screen layouts. + @notice When adding controls such as button/toggle/textEdit, leave enough space around them for the focus outline. + @notice In a stand alone tool script, the box automatically adds scroll bars if child objects fall outside its boundaries; for widgets, out-of-bounds children are clipped instead. + @notice `scrollBar`, `scrollDir`, `scrolled`, and `scrollTo` were added in 2.11.2. + + @status current Introduced in 2.11.0, align added in 2.11.4, borderPad added in 2.11.5, floating added in 2.11.6, scrollBar/scrollDir/scrolled/scrollTo added in 2.11.2 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Create a container for managing object layout. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default * `flexPad` (number) padding between rows/columns when flex layout is used; recommend using `lvgl.PAD_xxx` values, defaults to `PAD_OUTLINE` * `scrollBar` (boolean) enables/disables scroll bars, defaults to true * `scrollDir` (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the box bounds (stand alone scripts only), defaults to `lvgl.SCROLL_ALL` * `scrolled` (function) called when the box content is scrolled; passed `x`, `y` of the current scroll position, defaults to nil * `scrollTo` (function) overrides the box scroll position; must return `x`, `y` to scroll to, defaults to nil * `align` (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4); avoid combining an alignment with a scrollbar on the same axis, defaults to `CENTER | VTOP` * `borderPad` (number or table) border padding around the container edges; a single number applies to all sides, or a table `{left=?, right=?, top=?, bottom=?}` (added in 2.11.5), defaults to `PAD_OUTLINE` if `flexFlow` is set, otherwise 0 | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +#### Notes + +- The box is a helper for managing screen layouts. + @notice When adding controls such as button/toggle/textEdit, leave enough space around them for the focus outline. + @notice In a stand alone tool script, the box automatically adds scroll bars if child objects fall outside its boundaries; for widgets, out-of-bounds children are clipped instead. + @notice `scrollBar`, `scrollDir`, `scrolled`, and `scrollTo` were added in 2.11.2. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.box([parent, params]) + +Create a container for managing object layout. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default + * `flexPad` (number) padding between rows/columns when flex layout is used; recommend using `lvgl.PAD_xxx` values, defaults to `PAD_OUTLINE` + * `scrollBar` (boolean) enables/disables scroll bars, defaults to true + * `scrollDir` (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the box bounds (stand alone scripts only), defaults to `lvgl.SCROLL_ALL` + * `scrolled` (function) called when the box content is scrolled; passed `x`, `y` of the current scroll position, defaults to nil + * `scrollTo` (function) overrides the box scroll position; must return `x`, `y` to scroll to, defaults to nil + * `align` (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4); avoid combining an alignment with a scrollbar on the same axis, defaults to `CENTER | VTOP` + * `borderPad` (number or table) border padding around the container edges; a single number applies to all sides, or a table `{left=?, right=?, top=?, bottom=?}` (added in 2.11.5), defaults to `PAD_OUTLINE` if `flexFlow` is set, otherwise 0 + +@retval (table) LVGL object + +@notice The box is a helper for managing screen layouts. + @notice When adding controls such as button/toggle/textEdit, leave enough space around them for the focus outline. + @notice In a stand alone tool script, the box automatically adds scroll bars if child objects fall outside its boundaries; for widgets, out-of-bounds children are clipped instead. + @notice `scrollBar`, `scrollDir`, `scrolled`, and `scrollTo` were added in 2.11.2. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-build.md b/website/md-docs/api-reference/review-lvgl-build.md new file mode 100644 index 000000000..0a239cf68 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-build.md @@ -0,0 +1,123 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.build + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-build.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.build` +- Doc id: `lvgl.build` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:453` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.build"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the built objects to; if omitted they attach to the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>a table of tables, each defining one LVGL object: +* `type` (string or type constant) mandatory, selects the kind of object to create, e.g. `"rectangle"` or `lvgl.RECTANGLE`; named type constants (e.g. `lvgl.RECTANGLE`) added in 2.11.4, string names work in all versions + * `name` (string) optional name used to look up this object in the returned table, defaults to an empty string + * `children` (table) optional nested table of the same shape, to create child objects + * any other key accepted by the constructor function for the chosen `type`</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>named LVGL objects (only entries whose definition included a `name` are included)</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.build", "symbol": "lvgl.build", "summary": "Build a complex UI in a single operation from a table of object definitions.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the built objects to; if omitted they attach to the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "a table of tables, each defining one LVGL object:\n* `type` (string or type constant) mandatory, selects the kind of object to create, e.g. `\"rectangle\"` or `lvgl.RECTANGLE`; named type constants (e.g. `lvgl.RECTANGLE`) added in 2.11.4, string names work in all versions\n * `name` (string) optional name used to look up this object in the returned table, defaults to an empty string\n * `children` (table) optional nested table of the same shape, to create child objects\n * any other key accepted by the constructor function for the chosen `type`"}], "returns": [{"name": "", "type": "table", "description": "named LVGL objects (only entries whose definition included a `name` are included)"}], "notes": ["Objects can be nested via `children`, another table of tables using the same shape as the top-level `params`.\n@notice Very large or deeply nested tables may fail to compile to `.luac` -- if a script works from `.lua` but fails from `.luac`, split the call into multiple smaller `lvgl.build()` calls."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.build([parent, ]params) + +Build a complex UI in a single operation from a table of object definitions. + +@param parent (object) optional LVGL object to attach the built objects to; if omitted they attach to the top-level script window + +@param params (table) a table of tables, each defining one LVGL object: + * `type` (string or type constant) mandatory, selects the kind of object to create, e.g. `"rectangle"` or `lvgl.RECTANGLE`; named type constants (e.g. `lvgl.RECTANGLE`) added in 2.11.4, string names work in all versions + * `name` (string) optional name used to look up this object in the returned table, defaults to an empty string + * `children` (table) optional nested table of the same shape, to create child objects + * any other key accepted by the constructor function for the chosen `type` + +@retval table named LVGL objects (only entries whose definition included a `name` are included) + +@notice Objects can be nested via `children`, another table of tables using the same shape as the top-level `params`. +@notice Very large or deeply nested tables may fail to compile to `.luac` -- if a script works from `.lua` but fails from `.luac`, split the call into multiple smaller `lvgl.build()` calls. + +@status current Introduced in 2.11.0, named type constants added in 2.11.4 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Build a complex UI in a single operation from a table of object definitions. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the built objects to; if omitted they attach to the top-level script window | +| `params` | yes | `table` | a table of tables, each defining one LVGL object: * `type` (string or type constant) mandatory, selects the kind of object to create, e.g. `"rectangle"` or `lvgl.RECTANGLE`; named type constants (e.g. `lvgl.RECTANGLE`) added in 2.11.4, string names work in all versions * `name` (string) optional name used to look up this object in the returned table, defaults to an empty string * `children` (table) optional nested table of the same shape, to create child objects * any other key accepted by the constructor function for the chosen `type` | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | named LVGL objects (only entries whose definition included a `name` are included) | + +#### Notes + +- Objects can be nested via `children`, another table of tables using the same shape as the top-level `params`. +@notice Very large or deeply nested tables may fail to compile to `.luac` -- if a script works from `.lua` but fails from `.luac`, split the call into multiple smaller `lvgl.build()` calls. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.build([parent, params]) + +Build a complex UI in a single operation from a table of object definitions. + +@param parent (object) optional LVGL object to attach the built objects to; if omitted they attach to the top-level script window + +@param params (table) a table of tables, each defining one LVGL object: +* `type` (string or type constant) mandatory, selects the kind of object to create, e.g. `"rectangle"` or `lvgl.RECTANGLE`; named type constants (e.g. `lvgl.RECTANGLE`) added in 2.11.4, string names work in all versions + * `name` (string) optional name used to look up this object in the returned table, defaults to an empty string + * `children` (table) optional nested table of the same shape, to create child objects + * any other key accepted by the constructor function for the chosen `type` + +@retval (table) named LVGL objects (only entries whose definition included a `name` are included) + +@notice Objects can be nested via `children`, another table of tables using the same shape as the top-level `params`. +@notice Very large or deeply nested tables may fail to compile to `.luac` -- if a script works from `.lua` but fails from `.luac`, split the call into multiple smaller `lvgl.build()` calls. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-button.md b/website/md-docs/api-reference/review-lvgl-button.md new file mode 100644 index 000000000..d2a2f177d --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-button.md @@ -0,0 +1,160 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.button + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-button.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.button` +- Doc id: `lvgl.button` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:834` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.button"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `text` (string or function) text displayed in the button, defaults to an empty string + * `press` (function) called when the user taps the button, after releasing ENTER or the screen; may optionally return a non-zero integer to display the button in the checked state, defaults to nil + * `longpress` (function) called on a long tap; may optionally return a non-zero integer to display the button in the checked state, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `checked` (boolean) sets the initial checked state; can be updated with `lvgl.set()`, defaults to false + * `color` (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color + * `textColor` (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color + * `cornerRadius` (number) radius for the button's corners, defaults to the EdgeTX button style radius + * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE`</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.button", "symbol": "lvgl.button", "summary": "Add a text button using the EdgeTX style.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `text` (string or function) text displayed in the button, defaults to an empty string\n * `press` (function) called when the user taps the button, after releasing ENTER or the screen; may optionally return a non-zero integer to display the button in the checked state, defaults to nil\n * `longpress` (function) called on a long tap; may optionally return a non-zero integer to display the button in the checked state, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `checked` (boolean) sets the initial checked state; can be updated with `lvgl.set()`, defaults to false\n * `color` (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color\n * `textColor` (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color\n * `cornerRadius` (number) radius for the button's corners, defaults to the EdgeTX button style radius\n * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE`"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.button([parent, ]params) + + Add a text button using the EdgeTX style. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `text` (string or function) text displayed in the button, defaults to an empty string + * `press` (function) called when the user taps the button, after releasing ENTER or the screen; may optionally return a non-zero integer to display the button in the checked state, defaults to nil + * `longpress` (function) called on a long tap; may optionally return a non-zero integer to display the button in the checked state, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `checked` (boolean) sets the initial checked state; can be updated with `lvgl.set()`, defaults to false + * `color` (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color + * `textColor` (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color + * `cornerRadius` (number) radius for the button's corners, defaults to the EdgeTX button style radius + * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE` + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Add a text button using the EdgeTX style. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `text` (string or function) text displayed in the button, defaults to an empty string * `press` (function) called when the user taps the button, after releasing ENTER or the screen; may optionally return a non-zero integer to display the button in the checked state, defaults to nil * `longpress` (function) called on a long tap; may optionally return a non-zero integer to display the button in the checked state, defaults to nil * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * `checked` (boolean) sets the initial checked state; can be updated with `lvgl.set()`, defaults to false * `color` (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color * `textColor` (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color * `cornerRadius` (number) radius for the button's corners, defaults to the EdgeTX button style radius * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE` | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.button([parent, params]) + +Add a text button using the EdgeTX style. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `text` (string or function) text displayed in the button, defaults to an empty string + * `press` (function) called when the user taps the button, after releasing ENTER or the screen; may optionally return a non-zero integer to display the button in the checked state, defaults to nil + * `longpress` (function) called on a long tap; may optionally return a non-zero integer to display the button in the checked state, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `checked` (boolean) sets the initial checked state; can be updated with `lvgl.set()`, defaults to false + * `color` (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color + * `textColor` (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color + * `cornerRadius` (number) radius for the button's corners, defaults to the EdgeTX button style radius + * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE` + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-choice.md b/website/md-docs/api-reference/review-lvgl-choice.md new file mode 100644 index 000000000..e7cf728c5 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-choice.md @@ -0,0 +1,160 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.choice + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-choice.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.choice` +- Doc id: `lvgl.choice` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:952` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.choice"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `title` (string) text displayed in the popup menu's header, defaults to an empty string + * `values` (table) simple table of option strings shown in the popup; can be changed via `lvgl.set()` since 2.11.6, defaults to an empty list + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the index of the currently selected option (1..number of values), defaults to nil + * `set` (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `filter` (function) called for each option when the popup opens, passed the option's index; return true to show it, false to hide it, defaults to nil + * `popupWidth` (number) width of the popup window, defaults to 0 (use default width)</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.choice", "symbol": "lvgl.choice", "summary": "Display a button showing an option value. Tapping it opens a popup menu of options to choose from, using EdgeTX styling.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `title` (string) text displayed in the popup menu's header, defaults to an empty string\n * `values` (table) simple table of option strings shown in the popup; can be changed via `lvgl.set()` since 2.11.6, defaults to an empty list\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the index of the currently selected option (1..number of values), defaults to nil\n * `set` (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `filter` (function) called for each option when the popup opens, passed the option's index; return true to show it, false to hide it, defaults to nil\n * `popupWidth` (number) width of the popup window, defaults to 0 (use default width)"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.choice([parent, ]params) + + Display a button showing an option value. Tapping it opens a popup menu of options to choose from, using EdgeTX styling. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `title` (string) text displayed in the popup menu's header, defaults to an empty string + * `values` (table) simple table of option strings shown in the popup; can be changed via `lvgl.set()` since 2.11.6, defaults to an empty list + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the index of the currently selected option (1..number of values), defaults to nil + * `set` (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `filter` (function) called for each option when the popup opens, passed the option's index; return true to show it, false to hide it, defaults to nil + * `popupWidth` (number) width of the popup window, defaults to 0 (use default width) + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + + @status current Introduced in 2.11.0, values updatable via lvgl.set() added in 2.11.6, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a button showing an option value. Tapping it opens a popup menu of options to choose from, using EdgeTX styling. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `title` (string) text displayed in the popup menu's header, defaults to an empty string * `values` (table) simple table of option strings shown in the popup; can be changed via `lvgl.set()` since 2.11.6, defaults to an empty list * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the index of the currently selected option (1..number of values), defaults to nil * `set` (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * `filter` (function) called for each option when the popup opens, passed the option's index; return true to show it, false to hide it, defaults to nil * `popupWidth` (number) width of the popup window, defaults to 0 (use default width) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.choice([parent, params]) + +Display a button showing an option value. Tapping it opens a popup menu of options to choose from, using EdgeTX styling. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `title` (string) text displayed in the popup menu's header, defaults to an empty string + * `values` (table) simple table of option strings shown in the popup; can be changed via `lvgl.set()` since 2.11.6, defaults to an empty list + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the index of the currently selected option (1..number of values), defaults to nil + * `set` (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `filter` (function) called for each option when the popup opens, passed the option's index; return true to show it, false to hide it, defaults to nil + * `popupWidth` (number) width of the popup window, defaults to 0 (use default width) + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-circle.md b/website/md-docs/api-reference/review-lvgl-circle.md new file mode 100644 index 000000000..9ed0866a6 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-circle.md @@ -0,0 +1,143 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.circle + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-circle.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.circle` +- Doc id: `lvgl.circle` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:744` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.circle"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `thickness` (number) width of the border line, defaults to 1 + * `filled` (boolean) if true the circle is filled with `color`, defaults to false + * `radius` (number or function) radius of the circle, defaults to 0 + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.circle", "symbol": "lvgl.circle", "summary": "Display a solid or outlined circle.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `thickness` (number) width of the border line, defaults to 1\n * `filled` (boolean) if true the circle is filled with `color`, defaults to false\n * `radius` (number or function) radius of the circle, defaults to 0\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255"}], "returns": [{"name": "", "type": "table", "description": "LVGL object"}], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.circle([parent, ]params) + + Display a solid or outlined circle. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + `w`, `h`, and `size` should not be used with `lvgl.circle` -- use `radius` instead. + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `thickness` (number) width of the border line, defaults to 1 + * `filled` (boolean) if true the circle is filled with `color`, defaults to false + * `radius` (number or function) radius of the circle, defaults to 0 + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + + @retval table LVGL object + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a solid or outlined circle. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `thickness` (number) width of the border line, defaults to 1 * `filled` (boolean) if true the circle is filled with `color`, defaults to false * `radius` (number or function) radius of the circle, defaults to 0 * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.circle([parent, params]) + +Display a solid or outlined circle. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `thickness` (number) width of the border line, defaults to 1 + * `filled` (boolean) if true the circle is filled with `color`, defaults to false + * `radius` (number or function) radius of the circle, defaults to 0 + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + +@retval (table) LVGL object + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-clear.md b/website/md-docs/api-reference/review-lvgl-clear.md new file mode 100644 index 000000000..2df4b1c1f --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-clear.md @@ -0,0 +1,106 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.clear + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-clear.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.clear` +- Doc id: `lvgl.clear` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:138` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.clear"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object whose children should be deleted; if omitted, the entire script UI is deleted</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.clear", "symbol": "lvgl.clear", "summary": "Delete LVGL objects.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object whose children should be deleted; if omitted, the entire script UI is deleted"}], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": ["If `parent` is not set, the entire script UI is deleted -- use this when the UI changes dramatically (e.g. widget size changes).\n@notice If `parent` is set, only its child LVGL objects are deleted -- use this to remove and replace a specific set of objects."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.clear([parent]) + +Delete LVGL objects. + +@param parent (object) optional LVGL object whose children should be deleted; if omitted, the entire script UI is deleted + +@retval none + +@notice If `parent` is not set, the entire script UI is deleted -- use this when the UI changes dramatically (e.g. widget size changes). +@notice If `parent` is set, only its child LVGL objects are deleted -- use this to remove and replace a specific set of objects. + +@status current Introduced in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Delete LVGL objects. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object whose children should be deleted; if omitted, the entire script UI is deleted | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +- If `parent` is not set, the entire script UI is deleted -- use this when the UI changes dramatically (e.g. widget size changes). +@notice If `parent` is set, only its child LVGL objects are deleted -- use this to remove and replace a specific set of objects. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.clear([parent]) + +Delete LVGL objects. + +@param parent (object) optional LVGL object whose children should be deleted; if omitted, the entire script UI is deleted + +@retval none (TODO) + +@notice If `parent` is not set, the entire script UI is deleted -- use this when the UI changes dramatically (e.g. widget size changes). +@notice If `parent` is set, only its child LVGL objects are deleted -- use this to remove and replace a specific set of objects. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-close.md b/website/md-docs/api-reference/review-lvgl-close.md new file mode 100644 index 000000000..add772fb9 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-close.md @@ -0,0 +1,99 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.close + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-close.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.close` +- Doc id: `lvgl.close` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:252` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.close"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>obj</code></td><td>param</td><td><code>object</code></td><td>LVGL object previously created by the `lvgl` library</td><td><select data-field-kind="param" data-field-name="obj" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="obj" data-custom-type="true" /></td></tr> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.close", "symbol": "lvgl.close", "summary": "Close an LVGL object that represents a closable container or dialog.", "parameters": [{"name": "obj", "type": "object", "required": true, "description": "LVGL object previously created by the `lvgl` library"}], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.close(obj) + +Close an LVGL object that represents a closable container or dialog. + +@param obj (object) LVGL object previously created by the `lvgl` library + +@retval none + +@status current Introduced in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Close an LVGL object that represents a closable container or dialog. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `obj` | yes | `object` | LVGL object previously created by the `lvgl` library | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.close([obj]) + +Close an LVGL object that represents a closable container or dialog. + +@param obj (object) LVGL object previously created by the `lvgl` library + +@retval none (TODO) + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-color.md b/website/md-docs/api-reference/review-lvgl-color.md new file mode 100644 index 000000000..e4b81e8fe --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-color.md @@ -0,0 +1,145 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.color + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-color.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.color` +- Doc id: `lvgl.color` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:1069` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.color"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called once when the object is created, to get the initial color, defaults to nil + * `set` (function) called when the user picks a color; passed the selected color value, defaults to nil</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.color", "symbol": "lvgl.color", "summary": "Display a button showing a color swatch. Tapping it opens the color picker dialog, using EdgeTX styling.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called once when the object is created, to get the initial color, defaults to nil\n * `set` (function) called when the user picks a color; passed the selected color value, defaults to nil"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects a color.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.color([parent, ]params) + + Display a button showing a color swatch. Tapping it opens the color picker dialog, using EdgeTX styling. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called once when the object is created, to get the initial color, defaults to nil + * `set` (function) called when the user picks a color; passed the selected color value, defaults to nil + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects a color. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a button showing a color swatch. Tapping it opens the color picker dialog, using EdgeTX styling. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `get` (function) called once when the object is created, to get the initial color, defaults to nil * `set` (function) called when the user picks a color; passed the selected color value, defaults to nil | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects a color. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.color([parent, params]) + +Display a button showing a color swatch. Tapping it opens the color picker dialog, using EdgeTX styling. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called once when the object is created, to get the initial color, defaults to nil + * `set` (function) called when the user picks a color; passed the selected color value, defaults to nil + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects a color. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-confirm.md b/website/md-docs/api-reference/review-lvgl-confirm.md new file mode 100644 index 000000000..c4f78f707 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-confirm.md @@ -0,0 +1,113 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.confirm + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-confirm.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.confirm` +- Doc id: `lvgl.confirm` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:1285` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.confirm"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `title` (string) text displayed in the dialog's header, defaults to an empty string + * `message` (string) text displayed in the dialog's body, defaults to an empty string + * `confirm` (function) called when the user taps Yes, defaults to nil + * `cancel` (function) called when the user taps No, defaults to nil</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.confirm", "symbol": "lvgl.confirm", "summary": "Display a Yes/No confirmation dialog box.", "parameters": [{"name": "params", "type": "table", "required": true, "description": "* `title` (string) text displayed in the dialog's header, defaults to an empty string\n * `message` (string) text displayed in the dialog's body, defaults to an empty string\n * `confirm` (function) called when the user taps Yes, defaults to nil\n * `cancel` (function) called when the user taps No, defaults to nil"}], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": ["The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.confirm` -- only the settings listed above apply."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.confirm(params) + + Display a Yes/No confirmation dialog box. + + @param params (table): + * `title` (string) text displayed in the dialog's header, defaults to an empty string + * `message` (string) text displayed in the dialog's body, defaults to an empty string + * `confirm` (function) called when the user taps Yes, defaults to nil + * `cancel` (function) called when the user taps No, defaults to nil + + @retval none + + @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.confirm` -- only the settings listed above apply. + + @status current Introduced in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a Yes/No confirmation dialog box. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `params` | yes | `table` | * `title` (string) text displayed in the dialog's header, defaults to an empty string * `message` (string) text displayed in the dialog's body, defaults to an empty string * `confirm` (function) called when the user taps Yes, defaults to nil * `cancel` (function) called when the user taps No, defaults to nil | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +- The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.confirm` -- only the settings listed above apply. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.confirm([params]) + +Display a Yes/No confirmation dialog box. + +@param params (table) * `title` (string) text displayed in the dialog's header, defaults to an empty string + * `message` (string) text displayed in the dialog's body, defaults to an empty string + * `confirm` (function) called when the user taps Yes, defaults to nil + * `cancel` (function) called when the user taps No, defaults to nil + +@retval none (TODO) + +@notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.confirm` -- only the settings listed above apply. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-dialog.md b/website/md-docs/api-reference/review-lvgl-dialog.md new file mode 100644 index 000000000..a8d9dd98f --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-dialog.md @@ -0,0 +1,115 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.dialog + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-dialog.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.dialog` +- Doc id: `lvgl.dialog` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:1265` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.dialog"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `title` (string) text displayed in the dialog's header, defaults to an empty string + * `close` (function) called when the dialog is closed, defaults to nil + * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default + * `flexPad` (number) padding between rows/columns when flex layout is used, defaults to `PAD_OUTLINE`</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.dialog", "symbol": "lvgl.dialog", "summary": "Display a dialog box.", "parameters": [{"name": "params", "type": "table", "required": true, "description": "* `title` (string) text displayed in the dialog's header, defaults to an empty string\n * `close` (function) called when the dialog is closed, defaults to nil\n * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default\n * `flexPad` (number) padding between rows/columns when flex layout is used, defaults to `PAD_OUTLINE`"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.dialog` -- only the settings listed above apply."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.dialog(params) + + Display a dialog box. + + @param params (table): + * `title` (string) text displayed in the dialog's header, defaults to an empty string + * `close` (function) called when the dialog is closed, defaults to nil + * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default + * `flexPad` (number) padding between rows/columns when flex layout is used, defaults to `PAD_OUTLINE` + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.dialog` -- only the settings listed above apply. + + @status current Introduced in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a dialog box. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `params` | yes | `table` | * `title` (string) text displayed in the dialog's header, defaults to an empty string * `close` (function) called when the dialog is closed, defaults to nil * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default * `flexPad` (number) padding between rows/columns when flex layout is used, defaults to `PAD_OUTLINE` | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.dialog` -- only the settings listed above apply. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.dialog([params]) + +Display a dialog box. + +@param params (table) * `title` (string) text displayed in the dialog's header, defaults to an empty string + * `close` (function) called when the dialog is closed, defaults to nil + * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default + * `flexPad` (number) padding between rows/columns when flex layout is used, defaults to `PAD_OUTLINE` + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.dialog` -- only the settings listed above apply. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-disable.md b/website/md-docs/api-reference/review-lvgl-disable.md new file mode 100644 index 000000000..ff21370b1 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-disable.md @@ -0,0 +1,99 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.disable + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-disable.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.disable` +- Doc id: `lvgl.disable` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:232` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.disable"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>obj</code></td><td>param</td><td><code>object</code></td><td>LVGL object previously created by the `lvgl` library</td><td><select data-field-kind="param" data-field-name="obj" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="obj" data-custom-type="true" /></td></tr> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.disable", "symbol": "lvgl.disable", "summary": "Disable interaction for an LVGL control object.", "parameters": [{"name": "obj", "type": "object", "required": true, "description": "LVGL object previously created by the `lvgl` library"}], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.disable(obj) + +Disable interaction for an LVGL control object. + +@param obj (object) LVGL object previously created by the `lvgl` library + +@retval none + +@status current Introduced in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Disable interaction for an LVGL control object. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `obj` | yes | `object` | LVGL object previously created by the `lvgl` library | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.disable([obj]) + +Disable interaction for an LVGL control object. + +@param obj (object) LVGL object previously created by the `lvgl` library + +@retval none (TODO) + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-enable.md b/website/md-docs/api-reference/review-lvgl-enable.md new file mode 100644 index 000000000..9be68401e --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-enable.md @@ -0,0 +1,99 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.enable + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-enable.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.enable` +- Doc id: `lvgl.enable` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:212` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.enable"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>obj</code></td><td>param</td><td><code>object</code></td><td>LVGL object previously created by the `lvgl` library</td><td><select data-field-kind="param" data-field-name="obj" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="obj" data-custom-type="true" /></td></tr> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.enable", "symbol": "lvgl.enable", "summary": "Enable interaction for an LVGL control object.", "parameters": [{"name": "obj", "type": "object", "required": true, "description": "LVGL object previously created by the `lvgl` library"}], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.enable(obj) + +Enable interaction for an LVGL control object. + +@param obj (object) LVGL object previously created by the `lvgl` library + +@retval none + +@status current Introduced in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Enable interaction for an LVGL control object. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `obj` | yes | `object` | LVGL object previously created by the `lvgl` library | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.enable([obj]) + +Enable interaction for an LVGL control object. + +@param obj (object) LVGL object previously created by the `lvgl` library + +@retval none (TODO) + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-exit-full-screen.md b/website/md-docs/api-reference/review-lvgl-exit-full-screen.md new file mode 100644 index 000000000..dbfac6ca4 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-exit-full-screen.md @@ -0,0 +1,92 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.exitFullScreen + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-exit-full-screen.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.exitFullScreen` +- Doc id: `lvgl.exit-full-screen` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:538` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.exitFullScreen"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.exitFullScreen", "symbol": "lvgl.exitFullScreen", "summary": "If the script is running in full screen mode, return it to normal mode.", "parameters": [], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.exitFullScreen() + +If the script is running in full screen mode, return it to normal mode. + +@retval none + +@status current Introduced in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +If the script is running in full screen mode, return it to normal mode. + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.exitFullScreen() + +If the script is running in full screen mode, return it to normal mode. + +@retval none (TODO) + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-file.md b/website/md-docs/api-reference/review-lvgl-file.md new file mode 100644 index 000000000..7b94908a5 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-file.md @@ -0,0 +1,163 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.file + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-file.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.file` +- Doc id: `lvgl.file` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:1157` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.file"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `title` (string) text displayed in the popup's header, defaults to an empty string + * `get` (function) called when the popup is opened, and after the selection changes, to get the currently selected filename; must return a string, defaults to nil + * `set` (function) called when the user picks a file; passed the selected filename (without path), defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `folder` (string) SD card folder to browse for files, defaults to nil + * `extension` (string) extension filter, e.g. `.png` or concatenated `.png.bmp` to match multiple, defaults to nil (no filter) + * `hideExtension` (boolean) if true, the extension is stripped before `set` is called and hidden in the picker list, defaults to false + * `maxLen` (number) maximum filename length (measured after `hideExtension` stripping, if set); files with longer names are not shown in the picker list, defaults to 255</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.file", "symbol": "lvgl.file", "summary": "Display a button showing a filename. Tapping it opens a popup file picker, using EdgeTX styling.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `title` (string) text displayed in the popup's header, defaults to an empty string\n * `get` (function) called when the popup is opened, and after the selection changes, to get the currently selected filename; must return a string, defaults to nil\n * `set` (function) called when the user picks a file; passed the selected filename (without path), defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `folder` (string) SD card folder to browse for files, defaults to nil\n * `extension` (string) extension filter, e.g. `.png` or concatenated `.png.bmp` to match multiple, defaults to nil (no filter)\n * `hideExtension` (boolean) if true, the extension is stripped before `set` is called and hidden in the picker list, defaults to false\n * `maxLen` (number) maximum filename length (measured after `hideExtension` stripping, if set); files with longer names are not shown in the picker list, defaults to 255"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user picks a file.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.file([parent, ]params) + + Display a button showing a filename. Tapping it opens a popup file picker, using EdgeTX styling. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `title` (string) text displayed in the popup's header, defaults to an empty string + * `get` (function) called when the popup is opened, and after the selection changes, to get the currently selected filename; must return a string, defaults to nil + * `set` (function) called when the user picks a file; passed the selected filename (without path), defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `folder` (string) SD card folder to browse for files, defaults to nil + * `extension` (string) extension filter, e.g. `.png` or concatenated `.png.bmp` to match multiple, defaults to nil (no filter) + * `hideExtension` (boolean) if true, the extension is stripped before `set` is called and hidden in the picker list, defaults to false + * `maxLen` (number) maximum filename length (measured after `hideExtension` stripping, if set); files with longer names are not shown in the picker list, defaults to 255 + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user picks a file. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a button showing a filename. Tapping it opens a popup file picker, using EdgeTX styling. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `title` (string) text displayed in the popup's header, defaults to an empty string * `get` (function) called when the popup is opened, and after the selection changes, to get the currently selected filename; must return a string, defaults to nil * `set` (function) called when the user picks a file; passed the selected filename (without path), defaults to nil * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * `folder` (string) SD card folder to browse for files, defaults to nil * `extension` (string) extension filter, e.g. `.png` or concatenated `.png.bmp` to match multiple, defaults to nil (no filter) * `hideExtension` (boolean) if true, the extension is stripped before `set` is called and hidden in the picker list, defaults to false * `maxLen` (number) maximum filename length (measured after `hideExtension` stripping, if set); files with longer names are not shown in the picker list, defaults to 255 | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user picks a file. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.file([parent, params]) + +Display a button showing a filename. Tapping it opens a popup file picker, using EdgeTX styling. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `title` (string) text displayed in the popup's header, defaults to an empty string + * `get` (function) called when the popup is opened, and after the selection changes, to get the currently selected filename; must return a string, defaults to nil + * `set` (function) called when the user picks a file; passed the selected filename (without path), defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `folder` (string) SD card folder to browse for files, defaults to nil + * `extension` (string) extension filter, e.g. `.png` or concatenated `.png.bmp` to match multiple, defaults to nil (no filter) + * `hideExtension` (boolean) if true, the extension is stripped before `set` is called and hidden in the picker list, defaults to false + * `maxLen` (number) maximum filename length (measured after `hideExtension` stripping, if set); files with longer names are not shown in the picker list, defaults to 255 + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user picks a file. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-font.md b/website/md-docs/api-reference/review-lvgl-font.md new file mode 100644 index 000000000..e3c3bee03 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-font.md @@ -0,0 +1,148 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.font + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-font.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.font` +- Doc id: `lvgl.font` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:1026` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.font"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected font, defaults to nil + * `set` (function) called when the user taps a font in the popup; passed the selected font value, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.font", "symbol": "lvgl.font", "summary": "Display a button showing a font name. Tapping it opens a popup menu to choose a font from, using EdgeTX styling.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected font, defaults to nil\n * `set` (function) called when the user taps a font in the popup; passed the selected font value, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.font([parent, ]params) + + Display a button showing a font name. Tapping it opens a popup menu to choose a font from, using EdgeTX styling. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected font, defaults to nil + * `set` (function) called when the user taps a font in the popup; passed the selected font value, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a button showing a font name. Tapping it opens a popup menu to choose a font from, using EdgeTX styling. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected font, defaults to nil * `set` (function) called when the user taps a font in the popup; passed the selected font value, defaults to nil * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.font([parent, params]) + +Display a button showing a font name. Tapping it opens a popup menu to choose a font from, using EdgeTX styling. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected font, defaults to nil + * `set` (function) called when the user taps a font in the popup; passed the selected font value, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-get-context.md b/website/md-docs/api-reference/review-lvgl-get-context.md new file mode 100644 index 000000000..cc9f45d82 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-get-context.md @@ -0,0 +1,91 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.getContext + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-get-context.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.getContext` +- Doc id: `lvgl.get-context` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:554` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.getContext"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>the widget instance's local data table, or nil for stand alone tool scripts</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.getContext", "symbol": "lvgl.getContext", "summary": "For a widget script, returns the local instance table created by (and returned from) the script's `create()` function.", "parameters": [], "returns": [{"name": "", "type": "table", "description": "the widget instance's local data table, or nil for stand alone tool scripts"}], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.getContext() + +For a widget script, returns the local instance table created by (and returned from) the script's `create()` function. + +@retval table the widget instance's local data table, or nil for stand alone tool scripts + +@status current Introduced in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +For a widget script, returns the local instance table created by (and returned from) the script's `create()` function. + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | the widget instance's local data table, or nil for stand alone tool scripts | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.getContext() + +For a widget script, returns the local instance table created by (and returned from) the script's `create()` function. + +@retval (table) the widget instance's local data table, or nil for stand alone tool scripts + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-get-scroll-pos.md b/website/md-docs/api-reference/review-lvgl-get-scroll-pos.md new file mode 100644 index 000000000..922556164 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-get-scroll-pos.md @@ -0,0 +1,103 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.getScrollPos + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-get-scroll-pos.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.getScrollPos` +- Doc id: `lvgl.get-scroll-pos` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:574` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: number, + +## Decide + +- Unknown returns to decide: `number,` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.getScrollPos"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>LVGL container object (e.g. `box`, `rectangle`, or `page`)</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>number,</code></td><td>return</td><td><code>unknown</code></td><td>number the X and Y scroll position of the container's top-left corner</td><td><select data-field-kind="return" data-field-name="number," data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="number," data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.getScrollPos", "symbol": "lvgl.getScrollPos", "summary": "Get the current scroll position of a container object.", "parameters": [{"name": "parent", "type": "object", "required": true, "description": "LVGL container object (e.g. `box`, `rectangle`, or `page`)"}], "returns": [{"name": "number,", "type": "unknown", "description": "number the X and Y scroll position of the container's top-left corner"}], "notes": ["Only applies to container objects such as `box`, `rectangle`, and `page`."], "since": "2.11.2"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.getScrollPos(parent) + +Get the current scroll position of a container object. + +@param parent (object) LVGL container object (e.g. `box`, `rectangle`, or `page`) + +@retval number, number the X and Y scroll position of the container's top-left corner + +@notice Only applies to container objects such as `box`, `rectangle`, and `page`. + +@status current Introduced in 2.11.2 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get the current scroll position of a container object. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | yes | `object` | LVGL container object (e.g. `box`, `rectangle`, or `page`) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `number,` | `unknown` | number the X and Y scroll position of the container's top-left corner | + +#### Notes + +- Only applies to container objects such as `box`, `rectangle`, and `page`. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.getScrollPos([parent]) + +Get the current scroll position of a container object. + +@param parent (object) LVGL container object (e.g. `box`, `rectangle`, or `page`) + +@retval number, (TODO) number the X and Y scroll position of the container's top-left corner + +@notice Only applies to container objects such as `box`, `rectangle`, and `page`. + +@status current Introduced in 2.11.2 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-hide.md b/website/md-docs/api-reference/review-lvgl-hide.md new file mode 100644 index 000000000..8a1551a42 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-hide.md @@ -0,0 +1,103 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.hide + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-hide.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.hide` +- Doc id: `lvgl.hide` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:190` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.hide"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>LVGL object to hide</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.hide", "symbol": "lvgl.hide", "summary": "Hide an LVGL object.", "parameters": [{"name": "parent", "type": "object", "required": true, "description": "LVGL object to hide"}], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": ["The `visible` setting function can also be used to dynamically show and hide objects."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.hide(parent) + +Hide an LVGL object. + +@param parent (object) LVGL object to hide + +@retval none + +@notice The `visible` setting function can also be used to dynamically show and hide objects. + +@status current Introduced in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Hide an LVGL object. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | yes | `object` | LVGL object to hide | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +- The `visible` setting function can also be used to dynamically show and hide objects. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.hide([parent]) + +Hide an LVGL object. + +@param parent (object) LVGL object to hide + +@retval none (TODO) + +@notice The `visible` setting function can also be used to dynamically show and hide objects. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-hline.md b/website/md-docs/api-reference/review-lvgl-hline.md new file mode 100644 index 000000000..62e779b3e --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-hline.md @@ -0,0 +1,143 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.hline + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-hline.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.hline` +- Doc id: `lvgl.hline` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:660` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.hline"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `rounded` (boolean) if true the line's end caps are rounded, defaults to false + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + * `dashGap` (number) gap size for dashed lines, defaults to 0 + * `dashWidth` (number) dash size for dashed lines, defaults to 0; both `dashGap` and `dashWidth` must be > 0 to draw dashed lines</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.hline", "symbol": "lvgl.hline", "summary": "Display a horizontal line.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `rounded` (boolean) if true the line's end caps are rounded, defaults to false\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n * `dashGap` (number) gap size for dashed lines, defaults to 0\n * `dashWidth` (number) dash size for dashed lines, defaults to 0; both `dashGap` and `dashWidth` must be > 0 to draw dashed lines"}], "returns": [{"name": "", "type": "table", "description": "LVGL object"}], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.hline([parent, ]params) + + Display a horizontal line. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + `w` sets the length of the line; `h` sets its thickness. + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `rounded` (boolean) if true the line's end caps are rounded, defaults to false + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + * `dashGap` (number) gap size for dashed lines, defaults to 0 + * `dashWidth` (number) dash size for dashed lines, defaults to 0; both `dashGap` and `dashWidth` must be > 0 to draw dashed lines + + @retval table LVGL object + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a horizontal line. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `rounded` (boolean) if true the line's end caps are rounded, defaults to false * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 * `dashGap` (number) gap size for dashed lines, defaults to 0 * `dashWidth` (number) dash size for dashed lines, defaults to 0; both `dashGap` and `dashWidth` must be > 0 to draw dashed lines | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.hline([parent, params]) + +Display a horizontal line. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `rounded` (boolean) if true the line's end caps are rounded, defaults to false + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + * `dashGap` (number) gap size for dashed lines, defaults to 0 + * `dashWidth` (number) dash size for dashed lines, defaults to 0; both `dashGap` and `dashWidth` must be > 0 to draw dashed lines + +@retval (table) LVGL object + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-image.md b/website/md-docs/api-reference/review-lvgl-image.md new file mode 100644 index 000000000..6d61ca86b --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-image.md @@ -0,0 +1,139 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.image + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-image.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.image` +- Doc id: `lvgl.image` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:795` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.image"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `file` (string) full path to the image file on the SD card, defaults to an empty string + * `fill` (boolean) if true the image is scaled to completely fill the frame (may be cropped); if false it is scaled to fit entirely within the frame (may have empty borders), defaults to false</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.image", "symbol": "lvgl.image", "summary": "Display an image, centered in the frame `(x, y, w, h)`. Images can be scaled to fit entirely within the frame or to fill it completely.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `file` (string) full path to the image file on the SD card, defaults to an empty string\n * `fill` (boolean) if true the image is scaled to completely fill the frame (may be cropped); if false it is scaled to fit entirely within the frame (may have empty borders), defaults to false"}], "returns": [{"name": "", "type": "table", "description": "LVGL object"}], "notes": ["`w` and `h` are required."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.image([parent, ]params) + + Display an image, centered in the frame `(x, y, w, h)`. Images can be scaled to fit entirely within the frame or to fill it completely. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `file` (string) full path to the image file on the SD card, defaults to an empty string + * `fill` (boolean) if true the image is scaled to completely fill the frame (may be cropped); if false it is scaled to fit entirely within the frame (may have empty borders), defaults to false + + @retval table LVGL object + + @notice `w` and `h` are required. + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display an image, centered in the frame `(x, y, w, h)`. Images can be scaled to fit entirely within the frame or to fill it completely. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `file` (string) full path to the image file on the SD card, defaults to an empty string * `fill` (boolean) if true the image is scaled to completely fill the frame (may be cropped); if false it is scaled to fit entirely within the frame (may have empty borders), defaults to false | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +#### Notes + +- `w` and `h` are required. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.image([parent, params]) + +Display an image, centered in the frame `(x, y, w, h)`. Images can be scaled to fit entirely within the frame or to fill it completely. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `file` (string) full path to the image file on the SD card, defaults to an empty string + * `fill` (boolean) if true the image is scaled to completely fill the frame (may be cropped); if false it is scaled to fit entirely within the frame (may have empty borders), defaults to false + +@retval (table) LVGL object + +@notice `w` and `h` are required. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-is-app-mode.md b/website/md-docs/api-reference/review-lvgl-is-app-mode.md new file mode 100644 index 000000000..efe65ddf9 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-is-app-mode.md @@ -0,0 +1,91 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.isAppMode + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-is-app-mode.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.isAppMode` +- Doc id: `lvgl.is-app-mode` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:498` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.isAppMode"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>boolean</code></td><td>true if running in App Mode, false otherwise</td><td><select data-field-kind="return" data-field-name="-" data-current-type="boolean"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.isAppMode", "symbol": "lvgl.isAppMode", "summary": "Test if the script is running in App Mode.", "parameters": [], "returns": [{"name": "", "type": "boolean", "description": "true if running in App Mode, false otherwise"}], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.isAppMode() + +Test if the script is running in App Mode. + +@retval boolean true if running in App Mode, false otherwise + +@status current Introduced in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Test if the script is running in App Mode. + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `boolean` | true if running in App Mode, false otherwise | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.isAppMode() + +Test if the script is running in App Mode. + +@retval (boolean) true if running in App Mode, false otherwise + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-is-full-screen.md b/website/md-docs/api-reference/review-lvgl-is-full-screen.md new file mode 100644 index 000000000..82ab96f00 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-is-full-screen.md @@ -0,0 +1,95 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.isFullScreen + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-is-full-screen.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.isFullScreen` +- Doc id: `lvgl.is-full-screen` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:517` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.isFullScreen"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>boolean</code></td><td>true if running in full screen mode, false otherwise</td><td><select data-field-kind="return" data-field-name="-" data-current-type="boolean"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.isFullScreen", "symbol": "lvgl.isFullScreen", "summary": "Test if the script is running in full screen mode.", "parameters": [], "returns": [{"name": "", "type": "boolean", "description": "true if running in full screen mode, false otherwise"}], "notes": ["Always returns true for stand alone tool scripts."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.isFullScreen() + +Test if the script is running in full screen mode. + +@retval boolean true if running in full screen mode, false otherwise + +@notice Always returns true for stand alone tool scripts. + +@status current Introduced in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Test if the script is running in full screen mode. + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `boolean` | true if running in full screen mode, false otherwise | + +#### Notes + +- Always returns true for stand alone tool scripts. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.isFullScreen() + +Test if the script is running in full screen mode. + +@retval (boolean) true if running in full screen mode, false otherwise + +@notice Always returns true for stand alone tool scripts. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-label.md b/website/md-docs/api-reference/review-lvgl-label.md new file mode 100644 index 000000000..8d7afd307 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-label.md @@ -0,0 +1,138 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.label + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-label.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.label` +- Doc id: `lvgl.label` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:621` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.label"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `text` (string or function) text to display, defaults to an empty string + * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE` + * `align` (text alignment value or function) sets the text justification, e.g. `RIGHT`, `VCENTER`; defaults to `LEFT`. `RIGHT`/`CENTER` require `w` to be set. `LEFT`/`RIGHT`/`CENTER` align text horizontally within the label's bounding box `(x,y,w,h)`; `VCENTER`/`VTOP`/`VBOTTOM` align the label's bounding box vertically within the parent object</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.label", "symbol": "lvgl.label", "summary": "Display a text label.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `text` (string or function) text to display, defaults to an empty string\n * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE`\n * `align` (text alignment value or function) sets the text justification, e.g. `RIGHT`, `VCENTER`; defaults to `LEFT`. `RIGHT`/`CENTER` require `w` to be set. `LEFT`/`RIGHT`/`CENTER` align text horizontally within the label's bounding box `(x,y,w,h)`; `VCENTER`/`VTOP`/`VBOTTOM` align the label's bounding box vertically within the parent object"}], "returns": [{"name": "", "type": "table", "description": "LVGL object"}], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.label([parent, ]params) + + Display a text label. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `text` (string or function) text to display, defaults to an empty string + * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE` + * `align` (text alignment value or function) sets the text justification, e.g. `RIGHT`, `VCENTER`; defaults to `LEFT`. `RIGHT`/`CENTER` require `w` to be set. `LEFT`/`RIGHT`/`CENTER` align text horizontally within the label's bounding box `(x,y,w,h)`; `VCENTER`/`VTOP`/`VBOTTOM` align the label's bounding box vertically within the parent object + + @retval table LVGL object + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a text label. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `text` (string or function) text to display, defaults to an empty string * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE` * `align` (text alignment value or function) sets the text justification, e.g. `RIGHT`, `VCENTER`; defaults to `LEFT`. `RIGHT`/`CENTER` require `w` to be set. `LEFT`/`RIGHT`/`CENTER` align text horizontally within the label's bounding box `(x,y,w,h)`; `VCENTER`/`VTOP`/`VBOTTOM` align the label's bounding box vertically within the parent object | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.label([parent, params]) + +Display a text label. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `text` (string or function) text to display, defaults to an empty string + * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE` + * `align` (text alignment value or function) sets the text justification, e.g. `RIGHT`, `VCENTER`; defaults to `LEFT`. `RIGHT`/`CENTER` require `w` to be set. `LEFT`/`RIGHT`/`CENTER` align text horizontally within the label's bounding box `(x,y,w,h)`; `VCENTER`/`VTOP`/`VBOTTOM` align the label's bounding box vertically within the parent object + +@retval (table) LVGL object + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-line.md b/website/md-docs/api-reference/review-lvgl-line.md new file mode 100644 index 000000000..945c4eda7 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-line.md @@ -0,0 +1,143 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.line + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-line.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.line` +- Doc id: `lvgl.line` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:702` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.line"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `rounded` (boolean) if true the line's end caps are rounded, defaults to false + * `thickness` (number) thickness of each line segment, defaults to 1 + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + * `pts` (table or function) table of points, each a `{x, y}` pair; at least two points are required, defaults to nil</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.line", "symbol": "lvgl.line", "summary": "Display one or more connected line segments.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `rounded` (boolean) if true the line's end caps are rounded, defaults to false\n * `thickness` (number) thickness of each line segment, defaults to 1\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n * `pts` (table or function) table of points, each a `{x, y}` pair; at least two points are required, defaults to nil"}], "returns": [{"name": "", "type": "table", "description": "LVGL object"}], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.line([parent, ]params) + + Display one or more connected line segments. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + `x`, `y`, `w`, and `h` are not used. + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `rounded` (boolean) if true the line's end caps are rounded, defaults to false + * `thickness` (number) thickness of each line segment, defaults to 1 + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + * `pts` (table or function) table of points, each a `{x, y}` pair; at least two points are required, defaults to nil + + @retval table LVGL object + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display one or more connected line segments. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `rounded` (boolean) if true the line's end caps are rounded, defaults to false * `thickness` (number) thickness of each line segment, defaults to 1 * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 * `pts` (table or function) table of points, each a `{x, y}` pair; at least two points are required, defaults to nil | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.line([parent, params]) + +Display one or more connected line segments. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `rounded` (boolean) if true the line's end caps are rounded, defaults to false + * `thickness` (number) thickness of each line segment, defaults to 1 + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + * `pts` (table or function) table of points, each a `{x, y}` pair; at least two points are required, defaults to nil + +@retval (table) LVGL object + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-menu.md b/website/md-docs/api-reference/review-lvgl-menu.md new file mode 100644 index 000000000..ad9d112d3 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-menu.md @@ -0,0 +1,119 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.menu + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-menu.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.menu` +- Doc id: `lvgl.menu` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:1320` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.menu"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `title` (string) text displayed in the popup's header, defaults to an empty string + * `values` (table) simple table of option strings shown in the popup, defaults to an empty list + * `get` (function) called when the popup is opened, to get the index of the currently selected option (1..number of values), defaults to nil + * `set` (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.menu", "symbol": "lvgl.menu", "summary": "Open a popup menu with multiple options to choose from, using EdgeTX styling.", "parameters": [{"name": "params", "type": "table", "required": true, "description": "* `title` (string) text displayed in the popup's header, defaults to an empty string\n * `values` (table) simple table of option strings shown in the popup, defaults to an empty list\n * `get` (function) called when the popup is opened, to get the index of the currently selected option (1..number of values), defaults to nil\n * `set` (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil"}], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": ["The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.menu` -- only the settings listed above apply.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`."], "since": "2.11.1"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.menu(params) + + Open a popup menu with multiple options to choose from, using EdgeTX styling. + + @param params (table): + * `title` (string) text displayed in the popup's header, defaults to an empty string + * `values` (table) simple table of option strings shown in the popup, defaults to an empty list + * `get` (function) called when the popup is opened, to get the index of the currently selected option (1..number of values), defaults to nil + * `set` (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil + + @retval none + + @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.menu` -- only the settings listed above apply. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + + @status current Introduced in 2.11.1 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Open a popup menu with multiple options to choose from, using EdgeTX styling. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `params` | yes | `table` | * `title` (string) text displayed in the popup's header, defaults to an empty string * `values` (table) simple table of option strings shown in the popup, defaults to an empty list * `get` (function) called when the popup is opened, to get the index of the currently selected option (1..number of values), defaults to nil * `set` (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +- The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.menu` -- only the settings listed above apply. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.menu([params]) + +Open a popup menu with multiple options to choose from, using EdgeTX styling. + +@param params (table) * `title` (string) text displayed in the popup's header, defaults to an empty string + * `values` (table) simple table of option strings shown in the popup, defaults to an empty list + * `get` (function) called when the popup is opened, to get the index of the currently selected option (1..number of values), defaults to nil + * `set` (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil + +@retval none (TODO) + +@notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.menu` -- only the settings listed above apply. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +@status current Introduced in 2.11.1 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-message.md b/website/md-docs/api-reference/review-lvgl-message.md new file mode 100644 index 000000000..2d3522185 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-message.md @@ -0,0 +1,110 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.message + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-message.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.message` +- Doc id: `lvgl.message` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:1303` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.message"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `title` (string) text displayed in the dialog's header, defaults to an empty string + * `message` (string) text displayed in the dialog's body, defaults to an empty string + * `details` (string) additional text displayed in the dialog's body, defaults to an empty string</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.message", "symbol": "lvgl.message", "summary": "Display a message dialog box.", "parameters": [{"name": "params", "type": "table", "required": true, "description": "* `title` (string) text displayed in the dialog's header, defaults to an empty string\n * `message` (string) text displayed in the dialog's body, defaults to an empty string\n * `details` (string) additional text displayed in the dialog's body, defaults to an empty string"}], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": ["The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.message` -- only the settings listed above apply."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.message(params) + + Display a message dialog box. + + @param params (table): + * `title` (string) text displayed in the dialog's header, defaults to an empty string + * `message` (string) text displayed in the dialog's body, defaults to an empty string + * `details` (string) additional text displayed in the dialog's body, defaults to an empty string + + @retval none + + @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.message` -- only the settings listed above apply. + + @status current Introduced in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a message dialog box. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `params` | yes | `table` | * `title` (string) text displayed in the dialog's header, defaults to an empty string * `message` (string) text displayed in the dialog's body, defaults to an empty string * `details` (string) additional text displayed in the dialog's body, defaults to an empty string | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +- The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.message` -- only the settings listed above apply. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.message([params]) + +Display a message dialog box. + +@param params (table) * `title` (string) text displayed in the dialog's header, defaults to an empty string + * `message` (string) text displayed in the dialog's body, defaults to an empty string + * `details` (string) additional text displayed in the dialog's body, defaults to an empty string + +@retval none (TODO) + +@notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.message` -- only the settings listed above apply. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-momentary-button.md b/website/md-docs/api-reference/review-lvgl-momentary-button.md new file mode 100644 index 000000000..0466eb8bc --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-momentary-button.md @@ -0,0 +1,160 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.momentaryButton + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-momentary-button.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.momentaryButton` +- Doc id: `lvgl.momentary-button` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:860` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.momentaryButton"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `text` (string or function) text displayed in the button, defaults to an empty string + * `press` (function) called immediately when the user first taps the button or presses ENTER, defaults to nil + * `release` (function) called when the user releases ENTER or stops touching the screen, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `color` (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color + * `textColor` (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color + * `cornerRadius` (number) radius for the button's corners, defaults to the EdgeTX button style radius + * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE`</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.momentaryButton", "symbol": "lvgl.momentaryButton", "summary": "Add a momentary text button using the EdgeTX style.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `text` (string or function) text displayed in the button, defaults to an empty string\n * `press` (function) called immediately when the user first taps the button or presses ENTER, defaults to nil\n * `release` (function) called when the user releases ENTER or stops touching the screen, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `color` (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color\n * `textColor` (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color\n * `cornerRadius` (number) radius for the button's corners, defaults to the EdgeTX button style radius\n * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE`"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice Unlike `lvgl.button`, `press` fires immediately on tap/press rather than on release. The button shows the checked state until ENTER is released or the screen is no longer touched."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.momentaryButton([parent, ]params) + + Add a momentary text button using the EdgeTX style. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `text` (string or function) text displayed in the button, defaults to an empty string + * `press` (function) called immediately when the user first taps the button or presses ENTER, defaults to nil + * `release` (function) called when the user releases ENTER or stops touching the screen, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `color` (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color + * `textColor` (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color + * `cornerRadius` (number) radius for the button's corners, defaults to the EdgeTX button style radius + * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE` + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice Unlike `lvgl.button`, `press` fires immediately on tap/press rather than on release. The button shows the checked state until ENTER is released or the screen is no longer touched. + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Add a momentary text button using the EdgeTX style. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `text` (string or function) text displayed in the button, defaults to an empty string * `press` (function) called immediately when the user first taps the button or presses ENTER, defaults to nil * `release` (function) called when the user releases ENTER or stops touching the screen, defaults to nil * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * `color` (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color * `textColor` (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color * `cornerRadius` (number) radius for the button's corners, defaults to the EdgeTX button style radius * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE` | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice Unlike `lvgl.button`, `press` fires immediately on tap/press rather than on release. The button shows the checked state until ENTER is released or the screen is no longer touched. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.momentaryButton([parent, params]) + +Add a momentary text button using the EdgeTX style. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `text` (string or function) text displayed in the button, defaults to an empty string + * `press` (function) called immediately when the user first taps the button or presses ENTER, defaults to nil + * `release` (function) called when the user releases ENTER or stops touching the screen, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `color` (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color + * `textColor` (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color + * `cornerRadius` (number) radius for the button's corners, defaults to the EdgeTX button style radius + * `font` (font value or function) sets the font size, e.g. `MIDSIZE`, `DBLSIZE`; defaults to `STDSIZE` + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice Unlike `lvgl.button`, `press` fires immediately on tap/press rather than on release. The button shows the checked state until ENTER is released or the screen is no longer touched. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-number-edit.md b/website/md-docs/api-reference/review-lvgl-number-edit.md new file mode 100644 index 000000000..33a922e33 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-number-edit.md @@ -0,0 +1,157 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.numberEdit + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-number-edit.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.numberEdit` +- Doc id: `lvgl.number-edit` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:927` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.numberEdit"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called to get the current value to display, defaults to nil + * `set` (function) called for every change to the number while editing; passed the new value, defaults to nil + * `edited` (function) called after the user finishes editing; passed the final value (added in 2.11.5), defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `min` (number) minimum allowed value, defaults to -1024 + * `max` (number) maximum allowed value, defaults to 1024 + * `display` (function) overrides how the value is displayed; passed the current value, must return a string, defaults to nil</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.numberEdit", "symbol": "lvgl.numberEdit", "summary": "Add a number edit box using the EdgeTX style.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called to get the current value to display, defaults to nil\n * `set` (function) called for every change to the number while editing; passed the new value, defaults to nil\n * `edited` (function) called after the user finishes editing; passed the final value (added in 2.11.5), defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `min` (number) minimum allowed value, defaults to -1024\n * `max` (number) maximum allowed value, defaults to 1024\n * `display` (function) overrides how the value is displayed; passed the current value, must return a string, defaults to nil"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice Use `set` to react to every change during editing, or `edited` to only react to the final value once editing is complete."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.numberEdit([parent, ]params) + + Add a number edit box using the EdgeTX style. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called to get the current value to display, defaults to nil + * `set` (function) called for every change to the number while editing; passed the new value, defaults to nil + * `edited` (function) called after the user finishes editing; passed the final value (added in 2.11.5), defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `min` (number) minimum allowed value, defaults to -1024 + * `max` (number) maximum allowed value, defaults to 1024 + * `display` (function) overrides how the value is displayed; passed the current value, must return a string, defaults to nil + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice Use `set` to react to every change during editing, or `edited` to only react to the final value once editing is complete. + + @status current Introduced in 2.11.0, edited added in 2.11.5, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Add a number edit box using the EdgeTX style. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `get` (function) called to get the current value to display, defaults to nil * `set` (function) called for every change to the number while editing; passed the new value, defaults to nil * `edited` (function) called after the user finishes editing; passed the final value (added in 2.11.5), defaults to nil * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * `min` (number) minimum allowed value, defaults to -1024 * `max` (number) maximum allowed value, defaults to 1024 * `display` (function) overrides how the value is displayed; passed the current value, must return a string, defaults to nil | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice Use `set` to react to every change during editing, or `edited` to only react to the final value once editing is complete. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.numberEdit([parent, params]) + +Add a number edit box using the EdgeTX style. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called to get the current value to display, defaults to nil + * `set` (function) called for every change to the number while editing; passed the new value, defaults to nil + * `edited` (function) called after the user finishes editing; passed the final value (added in 2.11.5), defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `min` (number) minimum allowed value, defaults to -1024 + * `max` (number) maximum allowed value, defaults to 1024 + * `display` (function) overrides how the value is displayed; passed the current value, must return a string, defaults to nil + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice Use `set` to react to every change during editing, or `edited` to only react to the final value once editing is complete. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-page.md b/website/md-docs/api-reference/review-lvgl-page.md new file mode 100644 index 000000000..517b80de0 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-page.md @@ -0,0 +1,160 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.page + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-page.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.page` +- Doc id: `lvgl.page` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:1231` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.page"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `title` (string or function) title text in the header; function support added in 2.11.4, defaults to an empty string + * `subtitle` (string or function) sub-title text in the header; function support added in 2.11.4, defaults to an empty string + * `icon` (string) full path to a 30x30 grey-scale mask image for the back button icon (white = transparent, black = opaque); defaults to the EdgeTX logo icon + * `back` (function) called when RTN is pressed, or when the back button is tapped -- the top-left header button if `backButton` is not set, otherwise a second button on the top-right, defaults to nil + * `menu` (function) called when the top-left header button is tapped, but only if `backButton` is set to true -- in that case `back` moves to a second button on the top-right, defaults to nil + * `prevButton` (table) adds a prev navigation button; table has a `press` function and optional `active` function (added in 2.11.4), defaults to nil + * `nextButton` (table) adds a next navigation button; table has a `press` function and optional `active` function (added in 2.11.4), defaults to nil + * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this page, not used by default + * `flexPad` (number) padding between rows/columns when flex layout is used, defaults to `PAD_OUTLINE` + * `scrollBar` (boolean) enables/disables scroll bars, defaults to true + * `scrollDir` (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the page bounds (stand alone scripts only), defaults to `lvgl.SCROLL_ALL` + * `scrolled` (function) called when the page content is scrolled; passed `x`, `y` of the current scroll position, defaults to nil + * `scrollTo` (function) overrides the page scroll position; must return `x`, `y` to scroll to, defaults to nil + * `align` (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4), defaults to `CENTER | VTOP` + * `backButton` (boolean) if true, adds a second header button on the top-right calling `back`, and repurposes the top-left button to call `menu` instead (added in 2.11.4), defaults to false + * `borderPad` (number or table) border padding around the container edges; a single number applies to all sides, or a table `{left=?, right=?, top=?, bottom=?}` (added in 2.11.5), defaults to `PAD_OUTLINE` if `flexFlow` is set, otherwise 0</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.page", "symbol": "lvgl.page", "summary": "Create a page layout for a One-Time script using EdgeTX styling: a header with title/sub-title lines and a back button in the top-left corner. Should be created as the top-level LVGL object, with all other objects added as its children.", "parameters": [{"name": "params", "type": "table", "required": true, "description": "* `title` (string or function) title text in the header; function support added in 2.11.4, defaults to an empty string\n * `subtitle` (string or function) sub-title text in the header; function support added in 2.11.4, defaults to an empty string\n * `icon` (string) full path to a 30x30 grey-scale mask image for the back button icon (white = transparent, black = opaque); defaults to the EdgeTX logo icon\n * `back` (function) called when RTN is pressed, or when the back button is tapped -- the top-left header button if `backButton` is not set, otherwise a second button on the top-right, defaults to nil\n * `menu` (function) called when the top-left header button is tapped, but only if `backButton` is set to true -- in that case `back` moves to a second button on the top-right, defaults to nil\n * `prevButton` (table) adds a prev navigation button; table has a `press` function and optional `active` function (added in 2.11.4), defaults to nil\n * `nextButton` (table) adds a next navigation button; table has a `press` function and optional `active` function (added in 2.11.4), defaults to nil\n * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this page, not used by default\n * `flexPad` (number) padding between rows/columns when flex layout is used, defaults to `PAD_OUTLINE`\n * `scrollBar` (boolean) enables/disables scroll bars, defaults to true\n * `scrollDir` (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the page bounds (stand alone scripts only), defaults to `lvgl.SCROLL_ALL`\n * `scrolled` (function) called when the page content is scrolled; passed `x`, `y` of the current scroll position, defaults to nil\n * `scrollTo` (function) overrides the page scroll position; must return `x`, `y` to scroll to, defaults to nil\n * `align` (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4), defaults to `CENTER | VTOP`\n * `backButton` (boolean) if true, adds a second header button on the top-right calling `back`, and repurposes the top-left button to call `menu` instead (added in 2.11.4), defaults to false\n * `borderPad` (number or table) border padding around the container edges; a single number applies to all sides, or a table `{left=?, right=?, top=?, bottom=?}` (added in 2.11.5), defaults to `PAD_OUTLINE` if `flexFlow` is set, otherwise 0"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.page` -- only the settings listed above apply.\n @notice The page automatically adds scroll bars if child objects fall outside its boundaries.\n @notice `scrollBar`, `scrollDir`, `scrolled`, and `scrollTo` were added in 2.11.2.\n @notice The PAGE keys are not automatically mapped to `prevButton`/`nextButton` -- the script's `run` function must detect and handle them itself."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.page(params) + + Create a page layout for a One-Time script using EdgeTX styling: a header with title/sub-title lines and a back button in the top-left corner. Should be created as the top-level LVGL object, with all other objects added as its children. + + @param params (table): + * `title` (string or function) title text in the header; function support added in 2.11.4, defaults to an empty string + * `subtitle` (string or function) sub-title text in the header; function support added in 2.11.4, defaults to an empty string + * `icon` (string) full path to a 30x30 grey-scale mask image for the back button icon (white = transparent, black = opaque); defaults to the EdgeTX logo icon + * `back` (function) called when RTN is pressed, or when the back button is tapped -- the top-left header button if `backButton` is not set, otherwise a second button on the top-right, defaults to nil + * `menu` (function) called when the top-left header button is tapped, but only if `backButton` is set to true -- in that case `back` moves to a second button on the top-right, defaults to nil + * `prevButton` (table) adds a prev navigation button; table has a `press` function and optional `active` function (added in 2.11.4), defaults to nil + * `nextButton` (table) adds a next navigation button; table has a `press` function and optional `active` function (added in 2.11.4), defaults to nil + * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this page, not used by default + * `flexPad` (number) padding between rows/columns when flex layout is used, defaults to `PAD_OUTLINE` + * `scrollBar` (boolean) enables/disables scroll bars, defaults to true + * `scrollDir` (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the page bounds (stand alone scripts only), defaults to `lvgl.SCROLL_ALL` + * `scrolled` (function) called when the page content is scrolled; passed `x`, `y` of the current scroll position, defaults to nil + * `scrollTo` (function) overrides the page scroll position; must return `x`, `y` to scroll to, defaults to nil + * `align` (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4), defaults to `CENTER | VTOP` + * `backButton` (boolean) if true, adds a second header button on the top-right calling `back`, and repurposes the top-left button to call `menu` instead (added in 2.11.4), defaults to false + * `borderPad` (number or table) border padding around the container edges; a single number applies to all sides, or a table `{left=?, right=?, top=?, bottom=?}` (added in 2.11.5), defaults to `PAD_OUTLINE` if `flexFlow` is set, otherwise 0 + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.page` -- only the settings listed above apply. + @notice The page automatically adds scroll bars if child objects fall outside its boundaries. + @notice `scrollBar`, `scrollDir`, `scrolled`, and `scrollTo` were added in 2.11.2. + @notice The PAGE keys are not automatically mapped to `prevButton`/`nextButton` -- the script's `run` function must detect and handle them itself. + + @status current Introduced in 2.11.0, title/subtitle function support, menu, prevButton, nextButton, align, and backButton added in 2.11.4, borderPad added in 2.11.5, scrollBar/scrollDir/scrolled/scrollTo added in 2.11.2 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Create a page layout for a One-Time script using EdgeTX styling: a header with title/sub-title lines and a back button in the top-left corner. Should be created as the top-level LVGL object, with all other objects added as its children. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `params` | yes | `table` | * `title` (string or function) title text in the header; function support added in 2.11.4, defaults to an empty string * `subtitle` (string or function) sub-title text in the header; function support added in 2.11.4, defaults to an empty string * `icon` (string) full path to a 30x30 grey-scale mask image for the back button icon (white = transparent, black = opaque); defaults to the EdgeTX logo icon * `back` (function) called when RTN is pressed, or when the back button is tapped -- the top-left header button if `backButton` is not set, otherwise a second button on the top-right, defaults to nil * `menu` (function) called when the top-left header button is tapped, but only if `backButton` is set to true -- in that case `back` moves to a second button on the top-right, defaults to nil * `prevButton` (table) adds a prev navigation button; table has a `press` function and optional `active` function (added in 2.11.4), defaults to nil * `nextButton` (table) adds a next navigation button; table has a `press` function and optional `active` function (added in 2.11.4), defaults to nil * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this page, not used by default * `flexPad` (number) padding between rows/columns when flex layout is used, defaults to `PAD_OUTLINE` * `scrollBar` (boolean) enables/disables scroll bars, defaults to true * `scrollDir` (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the page bounds (stand alone scripts only), defaults to `lvgl.SCROLL_ALL` * `scrolled` (function) called when the page content is scrolled; passed `x`, `y` of the current scroll position, defaults to nil * `scrollTo` (function) overrides the page scroll position; must return `x`, `y` to scroll to, defaults to nil * `align` (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4), defaults to `CENTER | VTOP` * `backButton` (boolean) if true, adds a second header button on the top-right calling `back`, and repurposes the top-left button to call `menu` instead (added in 2.11.4), defaults to false * `borderPad` (number or table) border padding around the container edges; a single number applies to all sides, or a table `{left=?, right=?, top=?, bottom=?}` (added in 2.11.5), defaults to `PAD_OUTLINE` if `flexFlow` is set, otherwise 0 | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.page` -- only the settings listed above apply. + @notice The page automatically adds scroll bars if child objects fall outside its boundaries. + @notice `scrollBar`, `scrollDir`, `scrolled`, and `scrollTo` were added in 2.11.2. + @notice The PAGE keys are not automatically mapped to `prevButton`/`nextButton` -- the script's `run` function must detect and handle them itself. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.page([params]) + +Create a page layout for a One-Time script using EdgeTX styling: a header with title/sub-title lines and a back button in the top-left corner. Should be created as the top-level LVGL object, with all other objects added as its children. + +@param params (table) * `title` (string or function) title text in the header; function support added in 2.11.4, defaults to an empty string + * `subtitle` (string or function) sub-title text in the header; function support added in 2.11.4, defaults to an empty string + * `icon` (string) full path to a 30x30 grey-scale mask image for the back button icon (white = transparent, black = opaque); defaults to the EdgeTX logo icon + * `back` (function) called when RTN is pressed, or when the back button is tapped -- the top-left header button if `backButton` is not set, otherwise a second button on the top-right, defaults to nil + * `menu` (function) called when the top-left header button is tapped, but only if `backButton` is set to true -- in that case `back` moves to a second button on the top-right, defaults to nil + * `prevButton` (table) adds a prev navigation button; table has a `press` function and optional `active` function (added in 2.11.4), defaults to nil + * `nextButton` (table) adds a next navigation button; table has a `press` function and optional `active` function (added in 2.11.4), defaults to nil + * `flexFlow` (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this page, not used by default + * `flexPad` (number) padding between rows/columns when flex layout is used, defaults to `PAD_OUTLINE` + * `scrollBar` (boolean) enables/disables scroll bars, defaults to true + * `scrollDir` (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the page bounds (stand alone scripts only), defaults to `lvgl.SCROLL_ALL` + * `scrolled` (function) called when the page content is scrolled; passed `x`, `y` of the current scroll position, defaults to nil + * `scrollTo` (function) overrides the page scroll position; must return `x`, `y` to scroll to, defaults to nil + * `align` (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4), defaults to `CENTER | VTOP` + * `backButton` (boolean) if true, adds a second header button on the top-right calling `back`, and repurposes the top-left button to call `menu` instead (added in 2.11.4), defaults to false + * `borderPad` (number or table) border padding around the container edges; a single number applies to all sides, or a table `{left=?, right=?, top=?, bottom=?}` (added in 2.11.5), defaults to `PAD_OUTLINE` if `flexFlow` is set, otherwise 0 + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The common object settings (x, y, w, h, color, etc.) are not used by `lvgl.page` -- only the settings listed above apply. + @notice The page automatically adds scroll bars if child objects fall outside its boundaries. + @notice `scrollBar`, `scrollDir`, `scrolled`, and `scrollTo` were added in 2.11.2. + @notice The PAGE keys are not automatically mapped to `prevButton`/`nextButton` -- the script's `run` function must detect and handle them itself. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-qrcode.md b/website/md-docs/api-reference/review-lvgl-qrcode.md new file mode 100644 index 000000000..a40643ae1 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-qrcode.md @@ -0,0 +1,137 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.qrcode + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-qrcode.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.qrcode` +- Doc id: `lvgl.qrcode` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:814` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.qrcode"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `data` (string) URL or other content to encode, defaults to an empty string + * `bgColor` (color) background color for the QR code image, defaults to `COLOR_THEME_SECONDARY3`</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.qrcode", "symbol": "lvgl.qrcode", "summary": "Display a QR code.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `data` (string) URL or other content to encode, defaults to an empty string\n * `bgColor` (color) background color for the QR code image, defaults to `COLOR_THEME_SECONDARY3`"}], "returns": [{"name": "", "type": "table", "description": "LVGL object"}], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.qrcode([parent, ]params) + + Display a QR code. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + `w` and `h` should be set to the same value for a QR code. + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `data` (string) URL or other content to encode, defaults to an empty string + * `bgColor` (color) background color for the QR code image, defaults to `COLOR_THEME_SECONDARY3` + + @retval table LVGL object + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a QR code. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `data` (string) URL or other content to encode, defaults to an empty string * `bgColor` (color) background color for the QR code image, defaults to `COLOR_THEME_SECONDARY3` | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.qrcode([parent, params]) + +Display a QR code. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `data` (string) URL or other content to encode, defaults to an empty string + * `bgColor` (color) background color for the QR code image, defaults to `COLOR_THEME_SECONDARY3` + +@retval (table) LVGL object + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-rectangle.md b/website/md-docs/api-reference/review-lvgl-rectangle.md new file mode 100644 index 000000000..205557609 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-rectangle.md @@ -0,0 +1,145 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.rectangle + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-rectangle.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.rectangle` +- Doc id: `lvgl.rectangle` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:639` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.rectangle"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `thickness` (number) width of the border line, defaults to 1 + * `filled` (boolean or function) if true the rectangle is filled with `color`, defaults to false (function support added in 2.11.4) + * `rounded` (number) if greater than 0, rounds the corners with this radius; must be >= `thickness` if set, defaults to 0 + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.rectangle", "symbol": "lvgl.rectangle", "summary": "Display a rectangle. Based on `lvgl.box`, so all `lvgl.box` settings also apply.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `thickness` (number) width of the border line, defaults to 1\n * `filled` (boolean or function) if true the rectangle is filled with `color`, defaults to false (function support added in 2.11.4)\n * `rounded` (number) if greater than 0, rounds the corners with this radius; must be >= `thickness` if set, defaults to 0\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255"}], "returns": [{"name": "", "type": "table", "description": "LVGL object"}], "notes": ["When used in a stand alone tool script, the rectangle automatically adds scroll bars if any child objects are placed outside its boundaries. For widgets, child objects outside the bounds are clipped instead."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.rectangle([parent, ]params) + + Display a rectangle. Based on `lvgl.box`, so all `lvgl.box` settings also apply. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `thickness` (number) width of the border line, defaults to 1 + * `filled` (boolean or function) if true the rectangle is filled with `color`, defaults to false (function support added in 2.11.4) + * `rounded` (number) if greater than 0, rounds the corners with this radius; must be >= `thickness` if set, defaults to 0 + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + + @retval table LVGL object + + @notice When used in a stand alone tool script, the rectangle automatically adds scroll bars if any child objects are placed outside its boundaries. For widgets, child objects outside the bounds are clipped instead. + + @status current Introduced in 2.11.0, filled function support added in 2.11.4, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a rectangle. Based on `lvgl.box`, so all `lvgl.box` settings also apply. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `thickness` (number) width of the border line, defaults to 1 * `filled` (boolean or function) if true the rectangle is filled with `color`, defaults to false (function support added in 2.11.4) * `rounded` (number) if greater than 0, rounds the corners with this radius; must be >= `thickness` if set, defaults to 0 * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +#### Notes + +- When used in a stand alone tool script, the rectangle automatically adds scroll bars if any child objects are placed outside its boundaries. For widgets, child objects outside the bounds are clipped instead. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.rectangle([parent, params]) + +Display a rectangle. Based on `lvgl.box`, so all `lvgl.box` settings also apply. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `thickness` (number) width of the border line, defaults to 1 + * `filled` (boolean or function) if true the rectangle is filled with `color`, defaults to false (function support added in 2.11.4) + * `rounded` (number) if greater than 0, rounds the corners with this radius; must be >= `thickness` if set, defaults to 0 + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + +@retval (table) LVGL object + +@notice When used in a stand alone tool script, the rectangle automatically adds scroll bars if any child objects are placed outside its boundaries. For widgets, child objects outside the bounds are clipped instead. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-set.md b/website/md-docs/api-reference/review-lvgl-set.md new file mode 100644 index 000000000..32ce73884 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-set.md @@ -0,0 +1,105 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.set + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-set.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.set` +- Doc id: `lvgl.set` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:116` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.set"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>LVGL object to update; unlike the constructor functions, this parameter is required, not optional</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>settings to update; use the same keys documented for the object's constructor function</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.set", "symbol": "lvgl.set", "summary": "Update the settings of an existing LVGL object. Can also be used to change settings that have no dedicated update function (e.g. rectangle thickness). Can also be called as `parent:set(params)`.", "parameters": [{"name": "parent", "type": "object", "required": true, "description": "LVGL object to update; unlike the constructor functions, this parameter is required, not optional"}, {"name": "params", "type": "table", "required": true, "description": "settings to update; use the same keys documented for the object's constructor function"}], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.set(parent, params) + +Update the settings of an existing LVGL object. Can also be used to change settings that have no dedicated update function (e.g. rectangle thickness). Can also be called as `parent:set(params)`. + +@param parent (object) LVGL object to update; unlike the constructor functions, this parameter is required, not optional + +@param params (table) settings to update; use the same keys documented for the object's constructor function + +@retval none + +@status current Introduced in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Update the settings of an existing LVGL object. Can also be used to change settings that have no dedicated update function (e.g. rectangle thickness). Can also be called as `parent:set(params)`. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | yes | `object` | LVGL object to update; unlike the constructor functions, this parameter is required, not optional | +| `params` | yes | `table` | settings to update; use the same keys documented for the object's constructor function | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.set([parent, params]) + +Update the settings of an existing LVGL object. Can also be used to change settings that have no dedicated update function (e.g. rectangle thickness). Can also be called as `parent:set(params)`. + +@param parent (object) LVGL object to update; unlike the constructor functions, this parameter is required, not optional + +@param params (table) settings to update; use the same keys documented for the object's constructor function + +@retval none (TODO) + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-setting.md b/website/md-docs/api-reference/review-lvgl-setting.md new file mode 100644 index 000000000..dca732865 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-setting.md @@ -0,0 +1,136 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.setting + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-setting.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.setting` +- Doc id: `lvgl.setting` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:1213` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.setting"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `title` (string or function) text displayed on the left; function support added in 2.11.6, defaults to an empty string</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.setting", "symbol": "lvgl.setting", "summary": "Create a container for a single row of a settings page, automatically padded for controls such as toggle/textEdit/button.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `title` (string or function) text displayed on the left; function support added in 2.11.6, defaults to an empty string"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.setting([parent, ]params) + + Create a container for a single row of a settings page, automatically padded for controls such as toggle/textEdit/button. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `title` (string or function) text displayed on the left; function support added in 2.11.6, defaults to an empty string + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + + @status current Introduced in 2.11.0, title function support added in 2.11.6, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Create a container for a single row of a settings page, automatically padded for controls such as toggle/textEdit/button. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `title` (string or function) text displayed on the left; function support added in 2.11.6, defaults to an empty string | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.setting([parent, params]) + +Create a container for a single row of a settings page, automatically padded for controls such as toggle/textEdit/button. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `title` (string or function) text displayed on the left; function support added in 2.11.6, defaults to an empty string + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-show.md b/website/md-docs/api-reference/review-lvgl-show.md new file mode 100644 index 000000000..90fc109d3 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-show.md @@ -0,0 +1,103 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.show + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-show.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.show` +- Doc id: `lvgl.show` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:168` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.show"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>LVGL object to show</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.show", "symbol": "lvgl.show", "summary": "Show an LVGL object.", "parameters": [{"name": "parent", "type": "object", "required": true, "description": "LVGL object to show"}], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": ["The `visible` setting function can also be used to dynamically show and hide objects."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.show(parent) + +Show an LVGL object. + +@param parent (object) LVGL object to show + +@retval none + +@notice The `visible` setting function can also be used to dynamically show and hide objects. + +@status current Introduced in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Show an LVGL object. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | yes | `object` | LVGL object to show | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +- The `visible` setting function can also be used to dynamically show and hide objects. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.show([parent]) + +Show an LVGL object. + +@param parent (object) LVGL object to show + +@retval none (TODO) + +@notice The `visible` setting function can also be used to dynamically show and hide objects. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-slider.md b/website/md-docs/api-reference/review-lvgl-slider.md new file mode 100644 index 000000000..c05dc2f12 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-slider.md @@ -0,0 +1,150 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.slider + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-slider.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.slider` +- Doc id: `lvgl.slider` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:978` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.slider"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `min` (number) minimum value at the left end of the range, defaults to 0 + * `max` (number) maximum value at the right end of the range, defaults to 100 + * `get` (function) called to get the current knob value; should return a value between `min` and `max` inclusive, defaults to nil + * `set` (function) called when the user moves the knob; passed the new value, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.slider", "symbol": "lvgl.slider", "summary": "Add a horizontal slider using the EdgeTX style.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `min` (number) minimum value at the left end of the range, defaults to 0\n * `max` (number) maximum value at the right end of the range, defaults to 100\n * `get` (function) called to get the current knob value; should return a value between `min` and `max` inclusive, defaults to nil\n * `set` (function) called when the user moves the knob; passed the new value, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.slider([parent, ]params) + + Add a horizontal slider using the EdgeTX style. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + `w` sets the size of the slider; `h` is not used. + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `min` (number) minimum value at the left end of the range, defaults to 0 + * `max` (number) maximum value at the right end of the range, defaults to 100 + * `get` (function) called to get the current knob value; should return a value between `min` and `max` inclusive, defaults to nil + * `set` (function) called when the user moves the knob; passed the new value, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Add a horizontal slider using the EdgeTX style. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `min` (number) minimum value at the left end of the range, defaults to 0 * `max` (number) maximum value at the right end of the range, defaults to 100 * `get` (function) called to get the current knob value; should return a value between `min` and `max` inclusive, defaults to nil * `set` (function) called when the user moves the knob; passed the new value, defaults to nil * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.slider([parent, params]) + +Add a horizontal slider using the EdgeTX style. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `min` (number) minimum value at the left end of the range, defaults to 0 + * `max` (number) maximum value at the right end of the range, defaults to 100 + * `get` (function) called to get the current knob value; should return a value between `min` and `max` inclusive, defaults to nil + * `set` (function) called when the user moves the knob; passed the new value, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-source.md b/website/md-docs/api-reference/review-lvgl-source.md new file mode 100644 index 000000000..d38a14c8d --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-source.md @@ -0,0 +1,148 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.source + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-source.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.source` +- Doc id: `lvgl.source` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:1135` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.source"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected source, defaults to nil + * `set` (function) called when the user picks a source; passed the selected source value, defaults to nil + * `filter` (number) controls which source types the user can pick; combine `lvgl.SRC_xxx` constants to build a custom filter, defaults to `lvgl.SRC_ALL`</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.source", "symbol": "lvgl.source", "summary": "Display a button showing a source name. Tapping it opens the source-select popup, using EdgeTX styling.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected source, defaults to nil\n * `set` (function) called when the user picks a source; passed the selected source value, defaults to nil\n * `filter` (number) controls which source types the user can pick; combine `lvgl.SRC_xxx` constants to build a custom filter, defaults to `lvgl.SRC_ALL`"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.source([parent, ]params) + + Display a button showing a source name. Tapping it opens the source-select popup, using EdgeTX styling. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected source, defaults to nil + * `set` (function) called when the user picks a source; passed the selected source value, defaults to nil + * `filter` (number) controls which source types the user can pick; combine `lvgl.SRC_xxx` constants to build a custom filter, defaults to `lvgl.SRC_ALL` + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a button showing a source name. Tapping it opens the source-select popup, using EdgeTX styling. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected source, defaults to nil * `set` (function) called when the user picks a source; passed the selected source value, defaults to nil * `filter` (number) controls which source types the user can pick; combine `lvgl.SRC_xxx` constants to build a custom filter, defaults to `lvgl.SRC_ALL` | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.source([parent, params]) + +Display a button showing a source name. Tapping it opens the source-select popup, using EdgeTX styling. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected source, defaults to nil + * `set` (function) called when the user picks a source; passed the selected source value, defaults to nil + * `filter` (number) controls which source types the user can pick; combine `lvgl.SRC_xxx` constants to build a custom filter, defaults to `lvgl.SRC_ALL` + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-switch.md b/website/md-docs/api-reference/review-lvgl-switch.md new file mode 100644 index 000000000..fba82d1a5 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-switch.md @@ -0,0 +1,151 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.switch + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-switch.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.switch` +- Doc id: `lvgl.switch` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:1112` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.switch"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected switch, defaults to nil + * `set` (function) called when the user picks a switch; passed the selected switch value, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `filter` (number) controls which switch types the user can pick; combine `lvgl.SW_xxx` constants to build a custom filter, defaults to `lvgl.SW_ALL`</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.switch", "symbol": "lvgl.switch", "summary": "Display a button showing a switch name. Tapping it opens the switch-select popup, using EdgeTX styling.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected switch, defaults to nil\n * `set` (function) called when the user picks a switch; passed the selected switch value, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil\n * `filter` (number) controls which switch types the user can pick; combine `lvgl.SW_xxx` constants to build a custom filter, defaults to `lvgl.SW_ALL`"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.switch([parent, ]params) + + Display a button showing a switch name. Tapping it opens the switch-select popup, using EdgeTX styling. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected switch, defaults to nil + * `set` (function) called when the user picks a switch; passed the selected switch value, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `filter` (number) controls which switch types the user can pick; combine `lvgl.SW_xxx` constants to build a custom filter, defaults to `lvgl.SW_ALL` + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a button showing a switch name. Tapping it opens the switch-select popup, using EdgeTX styling. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected switch, defaults to nil * `set` (function) called when the user picks a switch; passed the selected switch value, defaults to nil * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * `filter` (number) controls which switch types the user can pick; combine `lvgl.SW_xxx` constants to build a custom filter, defaults to `lvgl.SW_ALL` | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.switch([parent, params]) + +Display a button showing a switch name. Tapping it opens the switch-select popup, using EdgeTX styling. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected switch, defaults to nil + * `set` (function) called when the user picks a switch; passed the selected switch value, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + * `filter` (number) controls which switch types the user can pick; combine `lvgl.SW_xxx` constants to build a custom filter, defaults to `lvgl.SW_ALL` + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-text-edit.md b/website/md-docs/api-reference/review-lvgl-text-edit.md new file mode 100644 index 000000000..df8cf8041 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-text-edit.md @@ -0,0 +1,145 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.textEdit + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-text-edit.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.textEdit` +- Doc id: `lvgl.text-edit` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:906` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.textEdit"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `value` (string or function) text to edit; if a function, the text can be changed by both script and user, defaults to an empty string + * `length` (number) maximum editable text length, 1 to 128, defaults to 32 + * `set` (function) called when the user edits the text; passed the new string content, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.textEdit", "symbol": "lvgl.textEdit", "summary": "Add a text edit box using the EdgeTX style.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `value` (string or function) text to edit; if a function, the text can be changed by both script and user, defaults to an empty string\n * `length` (number) maximum editable text length, 1 to 128, defaults to 32\n * `set` (function) called when the user edits the text; passed the new string content, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.textEdit([parent, ]params) + + Add a text edit box using the EdgeTX style. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `value` (string or function) text to edit; if a function, the text can be changed by both script and user, defaults to an empty string + * `length` (number) maximum editable text length, 1 to 128, defaults to 32 + * `set` (function) called when the user edits the text; passed the new string content, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Add a text edit box using the EdgeTX style. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `value` (string or function) text to edit; if a function, the text can be changed by both script and user, defaults to an empty string * `length` (number) maximum editable text length, 1 to 128, defaults to 32 * `set` (function) called when the user edits the text; passed the new string content, defaults to nil * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.textEdit([parent, params]) + +Add a text edit box using the EdgeTX style. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `value` (string or function) text to edit; if a function, the text can be changed by both script and user, defaults to an empty string + * `length` (number) maximum editable text length, 1 to 128, defaults to 32 + * `set` (function) called when the user edits the text; passed the new string content, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-timer.md b/website/md-docs/api-reference/review-lvgl-timer.md new file mode 100644 index 000000000..af7ad079a --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-timer.md @@ -0,0 +1,148 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.timer + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-timer.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.timer` +- Doc id: `lvgl.timer` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:1090` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.timer"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected timer, defaults to nil + * `set` (function) called when the user taps a timer in the popup; passed the selected timer value, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.timer", "symbol": "lvgl.timer", "summary": "Display a button showing a timer name. Tapping it opens a popup menu to choose a timer from, using EdgeTX styling.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected timer, defaults to nil\n * `set` (function) called when the user taps a timer in the popup; passed the selected timer value, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise.\n @notice The popup closes and `set` is called when the user selects an item.\n @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.timer([parent, ]params) + + Display a button showing a timer name. Tapping it opens a popup menu to choose a timer from, using EdgeTX styling. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected timer, defaults to nil + * `set` (function) called when the user taps a timer in the popup; passed the selected timer value, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a button showing a timer name. Tapping it opens a popup menu to choose a timer from, using EdgeTX styling. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected timer, defaults to nil * `set` (function) called when the user taps a timer in the popup; passed the selected timer value, defaults to nil * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.timer([parent, params]) + +Display a button showing a timer name. Tapping it opens a popup menu to choose a timer from, using EdgeTX styling. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected timer, defaults to nil + * `set` (function) called when the user taps a timer in the popup; passed the selected timer value, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + @notice The popup closes and `set` is called when the user selects an item. + @notice If the user taps outside the popup or presses RTN, the popup closes without calling `set`. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-toggle.md b/website/md-docs/api-reference/review-lvgl-toggle.md new file mode 100644 index 000000000..0beb4ffd2 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-toggle.md @@ -0,0 +1,142 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.toggle + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-toggle.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.toggle` +- Doc id: `lvgl.toggle` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:886` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.toggle"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called to get the current state; must return a boolean or number (0/false = off, 1/true = on), defaults to nil + * `set` (function) called when the user interacts with the switch; passed a single number, 0 = off, 1 = on, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.toggle", "symbol": "lvgl.toggle", "summary": "Add a toggle switch using the EdgeTX style.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `get` (function) called to get the current state; must return a boolean or number (0/false = off, 1/true = on), defaults to nil\n * `set` (function) called when the user interacts with the switch; passed a single number, 0 = off, 1 = on, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.toggle([parent, ]params) + + Add a toggle switch using the EdgeTX style. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called to get the current state; must return a boolean or number (0/false = off, 1/true = on), defaults to nil + * `set` (function) called when the user interacts with the switch; passed a single number, 0 = off, 1 = on, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Add a toggle switch using the EdgeTX style. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `get` (function) called to get the current state; must return a boolean or number (0/false = off, 1/true = on), defaults to nil * `set` (function) called when the user interacts with the switch; passed a single number, 0 = off, 1 = on, defaults to nil * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.toggle([parent, params]) + +Add a toggle switch using the EdgeTX style. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `get` (function) called to get the current state; must return a boolean or number (0/false = off, 1/true = on), defaults to nil + * `set` (function) called when the user interacts with the switch; passed a single number, 0 = off, 1 = on, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-triangle.md b/website/md-docs/api-reference/review-lvgl-triangle.md new file mode 100644 index 000000000..92d5ba521 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-triangle.md @@ -0,0 +1,141 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.triangle + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-triangle.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.triangle` +- Doc id: `lvgl.triangle` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:723` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.triangle"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + * `pts` (table or function) table of exactly three points, each a `{x, y}` pair, defaults to nil</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.triangle", "symbol": "lvgl.triangle", "summary": "Display a filled triangle.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n * `pts` (table or function) table of exactly three points, each a `{x, y}` pair, defaults to nil"}], "returns": [{"name": "", "type": "table", "description": "LVGL object"}], "notes": ["Unlike the line-drawing objects, LVGL has no built-in triangle primitive. The drawing method used is simple and does not anti-alias."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.triangle([parent, ]params) + + Display a filled triangle. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + `x`, `y`, `w`, and `h` are not used. + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + * `pts` (table or function) table of exactly three points, each a `{x, y}` pair, defaults to nil + + @retval table LVGL object + + @notice Unlike the line-drawing objects, LVGL has no built-in triangle primitive. The drawing method used is simple and does not anti-alias. + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a filled triangle. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 * `pts` (table or function) table of exactly three points, each a `{x, y}` pair, defaults to nil | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +#### Notes + +- Unlike the line-drawing objects, LVGL has no built-in triangle primitive. The drawing method used is simple and does not anti-alias. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.triangle([parent, params]) + +Display a filled triangle. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + * `pts` (table or function) table of exactly three points, each a `{x, y}` pair, defaults to nil + +@retval (table) LVGL object + +@notice Unlike the line-drawing objects, LVGL has no built-in triangle primitive. The drawing method used is simple and does not anti-alias. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-vertical-slider.md b/website/md-docs/api-reference/review-lvgl-vertical-slider.md new file mode 100644 index 000000000..84cfa3c6f --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-vertical-slider.md @@ -0,0 +1,150 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.verticalSlider + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-vertical-slider.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.verticalSlider` +- Doc id: `lvgl.vertical-slider` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:1002` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.verticalSlider"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `min` (number) minimum value at the bottom end of the range, defaults to 0 + * `max` (number) maximum value at the top end of the range, defaults to 100 + * `get` (function) called to get the current knob value; should return a value between `min` and `max` inclusive, defaults to nil + * `set` (function) called when the user moves the knob; passed the new value, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object, or nil if not running as a One-Time script or fullscreen widget</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.verticalSlider", "symbol": "lvgl.verticalSlider", "summary": "Add a vertical slider using the EdgeTX style.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `min` (number) minimum value at the bottom end of the range, defaults to 0\n * `max` (number) maximum value at the top end of the range, defaults to 100\n * `get` (function) called to get the current knob value; should return a value between `min` and `max` inclusive, defaults to nil\n * `set` (function) called when the user moves the knob; passed the new value, defaults to nil\n * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil"}], "returns": [{"name": "", "type": "table", "description": "LVGL object, or nil if not running as a One-Time script or fullscreen widget"}], "notes": ["Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise."], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.verticalSlider([parent, ]params) + + Add a vertical slider using the EdgeTX style. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + `h` sets the size of the slider; `w` is not used. + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `min` (number) minimum value at the bottom end of the range, defaults to 0 + * `max` (number) maximum value at the top end of the range, defaults to 100 + * `get` (function) called to get the current knob value; should return a value between `min` and `max` inclusive, defaults to nil + * `set` (function) called when the user moves the knob; passed the new value, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + + @retval table LVGL object, or nil if not running as a One-Time script or fullscreen widget + + @notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Add a vertical slider using the EdgeTX style. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `min` (number) minimum value at the bottom end of the range, defaults to 0 * `max` (number) maximum value at the top end of the range, defaults to 100 * `get` (function) called to get the current knob value; should return a value between `min` and `max` inclusive, defaults to nil * `set` (function) called when the user moves the knob; passed the new value, defaults to nil * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object, or nil if not running as a One-Time script or fullscreen widget | + +#### Notes + +- Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.verticalSlider([parent, params]) + +Add a vertical slider using the EdgeTX style. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `min` (number) minimum value at the bottom end of the range, defaults to 0 + * `max` (number) maximum value at the top end of the range, defaults to 100 + * `get` (function) called to get the current knob value; should return a value between `min` and `max` inclusive, defaults to nil + * `set` (function) called when the user moves the knob; passed the new value, defaults to nil + * `active` (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil + +@retval (table) LVGL object, or nil if not running as a One-Time script or fullscreen widget + +@notice Only available for One-Time scripts and widgets running in full screen mode -- returns nil otherwise. + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-lvgl-vline.md b/website/md-docs/api-reference/review-lvgl-vline.md new file mode 100644 index 000000000..3bc5f14c4 --- /dev/null +++ b/website/md-docs/api-reference/review-lvgl-vline.md @@ -0,0 +1,143 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: lvgl.vline + +[Back to dashboard](review.md) | [Open API page](display-lvgl/lvgl-vline.md) + +## Snapshot + +- Module: `lvgl` +- Current symbol: `lvgl.vline` +- Doc id: `lvgl.vline` +- Source: `radio/src/lua/api_colorlcd_lvgl.cpp:681` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="lvgl.vline"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>parent</code></td><td>param</td><td><code>object</code></td><td>optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window</td><td><select data-field-kind="param" data-field-name="parent" data-current-type="object"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="parent" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>* `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `rounded` (boolean) if true the line's end caps are rounded, defaults to false + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + * `dashGap` (number) gap size for dashed lines, defaults to 0 + * `dashWidth` (number) dash size for dashed lines, defaults to 0; both `dashGap` and `dashWidth` must be > 0 to draw dashed lines</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>LVGL object</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "lvgl.vline", "symbol": "lvgl.vline", "summary": "Display a vertical line.", "parameters": [{"name": "parent", "type": "object", "required": false, "description": "optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window"}, {"name": "params", "type": "table", "required": true, "description": "* `x` (number) position relative to the top-left of the parent\n * `y` (number) position relative to the top-left of the parent\n * `w` (number) width\n * `h` (number) height\n * `color` (color or function) primary color for the object\n * `pos` (function) dynamic position callback returning `x, y`\n * `size` (function) dynamic size callback returning `w, h`\n * `visible` (function) dynamic visibility callback\n * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false\n * `rounded` (boolean) if true the line's end caps are rounded, defaults to false\n * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255\n * `dashGap` (number) gap size for dashed lines, defaults to 0\n * `dashWidth` (number) dash size for dashed lines, defaults to 0; both `dashGap` and `dashWidth` must be > 0 to draw dashed lines"}], "returns": [{"name": "", "type": "table", "description": "LVGL object"}], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function lvgl.vline([parent, ]params) + + Display a vertical line. + + @param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + + `h` sets the length of the line; `w` sets its thickness. + + @param params (table): + * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `rounded` (boolean) if true the line's end caps are rounded, defaults to false + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + * `dashGap` (number) gap size for dashed lines, defaults to 0 + * `dashWidth` (number) dash size for dashed lines, defaults to 0; both `dashGap` and `dashWidth` must be > 0 to draw dashed lines + + @retval table LVGL object + + @status current Introduced in 2.11.0, floating added in 2.11.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Display a vertical line. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `parent` | no | `object` | optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window | +| `params` | yes | `table` | * `x` (number) position relative to the top-left of the parent * `y` (number) position relative to the top-left of the parent * `w` (number) width * `h` (number) height * `color` (color or function) primary color for the object * `pos` (function) dynamic position callback returning `x, y` * `size` (function) dynamic size callback returning `w, h` * `visible` (function) dynamic visibility callback * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * `rounded` (boolean) if true the line's end caps are rounded, defaults to false * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 * `dashGap` (number) gap size for dashed lines, defaults to 0 * `dashWidth` (number) dash size for dashed lines, defaults to 0; both `dashGap` and `dashWidth` must be > 0 to draw dashed lines | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | LVGL object | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function lvgl.vline([parent, params]) + +Display a vertical line. + +@param parent (object) optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window + +@param params (table) * `x` (number) position relative to the top-left of the parent + * `y` (number) position relative to the top-left of the parent + * `w` (number) width + * `h` (number) height + * `color` (color or function) primary color for the object + * `pos` (function) dynamic position callback returning `x, y` + * `size` (function) dynamic size callback returning `w, h` + * `visible` (function) dynamic visibility callback + * `floating` (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false + * `rounded` (boolean) if true the line's end caps are rounded, defaults to false + * `opacity` (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 + * `dashGap` (number) gap size for dashed lines, defaults to 0 + * `dashWidth` (number) dash size for dashed lines, defaults to 0; both `dashGap` and `dashWidth` must be > 0 to draw dashed lines + +@retval (table) LVGL object + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-default-inputs.md b/website/md-docs/api-reference/review-model-default-inputs.md new file mode 100644 index 000000000..f59b74f69 --- /dev/null +++ b/website/md-docs/api-reference/review-model-default-inputs.md @@ -0,0 +1,75 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.defaultInputs + +[Back to dashboard](review.md) | [Open API page](model-functions/model-default-inputs.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.defaultInputs` +- Doc id: `model.default-inputs` +- Source: `radio/src/lua/api_model.cpp:767` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +No fields to edit. + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.defaultInputs() + +Set all inputs to defaults + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Set all inputs to defaults + +#### Parameters + +None. + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.defaultInputs() + +Set all inputs to defaults + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-delete-flight-modes.md b/website/md-docs/api-reference/review-model-delete-flight-modes.md new file mode 100644 index 000000000..890e074e3 --- /dev/null +++ b/website/md-docs/api-reference/review-model-delete-flight-modes.md @@ -0,0 +1,75 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.deleteFlightModes + +[Back to dashboard](review.md) | [Open API page](model-functions/model-delete-flight-modes.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.deleteFlightModes` +- Doc id: `model.delete-flight-modes` +- Source: `radio/src/lua/api_model.cpp:457` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +No fields to edit. + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.deleteFlightModes() + +Clear all flightModes + +@status current Introduced in 2.3.10 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Clear all flightModes + +#### Parameters + +None. + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.deleteFlightModes() + +Clear all flightModes + +@status current Introduced in 2.3.10 +~~~~ diff --git a/website/md-docs/api-reference/review-model-delete-input.md b/website/md-docs/api-reference/review-model-delete-input.md new file mode 100644 index 000000000..e78fa5227 --- /dev/null +++ b/website/md-docs/api-reference/review-model-delete-input.md @@ -0,0 +1,97 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.deleteInput + +[Back to dashboard](review.md) | [Open API page](model-functions/model-delete-input.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.deleteInput` +- Doc id: `model.delete-input` +- Source: `radio/src/lua/api_model.cpp:728` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.deleteInput"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>input</code></td><td>param</td><td><code>integer</code></td><td>input number (use 0 for Input1)</td><td><select data-field-kind="param" data-field-name="input" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="input" data-custom-type="true" /></td></tr> +<tr><td><code>line</code></td><td>param</td><td><code>integer</code></td><td>input line (use 0 for first line)</td><td><select data-field-kind="param" data-field-name="line" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="line" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.deleteInput", "symbol": "model.deleteInput", "summary": "Delete line from specified input", "parameters": [{"name": "input", "type": "integer", "required": true, "description": "input number (use 0 for Input1)"}, {"name": "line", "type": "integer", "required": true, "description": "input line (use 0 for first line)"}], "returns": [], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.deleteInput(input, line) + +Delete line from specified input + +@param input (unsigned number) input number (use 0 for Input1) + +@param line (unsigned number) input line (use 0 for first line) + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Delete line from specified input + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `input` | yes | `integer` | input number (use 0 for Input1) | +| `line` | yes | `integer` | input line (use 0 for first line) | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.deleteInput([input, line]) + +Delete line from specified input + +@param input (integer) input number (use 0 for Input1) + +@param line (integer) input line (use 0 for first line) + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-delete-inputs.md b/website/md-docs/api-reference/review-model-delete-inputs.md new file mode 100644 index 000000000..037920c90 --- /dev/null +++ b/website/md-docs/api-reference/review-model-delete-inputs.md @@ -0,0 +1,75 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.deleteInputs + +[Back to dashboard](review.md) | [Open API page](model-functions/model-delete-inputs.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.deleteInputs` +- Doc id: `model.delete-inputs` +- Source: `radio/src/lua/api_model.cpp:754` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +No fields to edit. + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.deleteInputs() + +Delete all Inputs + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Delete all Inputs + +#### Parameters + +None. + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.deleteInputs() + +Delete all Inputs + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-delete-mix.md b/website/md-docs/api-reference/review-model-delete-mix.md new file mode 100644 index 000000000..99e155743 --- /dev/null +++ b/website/md-docs/api-reference/review-model-delete-mix.md @@ -0,0 +1,97 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.deleteMix + +[Back to dashboard](review.md) | [Open API page](model-functions/model-delete-mix.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.deleteMix` +- Doc id: `model.delete-mix` +- Source: `radio/src/lua/api_model.cpp:979` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.deleteMix"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>channel</code></td><td>param</td><td><code>integer</code></td><td>channel number (use 0 for CH1)</td><td><select data-field-kind="param" data-field-name="channel" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="channel" data-custom-type="true" /></td></tr> +<tr><td><code>line</code></td><td>param</td><td><code>integer</code></td><td>mix number (use 0 for first line(mix))</td><td><select data-field-kind="param" data-field-name="line" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="line" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.deleteMix", "symbol": "model.deleteMix", "summary": "Delete mixer line from specified Channel", "parameters": [{"name": "channel", "type": "integer", "required": true, "description": "channel number (use 0 for CH1)"}, {"name": "line", "type": "integer", "required": true, "description": "mix number (use 0 for first line(mix))"}], "returns": [], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.deleteMix(channel, line) + +Delete mixer line from specified Channel + +@param channel (unsigned number) channel number (use 0 for CH1) + +@param line (unsigned number) mix number (use 0 for first line(mix)) + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Delete mixer line from specified Channel + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `channel` | yes | `integer` | channel number (use 0 for CH1) | +| `line` | yes | `integer` | mix number (use 0 for first line(mix)) | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.deleteMix([channel, line]) + +Delete mixer line from specified Channel + +@param channel (integer) channel number (use 0 for CH1) + +@param line (integer) mix number (use 0 for first line(mix)) + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-delete-mixes.md b/website/md-docs/api-reference/review-model-delete-mixes.md new file mode 100644 index 000000000..ceae72af5 --- /dev/null +++ b/website/md-docs/api-reference/review-model-delete-mixes.md @@ -0,0 +1,75 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.deleteMixes + +[Back to dashboard](review.md) | [Open API page](model-functions/model-delete-mixes.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.deleteMixes` +- Doc id: `model.delete-mixes` +- Source: `radio/src/lua/api_model.cpp:1005` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +No fields to edit. + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.deleteMixes() + +Remove all mixers + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Remove all mixers + +#### Parameters + +None. + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.deleteMixes() + +Remove all mixers + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-get-curve.md b/website/md-docs/api-reference/review-model-get-curve.md new file mode 100644 index 000000000..ed951c6e6 --- /dev/null +++ b/website/md-docs/api-reference/review-model-get-curve.md @@ -0,0 +1,137 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.getCurve + +[Back to dashboard](review.md) | [Open API page](model-functions/model-get-curve.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.getCurve` +- Doc id: `model.get-curve` +- Source: `radio/src/lua/api_model.cpp:1123` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.getCurve"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>curve</code></td><td>param</td><td><code>integer</code></td><td>curve number (use 0 for Curve1)</td><td><select data-field-kind="param" data-field-name="curve" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="curve" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>requested curve does not exist</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>curve data: +* `name` (string) name + * `type` (number) type + * `smooth` (boolean) smooth + * `points` (number) number of points + * `y` (table) table of Y values: + * `key` is point number (zero based) + * `value` is y value + * `x` (table) **only included for custom curve type**: + * `key` is point number (zero based) + * `value` is x value</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.getCurve", "symbol": "model.getCurve", "summary": "Get Curve parameters", "parameters": [{"name": "curve", "type": "integer", "required": true, "description": "curve number (use 0 for Curve1)"}], "returns": [{"name": "", "type": "nil", "description": "requested curve does not exist"}, {"name": "", "type": "table", "description": "curve data:\n* `name` (string) name\n * `type` (number) type\n * `smooth` (boolean) smooth\n * `points` (number) number of points\n * `y` (table) table of Y values:\n * `key` is point number (zero based)\n * `value` is y value\n * `x` (table) **only included for custom curve type**:\n * `key` is point number (zero based)\n * `value` is x value"}], "notes": [], "since": "2.0.12"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.getCurve(curve) + +Get Curve parameters + +@param curve (unsigned number) curve number (use 0 for Curve1) + +@retval nil requested curve does not exist + +@retval table curve data: + * `name` (string) name + * `type` (number) type + * `smooth` (boolean) smooth + * `points` (number) number of points + * `y` (table) table of Y values: + * `key` is point number (zero based) + * `value` is y value + * `x` (table) **only included for custom curve type**: + * `key` is point number (zero based) + * `value` is x value + + Note that functions returns the tables starting with index 0 contrary to LUA's + usual index starting with 1 + +@status current Introduced in 2.0.12 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get Curve parameters + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `curve` | yes | `integer` | curve number (use 0 for Curve1) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested curve does not exist | +| `-` | `table` | curve data: * `name` (string) name * `type` (number) type * `smooth` (boolean) smooth * `points` (number) number of points * `y` (table) table of Y values: * `key` is point number (zero based) * `value` is y value * `x` (table) **only included for custom curve type**: * `key` is point number (zero based) * `value` is x value | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.getCurve([curve]) + +Get Curve parameters + +@param curve (integer) curve number (use 0 for Curve1) + +@retval (nil) requested curve does not exist + +@retval (table) curve data: +* `name` (string) name + * `type` (number) type + * `smooth` (boolean) smooth + * `points` (number) number of points + * `y` (table) table of Y values: + * `key` is point number (zero based) + * `value` is y value + * `x` (table) **only included for custom curve type**: + * `key` is point number (zero based) + * `value` is x value + +@status current Introduced in 2.0.12 +~~~~ diff --git a/website/md-docs/api-reference/review-model-get-custom-function.md b/website/md-docs/api-reference/review-model-get-custom-function.md new file mode 100644 index 000000000..10e9f8c4f --- /dev/null +++ b/website/md-docs/api-reference/review-model-get-custom-function.md @@ -0,0 +1,128 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.getCustomFunction + +[Back to dashboard](review.md) | [Open API page](model-functions/model-get-custom-function.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.getCustomFunction` +- Doc id: `model.get-custom-function` +- Source: `radio/src/lua/api_model.cpp:1385` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.getCustomFunction"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>function</code></td><td>param</td><td><code>integer</code></td><td>custom function number (use 0 for CF1)</td><td><select data-field-kind="param" data-field-name="function" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="function" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>requested custom function does not exist</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>custom function data: +* `switch` (number) switch index + * `func` (number) function index + * `name` (string) Name of track to play (only returned only returned if action is play track, sound or script) + * `value` (number) value (only returned only returned if action is **not** play track, sound or script) + * `mode` (number) mode (only returned only returned if action is **not** play track, sound or script) + * `param` (number) parameter (only returned only returned if action is **not** play track, sound or script) + * `active` (number) 0 = disabled, 1 = enabled + * `repetition` (number) -1 to 60, range and meaning depend on function</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.getCustomFunction", "symbol": "model.getCustomFunction", "summary": "Get Custom Function parameters", "parameters": [{"name": "function", "type": "integer", "required": true, "description": "custom function number (use 0 for CF1)"}], "returns": [{"name": "", "type": "nil", "description": "requested custom function does not exist"}, {"name": "", "type": "table", "description": "custom function data:\n* `switch` (number) switch index\n * `func` (number) function index\n * `name` (string) Name of track to play (only returned only returned if action is play track, sound or script)\n * `value` (number) value (only returned only returned if action is **not** play track, sound or script)\n * `mode` (number) mode (only returned only returned if action is **not** play track, sound or script)\n * `param` (number) parameter (only returned only returned if action is **not** play track, sound or script)\n * `active` (number) 0 = disabled, 1 = enabled\n * `repetition` (number) -1 to 60, range and meaning depend on function"}], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.getCustomFunction(function) + +Get Custom Function parameters + +@param function (unsigned number) custom function number (use 0 for CF1) + +@retval nil requested custom function does not exist + +@retval table custom function data: + * `switch` (number) switch index + * `func` (number) function index + * `name` (string) Name of track to play (only returned only returned if action is play track, sound or script) + * `value` (number) value (only returned only returned if action is **not** play track, sound or script) + * `mode` (number) mode (only returned only returned if action is **not** play track, sound or script) + * `param` (number) parameter (only returned only returned if action is **not** play track, sound or script) + * `active` (number) 0 = disabled, 1 = enabled + * `repetition` (number) -1 to 60, range and meaning depend on function + +@status current Introduced in 2.0.0, TODO rename function +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get Custom Function parameters + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `function` | yes | `integer` | custom function number (use 0 for CF1) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested custom function does not exist | +| `-` | `table` | custom function data: * `switch` (number) switch index * `func` (number) function index * `name` (string) Name of track to play (only returned only returned if action is play track, sound or script) * `value` (number) value (only returned only returned if action is **not** play track, sound or script) * `mode` (number) mode (only returned only returned if action is **not** play track, sound or script) * `param` (number) parameter (only returned only returned if action is **not** play track, sound or script) * `active` (number) 0 = disabled, 1 = enabled * `repetition` (number) -1 to 60, range and meaning depend on function | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.getCustomFunction([function]) + +Get Custom Function parameters + +@param function (integer) custom function number (use 0 for CF1) + +@retval (nil) requested custom function does not exist + +@retval (table) custom function data: +* `switch` (number) switch index + * `func` (number) function index + * `name` (string) Name of track to play (only returned only returned if action is play track, sound or script) + * `value` (number) value (only returned only returned if action is **not** play track, sound or script) + * `mode` (number) mode (only returned only returned if action is **not** play track, sound or script) + * `param` (number) parameter (only returned only returned if action is **not** play track, sound or script) + * `active` (number) 0 = disabled, 1 = enabled + * `repetition` (number) -1 to 60, range and meaning depend on function + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-get-flight-mode.md b/website/md-docs/api-reference/review-model-get-flight-mode.md new file mode 100644 index 000000000..10ea8760b --- /dev/null +++ b/website/md-docs/api-reference/review-model-get-flight-mode.md @@ -0,0 +1,132 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.getFlightMode + +[Back to dashboard](review.md) | [Open API page](model-functions/model-get-flight-mode.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.getFlightMode` +- Doc id: `model.get-flight-mode` +- Source: `radio/src/lua/api_model.cpp:470` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.getFlightMode"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>index</code></td><td>param</td><td><code>integer</code></td><td>flight mode number (use 0 for FM0)</td><td><select data-field-kind="param" data-field-name="index" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="index" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>requested input or line does not exist</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>input data: +* `name` (string) input line name + * `switch` (number) input switch index + * `fadeIn` (number) fade in value (in 0.1s) + * `fadeOut` (number) fade out value (in 0.1s) + * `trimsValues` (table) table of trim values: + * `key` is trim number (zero based) + * `value` is trim value + * `trimsModes` (table) table of trim mode: + * `key` is trim number (zero based) + * `value` is trim mode</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.getFlightMode", "symbol": "model.getFlightMode", "summary": "", "parameters": [{"name": "index", "type": "integer", "required": true, "description": "flight mode number (use 0 for FM0)"}], "returns": [{"name": "", "type": "nil", "description": "requested input or line does not exist"}, {"name": "", "type": "table", "description": "input data:\n* `name` (string) input line name\n * `switch` (number) input switch index\n * `fadeIn` (number) fade in value (in 0.1s)\n * `fadeOut` (number) fade out value (in 0.1s)\n * `trimsValues` (table) table of trim values:\n * `key` is trim number (zero based)\n * `value` is trim value\n * `trimsModes` (table) table of trim mode:\n * `key` is trim number (zero based)\n * `value` is trim mode"}], "notes": [], "since": "2.3.10"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.getFlightMode(index) + +@param index (unsigned number) flight mode number (use 0 for FM0) + +Return input data for given input and line number + +@retval nil requested input or line does not exist + +@retval table input data: + * `name` (string) input line name + * `switch` (number) input switch index + * `fadeIn` (number) fade in value (in 0.1s) + * `fadeOut` (number) fade out value (in 0.1s) + * `trimsValues` (table) table of trim values: + * `key` is trim number (zero based) + * `value` is trim value + * `trimsModes` (table) table of trim mode: + * `key` is trim number (zero based) + * `value` is trim mode + +@status current Introduced in 2.3.10 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | flight mode number (use 0 for FM0) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested input or line does not exist | +| `-` | `table` | input data: * `name` (string) input line name * `switch` (number) input switch index * `fadeIn` (number) fade in value (in 0.1s) * `fadeOut` (number) fade out value (in 0.1s) * `trimsValues` (table) table of trim values: * `key` is trim number (zero based) * `value` is trim value * `trimsModes` (table) table of trim mode: * `key` is trim number (zero based) * `value` is trim mode | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.getFlightMode([index]) + +@param index (integer) flight mode number (use 0 for FM0) + +@retval (nil) requested input or line does not exist + +@retval (table) input data: +* `name` (string) input line name + * `switch` (number) input switch index + * `fadeIn` (number) fade in value (in 0.1s) + * `fadeOut` (number) fade out value (in 0.1s) + * `trimsValues` (table) table of trim values: + * `key` is trim number (zero based) + * `value` is trim value + * `trimsModes` (table) table of trim mode: + * `key` is trim number (zero based) + * `value` is trim mode + +@status current Introduced in 2.3.10 +~~~~ diff --git a/website/md-docs/api-reference/review-model-get-global-variable-details.md b/website/md-docs/api-reference/review-model-get-global-variable-details.md new file mode 100644 index 000000000..6c5734ea4 --- /dev/null +++ b/website/md-docs/api-reference/review-model-get-global-variable-details.md @@ -0,0 +1,116 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.getGlobalVariableDetails + +[Back to dashboard](review.md) | [Open API page](model-functions/model-get-global-variable-details.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.getGlobalVariableDetails` +- Doc id: `model.get-global-variable-details` +- Source: `radio/src/lua/api_model.cpp:1650` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.getGlobalVariableDetails"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>index</code></td><td>param</td><td><code>integer</code></td><td>zero based global variable index, use 0 for GV1, 8 for GV9</td><td><select data-field-kind="param" data-field-name="index" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="index" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>details of the global variable: +* `name` (string) global variable name + * `min` (number) minimum value + * `max` (number) maximum value + * `prec` (number) precision + * `unit` (number) unit + * `popup` (boolean) show popup - if exists</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.getGlobalVariableDetails", "symbol": "model.getGlobalVariableDetails", "summary": "Returns details about a Global Variable, but not values", "parameters": [{"name": "index", "type": "integer", "required": true, "description": "zero based global variable index, use 0 for GV1, 8 for GV9"}], "returns": [{"name": "", "type": "table", "description": "details of the global variable:\n* `name` (string) global variable name\n * `min` (number) minimum value\n * `max` (number) maximum value\n * `prec` (number) precision\n * `unit` (number) unit\n * `popup` (boolean) show popup - if exists"}], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.getGlobalVariableDetails(index) + +Returns details about a Global Variable, but not values + +@param index (number) zero based global variable index, use 0 for GV1, 8 for GV9 + +@retval table details of the global variable: + * `name` (string) global variable name + * `min` (number) minimum value + * `max` (number) maximum value + * `prec` (number) precision + * `unit` (number) unit + * `popup` (boolean) show popup - if exists + +@status current Introduced in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Returns details about a Global Variable, but not values + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | zero based global variable index, use 0 for GV1, 8 for GV9 | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | details of the global variable: * `name` (string) global variable name * `min` (number) minimum value * `max` (number) maximum value * `prec` (number) precision * `unit` (number) unit * `popup` (boolean) show popup - if exists | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.getGlobalVariableDetails([index]) + +Returns details about a Global Variable, but not values + +@param index (integer) zero based global variable index, use 0 for GV1, 8 for GV9 + +@retval (table) details of the global variable: +* `name` (string) global variable name + * `min` (number) minimum value + * `max` (number) maximum value + * `prec` (number) precision + * `unit` (number) unit + * `popup` (boolean) show popup - if exists + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-get-global-variable.md b/website/md-docs/api-reference/review-model-get-global-variable.md new file mode 100644 index 000000000..c51316010 --- /dev/null +++ b/website/md-docs/api-reference/review-model-get-global-variable.md @@ -0,0 +1,119 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.getGlobalVariable + +[Back to dashboard](review.md) | [Open API page](model-functions/model-get-global-variable.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.getGlobalVariable` +- Doc id: `model.get-global-variable` +- Source: `radio/src/lua/api_model.cpp:1589` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.getGlobalVariable"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>index</code></td><td>param</td><td><code>integer</code></td><td>zero based global variable index, use 0 for GV1, 8 for GV9</td><td><select data-field-kind="param" data-field-name="index" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="index" data-custom-type="true" /></td></tr> +<tr><td><code>flight_mode</code></td><td>param</td><td><code>integer</code></td><td>Flight mode number (0 = FM0, 8 = FM8)</td><td><select data-field-kind="param" data-field-name="flight_mode" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flight_mode" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>requested global variable does not exist</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>current value of global variable</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.getGlobalVariable", "symbol": "model.getGlobalVariable", "summary": "Return current global variable value", "parameters": [{"name": "index", "type": "integer", "required": true, "description": "zero based global variable index, use 0 for GV1, 8 for GV9"}, {"name": "flight_mode", "type": "integer", "required": true, "description": "Flight mode number (0 = FM0, 8 = FM8)"}], "returns": [{"name": "", "type": "nil", "description": "requested global variable does not exist"}, {"name": "", "type": "integer", "description": "current value of global variable"}], "notes": ["a simple warning or notice"], "since": "unknown"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.getGlobalVariable(index, flight_mode) + +Return current global variable value + +@notice a simple warning or notice + +@param index zero based global variable index, use 0 for GV1, 8 for GV9 + +@param flight_mode Flight mode number (0 = FM0, 8 = FM8) + +@retval nil requested global variable does not exist + +@retval number current value of global variable + +Example: + +```lua + -- get GV3 (index = 2) from Flight mode 0 (FM0) + val = model.getGlobalVariable(2, 0) +``` +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return current global variable value + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | zero based global variable index, use 0 for GV1, 8 for GV9 | +| `flight_mode` | yes | `integer` | Flight mode number (0 = FM0, 8 = FM8) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested global variable does not exist | +| `-` | `integer` | current value of global variable | + +#### Notes + +- a simple warning or notice + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.getGlobalVariable([index, flight_mode]) + +Return current global variable value + +@param index (integer) zero based global variable index, use 0 for GV1, 8 for GV9 + +@param flight_mode (integer) Flight mode number (0 = FM0, 8 = FM8) + +@retval (nil) requested global variable does not exist + +@retval (integer) current value of global variable + +@notice a simple warning or notice + +@status current Introduced in unknown +~~~~ diff --git a/website/md-docs/api-reference/review-model-get-info.md b/website/md-docs/api-reference/review-model-get-info.md new file mode 100644 index 000000000..ab70f6043 --- /dev/null +++ b/website/md-docs/api-reference/review-model-get-info.md @@ -0,0 +1,106 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.getInfo + +[Back to dashboard](review.md) | [Open API page](model-functions/model-get-info.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.getInfo` +- Doc id: `model.get-info` +- Source: `radio/src/lua/api_model.cpp:45` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.getInfo"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>model information: +* `name` (string) model name + * `extendedLimits` (boolean) extended limits enabled + * `jitterFilter` (number) model level ADC filter + * `bitmap` (string) bitmap name (not present on X7) + * `filename` (string) model filename</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.getInfo", "symbol": "model.getInfo", "summary": "Get current Model information", "parameters": [], "returns": [{"name": "", "type": "table", "description": "model information:\n* `name` (string) model name\n * `extendedLimits` (boolean) extended limits enabled\n * `jitterFilter` (number) model level ADC filter\n * `bitmap` (string) bitmap name (not present on X7)\n * `filename` (string) model filename"}], "notes": [], "since": "2.0.6"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.getInfo() + +Get current Model information + +@retval table model information: + * `name` (string) model name + * `extendedLimits` (boolean) extended limits enabled + * `jitterFilter` (number) model level ADC filter + * `bitmap` (string) bitmap name (not present on X7) + * `filename` (string) model filename + +@status current Introduced in 2.0.6, changed in 2.2.0, filename added in 2.6.0, extendedLimits, jitterFilter, and labels added in 2.8.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get current Model information + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | model information: * `name` (string) model name * `extendedLimits` (boolean) extended limits enabled * `jitterFilter` (number) model level ADC filter * `bitmap` (string) bitmap name (not present on X7) * `filename` (string) model filename | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.getInfo() + +Get current Model information + +@retval (table) model information: +* `name` (string) model name + * `extendedLimits` (boolean) extended limits enabled + * `jitterFilter` (number) model level ADC filter + * `bitmap` (string) bitmap name (not present on X7) + * `filename` (string) model filename + +@status current Introduced in 2.0.6 +~~~~ diff --git a/website/md-docs/api-reference/review-model-get-input.md b/website/md-docs/api-reference/review-model-get-input.md new file mode 100644 index 000000000..a23ba0f2a --- /dev/null +++ b/website/md-docs/api-reference/review-model-get-input.md @@ -0,0 +1,149 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.getInput + +[Back to dashboard](review.md) | [Open API page](model-functions/model-get-input.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.getInput` +- Doc id: `model.get-input` +- Source: `radio/src/lua/api_model.cpp:594` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.getInput"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>input</code></td><td>param</td><td><code>integer</code></td><td>input number (use 0 for Input1)</td><td><select data-field-kind="param" data-field-name="input" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="input" data-custom-type="true" /></td></tr> +<tr><td><code>line</code></td><td>param</td><td><code>integer</code></td><td>input line (use 0 for first line)</td><td><select data-field-kind="param" data-field-name="line" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="line" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>requested input or line does not exist</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>input data: +* `name` (string) input line name + * `inputName` (string) input input name + * `source` (number) input source index + * `scale` (number) input scaling (for telemetry) + * `weight` (number) input weight + * `offset` (number) input offset + * `switch` (number) input switch index + * `curveType` (number) curve type (function, expo, custom curve) + * `curveValue` (number) curve index + * `carryTrim` deprecated, please use trimSource instead. WARNING: carryTrim was getting negative values (carryTrim = - trimSource) + * `trimSource` (number) a positive number representing trim source + * `side` (number) input side (positive, negative or all) + * `flightModes` (number) bit-mask of active flight modes</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.getInput", "symbol": "model.getInput", "summary": "Return input data for given input and line number", "parameters": [{"name": "input", "type": "integer", "required": true, "description": "input number (use 0 for Input1)"}, {"name": "line", "type": "integer", "required": true, "description": "input line (use 0 for first line)"}], "returns": [{"name": "", "type": "nil", "description": "requested input or line does not exist"}, {"name": "", "type": "table", "description": "input data:\n* `name` (string) input line name\n * `inputName` (string) input input name\n * `source` (number) input source index\n * `scale` (number) input scaling (for telemetry)\n * `weight` (number) input weight\n * `offset` (number) input offset\n * `switch` (number) input switch index\n * `curveType` (number) curve type (function, expo, custom curve)\n * `curveValue` (number) curve index\n * `carryTrim` deprecated, please use trimSource instead. WARNING: carryTrim was getting negative values (carryTrim = - trimSource)\n * `trimSource` (number) a positive number representing trim source\n * `side` (number) input side (positive, negative or all)\n * `flightModes` (number) bit-mask of active flight modes"}], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.getInput(input, line) + +Return input data for given input and line number + +@param input (unsigned number) input number (use 0 for Input1) + +@param line (unsigned number) input line (use 0 for first line) + +@retval nil requested input or line does not exist + +@retval table input data: + * `name` (string) input line name + * `inputName` (string) input input name + * `source` (number) input source index + * `scale` (number) input scaling (for telemetry) + * `weight` (number) input weight + * `offset` (number) input offset + * `switch` (number) input switch index + * `curveType` (number) curve type (function, expo, custom curve) + * `curveValue` (number) curve index + * `carryTrim` deprecated, please use trimSource instead. WARNING: carryTrim was getting negative values (carryTrim = - trimSource) + * `trimSource` (number) a positive number representing trim source + * `side` (number) input side (positive, negative or all) + * `flightModes` (number) bit-mask of active flight modes + +@status current Introduced in 2.0.0, curveType/curveValue/carryTrim added in 2.3, inputName added 2.3.10, flighmode reworked in 2.3.11, broken carryTrim replaced by trimSource in 2.8.1, scale added in 2.10, side added in 2.11 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return input data for given input and line number + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `input` | yes | `integer` | input number (use 0 for Input1) | +| `line` | yes | `integer` | input line (use 0 for first line) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested input or line does not exist | +| `-` | `table` | input data: * `name` (string) input line name * `inputName` (string) input input name * `source` (number) input source index * `scale` (number) input scaling (for telemetry) * `weight` (number) input weight * `offset` (number) input offset * `switch` (number) input switch index * `curveType` (number) curve type (function, expo, custom curve) * `curveValue` (number) curve index * `carryTrim` deprecated, please use trimSource instead. WARNING: carryTrim was getting negative values (carryTrim = - trimSource) * `trimSource` (number) a positive number representing trim source * `side` (number) input side (positive, negative or all) * `flightModes` (number) bit-mask of active flight modes | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.getInput([input, line]) + +Return input data for given input and line number + +@param input (integer) input number (use 0 for Input1) + +@param line (integer) input line (use 0 for first line) + +@retval (nil) requested input or line does not exist + +@retval (table) input data: +* `name` (string) input line name + * `inputName` (string) input input name + * `source` (number) input source index + * `scale` (number) input scaling (for telemetry) + * `weight` (number) input weight + * `offset` (number) input offset + * `switch` (number) input switch index + * `curveType` (number) curve type (function, expo, custom curve) + * `curveValue` (number) curve index + * `carryTrim` deprecated, please use trimSource instead. WARNING: carryTrim was getting negative values (carryTrim = - trimSource) + * `trimSource` (number) a positive number representing trim source + * `side` (number) input side (positive, negative or all) + * `flightModes` (number) bit-mask of active flight modes + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-get-inputs-count.md b/website/md-docs/api-reference/review-model-get-inputs-count.md new file mode 100644 index 000000000..a87efd7ea --- /dev/null +++ b/website/md-docs/api-reference/review-model-get-inputs-count.md @@ -0,0 +1,98 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.getInputsCount + +[Back to dashboard](review.md) | [Open API page](model-functions/model-get-inputs-count.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.getInputsCount` +- Doc id: `model.get-inputs-count` +- Source: `radio/src/lua/api_model.cpp:438` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.getInputsCount"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>input</code></td><td>param</td><td><code>integer</code></td><td>input number (use 0 for Input1)</td><td><select data-field-kind="param" data-field-name="input" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="input" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>number of configured lines for given input</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.getInputsCount", "symbol": "model.getInputsCount", "summary": "Return number of lines for given input", "parameters": [{"name": "input", "type": "integer", "required": true, "description": "input number (use 0 for Input1)"}], "returns": [{"name": "", "type": "integer", "description": "number of configured lines for given input"}], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.getInputsCount(input) + +Return number of lines for given input + +@param input (unsigned number) input number (use 0 for Input1) + +@retval number number of configured lines for given input + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return number of lines for given input + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `input` | yes | `integer` | input number (use 0 for Input1) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | number of configured lines for given input | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.getInputsCount([input]) + +Return number of lines for given input + +@param input (integer) input number (use 0 for Input1) + +@retval (integer) number of configured lines for given input + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-get-logical-switch.md b/website/md-docs/api-reference/review-model-get-logical-switch.md new file mode 100644 index 000000000..574bd4cb2 --- /dev/null +++ b/website/md-docs/api-reference/review-model-get-logical-switch.md @@ -0,0 +1,131 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.getLogicalSwitch + +[Back to dashboard](review.md) | [Open API page](model-functions/model-get-logical-switch.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.getLogicalSwitch` +- Doc id: `model.get-logical-switch` +- Source: `radio/src/lua/api_model.cpp:1018` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.getLogicalSwitch"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>switch</code></td><td>param</td><td><code>integer</code></td><td>logical switch number (use 0 for LS1)</td><td><select data-field-kind="param" data-field-name="switch" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="switch" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>requested logical switch does not exist</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>logical switch data: +* `func` (number) function index + * `v1` (number) V1 value (index) + * `v2` (number) V2 value (index or value) + * `v3` (number) V3 value (index or value) + * `and` (number) AND switch index + * `delay` (number) delay (time in 1/10 s) + * `duration` (number) duration (time in 1/10 s) + * `state` (boolean) current state of the logical switch + * `persistent` (boolean) if true then the state is persistent across reboot of the radio</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.getLogicalSwitch", "symbol": "model.getLogicalSwitch", "summary": "Get Logical Switch parameters", "parameters": [{"name": "switch", "type": "integer", "required": true, "description": "logical switch number (use 0 for LS1)"}], "returns": [{"name": "", "type": "nil", "description": "requested logical switch does not exist"}, {"name": "", "type": "table", "description": "logical switch data:\n* `func` (number) function index\n * `v1` (number) V1 value (index)\n * `v2` (number) V2 value (index or value)\n * `v3` (number) V3 value (index or value)\n * `and` (number) AND switch index\n * `delay` (number) delay (time in 1/10 s)\n * `duration` (number) duration (time in 1/10 s)\n * `state` (boolean) current state of the logical switch\n * `persistent` (boolean) if true then the state is persistent across reboot of the radio"}], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.getLogicalSwitch(switch) + +Get Logical Switch parameters + +@param switch (unsigned number) logical switch number (use 0 for LS1) + +@retval nil requested logical switch does not exist + +@retval table logical switch data: + * `func` (number) function index + * `v1` (number) V1 value (index) + * `v2` (number) V2 value (index or value) + * `v3` (number) V3 value (index or value) + * `and` (number) AND switch index + * `delay` (number) delay (time in 1/10 s) + * `duration` (number) duration (time in 1/10 s) + * `state` (boolean) current state of the logical switch + * `persistent` (boolean) if true then the state is persistent across reboot of the radio + +@status current Introduced in 2.0.0, state and persistent added in 2.11.2 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get Logical Switch parameters + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `switch` | yes | `integer` | logical switch number (use 0 for LS1) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested logical switch does not exist | +| `-` | `table` | logical switch data: * `func` (number) function index * `v1` (number) V1 value (index) * `v2` (number) V2 value (index or value) * `v3` (number) V3 value (index or value) * `and` (number) AND switch index * `delay` (number) delay (time in 1/10 s) * `duration` (number) duration (time in 1/10 s) * `state` (boolean) current state of the logical switch * `persistent` (boolean) if true then the state is persistent across reboot of the radio | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.getLogicalSwitch([switch]) + +Get Logical Switch parameters + +@param switch (integer) logical switch number (use 0 for LS1) + +@retval (nil) requested logical switch does not exist + +@retval (table) logical switch data: +* `func` (number) function index + * `v1` (number) V1 value (index) + * `v2` (number) V2 value (index or value) + * `v3` (number) V3 value (index or value) + * `and` (number) AND switch index + * `delay` (number) delay (time in 1/10 s) + * `duration` (number) duration (time in 1/10 s) + * `state` (boolean) current state of the logical switch + * `persistent` (boolean) if true then the state is persistent across reboot of the radio + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-get-mix.md b/website/md-docs/api-reference/review-model-get-mix.md new file mode 100644 index 000000000..801627d7f --- /dev/null +++ b/website/md-docs/api-reference/review-model-get-mix.md @@ -0,0 +1,161 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.getMix + +[Back to dashboard](review.md) | [Open API page](model-functions/model-get-mix.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.getMix` +- Doc id: `model.get-mix` +- Source: `radio/src/lua/api_model.cpp:827` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.getMix"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>channel</code></td><td>param</td><td><code>integer</code></td><td>channel number (use 0 for CH1)</td><td><select data-field-kind="param" data-field-name="channel" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="channel" data-custom-type="true" /></td></tr> +<tr><td><code>line</code></td><td>param</td><td><code>integer</code></td><td>mix number (use 0 for first line(mix))</td><td><select data-field-kind="param" data-field-name="line" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="line" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>requested channel or line does not exist</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>mix data: +* `name` (string) mix line name + * `source` (number) source index + * `weight` (number) weight value (-512 to 511) or source (>= 1024 or <= -1024) + * `offset` (number) offset value (-512 to 511) or source (>= 1024 or <= -1024) + * `switch` (number) switch index + * `multiplex` (number) multiplex (0 = ADD, 1 = MULTIPLY, 2 = REPLACE) + * `curveType` (number) curve type (function, expo, custom curve) + * `curveValue` (number) curve index + * `flightModes` (number) bit-mask of active flight modes + * `carryTrim` (boolean) carry trim + * `mixWarn` (number) warning (0 = off, 1 = 1 beep, .. 3 = 3 beeps) + * `delayPrec` precision of delay up/down (1 or 10) + * `delayUp` (number) delay up (time in 1/10 s) + * `delayDown` (number) delay down + * `speedPrec` precision of speed up/down (1 or 10) + * `speedUp` (number) speed up + * `speedDown` (number) speed down</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.getMix", "symbol": "model.getMix", "summary": "Get configuration for specified Mix", "parameters": [{"name": "channel", "type": "integer", "required": true, "description": "channel number (use 0 for CH1)"}, {"name": "line", "type": "integer", "required": true, "description": "mix number (use 0 for first line(mix))"}], "returns": [{"name": "", "type": "nil", "description": "requested channel or line does not exist"}, {"name": "", "type": "table", "description": "mix data:\n* `name` (string) mix line name\n * `source` (number) source index\n * `weight` (number) weight value (-512 to 511) or source (>= 1024 or <= -1024)\n * `offset` (number) offset value (-512 to 511) or source (>= 1024 or <= -1024)\n * `switch` (number) switch index\n * `multiplex` (number) multiplex (0 = ADD, 1 = MULTIPLY, 2 = REPLACE)\n * `curveType` (number) curve type (function, expo, custom curve)\n * `curveValue` (number) curve index\n * `flightModes` (number) bit-mask of active flight modes\n * `carryTrim` (boolean) carry trim\n * `mixWarn` (number) warning (0 = off, 1 = 1 beep, .. 3 = 3 beeps)\n * `delayPrec` precision of delay up/down (1 or 10)\n * `delayUp` (number) delay up (time in 1/10 s)\n * `delayDown` (number) delay down\n * `speedPrec` precision of speed up/down (1 or 10)\n * `speedUp` (number) speed up\n * `speedDown` (number) speed down"}], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.getMix(channel, line) + +Get configuration for specified Mix + +@param channel (unsigned number) channel number (use 0 for CH1) + +@param line (unsigned number) mix number (use 0 for first line(mix)) + +@retval nil requested channel or line does not exist + +@retval table mix data: + * `name` (string) mix line name + * `source` (number) source index + * `weight` (number) weight value (-512 to 511) or source (>= 1024 or <= -1024) + * `offset` (number) offset value (-512 to 511) or source (>= 1024 or <= -1024) + * `switch` (number) switch index + * `multiplex` (number) multiplex (0 = ADD, 1 = MULTIPLY, 2 = REPLACE) + * `curveType` (number) curve type (function, expo, custom curve) + * `curveValue` (number) curve index + * `flightModes` (number) bit-mask of active flight modes + * `carryTrim` (boolean) carry trim + * `mixWarn` (number) warning (0 = off, 1 = 1 beep, .. 3 = 3 beeps) + * `delayPrec` precision of delay up/down (1 or 10) + * `delayUp` (number) delay up (time in 1/10 s) + * `delayDown` (number) delay down + * `speedPrec` precision of speed up/down (1 or 10) + * `speedUp` (number) speed up + * `speedDown` (number) speed down + +@status current Introduced in 2.0.0, parameters below `multiplex` added in 2.0.13, `speedPrec` added in 2.10, `delayPrec` added in 2.11 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get configuration for specified Mix + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `channel` | yes | `integer` | channel number (use 0 for CH1) | +| `line` | yes | `integer` | mix number (use 0 for first line(mix)) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested channel or line does not exist | +| `-` | `table` | mix data: * `name` (string) mix line name * `source` (number) source index * `weight` (number) weight value (-512 to 511) or source (>= 1024 or <= -1024) * `offset` (number) offset value (-512 to 511) or source (>= 1024 or <= -1024) * `switch` (number) switch index * `multiplex` (number) multiplex (0 = ADD, 1 = MULTIPLY, 2 = REPLACE) * `curveType` (number) curve type (function, expo, custom curve) * `curveValue` (number) curve index * `flightModes` (number) bit-mask of active flight modes * `carryTrim` (boolean) carry trim * `mixWarn` (number) warning (0 = off, 1 = 1 beep, .. 3 = 3 beeps) * `delayPrec` precision of delay up/down (1 or 10) * `delayUp` (number) delay up (time in 1/10 s) * `delayDown` (number) delay down * `speedPrec` precision of speed up/down (1 or 10) * `speedUp` (number) speed up * `speedDown` (number) speed down | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.getMix([channel, line]) + +Get configuration for specified Mix + +@param channel (integer) channel number (use 0 for CH1) + +@param line (integer) mix number (use 0 for first line(mix)) + +@retval (nil) requested channel or line does not exist + +@retval (table) mix data: +* `name` (string) mix line name + * `source` (number) source index + * `weight` (number) weight value (-512 to 511) or source (>= 1024 or <= -1024) + * `offset` (number) offset value (-512 to 511) or source (>= 1024 or <= -1024) + * `switch` (number) switch index + * `multiplex` (number) multiplex (0 = ADD, 1 = MULTIPLY, 2 = REPLACE) + * `curveType` (number) curve type (function, expo, custom curve) + * `curveValue` (number) curve index + * `flightModes` (number) bit-mask of active flight modes + * `carryTrim` (boolean) carry trim + * `mixWarn` (number) warning (0 = off, 1 = 1 beep, .. 3 = 3 beeps) + * `delayPrec` precision of delay up/down (1 or 10) + * `delayUp` (number) delay up (time in 1/10 s) + * `delayDown` (number) delay down + * `speedPrec` precision of speed up/down (1 or 10) + * `speedUp` (number) speed up + * `speedDown` (number) speed down + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-get-mixes-count.md b/website/md-docs/api-reference/review-model-get-mixes-count.md new file mode 100644 index 000000000..d4b39ce1f --- /dev/null +++ b/website/md-docs/api-reference/review-model-get-mixes-count.md @@ -0,0 +1,98 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.getMixesCount + +[Back to dashboard](review.md) | [Open API page](model-functions/model-get-mixes-count.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.getMixesCount` +- Doc id: `model.get-mixes-count` +- Source: `radio/src/lua/api_model.cpp:808` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.getMixesCount"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>channel</code></td><td>param</td><td><code>integer</code></td><td>channel number (use 0 for CH1)</td><td><select data-field-kind="param" data-field-name="channel" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="channel" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>number of mixes for requested channel</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.getMixesCount", "symbol": "model.getMixesCount", "summary": "Get the number of Mixer lines that the specified Channel has", "parameters": [{"name": "channel", "type": "integer", "required": true, "description": "channel number (use 0 for CH1)"}], "returns": [{"name": "", "type": "integer", "description": "number of mixes for requested channel"}], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.getMixesCount(channel) + +Get the number of Mixer lines that the specified Channel has + +@param channel (unsigned number) channel number (use 0 for CH1) + +@retval number number of mixes for requested channel + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get the number of Mixer lines that the specified Channel has + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `channel` | yes | `integer` | channel number (use 0 for CH1) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | number of mixes for requested channel | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.getMixesCount([channel]) + +Get the number of Mixer lines that the specified Channel has + +@param channel (integer) channel number (use 0 for CH1) + +@retval (integer) number of mixes for requested channel + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-get-module.md b/website/md-docs/api-reference/review-model-get-module.md new file mode 100644 index 000000000..66d44162c --- /dev/null +++ b/website/md-docs/api-reference/review-model-get-module.md @@ -0,0 +1,163 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.getModule + +[Back to dashboard](review.md) | [Open API page](model-functions/model-get-module.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.getModule` +- Doc id: `model.get-module` +- Source: `radio/src/lua/api_model.cpp:124` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.getModule"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>index</code></td><td>param</td><td><code>integer</code></td><td>module index (0 for internal, 1 for external)</td><td><select data-field-kind="param" data-field-name="index" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="index" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>requested module does not exist</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>module parameters: +* `subType` (number) protocol index + * `modelId` (number) receiver number + * `firstChannel` (number) start channel (0 is CH1) + * `channelsCount` (number) number of channels sent to module + * `Type` (number) module type + * if the module type is Multi additional information are available + * `protocol` (number) protocol number (Multi only) + * `subProtocol` (number) sub-protocol number (Multi only) + * `channelsOrder` (number) first 4 channels expected order (Multi only) + * if the module type is LemonDSMP additional info is available + * `channelsOrder` (number) first 4 channels expected order (DSMP only)</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.getModule", "symbol": "model.getModule", "summary": "Get RF module parameters", "parameters": [{"name": "index", "type": "integer", "required": true, "description": "module index (0 for internal, 1 for external)"}], "returns": [{"name": "", "type": "nil", "description": "requested module does not exist"}, {"name": "", "type": "table", "description": "module parameters:\n* `subType` (number) protocol index\n * `modelId` (number) receiver number\n * `firstChannel` (number) start channel (0 is CH1)\n * `channelsCount` (number) number of channels sent to module\n * `Type` (number) module type\n * if the module type is Multi additional information are available\n * `protocol` (number) protocol number (Multi only)\n * `subProtocol` (number) sub-protocol number (Multi only)\n * `channelsOrder` (number) first 4 channels expected order (Multi only)\n * if the module type is LemonDSMP additional info is available\n * `channelsOrder` (number) first 4 channels expected order (DSMP only)"}], "notes": [], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.getModule(index) + +Get RF module parameters + +`Type` values: + * 0 NONE + * 1 PPM + * 2 XJT_PXX1 + * 3 ISRM_PXX2 + * 4 DSM2 + * 5 CROSSFIRE + * 6 MULTIMODULE + * 7 R9M_PXX1 + * 8 R9M_PXX2 + * 9 R9M_LITE_PXX1 + * 10 R9M_LITE_PXX2 + * 11 R9M_LITE_PRO_PXX1 + * 12 R9M_LITE_PRO_PXX2 + * 13 SBUS + * 14 XJT_LITE_PXX2 + * 15 MODULE_TYPE_FLYSKY_AFHDS3, + * 16 ?? + * 17 MODULE_TYPE_LEMON_DSMP + +`subType` values for XJT_PXX1: + * -1 OFF + * 0 D16 + * 1 D8 + * 2 LR12 + +@param index (number) module index (0 for internal, 1 for external) + +@retval nil requested module does not exist + +@retval table module parameters: + * `subType` (number) protocol index + * `modelId` (number) receiver number + * `firstChannel` (number) start channel (0 is CH1) + * `channelsCount` (number) number of channels sent to module + * `Type` (number) module type + * if the module type is Multi additional information are available + * `protocol` (number) protocol number (Multi only) + * `subProtocol` (number) sub-protocol number (Multi only) + * `channelsOrder` (number) first 4 channels expected order (Multi only) + * if the module type is LemonDSMP additional info is available + * `channelsOrder` (number) first 4 channels expected order (DSMP only) + +@status current Introduced in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get RF module parameters + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | module index (0 for internal, 1 for external) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested module does not exist | +| `-` | `table` | module parameters: * `subType` (number) protocol index * `modelId` (number) receiver number * `firstChannel` (number) start channel (0 is CH1) * `channelsCount` (number) number of channels sent to module * `Type` (number) module type * if the module type is Multi additional information are available * `protocol` (number) protocol number (Multi only) * `subProtocol` (number) sub-protocol number (Multi only) * `channelsOrder` (number) first 4 channels expected order (Multi only) * if the module type is LemonDSMP additional info is available * `channelsOrder` (number) first 4 channels expected order (DSMP only) | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.getModule([index]) + +Get RF module parameters + +@param index (integer) module index (0 for internal, 1 for external) + +@retval (nil) requested module does not exist + +@retval (table) module parameters: +* `subType` (number) protocol index + * `modelId` (number) receiver number + * `firstChannel` (number) start channel (0 is CH1) + * `channelsCount` (number) number of channels sent to module + * `Type` (number) module type + * if the module type is Multi additional information are available + * `protocol` (number) protocol number (Multi only) + * `subProtocol` (number) sub-protocol number (Multi only) + * `channelsOrder` (number) first 4 channels expected order (Multi only) + * if the module type is LemonDSMP additional info is available + * `channelsOrder` (number) first 4 channels expected order (DSMP only) + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-get-output.md b/website/md-docs/api-reference/review-model-get-output.md new file mode 100644 index 000000000..c3bcfa2b1 --- /dev/null +++ b/website/md-docs/api-reference/review-model-get-output.md @@ -0,0 +1,134 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.getOutput + +[Back to dashboard](review.md) | [Open API page](model-functions/model-get-output.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.getOutput` +- Doc id: `model.get-output` +- Source: `radio/src/lua/api_model.cpp:1487` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.getOutput"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>index</code></td><td>param</td><td><code>integer</code></td><td>output number (use 0 for CH1)</td><td><select data-field-kind="param" data-field-name="index" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="index" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>requested output does not exist</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>output parameters: +* `name` (string) name + * `min` (number) Minimum % * 10 + * `max` (number) Maximum % * 10 + * `offset` (number) Subtrim * 10 + * `ppmCenter` (number) offset from PPM Center. 0 = 1500 + * `symetrical` (number) linear Subtrim 0 = Off, 1 = On + * `revert` (number) irection 0 = ­­­---, 1 = INV + * `curve` + * (number) Curve number (0 for Curve1) + * or `nil` if no curve set</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.getOutput", "symbol": "model.getOutput", "summary": "Get servo parameters", "parameters": [{"name": "index", "type": "integer", "required": true, "description": "output number (use 0 for CH1)"}], "returns": [{"name": "", "type": "nil", "description": "requested output does not exist"}, {"name": "", "type": "table", "description": "output parameters:\n* `name` (string) name\n * `min` (number) Minimum % * 10\n * `max` (number) Maximum % * 10\n * `offset` (number) Subtrim * 10\n * `ppmCenter` (number) offset from PPM Center. 0 = 1500\n * `symetrical` (number) linear Subtrim 0 = Off, 1 = On\n * `revert` (number) irection 0 = \u00ad\u00ad\u00ad---, 1 = INV\n * `curve`\n * (number) Curve number (0 for Curve1)\n * or `nil` if no curve set"}], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.getOutput(index) + +Get servo parameters + +@param index (unsigned number) output number (use 0 for CH1) + +@retval nil requested output does not exist + +@retval table output parameters: + * `name` (string) name + * `min` (number) Minimum % * 10 + * `max` (number) Maximum % * 10 + * `offset` (number) Subtrim * 10 + * `ppmCenter` (number) offset from PPM Center. 0 = 1500 + * `symetrical` (number) linear Subtrim 0 = Off, 1 = On + * `revert` (number) irection 0 = ­­­---, 1 = INV + * `curve` + * (number) Curve number (0 for Curve1) + * or `nil` if no curve set + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get servo parameters + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | output number (use 0 for CH1) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested output does not exist | +| `-` | `table` | output parameters: * `name` (string) name * `min` (number) Minimum % * 10 * `max` (number) Maximum % * 10 * `offset` (number) Subtrim * 10 * `ppmCenter` (number) offset from PPM Center. 0 = 1500 * `symetrical` (number) linear Subtrim 0 = Off, 1 = On * `revert` (number) irection 0 = ­­­---, 1 = INV * `curve` * (number) Curve number (0 for Curve1) * or `nil` if no curve set | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.getOutput([index]) + +Get servo parameters + +@param index (integer) output number (use 0 for CH1) + +@retval (nil) requested output does not exist + +@retval (table) output parameters: +* `name` (string) name + * `min` (number) Minimum % * 10 + * `max` (number) Maximum % * 10 + * `offset` (number) Subtrim * 10 + * `ppmCenter` (number) offset from PPM Center. 0 = 1500 + * `symetrical` (number) linear Subtrim 0 = Off, 1 = On + * `revert` (number) irection 0 = ­­­---, 1 = INV + * `curve` + * (number) Curve number (0 for Curve1) + * or `nil` if no curve set + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-get-sensor.md b/website/md-docs/api-reference/review-model-get-sensor.md new file mode 100644 index 000000000..692aae622 --- /dev/null +++ b/website/md-docs/api-reference/review-model-get-sensor.md @@ -0,0 +1,125 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.getSensor + +[Back to dashboard](review.md) | [Open API page](model-functions/model-get-sensor.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.getSensor` +- Doc id: `model.get-sensor` +- Source: `radio/src/lua/api_model.cpp:1731` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.getSensor"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>sensor</code></td><td>param</td><td><code>integer</code></td><td>sensor number (use 0 for sensor 1)</td><td><select data-field-kind="param" data-field-name="sensor" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="sensor" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>requested sensor does not exist</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>with sensor data: +* `type` (number) 0 = custom, 1 = calculated + * `name` (string) Name + * `unit` (number) See list of units in the appendix of the OpenTX Lua Reference Guide + * `prec` (number) Number of decimals + * `id` (number) Only custom sensors + * `instance` (number) Only custom sensors + * `formula` (number) Only calculated sensors. 0 = Add etc. see list of formula choices in Companion popup</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.getSensor", "symbol": "model.getSensor", "summary": "Get Telemetry Sensor parameters", "parameters": [{"name": "sensor", "type": "integer", "required": true, "description": "sensor number (use 0 for sensor 1)"}], "returns": [{"name": "", "type": "nil", "description": "requested sensor does not exist"}, {"name": "", "type": "table", "description": "with sensor data:\n* `type` (number) 0 = custom, 1 = calculated\n * `name` (string) Name\n * `unit` (number) See list of units in the appendix of the OpenTX Lua Reference Guide\n * `prec` (number) Number of decimals\n * `id` (number) Only custom sensors\n * `instance` (number) Only custom sensors\n * `formula` (number) Only calculated sensors. 0 = Add etc. see list of formula choices in Companion popup"}], "notes": [], "since": "2.3.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.getSensor(sensor) + +Get Telemetry Sensor parameters + +@param sensor (unsigned number) sensor number (use 0 for sensor 1) + +@retval nil requested sensor does not exist + +@retval table with sensor data: + * `type` (number) 0 = custom, 1 = calculated + * `name` (string) Name + * `unit` (number) See list of units in the appendix of the OpenTX Lua Reference Guide + * `prec` (number) Number of decimals + * `id` (number) Only custom sensors + * `instance` (number) Only custom sensors + * `formula` (number) Only calculated sensors. 0 = Add etc. see list of formula choices in Companion popup + +@status current Introduced in 2.3.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get Telemetry Sensor parameters + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sensor` | yes | `integer` | sensor number (use 0 for sensor 1) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested sensor does not exist | +| `-` | `table` | with sensor data: * `type` (number) 0 = custom, 1 = calculated * `name` (string) Name * `unit` (number) See list of units in the appendix of the OpenTX Lua Reference Guide * `prec` (number) Number of decimals * `id` (number) Only custom sensors * `instance` (number) Only custom sensors * `formula` (number) Only calculated sensors. 0 = Add etc. see list of formula choices in Companion popup | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.getSensor([sensor]) + +Get Telemetry Sensor parameters + +@param sensor (integer) sensor number (use 0 for sensor 1) + +@retval (nil) requested sensor does not exist + +@retval (table) with sensor data: +* `type` (number) 0 = custom, 1 = calculated + * `name` (string) Name + * `unit` (number) See list of units in the appendix of the OpenTX Lua Reference Guide + * `prec` (number) Number of decimals + * `id` (number) Only custom sensors + * `instance` (number) Only custom sensors + * `formula` (number) Only calculated sensors. 0 = Add etc. see list of formula choices in Companion popup + +@status current Introduced in 2.3.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-get-swash-ring.md b/website/md-docs/api-reference/review-model-get-swash-ring.md new file mode 100644 index 000000000..f398873e9 --- /dev/null +++ b/website/md-docs/api-reference/review-model-get-swash-ring.md @@ -0,0 +1,115 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.getSwashRing + +[Back to dashboard](review.md) | [Open API page](model-functions/model-get-swash-ring.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.getSwashRing` +- Doc id: `model.get-swash-ring` +- Source: `radio/src/lua/api_model.cpp:1798` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.getSwashRing"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>with heli swash parameters: +* `type` (number) 0=---, 1=120, 2=120X, 3=140, 4=90 +* `value` (number) swash ring value (normally 0) +* `collectiveSource` (number) source index +* `aileronSource` (number) source index +* `elevatorSource` (number) source index +* `collectiveWeight`(value) -100 to 100 +* `aileronWeight` (value) -100 to 100 +* `elevatorWeight` (value) -100 to 100</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.getSwashRing", "symbol": "model.getSwashRing", "summary": "Get heli swash parameters", "parameters": [], "returns": [{"name": "", "type": "table", "description": "with heli swash parameters:\n* `type` (number) 0=---, 1=120, 2=120X, 3=140, 4=90\n* `value` (number) swash ring value (normally 0)\n* `collectiveSource` (number) source index\n* `aileronSource` (number) source index\n* `elevatorSource` (number) source index\n* `collectiveWeight`(value) -100 to 100\n* `aileronWeight` (value) -100 to 100\n* `elevatorWeight` (value) -100 to 100"}], "notes": [], "since": "2.8.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.getSwashRing() + +Get heli swash parameters + +@retval table with heli swash parameters: +* `type` (number) 0=---, 1=120, 2=120X, 3=140, 4=90 +* `value` (number) swash ring value (normally 0) +* `collectiveSource` (number) source index +* `aileronSource` (number) source index +* `elevatorSource` (number) source index +* `collectiveWeight`(value) -100 to 100 +* `aileronWeight` (value) -100 to 100 +* `elevatorWeight` (value) -100 to 100 + + @status current Introduced in 2.8.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get heli swash parameters + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | with heli swash parameters: * `type` (number) 0=---, 1=120, 2=120X, 3=140, 4=90 * `value` (number) swash ring value (normally 0) * `collectiveSource` (number) source index * `aileronSource` (number) source index * `elevatorSource` (number) source index * `collectiveWeight`(value) -100 to 100 * `aileronWeight` (value) -100 to 100 * `elevatorWeight` (value) -100 to 100 | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.getSwashRing() + +Get heli swash parameters + +@retval (table) with heli swash parameters: +* `type` (number) 0=---, 1=120, 2=120X, 3=140, 4=90 +* `value` (number) swash ring value (normally 0) +* `collectiveSource` (number) source index +* `aileronSource` (number) source index +* `elevatorSource` (number) source index +* `collectiveWeight`(value) -100 to 100 +* `aileronWeight` (value) -100 to 100 +* `elevatorWeight` (value) -100 to 100 + +@status current Introduced in 2.8.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-get-timer.md b/website/md-docs/api-reference/review-model-get-timer.md new file mode 100644 index 000000000..b49a871aa --- /dev/null +++ b/website/md-docs/api-reference/review-model-get-timer.md @@ -0,0 +1,128 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.getTimer + +[Back to dashboard](review.md) | [Open API page](model-functions/model-get-timer.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.getTimer` +- Doc id: `model.get-timer` +- Source: `radio/src/lua/api_model.cpp:284` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.getTimer"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>timer</code></td><td>param</td><td><code>integer</code></td><td>timer index (0 for Timer 1)</td><td><select data-field-kind="param" data-field-name="timer" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="timer" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>requested timer does not exist</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>timer parameters: +* `mode` (number) timer trigger source: off, abs, stk, stk%, sw/!sw, !m_sw/!m_sw + * `start` (number) start value [seconds], 0 for up timer, 0> down timer + * `value` (number) current value [seconds] + * `countdownBeep` (number) countdown beep (0­ = silent, 1 =­ beeps, 2­ = voice) + * `minuteBeep` (boolean) minute beep + * `persistent` (number) persistent timer + * `name` (string) timer name + * `showElapsed` (boolean) show elapsed</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.getTimer", "symbol": "model.getTimer", "summary": "Get model timer parameters", "parameters": [{"name": "timer", "type": "integer", "required": true, "description": "timer index (0 for Timer 1)"}], "returns": [{"name": "", "type": "nil", "description": "requested timer does not exist"}, {"name": "", "type": "table", "description": "timer parameters:\n* `mode` (number) timer trigger source: off, abs, stk, stk%, sw/!sw, !m_sw/!m_sw\n * `start` (number) start value [seconds], 0 for up timer, 0> down timer\n * `value` (number) current value [seconds]\n * `countdownBeep` (number) countdown beep (0\u00ad = silent, 1 =\u00ad beeps, 2\u00ad = voice)\n * `minuteBeep` (boolean) minute beep\n * `persistent` (number) persistent timer\n * `name` (string) timer name\n * `showElapsed` (boolean) show elapsed"}], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.getTimer(timer) + +Get model timer parameters + +@param timer (number) timer index (0 for Timer 1) + +@retval nil requested timer does not exist + +@retval table timer parameters: + * `mode` (number) timer trigger source: off, abs, stk, stk%, sw/!sw, !m_sw/!m_sw + * `start` (number) start value [seconds], 0 for up timer, 0> down timer + * `value` (number) current value [seconds] + * `countdownBeep` (number) countdown beep (0­ = silent, 1 =­ beeps, 2­ = voice) + * `minuteBeep` (boolean) minute beep + * `persistent` (number) persistent timer + * `name` (string) timer name + * `showElapsed` (boolean) show elapsed + +@status current Introduced in 2.0.0, name added in 2.3.6, showElapsed added in 2.8.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get model timer parameters + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `timer` | yes | `integer` | timer index (0 for Timer 1) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | requested timer does not exist | +| `-` | `table` | timer parameters: * `mode` (number) timer trigger source: off, abs, stk, stk%, sw/!sw, !m_sw/!m_sw * `start` (number) start value [seconds], 0 for up timer, 0> down timer * `value` (number) current value [seconds] * `countdownBeep` (number) countdown beep (0­ = silent, 1 =­ beeps, 2­ = voice) * `minuteBeep` (boolean) minute beep * `persistent` (number) persistent timer * `name` (string) timer name * `showElapsed` (boolean) show elapsed | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.getTimer([timer]) + +Get model timer parameters + +@param timer (integer) timer index (0 for Timer 1) + +@retval (nil) requested timer does not exist + +@retval (table) timer parameters: +* `mode` (number) timer trigger source: off, abs, stk, stk%, sw/!sw, !m_sw/!m_sw + * `start` (number) start value [seconds], 0 for up timer, 0> down timer + * `value` (number) current value [seconds] + * `countdownBeep` (number) countdown beep (0­ = silent, 1 =­ beeps, 2­ = voice) + * `minuteBeep` (boolean) minute beep + * `persistent` (number) persistent timer + * `name` (string) timer name + * `showElapsed` (boolean) show elapsed + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-insert-input.md b/website/md-docs/api-reference/review-model-insert-input.md new file mode 100644 index 000000000..3933b3079 --- /dev/null +++ b/website/md-docs/api-reference/review-model-insert-input.md @@ -0,0 +1,103 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.insertInput + +[Back to dashboard](review.md) | [Open API page](model-functions/model-insert-input.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.insertInput` +- Doc id: `model.insert-input` +- Source: `radio/src/lua/api_model.cpp:650` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.insertInput"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>input</code></td><td>param</td><td><code>integer</code></td><td>input number (use 0 for Input1)</td><td><select data-field-kind="param" data-field-name="input" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="input" data-custom-type="true" /></td></tr> +<tr><td><code>line</code></td><td>param</td><td><code>integer</code></td><td>input line (use 0 for first line)</td><td><select data-field-kind="param" data-field-name="line" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="line" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>param</td><td><code>table</code></td><td>input data, see model.getInput()</td><td><select data-field-kind="param" data-field-name="value" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.insertInput", "symbol": "model.insertInput", "summary": "Insert an Input at specified line", "parameters": [{"name": "input", "type": "integer", "required": true, "description": "input number (use 0 for Input1)"}, {"name": "line", "type": "integer", "required": true, "description": "input line (use 0 for first line)"}, {"name": "value", "type": "table", "required": true, "description": "input data, see model.getInput()"}], "returns": [], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.insertInput(input, line, value) + +Insert an Input at specified line + +@param input (unsigned number) input number (use 0 for Input1) + +@param line (unsigned number) input line (use 0 for first line) + +@param value (table) input data, see model.getInput() + +@status current Introduced in 2.0.0, curveType/curveValue/carryTrim added in 2.3, inputName added 2.3.10, broken carryTrim replaced by trimSource in EdgeTX 2.8.1, scale added in 2.10 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Insert an Input at specified line + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `input` | yes | `integer` | input number (use 0 for Input1) | +| `line` | yes | `integer` | input line (use 0 for first line) | +| `value` | yes | `table` | input data, see model.getInput() | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.insertInput([input, line, value]) + +Insert an Input at specified line + +@param input (integer) input number (use 0 for Input1) + +@param line (integer) input line (use 0 for first line) + +@param value (table) input data, see model.getInput() + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-insert-mix.md b/website/md-docs/api-reference/review-model-insert-mix.md new file mode 100644 index 000000000..fda5589be --- /dev/null +++ b/website/md-docs/api-reference/review-model-insert-mix.md @@ -0,0 +1,103 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.insertMix + +[Back to dashboard](review.md) | [Open API page](model-functions/model-insert-mix.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.insertMix` +- Doc id: `model.insert-mix` +- Source: `radio/src/lua/api_model.cpp:892` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.insertMix"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>channel</code></td><td>param</td><td><code>integer</code></td><td>channel number (use 0 for CH1)</td><td><select data-field-kind="param" data-field-name="channel" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="channel" data-custom-type="true" /></td></tr> +<tr><td><code>line</code></td><td>param</td><td><code>integer</code></td><td>mix number (use 0 for first line(mix))</td><td><select data-field-kind="param" data-field-name="line" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="line" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>param</td><td><code>table</code></td><td>see model.getMix() for table format</td><td><select data-field-kind="param" data-field-name="value" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.insertMix", "symbol": "model.insertMix", "summary": "Insert a mixer line into Channel", "parameters": [{"name": "channel", "type": "integer", "required": true, "description": "channel number (use 0 for CH1)"}, {"name": "line", "type": "integer", "required": true, "description": "mix number (use 0 for first line(mix))"}, {"name": "value", "type": "table", "required": true, "description": "see model.getMix() for table format"}], "returns": [], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.insertMix(channel, line, value) + +Insert a mixer line into Channel + +@param channel (unsigned number) channel number (use 0 for CH1) + +@param line (unsigned number) mix number (use 0 for first line(mix)) + +@param value (table) see model.getMix() for table format + +@status current Introduced in 2.0.0, parameters below `multiplex` added in 2.0.13 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Insert a mixer line into Channel + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `channel` | yes | `integer` | channel number (use 0 for CH1) | +| `line` | yes | `integer` | mix number (use 0 for first line(mix)) | +| `value` | yes | `table` | see model.getMix() for table format | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.insertMix([channel, line, value]) + +Insert a mixer line into Channel + +@param channel (integer) channel number (use 0 for CH1) + +@param line (integer) mix number (use 0 for first line(mix)) + +@param value (table) see model.getMix() for table format + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-reset-sensor.md b/website/md-docs/api-reference/review-model-reset-sensor.md new file mode 100644 index 000000000..5405bc26d --- /dev/null +++ b/website/md-docs/api-reference/review-model-reset-sensor.md @@ -0,0 +1,98 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.resetSensor + +[Back to dashboard](review.md) | [Open API page](model-functions/model-reset-sensor.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.resetSensor` +- Doc id: `model.reset-sensor` +- Source: `radio/src/lua/api_model.cpp:1775` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.resetSensor"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>sensor</code></td><td>param</td><td><code>integer</code></td><td>sensor number (use 0 for sensor 1)</td><td><select data-field-kind="param" data-field-name="sensor" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="sensor" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td></td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.resetSensor", "symbol": "model.resetSensor", "summary": "Reset Telemetry Sensor parameters", "parameters": [{"name": "sensor", "type": "integer", "required": true, "description": "sensor number (use 0 for sensor 1)"}], "returns": [{"name": "", "type": "nil", "description": ""}], "notes": [], "since": "2.3.11"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.resetSensor(sensor) + +Reset Telemetry Sensor parameters + +@param sensor (unsigned number) sensor number (use 0 for sensor 1) + +@retval nil + +@status current Introduced in 2.3.11 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Reset Telemetry Sensor parameters + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sensor` | yes | `integer` | sensor number (use 0 for sensor 1) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.resetSensor([sensor]) + +Reset Telemetry Sensor parameters + +@param sensor (integer) sensor number (use 0 for sensor 1) + +@retval (nil) + +@status current Introduced in 2.3.11 +~~~~ diff --git a/website/md-docs/api-reference/review-model-reset-timer.md b/website/md-docs/api-reference/review-model-reset-timer.md new file mode 100644 index 000000000..0406d540c --- /dev/null +++ b/website/md-docs/api-reference/review-model-reset-timer.md @@ -0,0 +1,91 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.resetTimer + +[Back to dashboard](review.md) | [Open API page](model-functions/model-reset-timer.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.resetTimer` +- Doc id: `model.reset-timer` +- Source: `radio/src/lua/api_model.cpp:393` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.resetTimer"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>timer</code></td><td>param</td><td><code>integer</code></td><td>timer index (0 for Timer 1)</td><td><select data-field-kind="param" data-field-name="timer" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="timer" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.resetTimer", "symbol": "model.resetTimer", "summary": "Reset model timer to a startup value", "parameters": [{"name": "timer", "type": "integer", "required": true, "description": "timer index (0 for Timer 1)"}], "returns": [], "notes": [], "since": "unknown"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.resetTimer(timer) + +Reset model timer to a startup value + +@param timer (number) timer index (0 for Timer 1) + +@status current Introduced in TODO +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Reset model timer to a startup value + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `timer` | yes | `integer` | timer index (0 for Timer 1) | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.resetTimer([timer]) + +Reset model timer to a startup value + +@param timer (integer) timer index (0 for Timer 1) + +@status current Introduced in unknown +~~~~ diff --git a/website/md-docs/api-reference/review-model-set-curve.md b/website/md-docs/api-reference/review-model-set-curve.md new file mode 100644 index 000000000..254c4ae64 --- /dev/null +++ b/website/md-docs/api-reference/review-model-set-curve.md @@ -0,0 +1,143 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.setCurve + +[Back to dashboard](review.md) | [Open API page](model-functions/model-set-curve.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.setCurve` +- Doc id: `model.set-curve` +- Source: `radio/src/lua/api_model.cpp:1191` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.setCurve"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>curve</code></td><td>param</td><td><code>integer</code></td><td>curve number (use 0 for Curve1)</td><td><select data-field-kind="param" data-field-name="curve" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="curve" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>integer</code></td><td>see model.getCurve return format for table format. setCurve uses standard lua array indexing and arrays start at index 1</td><td><select data-field-kind="param" data-field-name="params" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>0</code></td><td>return</td><td><code>integer</code></td><td>- Everything okay 1 - Wrong number of points + 2 - Invalid Curve number + 3 - Cuve does not fit anymore + 4 - point of out of index + 5 - x value not monotonically increasing + 6 - y value not in range [-100;100] + 7 - extra values for y are set + 8 - extra values for x are set</td><td><select data-field-kind="return" data-field-name="0" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="0" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.setCurve", "symbol": "model.setCurve", "summary": "Set Curve parameters", "parameters": [{"name": "curve", "type": "integer", "required": true, "description": "curve number (use 0 for Curve1)"}, {"name": "params", "type": "integer", "required": true, "description": "see model.getCurve return format for table format. setCurve uses standard lua array indexing and arrays start at index 1"}], "returns": [{"name": "0", "type": "integer", "description": "- Everything okay 1 - Wrong number of points\n 2 - Invalid Curve number\n 3 - Cuve does not fit anymore\n 4 - point of out of index\n 5 - x value not monotonically increasing\n 6 - y value not in range [-100;100]\n 7 - extra values for y are set\n 8 - extra values for x are set"}], "notes": [], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.setCurve(curve, params) + +Set Curve parameters + +@param curve (unsigned number) curve number (use 0 for Curve1) + +@param params see model.getCurve return format for table format. setCurve uses standard + lua array indexing and arrays start at index 1 + +The first and last x value must -100 and 100 and x values must be monotonically increasing + +@retval 0 - Everything okay + 1 - Wrong number of points + 2 - Invalid Curve number + 3 - Cuve does not fit anymore + 4 - point of out of index + 5 - x value not monotonically increasing + 6 - y value not in range [-100;100] + 7 - extra values for y are set + 8 - extra values for x are set + +@status current Introduced in 2.2.0 + +Example setting a 4-point custom curve: +```lua + params = {} + params["x"] = {-100, -34, 77, 100} + params["y"] = {-70, 20, -89, -100} + params["smooth"] = true + params["type"] = 1 + val = model.setCurve(2, params) + ``` +setting a 6-point standard smoothed curve + ```lua + val = model.setCurve(3, {smooth=true, y={-100, -50, 0, 50, 100, 80}}) + ``` +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Set Curve parameters + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `curve` | yes | `integer` | curve number (use 0 for Curve1) | +| `params` | yes | `integer` | see model.getCurve return format for table format. setCurve uses standard lua array indexing and arrays start at index 1 | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `0` | `integer` | - Everything okay 1 - Wrong number of points 2 - Invalid Curve number 3 - Cuve does not fit anymore 4 - point of out of index 5 - x value not monotonically increasing 6 - y value not in range [-100;100] 7 - extra values for y are set 8 - extra values for x are set | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.setCurve([curve, params]) + +Set Curve parameters + +@param curve (integer) curve number (use 0 for Curve1) + +@param params (integer) see model.getCurve return format for table format. setCurve uses standard lua array indexing and arrays start at index 1 + +@retval 0 (integer) - Everything okay 1 - Wrong number of points + 2 - Invalid Curve number + 3 - Cuve does not fit anymore + 4 - point of out of index + 5 - x value not monotonically increasing + 6 - y value not in range [-100;100] + 7 - extra values for y are set + 8 - extra values for x are set + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-set-custom-function.md b/website/md-docs/api-reference/review-model-set-custom-function.md new file mode 100644 index 000000000..6d56c7766 --- /dev/null +++ b/website/md-docs/api-reference/review-model-set-custom-function.md @@ -0,0 +1,104 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.setCustomFunction + +[Back to dashboard](review.md) | [Open API page](model-functions/model-set-custom-function.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.setCustomFunction` +- Doc id: `model.set-custom-function` +- Source: `radio/src/lua/api_model.cpp:1431` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.setCustomFunction"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>function</code></td><td>param</td><td><code>integer</code></td><td>custom function number (use 0 for CF1)</td><td><select data-field-kind="param" data-field-name="function" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="function" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>param</td><td><code>table</code></td><td>custom function parameters, see model.getCustomFunction() for table format</td><td><select data-field-kind="param" data-field-name="value" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.setCustomFunction", "symbol": "model.setCustomFunction", "summary": "Set Custom Function parameters", "parameters": [{"name": "function", "type": "integer", "required": true, "description": "custom function number (use 0 for CF1)"}, {"name": "value", "type": "table", "required": true, "description": "custom function parameters, see model.getCustomFunction() for table format"}], "returns": [], "notes": ["If a parameter is missing from the value, then\nthat parameter remains unchanged."], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.setCustomFunction(function, value) + +Set Custom Function parameters + +@param function (unsigned number) custom function number (use 0 for CF1) + +@param value (table) custom function parameters, see model.getCustomFunction() for table format + +@notice If a parameter is missing from the value, then +that parameter remains unchanged. + +@status current Introduced in 2.0.0, TODO rename function +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Set Custom Function parameters + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `function` | yes | `integer` | custom function number (use 0 for CF1) | +| `value` | yes | `table` | custom function parameters, see model.getCustomFunction() for table format | + +#### Returns + +None. + +#### Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.setCustomFunction([function, value]) + +Set Custom Function parameters + +@param function (integer) custom function number (use 0 for CF1) + +@param value (table) custom function parameters, see model.getCustomFunction() for table format + +@notice If a parameter is missing from the value, then +that parameter remains unchanged. + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-set-flight-mode.md b/website/md-docs/api-reference/review-model-set-flight-mode.md new file mode 100644 index 000000000..9de5ae7e0 --- /dev/null +++ b/website/md-docs/api-reference/review-model-set-flight-mode.md @@ -0,0 +1,98 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.setFlightMode + +[Back to dashboard](review.md) | [Open API page](model-functions/model-set-flight-mode.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.setFlightMode` +- Doc id: `model.set-flight-mode` +- Source: `radio/src/lua/api_model.cpp:526` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: params + +## Decide + +- Unknown params to decide: `params` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.setFlightMode"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>index</code></td><td>param</td><td><code>integer</code></td><td>flight mode number (use 0 for FM0)</td><td><select data-field-kind="param" data-field-name="index" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="index" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>unknown</code></td><td>see model.getFlightMode return format for table format.</td><td><select data-field-kind="param" data-field-name="params" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.setFlightMode", "symbol": "model.setFlightMode", "summary": "Set Flight mode parameters", "parameters": [{"name": "index", "type": "integer", "required": true, "description": "flight mode number (use 0 for FM0)"}, {"name": "params", "type": "unknown", "required": true, "description": "see model.getFlightMode return format for table format."}], "returns": [], "notes": [], "since": "2.3.10"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.setFlightMode(index, params) + +Set Flight mode parameters + +@param index (unsigned number) flight mode number (use 0 for FM0) + +@param params see model.getFlightMode return format for table format. + +@status current Introduced in 2.3.10 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Set Flight mode parameters + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | flight mode number (use 0 for FM0) | +| `params` | yes | `unknown` | see model.getFlightMode return format for table format. | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.setFlightMode([index, params]) + +Set Flight mode parameters + +@param index (integer) flight mode number (use 0 for FM0) + +@param params (TODO) see model.getFlightMode return format for table format. + +@status current Introduced in 2.3.10 +~~~~ diff --git a/website/md-docs/api-reference/review-model-set-global-variable-details.md b/website/md-docs/api-reference/review-model-set-global-variable-details.md new file mode 100644 index 000000000..5d5693def --- /dev/null +++ b/website/md-docs/api-reference/review-model-set-global-variable-details.md @@ -0,0 +1,105 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.setGlobalVariableDetails + +[Back to dashboard](review.md) | [Open API page](model-functions/model-set-global-variable-details.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.setGlobalVariableDetails` +- Doc id: `model.set-global-variable-details` +- Source: `radio/src/lua/api_model.cpp:1684` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.setGlobalVariableDetails"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>index</code></td><td>param</td><td><code>integer</code></td><td>zero based global variable index, use 0 for GV1, 8 for GV9</td><td><select data-field-kind="param" data-field-name="index" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="index" data-custom-type="true" /></td></tr> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>see model.getGlobalVariableDetails(index) return format for table format</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.setGlobalVariableDetails", "symbol": "model.setGlobalVariableDetails", "summary": "Sets details about a Global Variable, but not values", "parameters": [{"name": "index", "type": "integer", "required": true, "description": "zero based global variable index, use 0 for GV1, 8 for GV9"}, {"name": "params", "type": "table", "required": true, "description": "see model.getGlobalVariableDetails(index) return format for table format"}], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.setGlobalVariableDetails(index, params) + +Sets details about a Global Variable, but not values + +@param index (number) zero based global variable index, use 0 for GV1, 8 for GV9 + +@param params (table) see model.getGlobalVariableDetails(index) return format for table format + +@retval none + +@status current Introduced in 2.11.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Sets details about a Global Variable, but not values + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | zero based global variable index, use 0 for GV1, 8 for GV9 | +| `params` | yes | `table` | see model.getGlobalVariableDetails(index) return format for table format | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.setGlobalVariableDetails([index, params]) + +Sets details about a Global Variable, but not values + +@param index (integer) zero based global variable index, use 0 for GV1, 8 for GV9 + +@param params (table) see model.getGlobalVariableDetails(index) return format for table format + +@retval none (TODO) + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-set-global-variable.md b/website/md-docs/api-reference/review-model-set-global-variable.md new file mode 100644 index 000000000..195dfb28c --- /dev/null +++ b/website/md-docs/api-reference/review-model-set-global-variable.md @@ -0,0 +1,113 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.setGlobalVariable + +[Back to dashboard](review.md) | [Open API page](model-functions/model-set-global-variable.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.setGlobalVariable` +- Doc id: `model.set-global-variable` +- Source: `radio/src/lua/api_model.cpp:1622` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: value + +## Decide + +- Unknown params to decide: `value` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.setGlobalVariable"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>index</code></td><td>param</td><td><code>integer</code></td><td>zero based global variable index, use 0 for GV1, 8 for GV9</td><td><select data-field-kind="param" data-field-name="index" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="index" data-custom-type="true" /></td></tr> +<tr><td><code>flight_mode</code></td><td>param</td><td><code>integer</code></td><td>Flight mode number (0 = FM0, 8 = FM8)</td><td><select data-field-kind="param" data-field-name="flight_mode" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flight_mode" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>param</td><td><code>unknown</code></td><td>new value for global variable. Permitted range is from -1024 to 1024.</td><td><select data-field-kind="param" data-field-name="value" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.setGlobalVariable", "symbol": "model.setGlobalVariable", "summary": "Sets current global variable value. See also model.getGlobalVariable()", "parameters": [{"name": "index", "type": "integer", "required": true, "description": "zero based global variable index, use 0 for GV1, 8 for GV9"}, {"name": "flight_mode", "type": "integer", "required": true, "description": "Flight mode number (0 = FM0, 8 = FM8)"}, {"name": "value", "type": "unknown", "required": true, "description": "new value for global variable. Permitted range is from -1024 to 1024."}], "returns": [], "notes": ["Global variable can only store integer values,\nany floating point value is converted into integer value\nby truncating everything behind a floating point."], "since": "unknown"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.setGlobalVariable(index, flight_mode, value) + +Sets current global variable value. See also model.getGlobalVariable() + +@param index zero based global variable index, use 0 for GV1, 8 for GV9 + +@param flight_mode Flight mode number (0 = FM0, 8 = FM8) + +@param value new value for global variable. Permitted range is +from -1024 to 1024. + +@notice Global variable can only store integer values, +any floating point value is converted into integer value +by truncating everything behind a floating point. +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Sets current global variable value. See also model.getGlobalVariable() + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | zero based global variable index, use 0 for GV1, 8 for GV9 | +| `flight_mode` | yes | `integer` | Flight mode number (0 = FM0, 8 = FM8) | +| `value` | yes | `unknown` | new value for global variable. Permitted range is from -1024 to 1024. | + +#### Returns + +None. + +#### Notes + +- Global variable can only store integer values, +any floating point value is converted into integer value +by truncating everything behind a floating point. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.setGlobalVariable([index, flight_mode, value]) + +Sets current global variable value. See also model.getGlobalVariable() + +@param index (integer) zero based global variable index, use 0 for GV1, 8 for GV9 + +@param flight_mode (integer) Flight mode number (0 = FM0, 8 = FM8) + +@param value (TODO) new value for global variable. Permitted range is from -1024 to 1024. + +@notice Global variable can only store integer values, +any floating point value is converted into integer value +by truncating everything behind a floating point. + +@status current Introduced in unknown +~~~~ diff --git a/website/md-docs/api-reference/review-model-set-info.md b/website/md-docs/api-reference/review-model-set-info.md new file mode 100644 index 000000000..58f82cc17 --- /dev/null +++ b/website/md-docs/api-reference/review-model-set-info.md @@ -0,0 +1,99 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.setInfo + +[Back to dashboard](review.md) | [Open API page](model-functions/model-set-info.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.setInfo` +- Doc id: `model.set-info` +- Source: `radio/src/lua/api_model.cpp:83` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: value + +## Decide + +- Unknown params to decide: `value` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.setInfo"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>value</code></td><td>param</td><td><code>unknown</code></td><td>model information data, see model.getInfo()</td><td><select data-field-kind="param" data-field-name="value" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.setInfo", "symbol": "model.setInfo", "summary": "Set the current Model information", "parameters": [{"name": "value", "type": "unknown", "required": true, "description": "model information data, see model.getInfo()"}], "returns": [], "notes": ["If a parameter is missing from the value, then\nthat parameter remains unchanged."], "since": "2.0.6"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.setInfo(value) + +Set the current Model information + +@param value model information data, see model.getInfo() + +@notice If a parameter is missing from the value, then +that parameter remains unchanged. + +@status current Introduced in 2.0.6, extendedLimits and jitterFilter added in 2.8.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Set the current Model information + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `value` | yes | `unknown` | model information data, see model.getInfo() | + +#### Returns + +None. + +#### Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.setInfo([value]) + +Set the current Model information + +@param value (TODO) model information data, see model.getInfo() + +@notice If a parameter is missing from the value, then +that parameter remains unchanged. + +@status current Introduced in 2.0.6 +~~~~ diff --git a/website/md-docs/api-reference/review-model-set-logical-switch.md b/website/md-docs/api-reference/review-model-set-logical-switch.md new file mode 100644 index 000000000..13950d2ad --- /dev/null +++ b/website/md-docs/api-reference/review-model-set-logical-switch.md @@ -0,0 +1,112 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.setLogicalSwitch + +[Back to dashboard](review.md) | [Open API page](model-functions/model-set-logical-switch.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.setLogicalSwitch` +- Doc id: `model.set-logical-switch` +- Source: `radio/src/lua/api_model.cpp:1062` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.setLogicalSwitch"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>switch</code></td><td>param</td><td><code>integer</code></td><td>logical switch number (use 0 for LS1)</td><td><select data-field-kind="param" data-field-name="switch" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="switch" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>param</td><td><code>table</code></td><td>see model.getLogicalSwitch() for table format</td><td><select data-field-kind="param" data-field-name="value" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.setLogicalSwitch", "symbol": "model.setLogicalSwitch", "summary": "Set Logical Switch parameters", "parameters": [{"name": "switch", "type": "integer", "required": true, "description": "logical switch number (use 0 for LS1)"}, {"name": "value", "type": "table", "required": true, "description": "see model.getLogicalSwitch() for table format"}], "returns": [], "notes": ["If a parameter is missing from the value, then\nthat parameter remains unchanged.", "To set the `and` member (which is Lua keyword)\nuse the following syntax: `model.setLogicalSwitch(30, {func=4,v1=1,v2=-99, [\"and\"]=24})`"], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.setLogicalSwitch(switch, value) + +Set Logical Switch parameters + +@param switch (unsigned number) logical switch number (use 0 for LS1) + +@param value (table) see model.getLogicalSwitch() for table format + +@notice If a parameter is missing from the value, then +that parameter remains unchanged. + +@notice To set the `and` member (which is Lua keyword) +use the following syntax: `model.setLogicalSwitch(30, {func=4,v1=1,v2=-99, ["and"]=24})` + +@status current Introduced in 2.0.0, state and persistent added in 2.11.2 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Set Logical Switch parameters + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `switch` | yes | `integer` | logical switch number (use 0 for LS1) | +| `value` | yes | `table` | see model.getLogicalSwitch() for table format | + +#### Returns + +None. + +#### Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. +- To set the `and` member (which is Lua keyword) +use the following syntax: `model.setLogicalSwitch(30, {func=4,v1=1,v2=-99, ["and"]=24})` + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.setLogicalSwitch([switch, value]) + +Set Logical Switch parameters + +@param switch (integer) logical switch number (use 0 for LS1) + +@param value (table) see model.getLogicalSwitch() for table format + +@notice If a parameter is missing from the value, then +that parameter remains unchanged. + +@notice To set the `and` member (which is Lua keyword) +use the following syntax: `model.setLogicalSwitch(30, {func=4,v1=1,v2=-99, ["and"]=24})` + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-set-module.md b/website/md-docs/api-reference/review-model-set-module.md new file mode 100644 index 000000000..e0734b9bb --- /dev/null +++ b/website/md-docs/api-reference/review-model-set-module.md @@ -0,0 +1,105 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.setModule + +[Back to dashboard](review.md) | [Open API page](model-functions/model-set-module.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.setModule` +- Doc id: `model.set-module` +- Source: `radio/src/lua/api_model.cpp:219` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: value + +## Decide + +- Unknown params to decide: `value` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.setModule"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>index</code></td><td>param</td><td><code>integer</code></td><td>module index (0 for internal, 1 for external)</td><td><select data-field-kind="param" data-field-name="index" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="index" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>param</td><td><code>unknown</code></td><td>module parameters, see model.getModule()</td><td><select data-field-kind="param" data-field-name="value" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.setModule", "symbol": "model.setModule", "summary": "Set RF module parameters", "parameters": [{"name": "index", "type": "integer", "required": true, "description": "module index (0 for internal, 1 for external)"}, {"name": "value", "type": "unknown", "required": true, "description": "module parameters, see model.getModule()"}], "returns": [], "notes": ["If a parameter is missing from the value, then\nthat parameter remains unchanged."], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.setModule(index, value) + +Set RF module parameters + +@param index (number) module index (0 for internal, 1 for external) + +@param value module parameters, see model.getModule() + +@notice If a parameter is missing from the value, then +that parameter remains unchanged. + +@status current Introduced in 2.2.0, modified in 2.3.12 (proto/subproto) +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Set RF module parameters + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | module index (0 for internal, 1 for external) | +| `value` | yes | `unknown` | module parameters, see model.getModule() | + +#### Returns + +None. + +#### Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.setModule([index, value]) + +Set RF module parameters + +@param index (integer) module index (0 for internal, 1 for external) + +@param value (TODO) module parameters, see model.getModule() + +@notice If a parameter is missing from the value, then +that parameter remains unchanged. + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-set-output.md b/website/md-docs/api-reference/review-model-set-output.md new file mode 100644 index 000000000..5dc6e3bcb --- /dev/null +++ b/website/md-docs/api-reference/review-model-set-output.md @@ -0,0 +1,104 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.setOutput + +[Back to dashboard](review.md) | [Open API page](model-functions/model-set-output.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.setOutput` +- Doc id: `model.set-output` +- Source: `radio/src/lua/api_model.cpp:1532` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.setOutput"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>index</code></td><td>param</td><td><code>integer</code></td><td>channel number (use 0 for CH1)</td><td><select data-field-kind="param" data-field-name="index" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="index" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>param</td><td><code>table</code></td><td>servo parameters, see model.getOutput() for table format</td><td><select data-field-kind="param" data-field-name="value" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.setOutput", "symbol": "model.setOutput", "summary": "Set servo parameters", "parameters": [{"name": "index", "type": "integer", "required": true, "description": "channel number (use 0 for CH1)"}, {"name": "value", "type": "table", "required": true, "description": "servo parameters, see model.getOutput() for table format"}], "returns": [], "notes": ["If a parameter is missing from the value, then\nthat parameter remains unchanged."], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.setOutput(index, value) + +Set servo parameters + +@param index (unsigned number) channel number (use 0 for CH1) + +@param value (table) servo parameters, see model.getOutput() for table format + +@notice If a parameter is missing from the value, then +that parameter remains unchanged. + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Set servo parameters + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `index` | yes | `integer` | channel number (use 0 for CH1) | +| `value` | yes | `table` | servo parameters, see model.getOutput() for table format | + +#### Returns + +None. + +#### Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.setOutput([index, value]) + +Set servo parameters + +@param index (integer) channel number (use 0 for CH1) + +@param value (table) servo parameters, see model.getOutput() for table format + +@notice If a parameter is missing from the value, then +that parameter remains unchanged. + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-set-swash-ring.md b/website/md-docs/api-reference/review-model-set-swash-ring.md new file mode 100644 index 000000000..1c6615ee5 --- /dev/null +++ b/website/md-docs/api-reference/review-model-set-swash-ring.md @@ -0,0 +1,95 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.setSwashRing + +[Back to dashboard](review.md) | [Open API page](model-functions/model-set-swash-ring.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.setSwashRing` +- Doc id: `model.set-swash-ring` +- Source: `radio/src/lua/api_model.cpp:1830` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.setSwashRing"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>params</code></td><td>param</td><td><code>table</code></td><td>swash ring parameters, see model.getSwashRing() for table format</td><td><select data-field-kind="param" data-field-name="params" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="params" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.setSwashRing", "symbol": "model.setSwashRing", "summary": "Set heli swash parameters", "parameters": [{"name": "params", "type": "table", "required": true, "description": "swash ring parameters, see model.getSwashRing() for table format"}], "returns": [], "notes": ["If a parameter is missing, then that parameter remains unchanged."], "since": "2.8.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.setSwashRing(params) + +Set heli swash parameters + +@param value (table) swash ring parameters, see model.getSwashRing() for table format + +@notice If a parameter is missing, then that parameter remains unchanged. + +@status current Introduced in 2.8.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Set heli swash parameters + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `params` | yes | `table` | swash ring parameters, see model.getSwashRing() for table format | + +#### Returns + +None. + +#### Notes + +- If a parameter is missing, then that parameter remains unchanged. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.setSwashRing([params]) + +Set heli swash parameters + +@param params (table) swash ring parameters, see model.getSwashRing() for table format + +@notice If a parameter is missing, then that parameter remains unchanged. + +@status current Introduced in 2.8.0 +~~~~ diff --git a/website/md-docs/api-reference/review-model-set-timer.md b/website/md-docs/api-reference/review-model-set-timer.md new file mode 100644 index 000000000..2fdd535f8 --- /dev/null +++ b/website/md-docs/api-reference/review-model-set-timer.md @@ -0,0 +1,105 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: model.setTimer + +[Back to dashboard](review.md) | [Open API page](model-functions/model-set-timer.md) + +## Snapshot + +- Module: `model` +- Current symbol: `model.setTimer` +- Doc id: `model.set-timer` +- Source: `radio/src/lua/api_model.cpp:329` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: value + +## Decide + +- Unknown params to decide: `value` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="model.setTimer"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>timer</code></td><td>param</td><td><code>integer</code></td><td>timer index (0 for Timer 1)</td><td><select data-field-kind="param" data-field-name="timer" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="timer" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>param</td><td><code>unknown</code></td><td>timer parameters, see model.getTimer()</td><td><select data-field-kind="param" data-field-name="value" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "model.setTimer", "symbol": "model.setTimer", "summary": "Set model timer parameters", "parameters": [{"name": "timer", "type": "integer", "required": true, "description": "timer index (0 for Timer 1)"}, {"name": "value", "type": "unknown", "required": true, "description": "timer parameters, see model.getTimer()"}], "returns": [], "notes": ["If a parameter is missing from the value, then\nthat parameter remains unchanged."], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function model.setTimer(timer, value) + +Set model timer parameters + +@param timer (number) timer index (0 for Timer 1) + +@param value timer parameters, see model.getTimer() + +@notice If a parameter is missing from the value, then +that parameter remains unchanged. + +@status current Introduced in 2.0.0, name added in 2.3.6, showElapsed added in 2.8.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Set model timer parameters + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `timer` | yes | `integer` | timer index (0 for Timer 1) | +| `value` | yes | `unknown` | timer parameters, see model.getTimer() | + +#### Returns + +None. + +#### Notes + +- If a parameter is missing from the value, then +that parameter remains unchanged. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function model.setTimer([timer, value]) + +Set model timer parameters + +@param timer (integer) timer index (0 for Timer 1) + +@param value (TODO) timer parameters, see model.getTimer() + +@notice If a parameter is missing from the value, then +that parameter remains unchanged. + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-access-telemetry-push.md b/website/md-docs/api-reference/review-runtime-access-telemetry-push.md new file mode 100644 index 000000000..c2c0d86f9 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-access-telemetry-push.md @@ -0,0 +1,134 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: accessTelemetryPush + +[Back to dashboard](review.md) | [Open API page](rf-module/access-telemetry-push.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `accessTelemetryPush` +- Doc id: `runtime.access-telemetry-push` +- Source: `radio/src/lua/api_general.cpp:1062` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: sensorId, frameId, dataId, value + +## Decide + +- Unknown params to decide: `sensorId, frameId, dataId, value` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="accessTelemetryPush"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>module</code></td><td>param</td><td><code>integer</code></td><td>module index (0 = internal, 1 = external)</td><td><select data-field-kind="param" data-field-name="module" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="module" data-custom-type="true" /></td></tr> +<tr><td><code>rxUid</code></td><td>param</td><td><code>integer</code></td><td>receiver index</td><td><select data-field-kind="param" data-field-name="rxUid" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="rxUid" data-custom-type="true" /></td></tr> +<tr><td><code>sensorId</code></td><td>param</td><td><code>unknown</code></td><td>physical sensor ID</td><td><select data-field-kind="param" data-field-name="sensorId" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="sensorId" data-custom-type="true" /></td></tr> +<tr><td><code>frameId</code></td><td>param</td><td><code>unknown</code></td><td>frame ID</td><td><select data-field-kind="param" data-field-name="frameId" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="frameId" data-custom-type="true" /></td></tr> +<tr><td><code>dataId</code></td><td>param</td><td><code>unknown</code></td><td>data ID</td><td><select data-field-kind="param" data-field-name="dataId" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="dataId" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>param</td><td><code>unknown</code></td><td>value</td><td><select data-field-kind="param" data-field-name="value" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>boolean</code></td><td>data queued in output buffer or not.</td><td><select data-field-kind="return" data-field-name="-" data-current-type="boolean"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "accessTelemetryPush", "symbol": "accessTelemetryPush", "summary": "This functions allows for sending SPORT / ACCESS telemetry data toward the receiver,\nand more generally, to anything connected SPORT bus on the receiver or transmitter.", "parameters": [{"name": "module", "type": "integer", "required": true, "description": "module index (0 = internal, 1 = external)"}, {"name": "rxUid", "type": "integer", "required": true, "description": "receiver index"}, {"name": "sensorId", "type": "unknown", "required": true, "description": "physical sensor ID"}, {"name": "frameId", "type": "unknown", "required": true, "description": "frame ID"}, {"name": "dataId", "type": "unknown", "required": true, "description": "data ID"}, {"name": "value", "type": "unknown", "required": true, "description": "value"}], "returns": [{"name": "", "type": "boolean", "description": "data queued in output buffer or not."}], "notes": [], "since": "2.3"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function accessTelemetryPush() + +This functions allows for sending SPORT / ACCESS telemetry data toward the receiver, +and more generally, to anything connected SPORT bus on the receiver or transmitter. + +When called without parameters, it will only return the status of the output buffer without sending anything. + +@param module module index (0 = internal, 1 = external) + +@param rxUid receiver index + +@param sensorId physical sensor ID + +@param frameId frame ID + +@param dataId data ID + +@param value value + +@retval boolean data queued in output buffer or not. + +@status current Introduced in 2.3 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +This functions allows for sending SPORT / ACCESS telemetry data toward the receiver, +and more generally, to anything connected SPORT bus on the receiver or transmitter. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `module` | yes | `integer` | module index (0 = internal, 1 = external) | +| `rxUid` | yes | `integer` | receiver index | +| `sensorId` | yes | `unknown` | physical sensor ID | +| `frameId` | yes | `unknown` | frame ID | +| `dataId` | yes | `unknown` | data ID | +| `value` | yes | `unknown` | value | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `boolean` | data queued in output buffer or not. | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function accessTelemetryPush([module, rxUid, sensorId, frameId, dataId, value]) + +This functions allows for sending SPORT / ACCESS telemetry data toward the receiver, +and more generally, to anything connected SPORT bus on the receiver or transmitter. + +@param module (integer) module index (0 = internal, 1 = external) + +@param rxUid (integer) receiver index + +@param sensorId (TODO) physical sensor ID + +@param frameId (TODO) frame ID + +@param dataId (TODO) data ID + +@param value (TODO) value + +@retval (boolean) data queued in output buffer or not. + +@status current Introduced in 2.3 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-apply-rgbled-colors.md b/website/md-docs/api-reference/review-runtime-apply-rgbled-colors.md new file mode 100644 index 000000000..15ba71d52 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-apply-rgbled-colors.md @@ -0,0 +1,75 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: applyRGBLedColors + +[Back to dashboard](review.md) | [Open API page](radio-hardware/apply-rgbled-colors.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `applyRGBLedColors` +- Doc id: `runtime.apply-rgbled-colors` +- Source: `radio/src/lua/api_general.cpp:3007` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +No fields to edit. + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function applyRGBLedColors() + + Apply RGB led colors previously defined by setRGBLedColor + +@status current Introduced in 2.10 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Apply RGB led colors previously defined by setRGBLedColor + +#### Parameters + +None. + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function applyRGBLedColors() + +Apply RGB led colors previously defined by setRGBLedColor + +@status current Introduced in 2.10 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-chdir.md b/website/md-docs/api-reference/review-runtime-chdir.md new file mode 100644 index 000000000..e1f219bc8 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-chdir.md @@ -0,0 +1,91 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: chdir + +[Back to dashboard](review.md) | [Open API page](filesystem/chdir.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `chdir` +- Doc id: `runtime.chdir` +- Source: `radio/src/lua/api_filesystem.cpp:187` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="chdir"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>directory</code></td><td>param</td><td><code>string</code></td><td>New working directory</td><td><select data-field-kind="param" data-field-name="directory" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="directory" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "chdir", "symbol": "chdir", "summary": "Change the working directory", "parameters": [{"name": "directory", "type": "string", "required": true, "description": "New working directory"}], "returns": [], "notes": [], "since": "2.3.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function chdir(directory) + + Change the working directory + +@param directory (string) New working directory + +@status current Introduced in 2.3.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Change the working directory + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `directory` | yes | `string` | New working directory | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function chdir([directory]) + +Change the working directory + +@param directory (string) New working directory + +@status current Introduced in 2.3.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-crossfire-telemetry-pop.md b/website/md-docs/api-reference/review-runtime-crossfire-telemetry-pop.md new file mode 100644 index 000000000..38af9fb7e --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-crossfire-telemetry-pop.md @@ -0,0 +1,103 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: crossfireTelemetryPop + +[Back to dashboard](review.md) | [Open API page](telemetry/crossfire-telemetry-pop.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `crossfireTelemetryPop` +- Doc id: `runtime.crossfire-telemetry-pop` +- Source: `radio/src/lua/api_general.cpp:1140` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="crossfireTelemetryPop"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>queue does not contain any (or enough) bytes to form a whole packet</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>command</code></td><td>return</td><td><code>integer</code></td><td></td><td><select data-field-kind="return" data-field-name="command" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="command" data-custom-type="true" /></td></tr> +<tr><td><code>packet</code></td><td>return</td><td><code>table</code></td><td>data bytes</td><td><select data-field-kind="return" data-field-name="packet" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="packet" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "crossfireTelemetryPop", "symbol": "crossfireTelemetryPop", "summary": "Pops a received Crossfire Telemetry packet from the queue.", "parameters": [], "returns": [{"name": "", "type": "nil", "description": "queue does not contain any (or enough) bytes to form a whole packet"}, {"name": "command", "type": "integer", "description": ""}, {"name": "packet", "type": "table", "description": "data bytes"}], "notes": [], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function crossfireTelemetryPop() + +Pops a received Crossfire Telemetry packet from the queue. + +@retval nil queue does not contain any (or enough) bytes to form a whole packet + +@retval multiple returns 2 values: + * command (number) + * packet (table) data bytes + +@status current Introduced in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Pops a received Crossfire Telemetry packet from the queue. + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | queue does not contain any (or enough) bytes to form a whole packet | +| `command` | `integer` | | +| `packet` | `table` | data bytes | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function crossfireTelemetryPop() + +Pops a received Crossfire Telemetry packet from the queue. + +@retval (nil) queue does not contain any (or enough) bytes to form a whole packet + +@retval command (integer) + +@retval packet (table) data bytes + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-crossfire-telemetry-push.md b/website/md-docs/api-reference/review-runtime-crossfire-telemetry-push.md new file mode 100644 index 000000000..f32979c6b --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-crossfire-telemetry-push.md @@ -0,0 +1,113 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: crossfireTelemetryPush + +[Back to dashboard](review.md) | [Open API page](rf-module/crossfire-telemetry-push.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `crossfireTelemetryPush` +- Doc id: `runtime.crossfire-telemetry-push` +- Source: `radio/src/lua/api_general.cpp:1178` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: command + +## Decide + +- Unknown params to decide: `command` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="crossfireTelemetryPush"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>command</code></td><td>param</td><td><code>unknown</code></td><td>command</td><td><select data-field-kind="param" data-field-name="command" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="command" data-custom-type="true" /></td></tr> +<tr><td><code>data</code></td><td>param</td><td><code>table</code></td><td>table of data bytes</td><td><select data-field-kind="param" data-field-name="data" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="data" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>boolean</code></td><td>data queued in output buffer or not.</td><td><select data-field-kind="return" data-field-name="-" data-current-type="boolean"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>incorrect telemetry protocol.</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "crossfireTelemetryPush", "symbol": "crossfireTelemetryPush", "summary": "This functions allows for sending telemetry data toward the TBS Crossfire link.", "parameters": [{"name": "command", "type": "unknown", "required": true, "description": "command"}, {"name": "data", "type": "table", "required": true, "description": "table of data bytes"}], "returns": [{"name": "", "type": "boolean", "description": "data queued in output buffer or not."}, {"name": "", "type": "nil", "description": "incorrect telemetry protocol."}], "notes": [], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function crossfireTelemetryPush() + +This functions allows for sending telemetry data toward the TBS Crossfire link. + +When called without parameters, it will only return the status of the output buffer without sending anything. + +@param command command + +@param data table of data bytes + +@retval boolean data queued in output buffer or not. + +@retval nil incorrect telemetry protocol. + +@status current Introduced in 2.2.0, retval nil added in 2.3.4 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +This functions allows for sending telemetry data toward the TBS Crossfire link. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `command` | yes | `unknown` | command | +| `data` | yes | `table` | table of data bytes | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `boolean` | data queued in output buffer or not. | +| `-` | `nil` | incorrect telemetry protocol. | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function crossfireTelemetryPush([command, data]) + +This functions allows for sending telemetry data toward the TBS Crossfire link. + +@param command (TODO) command + +@param data (table) table of data bytes + +@retval (boolean) data queued in output buffer or not. + +@retval (nil) incorrect telemetry protocol. + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-default-channel.md b/website/md-docs/api-reference/review-runtime-default-channel.md new file mode 100644 index 000000000..e2dfdd199 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-default-channel.md @@ -0,0 +1,104 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: defaultChannel + +[Back to dashboard](review.md) | [Open API page](key-inputs/default-channel.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `defaultChannel` +- Doc id: `runtime.default-channel` +- Source: `radio/src/lua/api_general.cpp:2047` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="defaultChannel"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>stick</code></td><td>param</td><td><code>integer</code></td><td>stick number (from 0 to 3)</td><td><select data-field-kind="param" data-field-name="stick" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="stick" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>channel assigned to this stick (from 0 to 3)</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>stick not found</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "defaultChannel", "symbol": "defaultChannel", "summary": "Get channel assigned to stick. See Default Channel Order in General Settings", "parameters": [{"name": "stick", "type": "integer", "required": true, "description": "stick number (from 0 to 3)"}], "returns": [{"name": "", "type": "integer", "description": "channel assigned to this stick (from 0 to 3)"}, {"name": "", "type": "nil", "description": "stick not found"}], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function defaultChannel(stick) + +Get channel assigned to stick. See Default Channel Order in General Settings + +@param stick (number) stick number (from 0 to 3) + +@retval number channel assigned to this stick (from 0 to 3) + +@retval nil stick not found + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get channel assigned to stick. See Default Channel Order in General Settings + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `stick` | yes | `integer` | stick number (from 0 to 3) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | channel assigned to this stick (from 0 to 3) | +| `-` | `nil` | stick not found | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function defaultChannel([stick]) + +Get channel assigned to stick. See Default Channel Order in General Settings + +@param stick (integer) stick number (from 0 to 3) + +@retval (integer) channel assigned to this stick (from 0 to 3) + +@retval (nil) stick not found + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-default-stick.md b/website/md-docs/api-reference/review-runtime-default-stick.md new file mode 100644 index 000000000..411e9bec6 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-default-stick.md @@ -0,0 +1,98 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: defaultStick + +[Back to dashboard](review.md) | [Open API page](key-inputs/default-stick.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `defaultStick` +- Doc id: `runtime.default-stick` +- Source: `radio/src/lua/api_general.cpp:1962` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="defaultStick"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>channel</code></td><td>param</td><td><code>integer</code></td><td>channel number (0 means CH1)</td><td><select data-field-kind="param" data-field-name="channel" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="channel" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>Stick assigned to this channel (from 0 to 3)</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "defaultStick", "symbol": "defaultStick", "summary": "Get stick that is assigned to a channel. See Default Channel Order in General Settings.", "parameters": [{"name": "channel", "type": "integer", "required": true, "description": "channel number (0 means CH1)"}], "returns": [{"name": "", "type": "integer", "description": "Stick assigned to this channel (from 0 to 3)"}], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function defaultStick(channel) + +Get stick that is assigned to a channel. See Default Channel Order in General Settings. + +@param channel (number) channel number (0 means CH1) + +@retval number Stick assigned to this channel (from 0 to 3) + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get stick that is assigned to a channel. See Default Channel Order in General Settings. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `channel` | yes | `integer` | channel number (0 means CH1) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | Stick assigned to this channel (from 0 to 3) | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function defaultStick([channel]) + +Get stick that is assigned to a channel. See Default Channel Order in General Settings. + +@param channel (integer) channel number (0 means CH1) + +@retval (integer) Stick assigned to this channel (from 0 to 3) + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-del.md b/website/md-docs/api-reference/review-runtime-del.md new file mode 100644 index 000000000..dd29968bf --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-del.md @@ -0,0 +1,85 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: del + +[Back to dashboard](review.md) | [Open API page](filesystem/del.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `del` +- Doc id: `runtime.del` +- Source: `radio/src/lua/api_filesystem.cpp:157` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +No fields to edit. + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function del(file or directory) + + Returns FRESULT (e.g. 0=OK, 4=File not found, 5=Path not found, 6=Path invalid) + +@status current Introduced in 2.9.0 + +### Example + +```lua + if del("/SCRIPTS/TOOLS/deleteme.txt") == 0 then + -- successfully deleted file + else + -- failed to delete file + end +``` +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Returns FRESULT (e.g. 0=OK, 4=File not found, 5=Path not found, 6=Path invalid) + +#### Parameters + +None. + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function del() + +Returns FRESULT (e.g. 0=OK, 4=File not found, 5=Path not found, 6=Path invalid) + +@status current Introduced in 2.9.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-dir.md b/website/md-docs/api-reference/review-runtime-dir.md new file mode 100644 index 000000000..ef7a0dfcf --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-dir.md @@ -0,0 +1,99 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: dir + +[Back to dashboard](review.md) | [Open API page](filesystem/dir.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `dir` +- Doc id: `runtime.dir` +- Source: `radio/src/lua/api_filesystem.cpp:50` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="dir"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>directory</code></td><td>param</td><td><code>string</code></td><td>Working directory</td><td><select data-field-kind="param" data-field-name="directory" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="directory" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "dir", "symbol": "dir", "summary": "Return an iterator listing all the files and directories name in a directory", "parameters": [{"name": "directory", "type": "string", "required": true, "description": "Working directory"}], "returns": [], "notes": [], "since": "2.5.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function dir(directory) + + Return an iterator listing all the files and directories name in a directory + +@param directory (string) Working directory + +@status current Introduced in 2.5.0 + +### Example + +```lua + for fname in dir(".") do + print(fname) + end +``` +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return an iterator listing all the files and directories name in a directory + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `directory` | yes | `string` | Working directory | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function dir([directory]) + +Return an iterator listing all the files and directories name in a directory + +@param directory (string) Working directory + +@status current Introduced in 2.5.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-flush-audio.md b/website/md-docs/api-reference/review-runtime-flush-audio.md new file mode 100644 index 000000000..bb120db2b --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-flush-audio.md @@ -0,0 +1,75 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: flushAudio + +[Back to dashboard](review.md) | [Open API page](audio-sound/flush-audio.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `flushAudio` +- Doc id: `runtime.flush-audio` +- Source: `radio/src/lua/api_general.cpp:2074` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +No fields to edit. + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function flushAudio() + +flushes audio queue + +@status experimental +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +flushes audio queue + +#### Parameters + +None. + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function flushAudio() + +flushes audio queue + +@status current Introduced in unknown +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-fstat.md b/website/md-docs/api-reference/review-runtime-fstat.md new file mode 100644 index 000000000..5844417be --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-fstat.md @@ -0,0 +1,150 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: fstat + +[Back to dashboard](review.md) | [Open API page](filesystem/fstat.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `fstat` +- Doc id: `runtime.fstat` +- Source: `radio/src/lua/api_filesystem.cpp:88` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="fstat"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>path</code></td><td>param</td><td><code>string</code></td><td>path to the object</td><td><select data-field-kind="param" data-field-name="path" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="path" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>object info, table elements: +* `size` (number) file size +* `attrib` (number) file attribute flags +* `time` (table) table with last time modified date and times, table elements: + * `year` (number) year + * `mon` (number) month + * `day` (number) day of month + * `hour` (number) hours + * `hour12` (number) hours in US format + * `min` (number) minutes + * `sec` (number) seconds + * `suffix` (text) am or pm</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "fstat", "symbol": "fstat", "summary": "Checks the existence of file or directory.\n If not exist, return nil.\n If exist, return the object information.", "parameters": [{"name": "path", "type": "string", "required": true, "description": "path to the object"}], "returns": [{"name": "", "type": "table", "description": "object info, table elements:\n* `size` (number) file size\n* `attrib` (number) file attribute flags\n* `time` (table) table with last time modified date and times, table elements:\n * `year` (number) year\n * `mon` (number) month\n * `day` (number) day of month\n * `hour` (number) hours\n * `hour12` (number) hours in US format\n * `min` (number) minutes\n * `sec` (number) seconds\n * `suffix` (text) am or pm"}], "notes": [], "since": "2.5.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function fstat(path) + + Checks the existence of file or directory. + If not exist, return nil. + If exist, return the object information. + +@param path (string) path to the object + +@retval table object info, table elements: +* `size` (number) file size +* `attrib` (number) file attribute flags +* `time` (table) table with last time modified date and times, table elements: + * `year` (number) year + * `mon` (number) month + * `day` (number) day of month + * `hour` (number) hours + * `hour12` (number) hours in US format + * `min` (number) minutes + * `sec` (number) seconds + * `suffix` (text) am or pm + +### Example + +```lua + info = fstat("radio") + if info ~= nil then + if (info.attrib == AM_DIR) then + print("is a directory") + end + + size = info.size + time = info.time + end +``` +@status current Introduced in 2.5.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Checks the existence of file or directory. + If not exist, return nil. + If exist, return the object information. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `path` | yes | `string` | path to the object | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | object info, table elements: * `size` (number) file size * `attrib` (number) file attribute flags * `time` (table) table with last time modified date and times, table elements: * `year` (number) year * `mon` (number) month * `day` (number) day of month * `hour` (number) hours * `hour12` (number) hours in US format * `min` (number) minutes * `sec` (number) seconds * `suffix` (text) am or pm | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function fstat([path]) + +Checks the existence of file or directory. + If not exist, return nil. + If exist, return the object information. + +@param path (string) path to the object + +@retval (table) object info, table elements: +* `size` (number) file size +* `attrib` (number) file attribute flags +* `time` (table) table with last time modified date and times, table elements: + * `year` (number) year + * `mon` (number) month + * `day` (number) day of month + * `hour` (number) hours + * `hour12` (number) hours in US format + * `min` (number) minutes + * `sec` (number) seconds + * `suffix` (text) am or pm + +@status current Introduced in 2.5.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-available-memory.md b/website/md-docs/api-reference/review-runtime-get-available-memory.md new file mode 100644 index 000000000..c1a975e05 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-available-memory.md @@ -0,0 +1,89 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getAvailableMemory + +[Back to dashboard](review.md) | [Open API page](system/get-available-memory.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getAvailableMemory` +- Doc id: `runtime.get-available-memory` +- Source: `radio/src/lua/api_general.cpp:2213` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getAvailableMemory"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>usage</code></td><td>return</td><td><code>integer</code></td><td>a value returned in b</td><td><select data-field-kind="return" data-field-name="usage" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="usage" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getAvailableMemory", "symbol": "getAvailableMemory", "summary": "Get available memory remaining in the Heap for Lua.", "parameters": [], "returns": [{"name": "usage", "type": "integer", "description": "a value returned in b"}], "notes": [], "since": "unknown"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getAvailableMemory() + +Get available memory remaining in the Heap for Lua. + +@retval usage (number) a value returned in b +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get available memory remaining in the Heap for Lua. + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `usage` | `integer` | a value returned in b | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getAvailableMemory() + +Get available memory remaining in the Heap for Lua. + +@retval usage (integer) a value returned in b + +@status current Introduced in unknown +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-date-time.md b/website/md-docs/api-reference/review-runtime-get-date-time.md new file mode 100644 index 000000000..97b9c0ab5 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-date-time.md @@ -0,0 +1,113 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getDateTime + +[Back to dashboard](review.md) | [Open API page](time/get-date-time.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getDateTime` +- Doc id: `runtime.get-date-time` +- Source: `radio/src/lua/api_general.cpp:233` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getDateTime"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>current date and time, table elements: +* `year` (number) year + * `mon` (number) month + * `day` (number) day of month + * `hour` (number) hours + * `hour12` (number) hours in US format + * `min` (number) minutes + * `sec` (number) seconds + * `suffix` (text) am or pm</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getDateTime", "symbol": "getDateTime", "summary": "Return current system date and time that is kept by the RTC unit", "parameters": [], "returns": [{"name": "", "type": "table", "description": "current date and time, table elements:\n* `year` (number) year\n * `mon` (number) month\n * `day` (number) day of month\n * `hour` (number) hours\n * `hour12` (number) hours in US format\n * `min` (number) minutes\n * `sec` (number) seconds\n * `suffix` (text) am or pm"}], "notes": [], "since": "unknown"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getDateTime() + +Return current system date and time that is kept by the RTC unit + +@retval table current date and time, table elements: + * `year` (number) year + * `mon` (number) month + * `day` (number) day of month + * `hour` (number) hours + * `hour12` (number) hours in US format + * `min` (number) minutes + * `sec` (number) seconds + * `suffix` (text) am or pm +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return current system date and time that is kept by the RTC unit + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | current date and time, table elements: * `year` (number) year * `mon` (number) month * `day` (number) day of month * `hour` (number) hours * `hour12` (number) hours in US format * `min` (number) minutes * `sec` (number) seconds * `suffix` (text) am or pm | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getDateTime() + +Return current system date and time that is kept by the RTC unit + +@retval (table) current date and time, table elements: +* `year` (number) year + * `mon` (number) month + * `day` (number) day of month + * `hour` (number) hours + * `hour12` (number) hours in US format + * `min` (number) minutes + * `sec` (number) seconds + * `suffix` (text) am or pm + +@status current Introduced in unknown +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-field-info.md b/website/md-docs/api-reference/review-runtime-get-field-info.md new file mode 100644 index 000000000..49f0a3d64 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-field-info.md @@ -0,0 +1,125 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getFieldInfo + +[Back to dashboard](review.md) | [Open API page](sources/get-field-info.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getFieldInfo` +- Doc id: `runtime.get-field-info` +- Source: `radio/src/lua/api_general.cpp:608` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getFieldInfo"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>source</code></td><td>param</td><td><code>string</code></td><td>can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source.</td><td><select data-field-kind="param" data-field-name="source" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="source" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>information about requested field, table elements: +* `id` (number) field identifier + * `name` (string) field name + * `desc` (string) field description + * `unit` (number) unit identifier, see the Units reference for the full list</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>the requested field was not found</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getFieldInfo", "symbol": "getFieldInfo", "summary": "Return detailed information about field (source)", "parameters": [{"name": "source", "type": "string", "required": true, "description": "can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source."}], "returns": [{"name": "", "type": "table", "description": "information about requested field, table elements:\n* `id` (number) field identifier\n * `name` (string) field name\n * `desc` (string) field description\n * `unit` (number) unit identifier, see the Units reference for the full list"}, {"name": "", "type": "nil", "description": "the requested field was not found"}], "notes": [], "since": "2.0.8"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getFieldInfo(source) + +Return detailed information about field (source) + +The list of valid sources is available: + +| OpenTX Version | Radio | +|----------------|-------| +| 2.0 | [all](http://downloads-20.open-tx.org/firmware/lua_fields.txt) | +| 2.1 | [X9D and X9D+](http://downloads-21.open-tx.org/firmware/lua_fields_taranis.txt), [X9E](http://downloads-21.open-tx.org/firmware/lua_fields_taranis_x9e.txt) | +| 2.2 | [X9D and X9D+](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9e.txt), [Horus](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x12s.txt) | +| 2.3 | [X9D and X9D+](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9e.txt), [X7](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x7.txt), [Horus](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x12s.txt) | + +@param source can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source. + +@retval table information about requested field, table elements: + * `id` (number) field identifier + * `name` (string) field name + * `desc` (string) field description + * `unit` (number) unit identifier, see the Units reference for the full list + +@retval nil the requested field was not found + +@status current Introduced in 2.0.8, 'unit' field added in 2.2.0, and argument also can be an index number as of 2.6.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return detailed information about field (source) + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `source` | yes | `string` | can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source. | + +#### Returns + +| 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, see the Units reference for the full list | +| `-` | `nil` | the requested field was not found | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getFieldInfo([source]) + +Return detailed information about field (source) + +@param source (string) can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source. + +@retval (table) information about requested field, table elements: +* `id` (number) field identifier + * `name` (string) field name + * `desc` (string) field description + * `unit` (number) unit identifier, see the Units reference for the full list + +@retval (nil) the requested field was not found + +@status current Introduced in 2.0.8 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-flight-mode.md b/website/md-docs/api-reference/review-runtime-get-flight-mode.md new file mode 100644 index 000000000..8ce8079c7 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-flight-mode.md @@ -0,0 +1,105 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getFlightMode + +[Back to dashboard](review.md) | [Open API page](model-functions/get-flight-mode.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getFlightMode` +- Doc id: `runtime.get-flight-mode` +- Source: `radio/src/lua/api_general.cpp:1427` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getFlightMode"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>mode</code></td><td>param</td><td><code>integer</code></td><td>flight mode number to return (0 - 8). If mode parameter is not specified (or contains invalid value), then the current flight mode data is returned.</td><td><select data-field-kind="param" data-field-name="mode" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="mode" data-custom-type="true" /></td></tr> +<tr><td><code>current_flight_mode_number_0_8</code></td><td>return</td><td><code>integer</code></td><td>(current) flight mode number (0 - 8)</td><td><select data-field-kind="return" data-field-name="current_flight_mode_number_0_8" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="current_flight_mode_number_0_8" data-custom-type="true" /></td></tr> +<tr><td><code>current_flight_mode_name</code></td><td>return</td><td><code>string</code></td><td>(current) flight mode name</td><td><select data-field-kind="return" data-field-name="current_flight_mode_name" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="current_flight_mode_name" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getFlightMode", "symbol": "getFlightMode", "summary": "Return flight mode data.", "parameters": [{"name": "mode", "type": "integer", "required": true, "description": "flight mode number to return (0 - 8). If mode parameter is not specified (or contains invalid value), then the current flight mode data is returned."}], "returns": [{"name": "current_flight_mode_number_0_8", "type": "integer", "description": "(current) flight mode number (0 - 8)"}, {"name": "current_flight_mode_name", "type": "string", "description": "(current) flight mode name"}], "notes": [], "since": "2.1.7"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getFlightMode(mode) + +Return flight mode data. + +@param mode (number) flight mode number to return (0 - 8). If mode parameter +is not specified (or contains invalid value), then the current flight mode data is returned. + +@retval multiple returns 2 values: + * (number) (current) flight mode number (0 - 8) + * (string) (current) flight mode name + +@status current Introduced in 2.1.7 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return flight mode data. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `mode` | yes | `integer` | flight mode number to return (0 - 8). If mode parameter is not specified (or contains invalid value), then the current flight mode data is returned. | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `current_flight_mode_number_0_8` | `integer` | (current) flight mode number (0 - 8) | +| `current_flight_mode_name` | `string` | (current) flight mode name | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getFlightMode([mode]) + +Return flight mode data. + +@param mode (integer) flight mode number to return (0 - 8). If mode parameter is not specified (or contains invalid value), then the current flight mode data is returned. + +@retval current_flight_mode_number_0_8 (integer) (current) flight mode number (0 - 8) + +@retval current_flight_mode_name (string) (current) flight mode name + +@status current Introduced in 2.1.7 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-general-settings.md b/website/md-docs/api-reference/review-runtime-get-general-settings.md new file mode 100644 index 000000000..10b6805a6 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-general-settings.md @@ -0,0 +1,116 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getGeneralSettings + +[Back to dashboard](review.md) | [Open API page](system/get-general-settings.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getGeneralSettings` +- Doc id: `runtime.get-general-settings` +- Source: `radio/src/lua/api_general.cpp:1735` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getGeneralSettings"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>with elements: +* `battWarn` (number) radio battery range - warning value + * `battMin` (number) radio battery range - minimum value + * `battMax` (number) radio battery range - maximum value + * `imperial` (number) set to a value different from 0 if the radio is set to the + IMPERIAL units + * `language` (string) radio language (used for menus) + * `voice` (string) voice language (used for speech) + * `gtimer` (number) radio global timer in seconds (does not include current session)</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getGeneralSettings", "symbol": "getGeneralSettings", "summary": "Returns (some of) the general radio settings", "parameters": [], "returns": [{"name": "", "type": "table", "description": "with elements:\n* `battWarn` (number) radio battery range - warning value\n * `battMin` (number) radio battery range - minimum value\n * `battMax` (number) radio battery range - maximum value\n * `imperial` (number) set to a value different from 0 if the radio is set to the\n IMPERIAL units\n * `language` (string) radio language (used for menus)\n * `voice` (string) voice language (used for speech)\n * `gtimer` (number) radio global timer in seconds (does not include current session)"}], "notes": [], "since": "2.0.6"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getGeneralSettings() + +Returns (some of) the general radio settings + +@retval table with elements: + * `battWarn` (number) radio battery range - warning value + * `battMin` (number) radio battery range - minimum value + * `battMax` (number) radio battery range - maximum value + * `imperial` (number) set to a value different from 0 if the radio is set to the + IMPERIAL units + * `language` (string) radio language (used for menus) + * `voice` (string) voice language (used for speech) + * `gtimer` (number) radio global timer in seconds (does not include current session) + +@status current Introduced in 2.0.6, `imperial` added in TODO, +`language` and `voice` added in 2.2.0, gtimer added in 2.2.2. +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Returns (some of) the general radio settings + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | with elements: * `battWarn` (number) radio battery range - warning value * `battMin` (number) radio battery range - minimum value * `battMax` (number) radio battery range - maximum value * `imperial` (number) set to a value different from 0 if the radio is set to the IMPERIAL units * `language` (string) radio language (used for menus) * `voice` (string) voice language (used for speech) * `gtimer` (number) radio global timer in seconds (does not include current session) | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getGeneralSettings() + +Returns (some of) the general radio settings + +@retval (table) with elements: +* `battWarn` (number) radio battery range - warning value + * `battMin` (number) radio battery range - minimum value + * `battMax` (number) radio battery range - maximum value + * `imperial` (number) set to a value different from 0 if the radio is set to the + IMPERIAL units + * `language` (string) radio language (used for menus) + * `voice` (string) voice language (used for speech) + * `gtimer` (number) radio global timer in seconds (does not include current session) + +@status current Introduced in 2.0.6 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-global-timer.md b/website/md-docs/api-reference/review-runtime-get-global-timer.md new file mode 100644 index 000000000..0ffd0c13b --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-global-timer.md @@ -0,0 +1,103 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getGlobalTimer + +[Back to dashboard](review.md) | [Open API page](time/get-global-timer.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getGlobalTimer` +- Doc id: `runtime.get-global-timer` +- Source: `radio/src/lua/api_general.cpp:1775` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getGlobalTimer"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>with elements: +* `gtimer` (number) radio global timer in seconds +* `session` (number) radio session in seconds +* `ttimer` (number) radio throttle timer in seconds +* `tptimer` (number) radio throttle percent timer in seconds</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getGlobalTimer", "symbol": "getGlobalTimer", "summary": "Returns radio timers", "parameters": [], "returns": [{"name": "", "type": "table", "description": "with elements:\n* `gtimer` (number) radio global timer in seconds\n* `session` (number) radio session in seconds\n* `ttimer` (number) radio throttle timer in seconds\n* `tptimer` (number) radio throttle percent timer in seconds"}], "notes": [], "since": "unknown"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getGlobalTimer() + +Returns radio timers + +@retval table with elements: +* `gtimer` (number) radio global timer in seconds +* `session` (number) radio session in seconds +* `ttimer` (number) radio throttle timer in seconds +* `tptimer` (number) radio throttle percent timer in seconds + +@status current Introduced added in 2.3.0. +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Returns radio timers + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | with elements: * `gtimer` (number) radio global timer in seconds * `session` (number) radio session in seconds * `ttimer` (number) radio throttle timer in seconds * `tptimer` (number) radio throttle percent timer in seconds | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getGlobalTimer() + +Returns radio timers + +@retval (table) with elements: +* `gtimer` (number) radio global timer in seconds +* `session` (number) radio session in seconds +* `ttimer` (number) radio throttle timer in seconds +* `tptimer` (number) radio throttle percent timer in seconds + +@status current Introduced in unknown +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-logical-switch-value.md b/website/md-docs/api-reference/review-runtime-get-logical-switch-value.md new file mode 100644 index 000000000..3c87a8e8f --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-logical-switch-value.md @@ -0,0 +1,96 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getLogicalSwitchValue + +[Back to dashboard](review.md) | [Open API page](switches/get-logical-switch-value.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getLogicalSwitchValue` +- Doc id: `runtime.get-logical-switch-value` +- Source: `radio/src/lua/api_general.cpp:2563` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getLogicalSwitchValue"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>id</code></td><td>param</td><td><code>integer</code></td><td>identifying the logical switch (zero for LS1 etc.).</td><td><select data-field-kind="param" data-field-name="id" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="id" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>return</td><td><code>true/false</code></td><td>.</td><td><select data-field-kind="return" data-field-name="value" data-current-type="true/false"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="value" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getLogicalSwitchValue", "symbol": "getLogicalSwitchValue", "summary": "", "parameters": [{"name": "id", "type": "integer", "required": true, "description": "identifying the logical switch (zero for LS1 etc.)."}], "returns": [{"name": "value", "type": "true/false", "description": "."}], "notes": [], "since": "2.6"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getLogicalSwitchValue(id) + +@param id: integer identifying the logical switch (zero for LS1 etc.). + +@retval value: true/false. + +Reads the value of a logical switch. + +@status current Introduced in 2.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `integer` | identifying the logical switch (zero for LS1 etc.). | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `true/false` | . | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getLogicalSwitchValue([id]) + +@param id (integer) identifying the logical switch (zero for LS1 etc.). + +@retval value (true/false) . + +@status current Introduced in 2.6 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-output-value.md b/website/md-docs/api-reference/review-runtime-get-output-value.md new file mode 100644 index 000000000..12947be15 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-output-value.md @@ -0,0 +1,97 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getOutputValue + +[Back to dashboard](review.md) | [Open API page](model-functions/get-output-value.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getOutputValue` +- Doc id: `runtime.get-output-value` +- Source: `radio/src/lua/api_general.cpp:2851` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getOutputValue"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>outputIndex</code></td><td>param</td><td><code>integer</code></td><td>identifying the output channel number 0 for CH1, up to MAX_OUTPUT_CHANNELS - 1.</td><td><select data-field-kind="param" data-field-name="outputIndex" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="outputIndex" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>current output value (number). Zero is returned for: +* non-existing outputs</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getOutputValue", "symbol": "getOutputValue", "summary": "", "parameters": [{"name": "outputIndex", "type": "integer", "required": true, "description": "identifying the output channel number 0 for CH1, up to MAX_OUTPUT_CHANNELS - 1."}], "returns": [{"name": "", "type": "integer", "description": "current output value (number). Zero is returned for:\n* non-existing outputs"}], "notes": [], "since": "2.8.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getOutputValue(outputIndex) + +@param outputIndex: integer identifying the output channel number 0 for CH1, up to MAX_OUTPUT_CHANNELS - 1. + +@retval value current output value (number). Zero is returned for: + * non-existing outputs + +@status current Introduced in 2.8.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `outputIndex` | yes | `integer` | identifying the output channel number 0 for CH1, up to MAX_OUTPUT_CHANNELS - 1. | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | current output value (number). Zero is returned for: * non-existing outputs | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getOutputValue([outputIndex]) + +@param outputIndex (integer) identifying the output channel number 0 for CH1, up to MAX_OUTPUT_CHANNELS - 1. + +@retval (integer) current output value (number). Zero is returned for: +* non-existing outputs + +@status current Introduced in 2.8.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-ras.md b/website/md-docs/api-reference/review-runtime-get-ras.md new file mode 100644 index 000000000..7014c9042 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-ras.md @@ -0,0 +1,96 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getRAS + +[Back to dashboard](review.md) | [Open API page](telemetry/get-ras.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getRAS` +- Doc id: `runtime.get-ras` +- Source: `radio/src/lua/api_general.cpp:1365` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getRAS"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>representing RAS value. Value bellow 0x33 (51 decimal) are all ok, value above 0x33 indicate a hardware antenna issue. This is just a hardware pass/fail measure and does not represent the quality of the radio link</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getRAS", "symbol": "getRAS", "summary": "Return the RAS value or nil if no valid hardware found", "parameters": [], "returns": [{"name": "", "type": "integer", "description": "representing RAS value. Value bellow 0x33 (51 decimal) are all ok, value above 0x33 indicate a hardware antenna issue. This is just a hardware pass/fail measure and does not represent the quality of the radio link"}], "notes": ["RAS was called SWR in the past"], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getRAS() + +Return the RAS value or nil if no valid hardware found + +@retval number representing RAS value. Value bellow 0x33 (51 decimal) are all ok, value above 0x33 indicate a hardware antenna issue. +This is just a hardware pass/fail measure and does not represent the quality of the radio link + +@notice RAS was called SWR in the past + +@status current Introduced in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return the RAS value or nil if no valid hardware found + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | representing RAS value. Value bellow 0x33 (51 decimal) are all ok, value above 0x33 indicate a hardware antenna issue. This is just a hardware pass/fail measure and does not represent the quality of the radio link | + +#### Notes + +- RAS was called SWR in the past + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getRAS() + +Return the RAS value or nil if no valid hardware found + +@retval (integer) representing RAS value. Value bellow 0x33 (51 decimal) are all ok, value above 0x33 indicate a hardware antenna issue. This is just a hardware pass/fail measure and does not represent the quality of the radio link + +@notice RAS was called SWR in the past + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-rot-enc-mode.md b/website/md-docs/api-reference/review-runtime-get-rot-enc-mode.md new file mode 100644 index 000000000..4f71fc896 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-rot-enc-mode.md @@ -0,0 +1,92 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getRotEncMode + +[Back to dashboard](review.md) | [Open API page](key-inputs/get-rot-enc-mode.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getRotEncMode` +- Doc id: `runtime.get-rot-enc-mode` +- Source: `radio/src/lua/api_general.cpp:874` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getRotEncMode"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>in list: Normal = 0, Both V and H inverted = 1, V-N = 2, V-A = 3 return 0 on radio without rotary encoder</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getRotEncMode", "symbol": "getRotEncMode", "summary": "Return rotary encoder mode", "parameters": [], "returns": [{"name": "", "type": "integer", "description": "in list: Normal = 0, Both V and H inverted = 1, V-N = 2, V-A = 3 return 0 on radio without rotary encoder"}], "notes": [], "since": "2.8.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getRotEncMode() + +Return rotary encoder mode + +@retval number in list: Normal = 0, Both V and H inverted = 1, V-N = 2, V-A = 3 + return 0 on radio without rotary encoder + +@status current Introduced in 2.8.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return rotary encoder mode + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | in list: Normal = 0, Both V and H inverted = 1, V-N = 2, V-A = 3 return 0 on radio without rotary encoder | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getRotEncMode() + +Return rotary encoder mode + +@retval (integer) in list: Normal = 0, Both V and H inverted = 1, V-N = 2, V-A = 3 return 0 on radio without rotary encoder + +@status current Introduced in 2.8.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-rot-enc-speed.md b/website/md-docs/api-reference/review-runtime-get-rot-enc-speed.md new file mode 100644 index 000000000..b947d333e --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-rot-enc-speed.md @@ -0,0 +1,92 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getRotEncSpeed + +[Back to dashboard](review.md) | [Open API page](key-inputs/get-rot-enc-speed.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getRotEncSpeed` +- Doc id: `runtime.get-rot-enc-speed` +- Source: `radio/src/lua/api_general.cpp:858` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getRotEncSpeed"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>in list: ROTENC_LOWSPEED, ROTENC_MIDSPEED, ROTENC_HIGHSPEED returns ROTENC_LOWSPEED on radio without rotary encoder</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getRotEncSpeed", "symbol": "getRotEncSpeed", "summary": "Return rotary encoder current speed", "parameters": [], "returns": [{"name": "", "type": "integer", "description": "in list: ROTENC_LOWSPEED, ROTENC_MIDSPEED, ROTENC_HIGHSPEED returns ROTENC_LOWSPEED on radio without rotary encoder"}], "notes": [], "since": "2.3.10"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getRotEncSpeed() + +Return rotary encoder current speed + +@retval number in list: ROTENC_LOWSPEED, ROTENC_MIDSPEED, ROTENC_HIGHSPEED + returns ROTENC_LOWSPEED on radio without rotary encoder + +@status current Introduced in 2.3.10 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return rotary encoder current speed + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | in list: ROTENC_LOWSPEED, ROTENC_MIDSPEED, ROTENC_HIGHSPEED returns ROTENC_LOWSPEED on radio without rotary encoder | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getRotEncSpeed() + +Return rotary encoder current speed + +@retval (integer) in list: ROTENC_LOWSPEED, ROTENC_MIDSPEED, ROTENC_HIGHSPEED returns ROTENC_LOWSPEED on radio without rotary encoder + +@status current Introduced in 2.3.10 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-rssi.md b/website/md-docs/api-reference/review-runtime-get-rssi.md new file mode 100644 index 000000000..35e055782 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-rssi.md @@ -0,0 +1,104 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getRSSI + +[Back to dashboard](review.md) | [Open API page](telemetry/get-rssi.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getRSSI` +- Doc id: `runtime.get-rssi` +- Source: `radio/src/lua/api_general.cpp:2087` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: rssi, alarm_low, alarm_crit + +## Decide + +- Unknown returns to decide: `rssi, alarm_low, alarm_crit` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="getRSSI"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>rssi</code></td><td>return</td><td><code>unknown</code></td><td>RSSI value (0 if no link)</td><td><select data-field-kind="return" data-field-name="rssi" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="rssi" data-custom-type="true" /></td></tr> +<tr><td><code>alarm_low</code></td><td>return</td><td><code>unknown</code></td><td>Configured low RSSI alarm level</td><td><select data-field-kind="return" data-field-name="alarm_low" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="alarm_low" data-custom-type="true" /></td></tr> +<tr><td><code>alarm_crit</code></td><td>return</td><td><code>unknown</code></td><td>Configured critical RSSI alarm level</td><td><select data-field-kind="return" data-field-name="alarm_crit" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="alarm_crit" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getRSSI", "symbol": "getRSSI", "summary": "Get RSSI value as well as low and critical RSSI alarm levels (in dB)", "parameters": [], "returns": [{"name": "rssi", "type": "unknown", "description": "RSSI value (0 if no link)"}, {"name": "alarm_low", "type": "unknown", "description": "Configured low RSSI alarm level"}, {"name": "alarm_crit", "type": "unknown", "description": "Configured critical RSSI alarm level"}], "notes": [], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getRSSI() + +Get RSSI value as well as low and critical RSSI alarm levels (in dB) + +@retval rssi RSSI value (0 if no link) + +@retval alarm_low Configured low RSSI alarm level + +@retval alarm_crit Configured critical RSSI alarm level + +@status current Introduced in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get RSSI value as well as low and critical RSSI alarm levels (in dB) + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `rssi` | `unknown` | RSSI value (0 if no link) | +| `alarm_low` | `unknown` | Configured low RSSI alarm level | +| `alarm_crit` | `unknown` | Configured critical RSSI alarm level | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getRSSI() + +Get RSSI value as well as low and critical RSSI alarm levels (in dB) + +@retval rssi (TODO) RSSI value (0 if no link) + +@retval alarm_low (TODO) Configured low RSSI alarm level + +@retval alarm_crit (TODO) Configured critical RSSI alarm level + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-rtc-time.md b/website/md-docs/api-reference/review-runtime-get-rtc-time.md new file mode 100644 index 000000000..32cf668c5 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-rtc-time.md @@ -0,0 +1,92 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getRtcTime + +[Back to dashboard](review.md) | [Open API page](time/get-rtc-time.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getRtcTime` +- Doc id: `runtime.get-rtc-time` +- Source: `radio/src/lua/api_general.cpp:256` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getRtcTime"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>Number of seconds elapsed since 1. Jan 1970</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getRtcTime", "symbol": "getRtcTime", "summary": "Return current RTC system date as unix timstamp (in seconds since 1. Jan 1970)", "parameters": [], "returns": [{"name": "", "type": "integer", "description": "Number of seconds elapsed since 1. Jan 1970"}], "notes": [], "since": "unknown"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getRtcTime() + +Return current RTC system date as unix timstamp (in seconds since 1. Jan 1970) + +Please note the RTC timestamp is kept internally as a 32bit integer, which will overflow +in 2038. + +@retval number Number of seconds elapsed since 1. Jan 1970 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return current RTC system date as unix timstamp (in seconds since 1. Jan 1970) + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | Number of seconds elapsed since 1. Jan 1970 | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getRtcTime() + +Return current RTC system date as unix timstamp (in seconds since 1. Jan 1970) + +@retval (integer) Number of seconds elapsed since 1. Jan 1970 + +@status current Introduced in unknown +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-shm-var.md b/website/md-docs/api-reference/review-runtime-get-shm-var.md new file mode 100644 index 000000000..0610249d6 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-shm-var.md @@ -0,0 +1,100 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getShmVar + +[Back to dashboard](review.md) | [Open API page](variables/get-shm-var.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getShmVar` +- Doc id: `runtime.get-shm-var` +- Source: `radio/src/lua/api_general.cpp:2503` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getShmVar"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>id</code></td><td>param</td><td><code>integer</code></td><td>between 1 and 16 identifying the shared memory variable.</td><td><select data-field-kind="param" data-field-name="id" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="id" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>return</td><td><code>integer</code></td><td>. The value of the shared memory variable.</td><td><select data-field-kind="return" data-field-name="value" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="value" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getShmVar", "symbol": "getShmVar", "summary": "", "parameters": [{"name": "id", "type": "integer", "required": true, "description": "between 1 and 16 identifying the shared memory variable."}], "returns": [{"name": "value", "type": "integer", "description": ". The value of the shared memory variable."}], "notes": ["Only available on radios with color display"], "since": "2.6"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getShmVar(id) + +@param id: integer between 1 and 16 identifying the shared memory variable. + +@retval value: integer. The value of the shared memory variable. + +Gets the value of a shared memory variable that can be used for passing data between Lua widgets and other Lua scripts. + +@status current Introduced in 2.6 + +@notice Only available on radios with color display +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `integer` | between 1 and 16 identifying the shared memory variable. | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `integer` | . The value of the shared memory variable. | + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getShmVar([id]) + +@param id (integer) between 1 and 16 identifying the shared memory variable. + +@retval value (integer) . The value of the shared memory variable. + +@notice Only available on radios with color display + +@status current Introduced in 2.6 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-source-index.md b/website/md-docs/api-reference/review-runtime-get-source-index.md new file mode 100644 index 000000000..9be498f75 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-source-index.md @@ -0,0 +1,101 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getSourceIndex + +[Back to dashboard](review.md) | [Open API page](sources/get-source-index.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getSourceIndex` +- Doc id: `runtime.get-source-index` +- Source: `radio/src/lua/api_general.cpp:2746` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getSourceIndex"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>sourceName</code></td><td>param</td><td><code>string</code></td><td>naming a value source as it is shown on radio menus where you can select it. Notice that many names have special characters in them.</td><td><select data-field-kind="param" data-field-name="sourceName" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="sourceName" data-custom-type="true" /></td></tr> +<tr><td><code>sourceIndex</code></td><td>return</td><td><code>integer</code></td><td>. The source index, which can be used as input for `getSourceName(sourceIndex)`, `getValue(sourceIndex)`, and `getFieldInfo(sourceIndex)`.</td><td><select data-field-kind="return" data-field-name="sourceIndex" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="sourceIndex" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getSourceIndex", "symbol": "getSourceIndex", "summary": "", "parameters": [{"name": "sourceName", "type": "string", "required": true, "description": "naming a value source as it is shown on radio menus where you can select it. Notice that many names have special characters in them."}], "returns": [{"name": "sourceIndex", "type": "integer", "description": ". The source index, which can be used as input for `getSourceName(sourceIndex)`, `getValue(sourceIndex)`, and `getFieldInfo(sourceIndex)`."}], "notes": ["the source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so `getValue(index)` will work with the indices obtained here.\nThis function is rather time consuming, and should not be used repeatedly in a script, if it can be avoided."], "since": "2.6"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getSourceIndex(sourceName) + +@param sourceName: string naming a value source as it is shown on radio menus where you can select it. Notice that many names have special characters in them. + +@retval sourceIndex: integer. The source index, which can be used as input for `getSourceName(sourceIndex)`, `getValue(sourceIndex)`, and `getFieldInfo(sourceIndex)`. + +@notice the source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so `getValue(index)` will work with the indices obtained here. +This function is rather time consuming, and should not be used repeatedly in a script, if it can be avoided. + +@status current Introduced in 2.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sourceName` | yes | `string` | naming a value source as it is shown on radio menus where you can select it. Notice that many names have special characters in them. | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `sourceIndex` | `integer` | . The source index, which can be used as input for `getSourceName(sourceIndex)`, `getValue(sourceIndex)`, and `getFieldInfo(sourceIndex)`. | + +#### Notes + +- the source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so `getValue(index)` will work with the indices obtained here. +This function is rather time consuming, and should not be used repeatedly in a script, if it can be avoided. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getSourceIndex([sourceName]) + +@param sourceName (string) naming a value source as it is shown on radio menus where you can select it. Notice that many names have special characters in them. + +@retval sourceIndex (integer) . The source index, which can be used as input for `getSourceName(sourceIndex)`, `getValue(sourceIndex)`, and `getFieldInfo(sourceIndex)`. + +@notice the source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so `getValue(index)` will work with the indices obtained here. +This function is rather time consuming, and should not be used repeatedly in a script, if it can be avoided. + +@status current Introduced in 2.6 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-source-name.md b/website/md-docs/api-reference/review-runtime-get-source-name.md new file mode 100644 index 000000000..d7190c873 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-source-name.md @@ -0,0 +1,98 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getSourceName + +[Back to dashboard](review.md) | [Open API page](sources/get-source-name.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getSourceName` +- Doc id: `runtime.get-source-name` +- Source: `radio/src/lua/api_general.cpp:2772` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getSourceName"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>sourceIndex</code></td><td>param</td><td><code>integer</code></td><td>identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`.</td><td><select data-field-kind="param" data-field-name="sourceIndex" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="sourceIndex" data-custom-type="true" /></td></tr> +<tr><td><code>sourceName</code></td><td>return</td><td><code>string</code></td><td>naming the value source as it is shown on radio menus where a source can be chosen.</td><td><select data-field-kind="return" data-field-name="sourceName" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="sourceName" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getSourceName", "symbol": "getSourceName", "summary": "", "parameters": [{"name": "sourceIndex", "type": "integer", "required": true, "description": "identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`."}], "returns": [{"name": "sourceName", "type": "string", "description": "naming the value source as it is shown on radio menus where a source can be chosen."}], "notes": ["the source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so `getValue(index)` will work with the indices used here."], "since": "2.6"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getSourceName(sourceIndex) + +@param sourceIndex: integer identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`. + +@retval sourceName: string naming the value source as it is shown on radio menus where a source can be chosen. + +@notice the source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so `getValue(index)` will work with the indices used here. + +@status current Introduced in 2.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sourceIndex` | yes | `integer` | identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`. | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `sourceName` | `string` | naming the value source as it is shown on radio menus where a source can be chosen. | + +#### Notes + +- the source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so `getValue(index)` will work with the indices used here. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getSourceName([sourceIndex]) + +@param sourceIndex (integer) identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`. + +@retval sourceName (string) naming the value source as it is shown on radio menus where a source can be chosen. + +@notice the source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so `getValue(index)` will work with the indices used here. + +@status current Introduced in 2.6 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-source-value.md b/website/md-docs/api-reference/review-runtime-get-source-value.md new file mode 100644 index 000000000..910f21bb6 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-source-value.md @@ -0,0 +1,152 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getSourceValue + +[Back to dashboard](review.md) | [Open API page](sources/get-source-value.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getSourceValue` +- Doc id: `runtime.get-source-value` +- Source: `radio/src/lua/api_general.cpp:726` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: isCurrent, isFresh + +## Decide + +- Unknown returns to decide: `isCurrent, isFresh` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="getSourceValue"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>source</code></td><td>param</td><td><code>string</code></td><td>can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source.</td><td><select data-field-kind="param" data-field-name="source" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="source" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>current source value (number), or last known telemetry item value.</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>isCurrent</code></td><td>return</td><td><code>unknown</code></td><td>is true for telemetry sources that are within the "Sensor Lost" duration and telemetry is streaming . Always true for non-telemetry items.</td><td><select data-field-kind="return" data-field-name="isCurrent" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="isCurrent" data-custom-type="true" /></td></tr> +<tr><td><code>isFresh</code></td><td>return</td><td><code>unknown</code></td><td>is true for telemetry sources which have been recently updated and telemetry is streaming. Always true for non-telemetry items.</td><td><select data-field-kind="return" data-field-name="isFresh" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="isFresh" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getSourceValue", "symbol": "getSourceValue", "summary": "Returns the value of a source. Superseeds getValue.", "parameters": [{"name": "source", "type": "string", "required": true, "description": "can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source."}], "returns": [{"name": "", "type": "integer", "description": "current source value (number), or last known telemetry item value."}, {"name": "isCurrent", "type": "unknown", "description": "is true for telemetry sources that are within the \"Sensor Lost\" duration and telemetry is streaming . Always true for non-telemetry items."}, {"name": "isFresh", "type": "unknown", "description": "is true for telemetry sources which have been recently updated and telemetry is streaming. Always true for non-telemetry items."}], "notes": ["Getting a value by its numerical identifier is much faster than by its name.\nWhile `Cels` sensor returns current values of all cells in a table, a `Cels+` or\n`Cels-` will return a single value - the maximum or minimum Cels value."], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getSourceValue(source) + +Returns the value of a source. Superseeds getValue. + +The list of fixed sources: + +| OpenTX Version | Radio | +|----------------|-------| +| 2.0 | [all](http://downloads-20.open-tx.org/firmware/lua_fields.txt) | +| 2.1 | [X9D and X9D+](http://downloads-21.open-tx.org/firmware/lua_fields_taranis.txt), [X9E](http://downloads-21.open-tx.org/firmware/lua_fields_taranis_x9e.txt) | +| 2.2 | [X9D and X9D+](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9e.txt), [Horus](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x12s.txt) | +| 2.3 | [X9D and X9D+](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9e.txt), [X7](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x7.txt), [Horus](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x12s.txt) | + +In OpenTX 2.1.x the telemetry sources no longer have a predefined name. +To get a telemetry value simply use it's sensor name. For example: + * Altitude sensor has a name "Alt" + * to get the current altitude use the source "Alt" + * to get the minimum altitude use the source "Alt-", to get the maximum use "Alt+" + +@param source can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source. + +@retval value current source value (number), or last known telemetry item value. + +value is nil for non-existing sources. all non-allowed sensors while FAI MODE is active, or if a telemetry item value has never been received + +value is a table for GPS position: + + * `lat` (number) latitude, positive is North + * `lon` (number) longitude, positive is East + * `pilot-lat` (number) pilot latitude, positive is North + * `pilot-lon` (number) pilot longitude, positive is East + +value is a table for date/time, see getDateTime() + +value is a table for battery cells(except where no cells were detected in which case the returned value is 0): + * table has one item for each detected cell: + * key (number) cell number (1 to number of cells) + * value (number) current cell voltage + +@retval isCurrent is true for telemetry sources that are within the "Sensor Lost" duration and telemetry is streaming . Always true for non-telemetry items. + +@retval isFresh is true for telemetry sources which have been recently updated and telemetry is streaming. Always true for non-telemetry items. + +@status current Introduced in 2.0.0, changed in 2.1.0, `Cels+` and `Cels-` added in 2.1.9 + +@notice Getting a value by its numerical identifier is much faster than by its name. +While `Cels` sensor returns current values of all cells in a table, a `Cels+` or +`Cels-` will return a single value - the maximum or minimum Cels value. +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Returns the value of a source. Superseeds getValue. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `source` | yes | `string` | can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source. | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | current source value (number), or last known telemetry item value. | +| `isCurrent` | `unknown` | is true for telemetry sources that are within the "Sensor Lost" duration and telemetry is streaming . Always true for non-telemetry items. | +| `isFresh` | `unknown` | is true for telemetry sources which have been recently updated and telemetry is streaming. Always true for non-telemetry items. | + +#### Notes + +- Getting a value by its numerical identifier is much faster than by its name. +While `Cels` sensor returns current values of all cells in a table, a `Cels+` or +`Cels-` will return a single value - the maximum or minimum Cels value. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getSourceValue([source]) + +Returns the value of a source. Superseeds getValue. + +@param source (string) can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source. + +@retval (integer) current source value (number), or last known telemetry item value. + +@retval isCurrent (TODO) is true for telemetry sources that are within the "Sensor Lost" duration and telemetry is streaming . Always true for non-telemetry items. + +@retval isFresh (TODO) is true for telemetry sources which have been recently updated and telemetry is streaming. Always true for non-telemetry items. + +@notice Getting a value by its numerical identifier is much faster than by its name. +While `Cels` sensor returns current values of all cells in a table, a `Cels+` or +`Cels-` will return a single value - the maximum or minimum Cels value. + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-stick-mode.md b/website/md-docs/api-reference/review-runtime-get-stick-mode.md new file mode 100644 index 000000000..776447696 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-stick-mode.md @@ -0,0 +1,87 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getStickMode + +[Back to dashboard](review.md) | [Open API page](radio-hardware/get-stick-mode.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getStickMode` +- Doc id: `runtime.get-stick-mode` +- Source: `radio/src/lua/api_general.cpp:3023` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getStickMode"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>a 1 to 4 value corresponding to radio stick mode</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getStickMode", "symbol": "getStickMode", "summary": "", "parameters": [], "returns": [{"name": "", "type": "integer", "description": "a 1 to 4 value corresponding to radio stick mode"}], "notes": [], "since": "3.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getStickMode() + +@retval : integer, a 1 to 4 value corresponding to radio stick mode + +@status current Introduced in 3.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | a 1 to 4 value corresponding to radio stick mode | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getStickMode() + +@retval (integer) a 1 to 4 value corresponding to radio stick mode + +@status current Introduced in 3.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-switch-index.md b/website/md-docs/api-reference/review-runtime-get-switch-index.md new file mode 100644 index 000000000..85f792fc0 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-switch-index.md @@ -0,0 +1,96 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getSwitchIndex + +[Back to dashboard](review.md) | [Open API page](switches/get-switch-index.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getSwitchIndex` +- Doc id: `runtime.get-switch-index` +- Source: `radio/src/lua/api_general.cpp:2623` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getSwitchIndex"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>positionName</code></td><td>param</td><td><code>string</code></td><td>naming a switch position as it is shown on radio menus where you can select a switch. Notice that many names have special characters in them like arrow up/down etc.</td><td><select data-field-kind="param" data-field-name="positionName" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="positionName" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>return</td><td><code>integer</code></td><td>. The switchIndex, which can be used as input for `getSwitchName(switchIndex)` and `getSwitchValue(switchIndex)`. Also corresponds to the fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches.</td><td><select data-field-kind="return" data-field-name="value" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="value" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getSwitchIndex", "symbol": "getSwitchIndex", "summary": "", "parameters": [{"name": "positionName", "type": "string", "required": true, "description": "naming a switch position as it is shown on radio menus where you can select a switch. Notice that many names have special characters in them like arrow up/down etc."}], "returns": [{"name": "value", "type": "integer", "description": ". The switchIndex, which can be used as input for `getSwitchName(switchIndex)` and `getSwitchValue(switchIndex)`. Also corresponds to the fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches."}], "notes": [], "since": "2.6"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getSwitchIndex(positionName) + +@param positionName: string naming a switch position as it is shown on radio menus where you can select a switch. Notice that many names have +special characters in them like arrow up/down etc. + +@retval value: integer. The switchIndex, which can be used as input for `getSwitchName(switchIndex)` and `getSwitchValue(switchIndex)`. Also corresponds +to the fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches. + +@status current Introduced in 2.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `positionName` | yes | `string` | naming a switch position as it is shown on radio menus where you can select a switch. Notice that many names have special characters in them like arrow up/down etc. | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `integer` | . The switchIndex, which can be used as input for `getSwitchName(switchIndex)` and `getSwitchValue(switchIndex)`. Also corresponds to the fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches. | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getSwitchIndex([positionName]) + +@param positionName (string) naming a switch position as it is shown on radio menus where you can select a switch. Notice that many names have special characters in them like arrow up/down etc. + +@retval value (integer) . The switchIndex, which can be used as input for `getSwitchName(switchIndex)` and `getSwitchValue(switchIndex)`. Also corresponds to the fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches. + +@status current Introduced in 2.6 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-switch-info.md b/website/md-docs/api-reference/review-runtime-get-switch-info.md new file mode 100644 index 000000000..e04373cd0 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-switch-info.md @@ -0,0 +1,114 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getSwitchInfo + +[Back to dashboard](review.md) | [Open API page](switches/get-switch-info.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getSwitchInfo` +- Doc id: `runtime.get-switch-info` +- Source: `radio/src/lua/api_general.cpp:2587` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getSwitchInfo"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>sourceIndex</code></td><td>param</td><td><code>integer</code></td><td>identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`.</td><td><select data-field-kind="param" data-field-name="sourceIndex" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="sourceIndex" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>information about requested field, table elements: +* `type` (number) field identifier +0 = SWITCH_NONE +1 = SWITCH_TOGGLE +2 = SWITCH_2POS +3 = SWITCH_3POS</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getSwitchInfo", "symbol": "getSwitchInfo", "summary": "", "parameters": [{"name": "sourceIndex", "type": "integer", "required": true, "description": "identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`."}], "returns": [{"name": "", "type": "table", "description": "information about requested field, table elements:\n* `type` (number) field identifier\n0 = SWITCH_NONE\n1 = SWITCH_TOGGLE\n2 = SWITCH_2POS\n3 = SWITCH_3POS"}], "notes": [], "since": "2.12"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getSwitchInfo(sourceIndex) + +@param sourceIndex: integer identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`. + +@retval table information about requested field, table elements: +* `type` (number) field identifier +0 = SWITCH_NONE +1 = SWITCH_TOGGLE +2 = SWITCH_2POS +3 = SWITCH_3POS + +* `isCustomisableSwitch` (boolean) field identifier +return true if switch is a customisable switch + +* `name` (string) switch name + +@status current Introduced in 2.12 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sourceIndex` | yes | `integer` | identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`. | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | information about requested field, table elements: * `type` (number) field identifier 0 = SWITCH_NONE 1 = SWITCH_TOGGLE 2 = SWITCH_2POS 3 = SWITCH_3POS | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getSwitchInfo([sourceIndex]) + +@param sourceIndex (integer) identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`. + +@retval (table) information about requested field, table elements: +* `type` (number) field identifier +0 = SWITCH_NONE +1 = SWITCH_TOGGLE +2 = SWITCH_2POS +3 = SWITCH_3POS + +@status current Introduced in 2.12 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-switch-name.md b/website/md-docs/api-reference/review-runtime-get-switch-name.md new file mode 100644 index 000000000..3b4d2eb52 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-switch-name.md @@ -0,0 +1,95 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getSwitchName + +[Back to dashboard](review.md) | [Open API page](switches/get-switch-name.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getSwitchName` +- Doc id: `runtime.get-switch-name` +- Source: `radio/src/lua/api_general.cpp:2648` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getSwitchName"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>switchIndex</code></td><td>param</td><td><code>integer</code></td><td>identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches.</td><td><select data-field-kind="param" data-field-name="switchIndex" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="switchIndex" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>return</td><td><code>string</code></td><td>naming the switch position as it is shown on radio menus where a switch can be chosen.</td><td><select data-field-kind="return" data-field-name="value" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="value" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getSwitchName", "symbol": "getSwitchName", "summary": "", "parameters": [{"name": "switchIndex", "type": "integer", "required": true, "description": "identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches."}], "returns": [{"name": "value", "type": "string", "description": "naming the switch position as it is shown on radio menus where a switch can be chosen."}], "notes": [], "since": "2.6"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getSwitchName(switchIndex) + +@param switchIndex: integer identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by +`model.getLogicalSwitch(switch)` identifying switches. + +@retval value: string naming the switch position as it is shown on radio menus where a switch can be chosen. + +@status current Introduced in 2.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `switchIndex` | yes | `integer` | identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches. | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `string` | naming the switch position as it is shown on radio menus where a switch can be chosen. | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getSwitchName([switchIndex]) + +@param switchIndex (integer) identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches. + +@retval value (string) naming the switch position as it is shown on radio menus where a switch can be chosen. + +@status current Introduced in 2.6 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-switch-value.md b/website/md-docs/api-reference/review-runtime-get-switch-value.md new file mode 100644 index 000000000..b200e6647 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-switch-value.md @@ -0,0 +1,95 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getSwitchValue + +[Back to dashboard](review.md) | [Open API page](switches/get-switch-value.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getSwitchValue` +- Doc id: `runtime.get-switch-value` +- Source: `radio/src/lua/api_general.cpp:2671` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getSwitchValue"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>switchIndex</code></td><td>param</td><td><code>integer</code></td><td>identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches.</td><td><select data-field-kind="param" data-field-name="switchIndex" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="switchIndex" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>return</td><td><code>integer</code></td><td>. The value of the switch.</td><td><select data-field-kind="return" data-field-name="value" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="value" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getSwitchValue", "symbol": "getSwitchValue", "summary": "", "parameters": [{"name": "switchIndex", "type": "integer", "required": true, "description": "identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches."}], "returns": [{"name": "value", "type": "integer", "description": ". The value of the switch."}], "notes": [], "since": "2.6"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getSwitchValue(switchIndex) + +@param switchIndex: integer identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by +`model.getLogicalSwitch(switch)` identifying switches. + +@retval value: true/false. The value of the switch. + +@status current Introduced in 2.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `switchIndex` | yes | `integer` | identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches. | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `integer` | . The value of the switch. | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getSwitchValue([switchIndex]) + +@param switchIndex (integer) identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches. + +@retval value (integer) . The value of the switch. + +@status current Introduced in 2.6 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-time.md b/website/md-docs/api-reference/review-runtime-get-time.md new file mode 100644 index 000000000..34bebb5f3 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-time.md @@ -0,0 +1,95 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getTime + +[Back to dashboard](review.md) | [Open API page](time/get-time.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getTime` +- Doc id: `runtime.get-time` +- Source: `radio/src/lua/api_general.cpp:187` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getTime"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>Number of 10ms ticks since the radio was started Example: run time: 12.54 seconds, return value: 1254</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getTime", "symbol": "getTime", "summary": "Return the time since the radio was started in multiple of 10ms", "parameters": [], "returns": [{"name": "", "type": "integer", "description": "Number of 10ms ticks since the radio was started Example: run time: 12.54 seconds, return value: 1254"}], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getTime() + +Return the time since the radio was started in multiple of 10ms + +@retval number Number of 10ms ticks since the radio was started Example: +run time: 12.54 seconds, return value: 1254 + +The timer internally uses a 32-bit counter which is enough for 497 days so +overflows will not happen. + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return the time since the radio was started in multiple of 10ms + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | Number of 10ms ticks since the radio was started Example: run time: 12.54 seconds, return value: 1254 | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getTime() + +Return the time since the radio was started in multiple of 10ms + +@retval (integer) Number of 10ms ticks since the radio was started Example: run time: 12.54 seconds, return value: 1254 + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-trainer-status.md b/website/md-docs/api-reference/review-runtime-get-trainer-status.md new file mode 100644 index 000000000..2a0ae68db --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-trainer-status.md @@ -0,0 +1,97 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getTrainerStatus + +[Back to dashboard](review.md) | [Open API page](telemetry/get-trainer-status.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getTrainerStatus` +- Doc id: `runtime.get-trainer-status` +- Source: `radio/src/lua/api_general.cpp:2872` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getTrainerStatus"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>current output value (number). 0 - Not Connected + 1 - Connected + 2 - Disconnected + 3 - Reconnected</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getTrainerStatus", "symbol": "getTrainerStatus", "summary": "", "parameters": [], "returns": [{"name": "", "type": "integer", "description": "current output value (number). 0 - Not Connected\n 1 - Connected\n 2 - Disconnected\n 3 - Reconnected"}], "notes": [], "since": "2.9.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getTrainerStatus() + +@retval value current output value (number). + 0 - Not Connected + 1 - Connected + 2 - Disconnected + 3 - Reconnected + +@status current Introduced in 2.9.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | current output value (number). 0 - Not Connected 1 - Connected 2 - Disconnected 3 - Reconnected | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getTrainerStatus() + +@retval (integer) current output value (number). 0 - Not Connected + 1 - Connected + 2 - Disconnected + 3 - Reconnected + +@status current Introduced in 2.9.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-tx-gps.md b/website/md-docs/api-reference/review-runtime-get-tx-gps.md new file mode 100644 index 000000000..4eeaa8762 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-tx-gps.md @@ -0,0 +1,115 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getTxGPS + +[Back to dashboard](review.md) | [Open API page](radio-hardware/get-tx-gps.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getTxGPS` +- Doc id: `runtime.get-tx-gps` +- Source: `radio/src/lua/api_general.cpp:1388` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getTxGPS"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>representing the current radio position +* `lat` (number) internal GPS latitude, positive is North + * `lon` (number) internal GPS longitude, positive is East + * `numsat` (number) current number of sats locked in by the GPS sensor + * `fix` (boolean) fix status + * `alt` (number) internal GPS altitude in 0.1m + * `speed` (number) internal GPSspeed in 0.1m/s + * `heading` (number) internal GPS ground course estimation in degrees * 10 + * `hdop` (number) internal GPS horizontal dilution of precision</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getTxGPS", "symbol": "getTxGPS", "summary": "Return the internal GPS position or nil if no valid hardware found", "parameters": [], "returns": [{"name": "", "type": "table", "description": "representing the current radio position\n* `lat` (number) internal GPS latitude, positive is North\n * `lon` (number) internal GPS longitude, positive is East\n * `numsat` (number) current number of sats locked in by the GPS sensor\n * `fix` (boolean) fix status\n * `alt` (number) internal GPS altitude in 0.1m\n * `speed` (number) internal GPSspeed in 0.1m/s\n * `heading` (number) internal GPS ground course estimation in degrees * 10\n * `hdop` (number) internal GPS horizontal dilution of precision"}], "notes": [], "since": "2.2.2"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getTxGPS() + +Return the internal GPS position or nil if no valid hardware found + +@retval table representing the current radio position + * `lat` (number) internal GPS latitude, positive is North + * `lon` (number) internal GPS longitude, positive is East + * `numsat` (number) current number of sats locked in by the GPS sensor + * `fix` (boolean) fix status + * `alt` (number) internal GPS altitude in 0.1m + * `speed` (number) internal GPSspeed in 0.1m/s + * `heading` (number) internal GPS ground course estimation in degrees * 10 + * `hdop` (number) internal GPS horizontal dilution of precision + +@status current Introduced in 2.2.2 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return the internal GPS position or nil if no valid hardware found + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `table` | representing the current radio position * `lat` (number) internal GPS latitude, positive is North * `lon` (number) internal GPS longitude, positive is East * `numsat` (number) current number of sats locked in by the GPS sensor * `fix` (boolean) fix status * `alt` (number) internal GPS altitude in 0.1m * `speed` (number) internal GPSspeed in 0.1m/s * `heading` (number) internal GPS ground course estimation in degrees * 10 * `hdop` (number) internal GPS horizontal dilution of precision | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getTxGPS() + +Return the internal GPS position or nil if no valid hardware found + +@retval (table) representing the current radio position +* `lat` (number) internal GPS latitude, positive is North + * `lon` (number) internal GPS longitude, positive is East + * `numsat` (number) current number of sats locked in by the GPS sensor + * `fix` (boolean) fix status + * `alt` (number) internal GPS altitude in 0.1m + * `speed` (number) internal GPSspeed in 0.1m/s + * `heading` (number) internal GPS ground course estimation in degrees * 10 + * `hdop` (number) internal GPS horizontal dilution of precision + +@status current Introduced in 2.2.2 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-usage.md b/website/md-docs/api-reference/review-runtime-get-usage.md new file mode 100644 index 000000000..5c949420d --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-usage.md @@ -0,0 +1,91 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getUsage + +[Back to dashboard](review.md) | [Open API page](system/get-usage.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getUsage` +- Doc id: `runtime.get-usage` +- Source: `radio/src/lua/api_general.cpp:2190` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getUsage"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>usage</code></td><td>return</td><td><code>integer</code></td><td>a value from 0 to 100 (percent)</td><td><select data-field-kind="return" data-field-name="usage" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="usage" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getUsage", "symbol": "getUsage", "summary": "Get percent of already used Lua instructions in current script execution cycle.", "parameters": [], "returns": [{"name": "usage", "type": "integer", "description": "a value from 0 to 100 (percent)"}], "notes": [], "since": "2.2.1"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getUsage() + +Get percent of already used Lua instructions in current script execution cycle. + +@retval usage (number) a value from 0 to 100 (percent) + +@status current Introduced in 2.2.1 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Get percent of already used Lua instructions in current script execution cycle. + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `usage` | `integer` | a value from 0 to 100 (percent) | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getUsage() + +Get percent of already used Lua instructions in current script execution cycle. + +@retval usage (integer) a value from 0 to 100 (percent) + +@status current Introduced in 2.2.1 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-value.md b/website/md-docs/api-reference/review-runtime-get-value.md new file mode 100644 index 000000000..6c134139b --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-value.md @@ -0,0 +1,176 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getValue + +[Back to dashboard](review.md) | [Open API page](sources/get-value.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getValue` +- Doc id: `runtime.get-value` +- Source: `radio/src/lua/api_general.cpp:658` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getValue"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>source</code></td><td>param</td><td><code>string</code></td><td>can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source.</td><td><select data-field-kind="param" data-field-name="source" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="source" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>current source value (number). Zero is returned for: +* non-existing sources + * for all telemetry source when the telemetry stream is not received + * far all non allowed sensors while FAI MODE is active</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>GPS position is returned in a table: +* `lat` (number) latitude, positive is North + * `lon` (number) longitude, positive is East + * `pilot-lat` (number) pilot latitude, positive is North + * `pilot-lon` (number) pilot longitude, positive is East</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>GPS date/time, see getDateTime()</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>table</code></td><td>Cells are returned in a table (except where no cells were detected in which +case the returned value is 0): + * table has one item for each detected cell: + * key (number) cell number (1 to number of cells) + * value (number) current cell voltage</td><td><select data-field-kind="return" data-field-name="-" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getValue", "symbol": "getValue", "summary": "Returns the value of a source.", "parameters": [{"name": "source", "type": "string", "required": true, "description": "can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source."}], "returns": [{"name": "", "type": "integer", "description": "current source value (number). Zero is returned for:\n* non-existing sources\n * for all telemetry source when the telemetry stream is not received\n * far all non allowed sensors while FAI MODE is active"}, {"name": "", "type": "table", "description": "GPS position is returned in a table:\n* `lat` (number) latitude, positive is North\n * `lon` (number) longitude, positive is East\n * `pilot-lat` (number) pilot latitude, positive is North\n * `pilot-lon` (number) pilot longitude, positive is East"}, {"name": "", "type": "table", "description": "GPS date/time, see getDateTime()"}, {"name": "", "type": "table", "description": "Cells are returned in a table (except where no cells were detected in which\ncase the returned value is 0):\n * table has one item for each detected cell:\n * key (number) cell number (1 to number of cells)\n * value (number) current cell voltage"}], "notes": ["Getting a value by its numerical identifier is faster then by its name.\nWhile `Cels` sensor returns current values of all cells in a table, a `Cels+` or\n`Cels-` will return a single value - the maximum or minimum Cels value."], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getValue(source) + +Returns the value of a source. + +The list of fixed sources: + +| OpenTX Version | Radio | +|----------------|-------| +| 2.0 | [all](http://downloads-20.open-tx.org/firmware/lua_fields.txt) | +| 2.1 | [X9D and X9D+](http://downloads-21.open-tx.org/firmware/lua_fields_taranis.txt), [X9E](http://downloads-21.open-tx.org/firmware/lua_fields_taranis_x9e.txt) | +| 2.2 | [X9D and X9D+](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x9e.txt), [Horus](http://downloads.open-tx.org/2.2/release/firmware/lua_fields_x12s.txt) | +| 2.3 | [X9D and X9D+](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9d.txt), [X9E](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x9e.txt), [X7](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x7.txt), [Horus](http://downloads.open-tx.org/2.3/release/firmware/lua_fields_x12s.txt) | + +In OpenTX 2.1.x the telemetry sources no longer have a predefined name. +To get a telemetry value simply use it's sensor name. For example: + * Altitude sensor has a name "Alt" + * to get the current altitude use the source "Alt" + * to get the minimum altitude use the source "Alt-", to get the maximum use "Alt+" + +@param source can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source. + +@retval value current source value (number). Zero is returned for: + * non-existing sources + * for all telemetry source when the telemetry stream is not received + * far all non allowed sensors while FAI MODE is active + +@retval table GPS position is returned in a table: + * `lat` (number) latitude, positive is North + * `lon` (number) longitude, positive is East + * `pilot-lat` (number) pilot latitude, positive is North + * `pilot-lon` (number) pilot longitude, positive is East + +@retval table GPS date/time, see getDateTime() + +@retval table Cells are returned in a table +(except where no cells were detected in which +case the returned value is 0): + * table has one item for each detected cell: + * key (number) cell number (1 to number of cells) + * value (number) current cell voltage + +@status current Introduced in 2.0.0, changed in 2.1.0, `Cels+` and +`Cels-` added in 2.1.9 + +@notice Getting a value by its numerical identifier is faster then by its name. +While `Cels` sensor returns current values of all cells in a table, a `Cels+` or +`Cels-` will return a single value - the maximum or minimum Cels value. +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Returns the value of a source. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `source` | yes | `string` | can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source. | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | current source value (number). Zero is returned for: * non-existing sources * for all telemetry source when the telemetry stream is not received * far all non allowed sensors while FAI MODE is active | +| `-` | `table` | GPS position is returned in a table: * `lat` (number) latitude, positive is North * `lon` (number) longitude, positive is East * `pilot-lat` (number) pilot latitude, positive is North * `pilot-lon` (number) pilot longitude, positive is East | +| `-` | `table` | GPS date/time, see getDateTime() | +| `-` | `table` | Cells are returned in a table (except where no cells were detected in which case the returned value is 0): * table has one item for each detected cell: * key (number) cell number (1 to number of cells) * value (number) current cell voltage | + +#### Notes + +- Getting a value by its numerical identifier is faster then by its name. +While `Cels` sensor returns current values of all cells in a table, a `Cels+` or +`Cels-` will return a single value - the maximum or minimum Cels value. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getValue([source]) + +Returns the value of a source. + +@param source (string) can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source. + +@retval (integer) current source value (number). Zero is returned for: +* non-existing sources + * for all telemetry source when the telemetry stream is not received + * far all non allowed sensors while FAI MODE is active + +@retval (table) GPS position is returned in a table: +* `lat` (number) latitude, positive is North + * `lon` (number) longitude, positive is East + * `pilot-lat` (number) pilot latitude, positive is North + * `pilot-lon` (number) pilot longitude, positive is East + +@retval (table) GPS date/time, see getDateTime() + +@retval (table) Cells are returned in a table (except where no cells were detected in which +case the returned value is 0): + * table has one item for each detected cell: + * key (number) cell number (1 to number of cells) + * value (number) current cell voltage + +@notice Getting a value by its numerical identifier is faster then by its name. +While `Cels` sensor returns current values of all cells in a table, a `Cels+` or +`Cels-` will return a single value - the maximum or minimum Cels value. + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-get-version.md b/website/md-docs/api-reference/review-runtime-get-version.md new file mode 100644 index 000000000..ac296428e --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-get-version.md @@ -0,0 +1,153 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: getVersion + +[Back to dashboard](review.md) | [Open API page](system/get-version.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `getVersion` +- Doc id: `runtime.get-version` +- Source: `radio/src/lua/api_general.cpp:129` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="getVersion"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>string</code></td><td>OpenTX version (ie "2.1.5")</td><td><select data-field-kind="return" data-field-name="-" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>opentx_version_ie_2</code></td><td>return</td><td><code>string</code></td><td>OpenTX version (ie "2.1.5")</td><td><select data-field-kind="return" data-field-name="opentx_version_ie_2" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="opentx_version_ie_2" data-custom-type="true" /></td></tr> +<tr><td><code>radio_type_x12s_x10_x9e_x9d_x9d_or_x7</code></td><td>return</td><td><code>string</code></td><td>radio type: `x12s`, `x10`, `x9e`, `x9d+`, `x9d` or `x7`.</td><td><select data-field-kind="return" data-field-name="radio_type_x12s_x10_x9e_x9d_x9d_or_x7" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="radio_type_x12s_x10_x9e_x9d_x9d_or_x7" data-custom-type="true" /></td></tr> +<tr><td><code>major_version_ie_2_if_version_2</code></td><td>return</td><td><code>integer</code></td><td>major version (ie 2 if version 2.1.5)</td><td><select data-field-kind="return" data-field-name="major_version_ie_2_if_version_2" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="major_version_ie_2_if_version_2" data-custom-type="true" /></td></tr> +<tr><td><code>minor_version_ie_1_if_version_2</code></td><td>return</td><td><code>integer</code></td><td>minor version (ie 1 if version 2.1.5)</td><td><select data-field-kind="return" data-field-name="minor_version_ie_1_if_version_2" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="minor_version_ie_1_if_version_2" data-custom-type="true" /></td></tr> +<tr><td><code>revision_number_ie_5_if_version_2</code></td><td>return</td><td><code>integer</code></td><td>revision number (ie 5 if version 2.1.5)</td><td><select data-field-kind="return" data-field-name="revision_number_ie_5_if_version_2" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="revision_number_ie_5_if_version_2" data-custom-type="true" /></td></tr> +<tr><td><code>os_name_i</code></td><td>return</td><td><code>string</code></td><td>OS name (i.e. EdgeTX or nil if OpenTX)</td><td><select data-field-kind="return" data-field-name="os_name_i" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="os_name_i" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "getVersion", "symbol": "getVersion", "summary": "Return OpenTX version", "parameters": [], "returns": [{"name": "", "type": "string", "description": "OpenTX version (ie \"2.1.5\")"}, {"name": "opentx_version_ie_2", "type": "string", "description": "OpenTX version (ie \"2.1.5\")"}, {"name": "radio_type_x12s_x10_x9e_x9d_x9d_or_x7", "type": "string", "description": "radio type: `x12s`, `x10`, `x9e`, `x9d+`, `x9d` or `x7`."}, {"name": "major_version_ie_2_if_version_2", "type": "integer", "description": "major version (ie 2 if version 2.1.5)"}, {"name": "minor_version_ie_1_if_version_2", "type": "integer", "description": "minor version (ie 1 if version 2.1.5)"}, {"name": "revision_number_ie_5_if_version_2", "type": "integer", "description": "revision number (ie 5 if version 2.1.5)"}, {"name": "os_name_i", "type": "string", "description": "OS name (i.e. EdgeTX or nil if OpenTX)"}], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function getVersion() + +Return OpenTX version + +@retval string OpenTX version (ie "2.1.5") + +@retval multiple values (available since 2.1.7): + * (string) OpenTX version (ie "2.1.5") + * (string) radio type: `x12s`, `x10`, `x9e`, `x9d+`, `x9d` or `x7`. +If running in simulator the "-simu" is added + * (number) major version (ie 2 if version 2.1.5) + * (number) minor version (ie 1 if version 2.1.5) + * (number) revision number (ie 5 if version 2.1.5) +Since EdgeTX 2.4.0, sixth value added + * (string) OS name (i.e. EdgeTX or nil if OpenTX) + +@status current Introduced in 2.0.0, expanded in 2.1.7, radio type strings changed in 2.2.0, os name added in EdgeTX 2.4.0 + +### Example + +This example also runs in OpenTX versions where the function returned only one value: + +```lua +local function run(event) + local ver, radio, maj, minor, rev, osname = getVersion() + print("version: "..ver) + if radio then print ("radio: "..radio) end + if maj then print ("maj: "..maj) end + if minor then print ("minor: "..minor) end + if rev then print ("rev: "..rev) end + if osname then print ("osname: "..osname) end + return 1 +end + +return { run=run } +``` +Output of the above script in simulator: +``` +version: 2.4.0 +radio: tx16s-simu +maj: 2 +minor: 4 +rev: 0 +osname: EdgeTX +``` +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Return OpenTX version + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `string` | OpenTX version (ie "2.1.5") | +| `opentx_version_ie_2` | `string` | OpenTX version (ie "2.1.5") | +| `radio_type_x12s_x10_x9e_x9d_x9d_or_x7` | `string` | radio type: `x12s`, `x10`, `x9e`, `x9d+`, `x9d` or `x7`. | +| `major_version_ie_2_if_version_2` | `integer` | major version (ie 2 if version 2.1.5) | +| `minor_version_ie_1_if_version_2` | `integer` | minor version (ie 1 if version 2.1.5) | +| `revision_number_ie_5_if_version_2` | `integer` | revision number (ie 5 if version 2.1.5) | +| `os_name_i` | `string` | OS name (i.e. EdgeTX or nil if OpenTX) | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function getVersion() + +Return OpenTX version + +@retval (string) OpenTX version (ie "2.1.5") + +@retval opentx_version_ie_2 (string) OpenTX version (ie "2.1.5") + +@retval radio_type_x12s_x10_x9e_x9d_x9d_or_x7 (string) radio type: `x12s`, `x10`, `x9e`, `x9d+`, `x9d` or `x7`. + +@retval major_version_ie_2_if_version_2 (integer) major version (ie 2 if version 2.1.5) + +@retval minor_version_ie_1_if_version_2 (integer) minor version (ie 1 if version 2.1.5) + +@retval revision_number_ie_5_if_version_2 (integer) revision number (ie 5 if version 2.1.5) + +@retval os_name_i (string) OS name (i.e. EdgeTX or nil if OpenTX) + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-ghost-telemetry-pop.md b/website/md-docs/api-reference/review-runtime-ghost-telemetry-pop.md new file mode 100644 index 000000000..a80b1bb8a --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-ghost-telemetry-pop.md @@ -0,0 +1,103 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: ghostTelemetryPop + +[Back to dashboard](review.md) | [Open API page](telemetry/ghost-telemetry-pop.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `ghostTelemetryPop` +- Doc id: `runtime.ghost-telemetry-pop` +- Source: `radio/src/lua/api_general.cpp:1261` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="ghostTelemetryPop"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>queue does not contain any (or enough) bytes to form a whole packet</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>type</code></td><td>return</td><td><code>integer</code></td><td></td><td><select data-field-kind="return" data-field-name="type" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="type" data-custom-type="true" /></td></tr> +<tr><td><code>packet</code></td><td>return</td><td><code>table</code></td><td>data bytes</td><td><select data-field-kind="return" data-field-name="packet" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="packet" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "ghostTelemetryPop", "symbol": "ghostTelemetryPop", "summary": "Pops a received Ghost Telemetry packet from the queue.", "parameters": [], "returns": [{"name": "", "type": "nil", "description": "queue does not contain any (or enough) bytes to form a whole packet"}, {"name": "type", "type": "integer", "description": ""}, {"name": "packet", "type": "table", "description": "data bytes"}], "notes": [], "since": "2.7.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function ghostTelemetryPop() + +Pops a received Ghost Telemetry packet from the queue. + +@retval nil queue does not contain any (or enough) bytes to form a whole packet + +@retval multiple returns 2 values: + * type (number) + * packet (table) data bytes + +@status current Introduced in 2.7.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Pops a received Ghost Telemetry packet from the queue. + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | queue does not contain any (or enough) bytes to form a whole packet | +| `type` | `integer` | | +| `packet` | `table` | data bytes | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function ghostTelemetryPop() + +Pops a received Ghost Telemetry packet from the queue. + +@retval (nil) queue does not contain any (or enough) bytes to form a whole packet + +@retval type (integer) + +@retval packet (table) data bytes + +@status current Introduced in 2.7.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-ghost-telemetry-push.md b/website/md-docs/api-reference/review-runtime-ghost-telemetry-push.md new file mode 100644 index 000000000..2cfbaad49 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-ghost-telemetry-push.md @@ -0,0 +1,113 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: ghostTelemetryPush + +[Back to dashboard](review.md) | [Open API page](rf-module/ghost-telemetry-push.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `ghostTelemetryPush` +- Doc id: `runtime.ghost-telemetry-push` +- Source: `radio/src/lua/api_general.cpp:1299` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: command + +## Decide + +- Unknown params to decide: `command` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="ghostTelemetryPush"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>command</code></td><td>param</td><td><code>unknown</code></td><td>command</td><td><select data-field-kind="param" data-field-name="command" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="command" data-custom-type="true" /></td></tr> +<tr><td><code>data</code></td><td>param</td><td><code>table</code></td><td>table of data bytes</td><td><select data-field-kind="param" data-field-name="data" data-current-type="table"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="data" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>boolean</code></td><td>data queued in output buffer or not.</td><td><select data-field-kind="return" data-field-name="-" data-current-type="boolean"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>incorrect telemetry protocol.</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "ghostTelemetryPush", "symbol": "ghostTelemetryPush", "summary": "This functions allows for sending telemetry data toward the Ghost link.", "parameters": [{"name": "command", "type": "unknown", "required": true, "description": "command"}, {"name": "data", "type": "table", "required": true, "description": "table of data bytes"}], "returns": [{"name": "", "type": "boolean", "description": "data queued in output buffer or not."}, {"name": "", "type": "nil", "description": "incorrect telemetry protocol."}], "notes": [], "since": "2.7.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function ghostTelemetryPush() + +This functions allows for sending telemetry data toward the Ghost link. + +When called without parameters, it will only return the status of the output buffer without sending anything. + +@param command command + +@param data table of data bytes + +@retval boolean data queued in output buffer or not. + +@retval nil incorrect telemetry protocol. + +@status current Introduced in 2.7.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +This functions allows for sending telemetry data toward the Ghost link. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `command` | yes | `unknown` | command | +| `data` | yes | `table` | table of data bytes | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `boolean` | data queued in output buffer or not. | +| `-` | `nil` | incorrect telemetry protocol. | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function ghostTelemetryPush([command, data]) + +This functions allows for sending telemetry data toward the Ghost link. + +@param command (TODO) command + +@param data (table) table of data bytes + +@retval (boolean) data queued in output buffer or not. + +@retval (nil) incorrect telemetry protocol. + +@status current Introduced in 2.7.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-grey.md b/website/md-docs/api-reference/review-runtime-grey.md new file mode 100644 index 000000000..9bd9393f9 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-grey.md @@ -0,0 +1,95 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: GREY + +[Back to dashboard](review.md) | [Open API page](display-lcd/grey.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `GREY` +- Doc id: `runtime.grey` +- Source: `radio/src/lua/api_general.cpp:1716` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="GREY"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>a value that represents amount of *greyness* (from 0 to 15)</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "GREY", "symbol": "GREY", "summary": "Returns gray value which can be used in LCD functions", "parameters": [], "returns": [{"name": "", "type": "integer", "description": "a value that represents amount of *greyness* (from 0 to 15)"}], "notes": ["Only available on Taranis"], "since": "2.0.13"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function GREY() + +Returns gray value which can be used in LCD functions + +@retval (number) a value that represents amount of *greyness* (from 0 to 15) + +@notice Only available on Taranis + +@status current Introduced in 2.0.13 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Returns gray value which can be used in LCD functions + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | a value that represents amount of *greyness* (from 0 to 15) | + +#### Notes + +- Only available on Taranis + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function GREY() + +Returns gray value which can be used in LCD functions + +@retval (integer) a value that represents amount of *greyness* (from 0 to 15) + +@notice Only available on Taranis + +@status current Introduced in 2.0.13 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-kill-events.md b/website/md-docs/api-reference/review-runtime-kill-events.md new file mode 100644 index 000000000..400f654db --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-kill-events.md @@ -0,0 +1,91 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: killEvents + +[Back to dashboard](review.md) | [Open API page](key-inputs/kill-events.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `killEvents` +- Doc id: `runtime.kill-events` +- Source: `radio/src/lua/api_general.cpp:1684` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="killEvents"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>key</code></td><td>param</td><td><code>integer</code></td><td>key to be killed, can also include event type (only the key part is used)</td><td><select data-field-kind="param" data-field-name="key" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="key" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "killEvents", "symbol": "killEvents", "summary": "Stops key state machine. See [Key Events](../key_events.md) for the detailed description.", "parameters": [{"name": "key", "type": "integer", "required": true, "description": "key to be killed, can also include event type (only the key part is used)"}], "returns": [], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function killEvents(key) + +Stops key state machine. See [Key Events](../key_events.md) for the detailed description. + +@param key (number) key to be killed, can also include event type (only the key part is used) + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Stops key state machine. See [Key Events](../api-overview/constants/key-event-constants.md) for the detailed description. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `key` | yes | `integer` | key to be killed, can also include event type (only the key part is used) | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function killEvents([key]) + +Stops key state machine. See [Key Events](../key_events.md) for the detailed description. + +@param key (integer) key to be killed, can also include event type (only the key part is used) + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-load-script.md b/website/md-docs/api-reference/review-runtime-load-script.md new file mode 100644 index 000000000..76b4fcf76 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-load-script.md @@ -0,0 +1,182 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: loadScript + +[Back to dashboard](review.md) | [Open API page](lua-scripts/load-script.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `loadScript` +- Doc id: `runtime.load-script` +- Source: `radio/src/lua/api_general.cpp:2111` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="loadScript"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>file</code></td><td>param</td><td><code>string</code></td><td>Full path and file name of script. The file extension is optional and ignored (see `mode` param to control which extension will be used). However, if an extension is specified, it should be ".lua" (or ".luac"), otherwise it is treated + as part of the file name and the .lua/.luac will be appended to that.</td><td><select data-field-kind="param" data-field-name="file" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="file" data-custom-type="true" /></td></tr> +<tr><td><code>mode</code></td><td>param</td><td><code>string</code></td><td>(optional) Controls whether to force loading the text (.lua) or pre-compiled binary (.luac) version of the script. By default ETX will load the newest version and compile a new binary if necessary (overwriting any + existing .luac version of the same script, and stripping some debug info like line numbers). + You can use `mode` to control the loading behavior more specifically. Possible values are: + * `b` only binary. + * `t` only text. + * `T` (default on simulator) prefer text but load binary if that is the only version available. + * `bt` (default on radio) either binary or text, whichever is newer (binary preferred when timestamps are equal). + * Add `x` to avoid automatic compilation of source file to .luac version. + Eg: "tx", "bx", or "btx". + * Add `c` to force compilation of source file to .luac version (even if existing version is newer than source file). + Eg: "tc" or "btc" (forces "t", overrides "x"). + * Add `d` to keep extra debug info in the compiled binary. + Eg: "td", "btd", or "tcd" (no effect with just "b" or with "x").</td><td><select data-field-kind="param" data-field-name="mode" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="mode" data-custom-type="true" /></td></tr> +<tr><td><code>env</code></td><td>param</td><td><code>integer</code></td><td>See documentation for Lua function loadfile().</td><td><select data-field-kind="param" data-field-name="env" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="env" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>function|nil</code></td><td>The loaded script, or `nil` if there was an error (e.g. file not found or syntax error).</td><td><select data-field-kind="return" data-field-name="-" data-current-type="function|nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>string|nil</code></td><td>Error message(s), if any. Blank if no error occurred.</td><td><select data-field-kind="return" data-field-name="-" data-current-type="string|nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "loadScript", "symbol": "loadScript", "summary": "Load a Lua script file. This is similar to Lua's own [loadfile()](https://www.lua.org/manual/5.2/manual.html#pdf-loadfile)\nAPI method, but it uses OpenTx's optional pre-compilation feature to save memory and time during load.", "parameters": [{"name": "file", "type": "string", "required": true, "description": "Full path and file name of script. The file extension is optional and ignored (see `mode` param to control which extension will be used). However, if an extension is specified, it should be \".lua\" (or \".luac\"), otherwise it is treated\n as part of the file name and the .lua/.luac will be appended to that."}, {"name": "mode", "type": "string", "required": false, "description": "(optional) Controls whether to force loading the text (.lua) or pre-compiled binary (.luac) version of the script. By default ETX will load the newest version and compile a new binary if necessary (overwriting any\n existing .luac version of the same script, and stripping some debug info like line numbers).\n You can use `mode` to control the loading behavior more specifically. Possible values are:\n * `b` only binary.\n * `t` only text.\n * `T` (default on simulator) prefer text but load binary if that is the only version available.\n * `bt` (default on radio) either binary or text, whichever is newer (binary preferred when timestamps are equal).\n * Add `x` to avoid automatic compilation of source file to .luac version.\n Eg: \"tx\", \"bx\", or \"btx\".\n * Add `c` to force compilation of source file to .luac version (even if existing version is newer than source file).\n Eg: \"tc\" or \"btc\" (forces \"t\", overrides \"x\").\n * Add `d` to keep extra debug info in the compiled binary.\n Eg: \"td\", \"btd\", or \"tcd\" (no effect with just \"b\" or with \"x\")."}, {"name": "env", "type": "integer", "required": false, "description": "See documentation for Lua function loadfile()."}], "returns": [{"name": "", "type": "function|nil", "description": "The loaded script, or `nil` if there was an error (e.g. file not found or syntax error)."}, {"name": "", "type": "string|nil", "description": "Error message(s), if any. Blank if no error occurred."}], "notes": ["Note that you will get an error if you specify `mode` as \"b\" or \"t\" and that specific version of the file does not exist (eg. no .luac file when \"b\" is used).\n Also note that `mode` is NOT passed on to Lua's loader function, so unlike with loadfile() the actual file content is not checked (as if no mode or \"bt\" were passed to loadfile())."], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function loadScript(file [, mode], [,env]) + +Load a Lua script file. This is similar to Lua's own [loadfile()](https://www.lua.org/manual/5.2/manual.html#pdf-loadfile) +API method, but it uses OpenTx's optional pre-compilation feature to save memory and time during load. + +Return values are same as from Lua API loadfile() method: If the script was loaded w/out errors +then the loaded script (or "chunk") is returned as a function. Otherwise, returns nil plus the error message. + +@param file (string) Full path and file name of script. The file extension is optional and ignored (see `mode` param to control + which extension will be used). However, if an extension is specified, it should be ".lua" (or ".luac"), otherwise it is treated + as part of the file name and the .lua/.luac will be appended to that. + +@param mode (string) (optional) Controls whether to force loading the text (.lua) or pre-compiled binary (.luac) + version of the script. By default ETX will load the newest version and compile a new binary if necessary (overwriting any + existing .luac version of the same script, and stripping some debug info like line numbers). + You can use `mode` to control the loading behavior more specifically. Possible values are: + * `b` only binary. + * `t` only text. + * `T` (default on simulator) prefer text but load binary if that is the only version available. + * `bt` (default on radio) either binary or text, whichever is newer (binary preferred when timestamps are equal). + * Add `x` to avoid automatic compilation of source file to .luac version. + Eg: "tx", "bx", or "btx". + * Add `c` to force compilation of source file to .luac version (even if existing version is newer than source file). + Eg: "tc" or "btc" (forces "t", overrides "x"). + * Add `d` to keep extra debug info in the compiled binary. + Eg: "td", "btd", or "tcd" (no effect with just "b" or with "x"). + +@notice + Note that you will get an error if you specify `mode` as "b" or "t" and that specific version of the file does not exist (eg. no .luac file when "b" is used). + Also note that `mode` is NOT passed on to Lua's loader function, so unlike with loadfile() the actual file content is not checked (as if no mode or "bt" were passed to loadfile()). + +@param env (integer) See documentation for Lua function loadfile(). + +@retval function The loaded script, or `nil` if there was an error (e.g. file not found or syntax error). + +@retval string Error message(s), if any. Blank if no error occurred. + +@status current Introduced in 2.2.0 + +### Example + +```lua + fun, err = loadScript("/SCRIPTS/FUNCTIONS/print.lua") + if (fun ~= nil) then + fun("Hello from loadScript()") + else + print(err) + end +``` +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Load a Lua script file. This is similar to Lua's own [loadfile()](https://www.lua.org/manual/5.2/manual.html#pdf-loadfile) +API method, but it uses OpenTx's optional pre-compilation feature to save memory and time during load. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `file` | yes | `string` | Full path and file name of script. The file extension is optional and ignored (see `mode` param to control which extension will be used). However, if an extension is specified, it should be ".lua" (or ".luac"), otherwise it is treated as part of the file name and the .lua/.luac will be appended to that. | +| `mode` | no | `string` | (optional) Controls whether to force loading the text (.lua) or pre-compiled binary (.luac) version of the script. By default ETX will load the newest version and compile a new binary if necessary (overwriting any existing .luac version of the same script, and stripping some debug info like line numbers). You can use `mode` to control the loading behavior more specifically. Possible values are: * `b` only binary. * `t` only text. * `T` (default on simulator) prefer text but load binary if that is the only version available. * `bt` (default on radio) either binary or text, whichever is newer (binary preferred when timestamps are equal). * Add `x` to avoid automatic compilation of source file to .luac version. Eg: "tx", "bx", or "btx". * Add `c` to force compilation of source file to .luac version (even if existing version is newer than source file). Eg: "tc" or "btc" (forces "t", overrides "x"). * Add `d` to keep extra debug info in the compiled binary. Eg: "td", "btd", or "tcd" (no effect with just "b" or with "x"). | +| `env` | no | `integer` | See documentation for Lua function loadfile(). | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `function|nil` | The loaded script, or `nil` if there was an error (e.g. file not found or syntax error). | +| `-` | `string|nil` | Error message(s), if any. Blank if no error occurred. | + +#### Notes + +- Note that you will get an error if you specify `mode` as "b" or "t" and that specific version of the file does not exist (eg. no .luac file when "b" is used). + Also note that `mode` is NOT passed on to Lua's loader function, so unlike with loadfile() the actual file content is not checked (as if no mode or "bt" were passed to loadfile()). + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function loadScript([file, mode, env]) + +Load a Lua script file. This is similar to Lua's own [loadfile()](https://www.lua.org/manual/5.2/manual.html#pdf-loadfile) +API method, but it uses OpenTx's optional pre-compilation feature to save memory and time during load. + +@param file (string) Full path and file name of script. The file extension is optional and ignored (see `mode` param to control which extension will be used). However, if an extension is specified, it should be ".lua" (or ".luac"), otherwise it is treated + as part of the file name and the .lua/.luac will be appended to that. + +@param mode (string) (optional) Controls whether to force loading the text (.lua) or pre-compiled binary (.luac) version of the script. By default ETX will load the newest version and compile a new binary if necessary (overwriting any + existing .luac version of the same script, and stripping some debug info like line numbers). + You can use `mode` to control the loading behavior more specifically. Possible values are: + * `b` only binary. + * `t` only text. + * `T` (default on simulator) prefer text but load binary if that is the only version available. + * `bt` (default on radio) either binary or text, whichever is newer (binary preferred when timestamps are equal). + * Add `x` to avoid automatic compilation of source file to .luac version. + Eg: "tx", "bx", or "btx". + * Add `c` to force compilation of source file to .luac version (even if existing version is newer than source file). + Eg: "tc" or "btc" (forces "t", overrides "x"). + * Add `d` to keep extra debug info in the compiled binary. + Eg: "td", "btd", or "tcd" (no effect with just "b" or with "x"). + +@param env (integer) See documentation for Lua function loadfile(). + +@retval (function|nil) The loaded script, or `nil` if there was an error (e.g. file not found or syntax error). + +@retval (string|nil) Error message(s), if any. Blank if no error occurred. + +@notice Note that you will get an error if you specify `mode` as "b" or "t" and that specific version of the file does not exist (eg. no .luac file when "b" is used). + Also note that `mode` is NOT passed on to Lua's loader function, so unlike with loadfile() the actual file content is not checked (as if no mode or "bt" were passed to loadfile()). + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-mkdir.md b/website/md-docs/api-reference/review-runtime-mkdir.md new file mode 100644 index 000000000..b7afa4660 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-mkdir.md @@ -0,0 +1,93 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: mkdir + +[Back to dashboard](review.md) | [Open API page](filesystem/mkdir.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `mkdir` +- Doc id: `runtime.mkdir` +- Source: `radio/src/lua/api_filesystem.cpp:205` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="mkdir"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>directory</code></td><td>param</td><td><code>string</code></td><td>Directory to create</td><td><select data-field-kind="param" data-field-name="directory" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="directory" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "mkdir", "symbol": "mkdir", "summary": "Create a directory", "parameters": [{"name": "directory", "type": "string", "required": true, "description": "Directory to create"}], "returns": [], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function mkdir(directory) + + Create a directory + +@param directory (string) Directory to create + +@status current Introduced in 2.11.0 + + Returns FRESULT (e.g. 0=OK, 6=Path invalid, 8=Directory exists) +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Create a directory + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `directory` | yes | `string` | Directory to create | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function mkdir([directory]) + +Create a directory + +@param directory (string) Directory to create + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-multi-buffer.md b/website/md-docs/api-reference/review-runtime-multi-buffer.md new file mode 100644 index 000000000..7e58cd280 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-multi-buffer.md @@ -0,0 +1,100 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: multiBuffer + +[Back to dashboard](review.md) | [Open API page](rf-module/multi-buffer.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `multiBuffer` +- Doc id: `runtime.multi-buffer` +- Source: `radio/src/lua/api_general.cpp:2265` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: address + +## Decide + +- Unknown params to decide: `address` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="multiBuffer"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>address</code></td><td>param</td><td><code>unknown</code></td><td>to read/write in the buffer @param (optional): value to write in the buffer</td><td><select data-field-kind="param" data-field-name="address" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="address" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>value (number)</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "multiBuffer", "symbol": "multiBuffer", "summary": "This function reads/writes the Multi protocol buffer to interact with a protocol.", "parameters": [{"name": "address", "type": "unknown", "required": true, "description": "to read/write in the buffer @param (optional): value to write in the buffer"}], "returns": [{"name": "", "type": "integer", "description": "value (number)"}], "notes": [], "since": "2.3.2"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function multiBuffer(address[,value]) + +This function reads/writes the Multi protocol buffer to interact with a protocol. + +@param address to read/write in the buffer +@param (optional): value to write in the buffer + +@retval buffer value (number) + +@status current Introduced in 2.3.2 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +This function reads/writes the Multi protocol buffer to interact with a protocol. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `address` | yes | `unknown` | to read/write in the buffer @param (optional): value to write in the buffer | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | value (number) | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function multiBuffer([address]) + +This function reads/writes the Multi protocol buffer to interact with a protocol. + +@param address (TODO) to read/write in the buffer @param (optional): value to write in the buffer + +@retval (integer) value (number) + +@status current Introduced in 2.3.2 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-play-duration.md b/website/md-docs/api-reference/review-runtime-play-duration.md new file mode 100644 index 000000000..8b7c7a041 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-play-duration.md @@ -0,0 +1,128 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: playDuration + +[Back to dashboard](review.md) | [Open API page](audio-sound/play-duration.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `playDuration` +- Doc id: `runtime.play-duration` +- Source: `radio/src/lua/api_general.cpp:1545` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="playDuration"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>duration</code></td><td>param</td><td><code>integer</code></td><td>number of seconds to play. Only integral part is used.</td><td><select data-field-kind="param" data-field-name="duration" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="duration" data-custom-type="true" /></td></tr> +<tr><td><code>hourFormat</code></td><td>param</td><td><code>integer</code></td><td>* `0 or not present` play format: minutes and seconds. + * `!= 0` play format: hours, minutes and seconds. + * +@param volume (number): + - (1..5) override radio settings Wav volume for the duration of file + - omitting the parameter uses radio settings Wav volume</td><td><select data-field-kind="param" data-field-name="hourFormat" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="hourFormat" data-custom-type="true" /></td></tr> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "playDuration", "symbol": "playDuration", "summary": "Play a time value (text to speech)", "parameters": [{"name": "duration", "type": "integer", "required": true, "description": "number of seconds to play. Only integral part is used."}, {"name": "hourFormat", "type": "integer", "required": false, "description": "* `0 or not present` play format: minutes and seconds.\n * `!= 0` play format: hours, minutes and seconds.\n *\n@param volume (number):\n - (1..5) override radio settings Wav volume for the duration of file\n - omitting the parameter uses radio settings Wav volume"}], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": [], "since": "2.1.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function playDuration(duration [, hourFormat [, volume]]) + +Play a time value (text to speech) + +@param duration (number) number of seconds to play. Only integral part is used. + +@param hourFormat (number): + * `0 or not present` play format: minutes and seconds. + * `!= 0` play format: hours, minutes and seconds. + * +@param volume (number): + - (1..5) override radio settings Wav volume for the duration of file + - omitting the parameter uses radio settings Wav volume + +@retval none + +@status current Introduced in 2.1.0, changed in 2.10 + +// targets: BW, COLOR +// +// EXAMPLES: +// playDuration(101, 0, 5) -- play duration 101s, seconds format, use Wav volume 5 +// playDuration(101, 0, 1) -- play duration 101s, seconds format, use Wav volume 1 +// playDuration(101, 1) -- play duration 101s, hour format, use radio settings Wav volume +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Play a time value (text to speech) + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `duration` | yes | `integer` | number of seconds to play. Only integral part is used. | +| `hourFormat` | no | `integer` | * `0 or not present` play format: minutes and seconds. * `!= 0` play format: hours, minutes and seconds. * @param volume (number): - (1..5) override radio settings Wav volume for the duration of file - omitting the parameter uses radio settings Wav volume | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function playDuration([duration, hourFormat]) + +Play a time value (text to speech) + +@param duration (integer) number of seconds to play. Only integral part is used. + +@param hourFormat (integer) * `0 or not present` play format: minutes and seconds. + * `!= 0` play format: hours, minutes and seconds. + * +@param volume (number): + - (1..5) override radio settings Wav volume for the duration of file + - omitting the parameter uses radio settings Wav volume + +@retval none (TODO) + +@status current Introduced in 2.1.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-play-file.md b/website/md-docs/api-reference/review-runtime-play-file.md new file mode 100644 index 000000000..36fd21344 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-play-file.md @@ -0,0 +1,120 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: playFile + +[Back to dashboard](review.md) | [Open API page](audio-sound/play-file.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `playFile` +- Doc id: `runtime.play-file` +- Source: `radio/src/lua/api_general.cpp:1455` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="playFile"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>filename</code></td><td>param</td><td><code>string</code></td><td>full path to wav file (i.e. "/SOUNDS/en/system/tada.wav") Introduced in 2.1.0: If you use a relative path, the current language is prepended +to the path (example: for English language: `/SOUNDS/en` is prepended)</td><td><select data-field-kind="param" data-field-name="filename" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="filename" data-custom-type="true" /></td></tr> +<tr><td><code>volume</code></td><td>param</td><td><code>integer</code></td><td>- (1..5) override radio settings Wav volume for the duration of file + - omitting the parameter uses radio settings Wav volume</td><td><select data-field-kind="param" data-field-name="volume" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="volume" data-custom-type="true" /></td></tr> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "playFile", "symbol": "playFile", "summary": "Play a file from the SD card", "parameters": [{"name": "filename", "type": "string", "required": true, "description": "full path to wav file (i.e. \"/SOUNDS/en/system/tada.wav\") Introduced in 2.1.0: If you use a relative path, the current language is prepended\nto the path (example: for English language: `/SOUNDS/en` is prepended)"}, {"name": "volume", "type": "integer", "required": false, "description": "- (1..5) override radio settings Wav volume for the duration of file\n - omitting the parameter uses radio settings Wav volume"}], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function playFile(filename [, volume]) + +Play a file from the SD card + +@param filename (string) full path to wav file (i.e. "/SOUNDS/en/system/tada.wav") +Introduced in 2.1.0: If you use a relative path, the current language is prepended +to the path (example: for English language: `/SOUNDS/en` is prepended) + +@param volume (number): + - (1..5) override radio settings Wav volume for the duration of file + - omitting the parameter uses radio settings Wav volume + +@retval none + +@status current Introduced in 2.0.0, changed in 2.1.0, changed in 2.10 + +// targets: BW, COLOR +// +// EXAMPLES: +// playFile("armed.wav", 5) -- play file armed.wav, use Wav volume 5 +// playFile("armed.wav", 1) -- play file armed.wav, use Wav volume 1 +// playFile("armed.wav") -- play file armed.wav, use radio settings Wav volume +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Play a file from the SD card + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `filename` | yes | `string` | full path to wav file (i.e. "/SOUNDS/en/system/tada.wav") Introduced in 2.1.0: If you use a relative path, the current language is prepended to the path (example: for English language: `/SOUNDS/en` is prepended) | +| `volume` | no | `integer` | - (1..5) override radio settings Wav volume for the duration of file - omitting the parameter uses radio settings Wav volume | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function playFile([filename, volume]) + +Play a file from the SD card + +@param filename (string) full path to wav file (i.e. "/SOUNDS/en/system/tada.wav") Introduced in 2.1.0: If you use a relative path, the current language is prepended +to the path (example: for English language: `/SOUNDS/en` is prepended) + +@param volume (integer) - (1..5) override radio settings Wav volume for the duration of file + - omitting the parameter uses radio settings Wav volume + +@retval none (TODO) + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-play-haptic.md b/website/md-docs/api-reference/review-runtime-play-haptic.md new file mode 100644 index 000000000..477aec2b6 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-play-haptic.md @@ -0,0 +1,107 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: playHaptic + +[Back to dashboard](review.md) | [Open API page](audio-sound/play-haptic.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `playHaptic` +- Doc id: `runtime.play-haptic` +- Source: `radio/src/lua/api_general.cpp:1656` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="playHaptic"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>duration</code></td><td>param</td><td><code>integer</code></td><td>length of the haptic feedback in milliseconds</td><td><select data-field-kind="param" data-field-name="duration" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="duration" data-custom-type="true" /></td></tr> +<tr><td><code>pause</code></td><td>param</td><td><code>integer</code></td><td>length of the silence after haptic feedback in milliseconds</td><td><select data-field-kind="param" data-field-name="pause" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="pause" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>* `0 or not present` play with normal priority + * `PLAY_NOW` play immediately</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "playHaptic", "symbol": "playHaptic", "summary": "Generate haptic feedback", "parameters": [{"name": "duration", "type": "integer", "required": true, "description": "length of the haptic feedback in milliseconds"}, {"name": "pause", "type": "integer", "required": true, "description": "length of the silence after haptic feedback in milliseconds"}, {"name": "flags", "type": "integer", "required": false, "description": "* `0 or not present` play with normal priority\n * `PLAY_NOW` play immediately"}], "returns": [], "notes": [], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function playHaptic(duration, pause [, flags]) + +Generate haptic feedback + +@param duration (number) length of the haptic feedback in milliseconds + +@param pause (number) length of the silence after haptic feedback in milliseconds + +@param flags (number): + * `0 or not present` play with normal priority + * `PLAY_NOW` play immediately + +@status current Introduced in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Generate haptic feedback + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `duration` | yes | `integer` | length of the haptic feedback in milliseconds | +| `pause` | yes | `integer` | length of the silence after haptic feedback in milliseconds | +| `flags` | no | `integer` | * `0 or not present` play with normal priority * `PLAY_NOW` play immediately | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function playHaptic([duration, pause, flags]) + +Generate haptic feedback + +@param duration (integer) length of the haptic feedback in milliseconds + +@param pause (integer) length of the silence after haptic feedback in milliseconds + +@param flags (integer) * `0 or not present` play with normal priority + * `PLAY_NOW` play immediately + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-play-number.md b/website/md-docs/api-reference/review-runtime-play-number.md new file mode 100644 index 000000000..49eb67405 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-play-number.md @@ -0,0 +1,137 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: playNumber + +[Back to dashboard](review.md) | [Open API page](audio-sound/play-number.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `playNumber` +- Doc id: `runtime.play-number` +- Source: `radio/src/lua/api_general.cpp:1501` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="playNumber"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>value</code></td><td>param</td><td><code>integer</code></td><td>number to play. Value is interpreted as integer.</td><td><select data-field-kind="param" data-field-name="value" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +<tr><td><code>unit</code></td><td>param</td><td><code>integer</code></td><td>unit identifier, see the Units reference for the full list</td><td><select data-field-kind="param" data-field-name="unit" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="unit" data-custom-type="true" /></td></tr> +<tr><td><code>attributes</code></td><td>param</td><td><code>integer</code></td><td>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)</td><td><select data-field-kind="param" data-field-name="attributes" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="attributes" data-custom-type="true" /></td></tr> +<tr><td><code>volume</code></td><td>param</td><td><code>integer</code></td><td>- (1..5) override radio settings Wav volume for the duration of file + - omitting the parameter uses radio settings Wav volume</td><td><select data-field-kind="param" data-field-name="volume" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="volume" data-custom-type="true" /></td></tr> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "playNumber", "symbol": "playNumber", "summary": "Play a numerical value (text to speech)", "parameters": [{"name": "value", "type": "integer", "required": true, "description": "number to play. Value is interpreted as integer."}, {"name": "unit", "type": "integer", "required": true, "description": "unit identifier, see the Units reference for the full list"}, {"name": "attributes", "type": "integer", "required": false, "description": "possible values:\n* `0 or not present` plays integral part of the number (for a number 123 it plays 123)\n * `PREC1` plays a number with one decimal place (for a number 123 it plays 12.3)\n * `PREC2` plays a number with two decimal places (for a number 123 it plays 1.23)"}, {"name": "volume", "type": "integer", "required": false, "description": "- (1..5) override radio settings Wav volume for the duration of file\n - omitting the parameter uses radio settings Wav volume"}], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": [], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function playNumber(value, unit [, attributes [, volume]]) + +Play a numerical value (text to speech) + +@param value (number) number to play. Value is interpreted as integer. + +@param unit (number) unit identifier, see the Units reference for the full list + +@param attributes (unsigned number) 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) + + @param volume (number): + - (1..5) override radio settings Wav volume for the duration of file + - omitting the parameter uses radio settings Wav volume + +@retval none + +@status current Introduced in 2.0.0, changed in 2.10 + +// targets: BW, COLOR +// +// EXAMPLES: +// playNumber(123, 3, 0, 5) -- play number 123, unit mAh, use Wav volume 5 +// playNumber(123, 3, 0, 1) -- play number 123, unit mAh, use Wav volume 1 +// playNumber(123, 3, 0) -- play number 123, unit mAh, use radio settings Wav volume +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Play a numerical value (text to speech) + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `value` | yes | `integer` | number to play. Value is interpreted as integer. | +| `unit` | yes | `integer` | unit identifier, see the Units reference for the full list | +| `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) | +| `volume` | no | `integer` | - (1..5) override radio settings Wav volume for the duration of file - omitting the parameter uses radio settings Wav volume | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function playNumber([value, unit, attributes, volume]) + +Play a numerical value (text to speech) + +@param value (integer) number to play. Value is interpreted as integer. + +@param unit (integer) unit identifier, see the Units reference for the full list + +@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) + +@param volume (integer) - (1..5) override radio settings Wav volume for the duration of file + - omitting the parameter uses radio settings Wav volume + +@retval none (TODO) + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-play-tone.md b/website/md-docs/api-reference/review-runtime-play-tone.md new file mode 100644 index 000000000..58d1706ef --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-play-tone.md @@ -0,0 +1,151 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: playTone + +[Back to dashboard](review.md) | [Open API page](audio-sound/play-tone.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `playTone` +- Doc id: `runtime.play-tone` +- Source: `radio/src/lua/api_general.cpp:1585` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="playTone"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>frequency</code></td><td>param</td><td><code>integer</code></td><td>tone frequency in Hz (from 150 to 15000)</td><td><select data-field-kind="param" data-field-name="frequency" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="frequency" data-custom-type="true" /></td></tr> +<tr><td><code>duration</code></td><td>param</td><td><code>integer</code></td><td>length of the tone in milliseconds</td><td><select data-field-kind="param" data-field-name="duration" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="duration" data-custom-type="true" /></td></tr> +<tr><td><code>pause</code></td><td>param</td><td><code>integer</code></td><td>length of the silence after the tone in milliseconds</td><td><select data-field-kind="param" data-field-name="pause" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="pause" data-custom-type="true" /></td></tr> +<tr><td><code>flags</code></td><td>param</td><td><code>integer</code></td><td>* `0 or not present` play with normal priority. + * `PLAY_BACKGROUND` play in background (built in vario function uses this context) + * `PLAY_NOW` play immediately</td><td><select data-field-kind="param" data-field-name="flags" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="flags" data-custom-type="true" /></td></tr> +<tr><td><code>freqIncr</code></td><td>param</td><td><code>integer</code></td><td>positive number increases the tone pitch (frequency with time), negative number decreases it. The frequency changes every 10 milliseconds, the change is `freqIncr * 10Hz`. +The valid range is from -127 to 127.</td><td><select data-field-kind="param" data-field-name="freqIncr" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="freqIncr" data-custom-type="true" /></td></tr> +<tr><td><code>volume</code></td><td>param</td><td><code>integer</code></td><td>- (1..5) override radio settings Beep volume for the duration of file + - omitting the parameter uses radio settings Beep volume</td><td><select data-field-kind="param" data-field-name="volume" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="volume" data-custom-type="true" /></td></tr> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "playTone", "symbol": "playTone", "summary": "Play a tone", "parameters": [{"name": "frequency", "type": "integer", "required": true, "description": "tone frequency in Hz (from 150 to 15000)"}, {"name": "duration", "type": "integer", "required": true, "description": "length of the tone in milliseconds"}, {"name": "pause", "type": "integer", "required": true, "description": "length of the silence after the tone in milliseconds"}, {"name": "flags", "type": "integer", "required": false, "description": "* `0 or not present` play with normal priority.\n * `PLAY_BACKGROUND` play in background (built in vario function uses this context)\n * `PLAY_NOW` play immediately"}, {"name": "freqIncr", "type": "integer", "required": false, "description": "positive number increases the tone pitch (frequency with time), negative number decreases it. The frequency changes every 10 milliseconds, the change is `freqIncr * 10Hz`.\nThe valid range is from -127 to 127."}, {"name": "volume", "type": "integer", "required": false, "description": "- (1..5) override radio settings Beep volume for the duration of file\n - omitting the parameter uses radio settings Beep volume"}], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": [], "since": "2.1.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function playTone(frequency, duration, pause [, flags [, freqIncr [, volume]]]) + +Play a tone + +@param frequency (number) tone frequency in Hz (from 150 to 15000) + +@param duration (number) length of the tone in milliseconds + +@param pause (number) length of the silence after the tone in milliseconds + +@param flags (number): + * `0 or not present` play with normal priority. + * `PLAY_BACKGROUND` play in background (built in vario function uses this context) + * `PLAY_NOW` play immediately + +@param freqIncr (number) positive number increases the tone pitch (frequency with time), +negative number decreases it. The frequency changes every 10 milliseconds, the change is `freqIncr * 10Hz`. +The valid range is from -127 to 127. + +@param volume (number): + - (1..5) override radio settings Beep volume for the duration of file + - omitting the parameter uses radio settings Beep volume + +@retval none + +@status current Introduced in 2.1.0, changed in 2.10 + +// targets: BW, COLOR +// +// EXAMPLES: +// playTone(2550, 160, 20, 3, -10, 5) -- play tone, use Beep volume 5 +// playTone(2550, 160, 20, 3, -10, 1) -- play tone, use Beep volume 1 +// playTone(2550, 160, 20, 3, -10) -- play tone, use radio settings Beep volume +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Play a tone + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `frequency` | yes | `integer` | tone frequency in Hz (from 150 to 15000) | +| `duration` | yes | `integer` | length of the tone in milliseconds | +| `pause` | yes | `integer` | length of the silence after the tone in milliseconds | +| `flags` | no | `integer` | * `0 or not present` play with normal priority. * `PLAY_BACKGROUND` play in background (built in vario function uses this context) * `PLAY_NOW` play immediately | +| `freqIncr` | no | `integer` | positive number increases the tone pitch (frequency with time), negative number decreases it. The frequency changes every 10 milliseconds, the change is `freqIncr * 10Hz`. The valid range is from -127 to 127. | +| `volume` | no | `integer` | - (1..5) override radio settings Beep volume for the duration of file - omitting the parameter uses radio settings Beep volume | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function playTone([frequency, duration, pause, flags, freqIncr, volume]) + +Play a tone + +@param frequency (integer) tone frequency in Hz (from 150 to 15000) + +@param duration (integer) length of the tone in milliseconds + +@param pause (integer) length of the silence after the tone in milliseconds + +@param flags (integer) * `0 or not present` play with normal priority. + * `PLAY_BACKGROUND` play in background (built in vario function uses this context) + * `PLAY_NOW` play immediately + +@param freqIncr (integer) positive number increases the tone pitch (frequency with time), negative number decreases it. The frequency changes every 10 milliseconds, the change is `freqIncr * 10Hz`. +The valid range is from -127 to 127. + +@param volume (integer) - (1..5) override radio settings Beep volume for the duration of file + - omitting the parameter uses radio settings Beep volume + +@retval none (TODO) + +@status current Introduced in 2.1.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-popup-confirmation.md b/website/md-docs/api-reference/review-runtime-popup-confirmation.md new file mode 100644 index 000000000..aea03dcf8 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-popup-confirmation.md @@ -0,0 +1,117 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: popupConfirmation + +[Back to dashboard](review.md) | [Open API page](display-lcd/popup-confirmation.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `popupConfirmation` +- Doc id: `runtime.popup-confirmation` +- Source: `radio/src/lua/api_general.cpp:1899` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: "CANCEL" + +## Decide + +- Unknown returns to decide: `"CANCEL"` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="popupConfirmation"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>title</code></td><td>param</td><td><code>string</code></td><td>title to display</td><td><select data-field-kind="param" data-field-name="title" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="title" data-custom-type="true" /></td></tr> +<tr><td><code>message</code></td><td>param</td><td><code>string</code></td><td>text to display</td><td><select data-field-kind="param" data-field-name="message" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="message" data-custom-type="true" /></td></tr> +<tr><td><code>event</code></td><td>param</td><td><code>integer</code></td><td>the event variable that is passed in from the Run function (key pressed)</td><td><select data-field-kind="param" data-field-name="event" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="event" data-custom-type="true" /></td></tr> +<tr><td><code>"CANCEL"</code></td><td>return</td><td><code>unknown</code></td><td>user pushed EXIT key</td><td><select data-field-kind="return" data-field-name=""CANCEL"" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name=""CANCEL"" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "popupConfirmation", "symbol": "popupConfirmation", "summary": "Raises a pop-up on screen that asks for confirmation", "parameters": [{"name": "title", "type": "string", "required": true, "description": "title to display"}, {"name": "message", "type": "string", "required": true, "description": "text to display"}, {"name": "event", "type": "integer", "required": true, "description": "the event variable that is passed in from the Run function (key pressed)"}], "returns": [{"name": "\"CANCEL\"", "type": "unknown", "description": "user pushed EXIT key"}], "notes": ["Use only from stand-alone and telemetry scripts."], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function popupConfirmation(title, event) deprecated, please replace by +@function popupConfirmation(title, message, event) + +Raises a pop-up on screen that asks for confirmation + +@param title (string) title to display + +@param message (string) text to display + +@param event (number) the event variable that is passed in from the +Run function (key pressed) + +@retval "CANCEL" user pushed EXIT key + +@notice Use only from stand-alone and telemetry scripts. + +@status current Introduced in 2.2.0, changed to (title, message, event) in 2.3.8 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Raises a pop-up on screen that asks for confirmation + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `title` | yes | `string` | title to display | +| `message` | yes | `string` | text to display | +| `event` | yes | `integer` | the event variable that is passed in from the Run function (key pressed) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `"CANCEL"` | `unknown` | user pushed EXIT key | + +#### Notes + +- Use only from stand-alone and telemetry scripts. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function popupConfirmation([title, message, event]) + +Raises a pop-up on screen that asks for confirmation + +@param title (string) title to display + +@param message (string) text to display + +@param event (integer) the event variable that is passed in from the Run function (key pressed) + +@retval "CANCEL" (TODO) user pushed EXIT key + +@notice Use only from stand-alone and telemetry scripts. + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-popup-input.md b/website/md-docs/api-reference/review-runtime-popup-input.md new file mode 100644 index 000000000..9e53a10a7 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-popup-input.md @@ -0,0 +1,140 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: popupInput + +[Back to dashboard](review.md) | [Open API page](display-lcd/popup-input.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `popupInput` +- Doc id: `runtime.popup-input` +- Source: `radio/src/lua/api_general.cpp:1800` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: "OK", "CANCEL" + +## Decide + +- Unknown returns to decide: `"OK", "CANCEL"` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="popupInput"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>title</code></td><td>param</td><td><code>string</code></td><td>text to display</td><td><select data-field-kind="param" data-field-name="title" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="title" data-custom-type="true" /></td></tr> +<tr><td><code>event</code></td><td>param</td><td><code>integer</code></td><td>the event variable that is passed in from the Run function (key pressed)</td><td><select data-field-kind="param" data-field-name="event" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="event" data-custom-type="true" /></td></tr> +<tr><td><code>input</code></td><td>param</td><td><code>integer</code></td><td>value that can be adjusted by the +/- keys</td><td><select data-field-kind="param" data-field-name="input" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="input" data-custom-type="true" /></td></tr> +<tr><td><code>min</code></td><td>param</td><td><code>integer</code></td><td>min value that input can reach (by pressing the - key)</td><td><select data-field-kind="param" data-field-name="min" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="min" data-custom-type="true" /></td></tr> +<tr><td><code>max</code></td><td>param</td><td><code>integer</code></td><td>max value that input can reach</td><td><select data-field-kind="param" data-field-name="max" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="max" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>integer</code></td><td>result of the input adjustment</td><td><select data-field-kind="return" data-field-name="-" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>"OK"</code></td><td>return</td><td><code>unknown</code></td><td>user pushed ENT key</td><td><select data-field-kind="return" data-field-name=""OK"" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name=""OK"" data-custom-type="true" /></td></tr> +<tr><td><code>"CANCEL"</code></td><td>return</td><td><code>unknown</code></td><td>user pushed EXIT key</td><td><select data-field-kind="return" data-field-name=""CANCEL"" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name=""CANCEL"" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "popupInput", "symbol": "popupInput", "summary": "Raises a pop-up on screen that allows uses input", "parameters": [{"name": "title", "type": "string", "required": true, "description": "text to display"}, {"name": "event", "type": "integer", "required": true, "description": "the event variable that is passed in from the Run function (key pressed)"}, {"name": "input", "type": "integer", "required": true, "description": "value that can be adjusted by the +/- keys"}, {"name": "min", "type": "integer", "required": true, "description": "min value that input can reach (by pressing the - key)"}, {"name": "max", "type": "integer", "required": true, "description": "max value that input can reach"}], "returns": [{"name": "", "type": "integer", "description": "result of the input adjustment"}, {"name": "\"OK\"", "type": "unknown", "description": "user pushed ENT key"}, {"name": "\"CANCEL\"", "type": "unknown", "description": "user pushed EXIT key"}], "notes": ["Use only from stand-alone and telemetry scripts."], "since": "2.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function popupInput(title, event, input, min, max) + +Raises a pop-up on screen that allows uses input + +@param title (string) text to display + +@param event (number) the event variable that is passed in from the +Run function (key pressed) + +@param input (number) value that can be adjusted by the +/- keys + +@param min (number) min value that input can reach (by pressing the - key) + +@param max (number) max value that input can reach + +@retval number result of the input adjustment + +@retval "OK" user pushed ENT key + +@retval "CANCEL" user pushed EXIT key + +@notice Use only from stand-alone and telemetry scripts. + +@status current Introduced in 2.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Raises a pop-up on screen that allows uses input + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `title` | yes | `string` | text to display | +| `event` | yes | `integer` | the event variable that is passed in from the Run function (key pressed) | +| `input` | yes | `integer` | value that can be adjusted by the +/- keys | +| `min` | yes | `integer` | min value that input can reach (by pressing the - key) | +| `max` | yes | `integer` | max value that input can reach | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | result of the input adjustment | +| `"OK"` | `unknown` | user pushed ENT key | +| `"CANCEL"` | `unknown` | user pushed EXIT key | + +#### Notes + +- Use only from stand-alone and telemetry scripts. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function popupInput([title, event, input, min, max]) + +Raises a pop-up on screen that allows uses input + +@param title (string) text to display + +@param event (integer) the event variable that is passed in from the Run function (key pressed) + +@param input (integer) value that can be adjusted by the +/- keys + +@param min (integer) min value that input can reach (by pressing the - key) + +@param max (integer) max value that input can reach + +@retval (integer) result of the input adjustment + +@retval "OK" (TODO) user pushed ENT key + +@retval "CANCEL" (TODO) user pushed EXIT key + +@notice Use only from stand-alone and telemetry scripts. + +@status current Introduced in 2.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-popup-warning.md b/website/md-docs/api-reference/review-runtime-popup-warning.md new file mode 100644 index 000000000..aebc3aeb9 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-popup-warning.md @@ -0,0 +1,110 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: popupWarning + +[Back to dashboard](review.md) | [Open API page](display-lcd/popup-warning.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `popupWarning` +- Doc id: `runtime.popup-warning` +- Source: `radio/src/lua/api_general.cpp:1852` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: "CANCEL" + +## Decide + +- Unknown returns to decide: `"CANCEL"` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="popupWarning"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>title</code></td><td>param</td><td><code>string</code></td><td>text to display</td><td><select data-field-kind="param" data-field-name="title" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="title" data-custom-type="true" /></td></tr> +<tr><td><code>event</code></td><td>param</td><td><code>integer</code></td><td>the event variable that is passed in from the Run function (key pressed)</td><td><select data-field-kind="param" data-field-name="event" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="event" data-custom-type="true" /></td></tr> +<tr><td><code>"CANCEL"</code></td><td>return</td><td><code>unknown</code></td><td>user pushed EXIT key</td><td><select data-field-kind="return" data-field-name=""CANCEL"" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name=""CANCEL"" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "popupWarning", "symbol": "popupWarning", "summary": "Raises a pop-up on screen that shows a warning", "parameters": [{"name": "title", "type": "string", "required": true, "description": "text to display"}, {"name": "event", "type": "integer", "required": true, "description": "the event variable that is passed in from the Run function (key pressed)"}], "returns": [{"name": "\"CANCEL\"", "type": "unknown", "description": "user pushed EXIT key"}], "notes": ["Use only from stand-alone and telemetry scripts."], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function popupWarning(title, event) + +Raises a pop-up on screen that shows a warning + +@param title (string) text to display + +@param event (number) the event variable that is passed in from the +Run function (key pressed) + +@retval "CANCEL" user pushed EXIT key + +@notice Use only from stand-alone and telemetry scripts. + +@status current Introduced in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Raises a pop-up on screen that shows a warning + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `title` | yes | `string` | text to display | +| `event` | yes | `integer` | the event variable that is passed in from the Run function (key pressed) | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `"CANCEL"` | `unknown` | user pushed EXIT key | + +#### Notes + +- Use only from stand-alone and telemetry scripts. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function popupWarning([title, event]) + +Raises a pop-up on screen that shows a warning + +@param title (string) text to display + +@param event (integer) the event variable that is passed in from the Run function (key pressed) + +@retval "CANCEL" (TODO) user pushed EXIT key + +@notice Use only from stand-alone and telemetry scripts. + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-rename.md b/website/md-docs/api-reference/review-runtime-rename.md new file mode 100644 index 000000000..c1964653c --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-rename.md @@ -0,0 +1,100 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: rename + +[Back to dashboard](review.md) | [Open API page](filesystem/rename.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `rename` +- Doc id: `runtime.rename` +- Source: `radio/src/lua/api_filesystem.cpp:226` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="rename"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>from_path</code></td><td>param</td><td><code>string</code></td><td>Current path to rename @param to_path (string) Path to rename to</td><td><select data-field-kind="param" data-field-name="from_path" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="from_path" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "rename", "symbol": "rename", "summary": "Rename a file or directory\n If the file or directory is being moved to a new parent directory, then the new parent\n directory must already exist.", "parameters": [{"name": "from_path", "type": "string", "required": true, "description": "Current path to rename @param to_path (string) Path to rename to"}], "returns": [], "notes": [], "since": "2.11.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function rename(from_path, to_path) + + Rename a file or directory + If the file or directory is being moved to a new parent directory, then the new parent + directory must already exist. + +@param from_path (string) Current path to rename +@param to_path (string) Path to rename to + +@status current Introduced in 2.11.0 + + Returns FRESULT (e.g. 0=OK, 6=Path invalid, 8=Directory exists) +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Rename a file or directory + If the file or directory is being moved to a new parent directory, then the new parent + directory must already exist. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `from_path` | yes | `string` | Current path to rename @param to_path (string) Path to rename to | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function rename([from_path]) + +Rename a file or directory + If the file or directory is being moved to a new parent directory, then the new parent + directory must already exist. + +@param from_path (string) Current path to rename @param to_path (string) Path to rename to + +@status current Introduced in 2.11.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-reset-global-timer.md b/website/md-docs/api-reference/review-runtime-reset-global-timer.md new file mode 100644 index 000000000..540d3848e --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-reset-global-timer.md @@ -0,0 +1,99 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: resetGlobalTimer + +[Back to dashboard](review.md) | [Open API page](time/reset-global-timer.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `resetGlobalTimer` +- Doc id: `runtime.reset-global-timer` +- Source: `radio/src/lua/api_general.cpp:2226` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: type + +## Decide + +- Unknown params to decide: `type` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="resetGlobalTimer"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>type</code></td><td>param</td><td><code>unknown</code></td><td>: if set to 'all', throttle ,throttle percent and session timers are reset too if set to 'session', radio session timer is reset too + if set to 'ttimer', radio throttle timer is reset too + if set to 'tptimer', radio throttle percent timer is reset too</td><td><select data-field-kind="param" data-field-name="type" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="type" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "resetGlobalTimer", "symbol": "resetGlobalTimer", "summary": "Resets the radio global timer to 0.", "parameters": [{"name": "type", "type": "unknown", "required": false, "description": ": if set to 'all', throttle ,throttle percent and session timers are reset too if set to 'session', radio session timer is reset too\n if set to 'ttimer', radio throttle timer is reset too\n if set to 'tptimer', radio throttle percent timer is reset too"}], "returns": [], "notes": [], "since": "2.2.2"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function resetGlobalTimer([type]) + + Resets the radio global timer to 0. + +@param (optional) : if set to 'all', throttle ,throttle percent and session timers are reset too + if set to 'session', radio session timer is reset too + if set to 'ttimer', radio throttle timer is reset too + if set to 'tptimer', radio throttle percent timer is reset too + +@status current Introduced in 2.2.2, param added in 2.3 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Resets the radio global timer to 0. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `type` | no | `unknown` | : if set to 'all', throttle ,throttle percent and session timers are reset too if set to 'session', radio session timer is reset too if set to 'ttimer', radio throttle timer is reset too if set to 'tptimer', radio throttle percent timer is reset too | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function resetGlobalTimer([type]) + +Resets the radio global timer to 0. + +@param type (TODO) : if set to 'all', throttle ,throttle percent and session timers are reset too if set to 'session', radio session timer is reset too + if set to 'ttimer', radio throttle timer is reset too + if set to 'tptimer', radio throttle percent timer is reset too + +@status current Introduced in 2.2.2 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-screenshot.md b/website/md-docs/api-reference/review-runtime-screenshot.md new file mode 100644 index 000000000..a7439d758 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-screenshot.md @@ -0,0 +1,98 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: screenshot + +[Back to dashboard](review.md) | [Open API page](system/screenshot.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `screenshot` +- Doc id: `runtime.screenshot` +- Source: `radio/src/lua/api_general.cpp:1636` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: none + +## Decide + +- Unknown returns to decide: `none` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="screenshot"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>none</code></td><td>return</td><td><code>unknown</code></td><td></td><td><select data-field-kind="return" data-field-name="none" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="none" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "screenshot", "symbol": "screenshot", "summary": "Takes a screenshot, which is saved to the SCREENSHOTS folder on the radio SD card.", "parameters": [], "returns": [{"name": "none", "type": "unknown", "description": ""}], "notes": ["This command is currently not rate limited, so repeated frequent calls will slow down the UI and can even freeze the entire radio, so should be used with care."], "since": "2.11"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function screenshot() + +Takes a screenshot, which is saved to the SCREENSHOTS folder on the radio SD card. + +@retval none + +@notice This command is currently not rate limited, so repeated frequent calls will slow down the UI and can even freeze the entire radio, so should be used with care. + +@status current Introduced in 2.11 + +// targets: BW, GS, COLOR +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Takes a screenshot, which is saved to the SCREENSHOTS folder on the radio SD card. + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +#### Notes + +- This command is currently not rate limited, so repeated frequent calls will slow down the UI and can even freeze the entire radio, so should be used with care. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function screenshot() + +Takes a screenshot, which is saved to the SCREENSHOTS folder on the radio SD card. + +@retval none (TODO) + +@notice This command is currently not rate limited, so repeated frequent calls will slow down the UI and can even freeze the entire radio, so should be used with care. + +@status current Introduced in 2.11 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-serial-get-power.md b/website/md-docs/api-reference/review-runtime-serial-get-power.md new file mode 100644 index 000000000..b4a6f8fc3 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-serial-get-power.md @@ -0,0 +1,104 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: serialGetPower + +[Back to dashboard](review.md) | [Open API page](serial-ports/serial-get-power.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `serialGetPower` +- Doc id: `runtime.serial-get-power` +- Source: `radio/src/lua/api_general.cpp:2394` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="serialGetPower"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>port_nr</code></td><td>param</td><td><code>valid</code></td><td>values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1 + 1 - second serial port, e.g. on TX16S AUX2</td><td><select data-field-kind="param" data-field-name="port_nr" data-current-type="valid"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="port_nr" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>return</td><td><code>true</code></td><td>for power enabled, false for power disabled.</td><td><select data-field-kind="return" data-field-name="value" data-current-type="true"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="value" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>the serial port power control not available on this radio</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "serialGetPower", "symbol": "serialGetPower", "summary": "", "parameters": [{"name": "port_nr", "type": "valid", "required": true, "description": "values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1\n 1 - second serial port, e.g. on TX16S AUX2"}], "returns": [{"name": "value", "type": "true", "description": "for power enabled, false for power disabled."}, {"name": "", "type": "nil", "description": "the serial port power control not available on this radio"}], "notes": [], "since": "2.9.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function serialGetPower(port_nr) + +@param port_nr: valid values are only 0 and 1 on radios that have SWSERIALPOWER defined + 0 - first serial port, e.g. on TX16S AUX1 + 1 - second serial port, e.g. on TX16S AUX2 + +@retval value: true for power enabled, false for power disabled. + +@retval nil the serial port power control not available on this radio + +@status current Introduced in 2.9.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `port_nr` | yes | `valid` | values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1 1 - second serial port, e.g. on TX16S AUX2 | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `true` | for power enabled, false for power disabled. | +| `-` | `nil` | the serial port power control not available on this radio | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function serialGetPower([port_nr]) + +@param port_nr (valid) values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1 + 1 - second serial port, e.g. on TX16S AUX2 + +@retval value (true) for power enabled, false for power disabled. + +@retval (nil) the serial port power control not available on this radio + +@status current Introduced in 2.9.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-serial-read.md b/website/md-docs/api-reference/review-runtime-serial-read.md new file mode 100644 index 000000000..0cc30901b --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-serial-read.md @@ -0,0 +1,103 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: serialRead + +[Back to dashboard](review.md) | [Open API page](serial-ports/serial-read.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `serialRead` +- Doc id: `runtime.serial-read` +- Source: `radio/src/lua/api_general.cpp:2346` +- Recommended action: **Fix C++ annotation first** +- Why: unknown return types: str + +## Decide + +- Unknown returns to decide: `str` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="serialRead"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>num</code></td><td>param</td><td><code>integer</code></td><td>maximum number of bytes to read. If non-zero, serialRead will read up to num characters from the buffer. + If 0 or left out, serialRead will read up to and including the first newline character or the end of the buffer. + Note that the returned string may not end in a newline if this character is not present in the buffer.</td><td><select data-field-kind="param" data-field-name="num" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="num" data-custom-type="true" /></td></tr> +<tr><td><code>str</code></td><td>return</td><td><code>unknown</code></td><td>string. Empty if no new characters were available.</td><td><select data-field-kind="return" data-field-name="str" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="str" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "serialRead", "symbol": "serialRead", "summary": "", "parameters": [{"name": "num", "type": "integer", "required": false, "description": "maximum number of bytes to read. If non-zero, serialRead will read up to num characters from the buffer.\n If 0 or left out, serialRead will read up to and including the first newline character or the end of the buffer.\n Note that the returned string may not end in a newline if this character is not present in the buffer."}], "returns": [{"name": "str", "type": "unknown", "description": "string. Empty if no new characters were available."}], "notes": [], "since": "2.3.8"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function serialRead([num]) +@param num (optional): maximum number of bytes to read. + If non-zero, serialRead will read up to num characters from the buffer. + If 0 or left out, serialRead will read up to and including the first newline character or the end of the buffer. + Note that the returned string may not end in a newline if this character is not present in the buffer. + +@retval str string. Empty if no new characters were available. + +Reads characters from the serial port. The string is allowed to contain any character, including 0. + +@status current Introduced in 2.3.8 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `num` | no | `integer` | maximum number of bytes to read. If non-zero, serialRead will read up to num characters from the buffer. If 0 or left out, serialRead will read up to and including the first newline character or the end of the buffer. Note that the returned string may not end in a newline if this character is not present in the buffer. | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `str` | `unknown` | string. Empty if no new characters were available. | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function serialRead([num]) + +@param num (integer) maximum number of bytes to read. If non-zero, serialRead will read up to num characters from the buffer. + If 0 or left out, serialRead will read up to and including the first newline character or the end of the buffer. + Note that the returned string may not end in a newline if this character is not present in the buffer. + +@retval str (TODO) string. Empty if no new characters were available. + +@status current Introduced in 2.3.8 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-serial-set-power.md b/website/md-docs/api-reference/review-runtime-serial-set-power.md new file mode 100644 index 000000000..c13a45bee --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-serial-set-power.md @@ -0,0 +1,105 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: serialSetPower + +[Back to dashboard](review.md) | [Open API page](serial-ports/serial-set-power.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `serialSetPower` +- Doc id: `runtime.serial-set-power` +- Source: `radio/src/lua/api_general.cpp:2431` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="serialSetPower"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>port_nr</code></td><td>param</td><td><code>valid</code></td><td>values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1 + 1 - second serial port, e.g. on TX16S AUX2</td><td><select data-field-kind="param" data-field-name="port_nr" data-current-type="valid"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="port_nr" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>param</td><td><code>0</code></td><td>- disable power 1 - enable power</td><td><select data-field-kind="param" data-field-name="value" data-current-type="0"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +<tr><td><code>success</code></td><td>return</td><td><code>true/false</code></td><td>.</td><td><select data-field-kind="return" data-field-name="success" data-current-type="true/false"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="success" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "serialSetPower", "symbol": "serialSetPower", "summary": "", "parameters": [{"name": "port_nr", "type": "valid", "required": true, "description": "values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1\n 1 - second serial port, e.g. on TX16S AUX2"}, {"name": "value", "type": "0", "required": true, "description": "- disable power 1 - enable power"}], "returns": [{"name": "success", "type": "true/false", "description": "."}], "notes": [], "since": "2.9.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function serialSetPower(port_nr, value) + +@param port_nr: valid values are only 0 and 1 on radios that have SWSERIALPOWER defined + 0 - first serial port, e.g. on TX16S AUX1 + 1 - second serial port, e.g. on TX16S AUX2 + +@param value: 0 - disable power + 1 - enable power + +@retval success: true/false. + +@status current Introduced in 2.9.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `port_nr` | yes | `valid` | values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1 1 - second serial port, e.g. on TX16S AUX2 | +| `value` | yes | `0` | - disable power 1 - enable power | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `success` | `true/false` | . | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function serialSetPower([port_nr, value]) + +@param port_nr (valid) values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1 + 1 - second serial port, e.g. on TX16S AUX2 + +@param value (0) - disable power 1 - enable power + +@retval success (true/false) . + +@status current Introduced in 2.9.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-serial-write.md b/website/md-docs/api-reference/review-runtime-serial-write.md new file mode 100644 index 000000000..e93dd5bf7 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-serial-write.md @@ -0,0 +1,88 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: serialWrite + +[Back to dashboard](review.md) | [Open API page](serial-ports/serial-write.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `serialWrite` +- Doc id: `runtime.serial-write` +- Source: `radio/src/lua/api_general.cpp:2318` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="serialWrite"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>str</code></td><td>param</td><td><code>string</code></td><td>String to be written to the serial port.</td><td><select data-field-kind="param" data-field-name="str" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="str" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "serialWrite", "symbol": "serialWrite", "summary": "", "parameters": [{"name": "str", "type": "string", "required": true, "description": "String to be written to the serial port."}], "returns": [], "notes": [], "since": "2.3.10"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function serialWrite(str) +@param str (string) String to be written to the serial port. + +Writes a string to the serial port. The string is allowed to contain any character, including 0. + +@status current Introduced in 2.3.10 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `str` | yes | `string` | String to be written to the serial port. | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function serialWrite([str]) + +@param str (string) String to be written to the serial port. + +@status current Introduced in 2.3.10 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-set-cfsled-color.md b/website/md-docs/api-reference/review-runtime-set-cfsled-color.md new file mode 100644 index 000000000..9e5de5539 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-set-cfsled-color.md @@ -0,0 +1,113 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: setCFSLedColor + +[Back to dashboard](review.md) | [Open API page](radio-hardware/set-cfsled-color.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `setCFSLedColor` +- Doc id: `runtime.set-cfsled-color` +- Source: `radio/src/lua/api_general.cpp:2953` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="setCFSLedColor"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>id</code></td><td>param</td><td><code>string</code></td><td>identifying a custom function switch name</td><td><select data-field-kind="param" data-field-name="id" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="id" data-custom-type="true" /></td></tr> +<tr><td><code>rvalue</code></td><td>param</td><td><code>integer</code></td><td>value of red channel</td><td><select data-field-kind="param" data-field-name="rvalue" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="rvalue" data-custom-type="true" /></td></tr> +<tr><td><code>bvalue</code></td><td>param</td><td><code>integer</code></td><td>value of green channel</td><td><select data-field-kind="param" data-field-name="bvalue" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="bvalue" data-custom-type="true" /></td></tr> +<tr><td><code>cvalue</code></td><td>param</td><td><code>integer</code></td><td>value of blue channel</td><td><select data-field-kind="param" data-field-name="cvalue" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="cvalue" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "setCFSLedColor", "symbol": "setCFSLedColor", "summary": "Overrides the LED color for a custom function switch", "parameters": [{"name": "id", "type": "string", "required": true, "description": "identifying a custom function switch name"}, {"name": "rvalue", "type": "integer", "required": true, "description": "value of red channel"}, {"name": "bvalue", "type": "integer", "required": true, "description": "value of green channel"}, {"name": "cvalue", "type": "integer", "required": true, "description": "value of blue channel"}], "returns": [], "notes": [], "since": "3.0.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function setCFSLedColor(id, rvalue, bvalue, cvalue) + +Overrides the LED color for a custom function switch + - if passed 4 arguments (id, r, g, b) then sets override color + - if passed 1 argument (id) then cancels override color + +@param id: string identifying a custom function switch name + +@param rvalue: interger, value of red channel + +@param gvalue: interger, value of green channel + +@param bvalue: interger, value of blue channel + +@retval: true if LED index is valid, false otherwise + +@status current. Introduced in 3.0.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Overrides the LED color for a custom function switch + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `string` | identifying a custom function switch name | +| `rvalue` | yes | `integer` | value of red channel | +| `bvalue` | yes | `integer` | value of green channel | +| `cvalue` | yes | `integer` | value of blue channel | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function setCFSLedColor([id, rvalue, bvalue, cvalue]) + +Overrides the LED color for a custom function switch + +@param id (string) identifying a custom function switch name + +@param rvalue (integer) value of red channel + +@param bvalue (integer) value of green channel + +@param cvalue (integer) value of blue channel + +@status current Introduced in 3.0.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-set-imu-x.md b/website/md-docs/api-reference/review-runtime-set-imu-x.md new file mode 100644 index 000000000..fd0882c32 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-set-imu-x.md @@ -0,0 +1,93 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: setIMU_X + +[Back to dashboard](review.md) | [Open API page](radio-hardware/set-imu-x.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `setIMU_X` +- Doc id: `runtime.set-imu-x` +- Source: `radio/src/lua/api_general.cpp:3037` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="setIMU_X"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>offset</code></td><td>param</td><td><code>integer</code></td><td>offset in angular degree. -1 to offset to current X position</td><td><select data-field-kind="param" data-field-name="offset" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="offset" data-custom-type="true" /></td></tr> +<tr><td><code>range</code></td><td>param</td><td><code>integer</code></td><td>range in angular degree. 180° max.90 means min/max value will be reached at 45° from offset position</td><td><select data-field-kind="param" data-field-name="range" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="range" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "setIMU_X", "symbol": "setIMU_X", "summary": "", "parameters": [{"name": "offset", "type": "integer", "required": true, "description": "offset in angular degree. -1 to offset to current X position"}, {"name": "range", "type": "integer", "required": true, "description": "range in angular degree. 180\u00b0 max.90 means min/max value will be reached at 45\u00b0 from offset position"}], "returns": [], "notes": [], "since": "3.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function setIMU_X(offset, range) + +@param offset: integer, offset in angular degree. -1 to offset to current X position + +@param range: integer, range in angular degree. 180° max.90 means min/max value will be reached at 45° from offset position + +@status current Introduced in 3.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `offset` | yes | `integer` | offset in angular degree. -1 to offset to current X position | +| `range` | yes | `integer` | range in angular degree. 180° max.90 means min/max value will be reached at 45° from offset position | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function setIMU_X([offset, range]) + +@param offset (integer) offset in angular degree. -1 to offset to current X position + +@param range (integer) range in angular degree. 180° max.90 means min/max value will be reached at 45° from offset position + +@status current Introduced in 3.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-set-imu-y.md b/website/md-docs/api-reference/review-runtime-set-imu-y.md new file mode 100644 index 000000000..892bc9c81 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-set-imu-y.md @@ -0,0 +1,93 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: setIMU_Y + +[Back to dashboard](review.md) | [Open API page](radio-hardware/set-imu-y.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `setIMU_Y` +- Doc id: `runtime.set-imu-y` +- Source: `radio/src/lua/api_general.cpp:3068` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="setIMU_Y"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>offset</code></td><td>param</td><td><code>integer</code></td><td>offset in angular degree. -1 to offset to current Y position</td><td><select data-field-kind="param" data-field-name="offset" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="offset" data-custom-type="true" /></td></tr> +<tr><td><code>range</code></td><td>param</td><td><code>integer</code></td><td>range in angular degree, 180° max. 90 means min/max value will be reached at 45° from offset position</td><td><select data-field-kind="param" data-field-name="range" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="range" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "setIMU_Y", "symbol": "setIMU_Y", "summary": "", "parameters": [{"name": "offset", "type": "integer", "required": true, "description": "offset in angular degree. -1 to offset to current Y position"}, {"name": "range", "type": "integer", "required": true, "description": "range in angular degree, 180\u00b0 max. 90 means min/max value will be reached at 45\u00b0 from offset position"}], "returns": [], "notes": [], "since": "3.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function setIMU_Y(offset, range) + +@param offset: integer, offset in angular degree. -1 to offset to current Y position + +@param range: integer, range in angular degree, 180° max. 90 means min/max value will be reached at 45° from offset position + +@status current Introduced in 3.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `offset` | yes | `integer` | offset in angular degree. -1 to offset to current Y position | +| `range` | yes | `integer` | range in angular degree, 180° max. 90 means min/max value will be reached at 45° from offset position | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function setIMU_Y([offset, range]) + +@param offset (integer) offset in angular degree. -1 to offset to current Y position + +@param range (integer) range in angular degree, 180° max. 90 means min/max value will be reached at 45° from offset position + +@status current Introduced in 3.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-set-rgbled-color.md b/website/md-docs/api-reference/review-runtime-set-rgbled-color.md new file mode 100644 index 000000000..0dbca3e66 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-set-rgbled-color.md @@ -0,0 +1,107 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: setRGBLedColor + +[Back to dashboard](review.md) | [Open API page](radio-hardware/set-rgbled-color.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `setRGBLedColor` +- Doc id: `runtime.set-rgbled-color` +- Source: `radio/src/lua/api_general.cpp:2899` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="setRGBLedColor"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>id</code></td><td>param</td><td><code>integer</code></td><td>identifying a led in the led chain</td><td><select data-field-kind="param" data-field-name="id" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="id" data-custom-type="true" /></td></tr> +<tr><td><code>rvalue</code></td><td>param</td><td><code>integer</code></td><td>value of red channel</td><td><select data-field-kind="param" data-field-name="rvalue" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="rvalue" data-custom-type="true" /></td></tr> +<tr><td><code>bvalue</code></td><td>param</td><td><code>integer</code></td><td>value of green channel</td><td><select data-field-kind="param" data-field-name="bvalue" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="bvalue" data-custom-type="true" /></td></tr> +<tr><td><code>cvalue</code></td><td>param</td><td><code>integer</code></td><td>value of blue channel</td><td><select data-field-kind="param" data-field-name="cvalue" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="cvalue" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "setRGBLedColor", "symbol": "setRGBLedColor", "summary": "", "parameters": [{"name": "id", "type": "integer", "required": true, "description": "identifying a led in the led chain"}, {"name": "rvalue", "type": "integer", "required": true, "description": "value of red channel"}, {"name": "bvalue", "type": "integer", "required": true, "description": "value of green channel"}, {"name": "cvalue", "type": "integer", "required": true, "description": "value of blue channel"}], "returns": [], "notes": [], "since": "2.10"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function setRGBLedColor(id, rvalue, bvalue, cvalue) + +@param id: integer identifying a led in the led chain + +@param rvalue: interger, value of red channel + +@param gvalue: interger, value of green channel + +@param bvalue: interger, value of blue channel + +@retval: true if LED index is valid, false otherwise + +@status current Introduced in 2.10 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `integer` | identifying a led in the led chain | +| `rvalue` | yes | `integer` | value of red channel | +| `bvalue` | yes | `integer` | value of green channel | +| `cvalue` | yes | `integer` | value of blue channel | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function setRGBLedColor([id, rvalue, bvalue, cvalue]) + +@param id (integer) identifying a led in the led chain + +@param rvalue (integer) value of red channel + +@param bvalue (integer) value of green channel + +@param cvalue (integer) value of blue channel + +@status current Introduced in 2.10 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-set-serial-baudrate.md b/website/md-docs/api-reference/review-runtime-set-serial-baudrate.md new file mode 100644 index 000000000..2a01dd5a1 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-set-serial-baudrate.md @@ -0,0 +1,89 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: setSerialBaudrate + +[Back to dashboard](review.md) | [Open API page](serial-ports/set-serial-baudrate.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `setSerialBaudrate` +- Doc id: `runtime.set-serial-baudrate` +- Source: `radio/src/lua/api_general.cpp:2299` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: baudrate + +## Decide + +- Unknown params to decide: `baudrate` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="setSerialBaudrate"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>baudrate</code></td><td>param</td><td><code>unknown</code></td><td>Desired baurate</td><td><select data-field-kind="param" data-field-name="baudrate" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="baudrate" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "setSerialBaudrate", "symbol": "setSerialBaudrate", "summary": "", "parameters": [{"name": "baudrate", "type": "unknown", "required": true, "description": "Desired baurate"}], "returns": [], "notes": [], "since": "2.3.12"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function setSerialBaudrate(baudrate) +@param baudrate Desired baurate + +Set baudrate for serial port(s) affected to LUA + +@status current Introduced in 2.3.12 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `baudrate` | yes | `unknown` | Desired baurate | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function setSerialBaudrate([baudrate]) + +@param baudrate (TODO) Desired baurate + +@status current Introduced in 2.3.12 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-set-shm-var.md b/website/md-docs/api-reference/review-runtime-set-shm-var.md new file mode 100644 index 000000000..7bbe4d83a --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-set-shm-var.md @@ -0,0 +1,99 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: setShmVar + +[Back to dashboard](review.md) | [Open API page](variables/set-shm-var.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `setShmVar` +- Doc id: `runtime.set-shm-var` +- Source: `radio/src/lua/api_general.cpp:2478` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="setShmVar"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>id</code></td><td>param</td><td><code>integer</code></td><td>between 1 and 16 identifying the shared memory variable.</td><td><select data-field-kind="param" data-field-name="id" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="id" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>param</td><td><code>integer</code></td><td>. The value of the shared memory variable.</td><td><select data-field-kind="param" data-field-name="value" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "setShmVar", "symbol": "setShmVar", "summary": "", "parameters": [{"name": "id", "type": "integer", "required": true, "description": "between 1 and 16 identifying the shared memory variable."}, {"name": "value", "type": "integer", "required": true, "description": ". The value of the shared memory variable."}], "returns": [], "notes": ["Only available on radios with color display"], "since": "2.6"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function setShmVar(id, value) + +@param id: integer between 1 and 16 identifying the shared memory variable. + +@param value: integer. The value of the shared memory variable. + +Sets the value of a shared memory variable that can be used for passing data between Lua widgets and other Lua scripts. + +@status current Introduced in 2.6 + +@notice Only available on radios with color display +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `integer` | between 1 and 16 identifying the shared memory variable. | +| `value` | yes | `integer` | . The value of the shared memory variable. | + +#### Returns + +None. + +#### Notes + +- Only available on radios with color display + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function setShmVar([id, value]) + +@param id (integer) between 1 and 16 identifying the shared memory variable. + +@param value (integer) . The value of the shared memory variable. + +@notice Only available on radios with color display + +@status current Introduced in 2.6 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-set-sticky-switch.md b/website/md-docs/api-reference/review-runtime-set-sticky-switch.md new file mode 100644 index 000000000..e5b97f8c1 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-set-sticky-switch.md @@ -0,0 +1,106 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: setStickySwitch + +[Back to dashboard](review.md) | [Open API page](switches/set-sticky-switch.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `setStickySwitch` +- Doc id: `runtime.set-sticky-switch` +- Source: `radio/src/lua/api_general.cpp:2530` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="setStickySwitch"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>id</code></td><td>param</td><td><code>integer</code></td><td>identifying the sticky logical switch (zero for LS1 etc.).</td><td><select data-field-kind="param" data-field-name="id" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="id" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>param</td><td><code>integer</code></td><td>. The new value of the sticky logical switch.</td><td><select data-field-kind="param" data-field-name="value" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +<tr><td><code>bufferFull</code></td><td>return</td><td><code>true/false</code></td><td>. This function sends a message from Lua to the logical switch processor via a buffer with eight slots that are read 10 times per second. If the buffer is full, then a true value +is returned and no messages was sent (i.e. the switch was not changed).</td><td><select data-field-kind="return" data-field-name="bufferFull" data-current-type="true/false"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="bufferFull" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "setStickySwitch", "symbol": "setStickySwitch", "summary": "", "parameters": [{"name": "id", "type": "integer", "required": true, "description": "identifying the sticky logical switch (zero for LS1 etc.)."}, {"name": "value", "type": "integer", "required": true, "description": ". The new value of the sticky logical switch."}], "returns": [{"name": "bufferFull", "type": "true/false", "description": ". This function sends a message from Lua to the logical switch processor via a buffer with eight slots that are read 10 times per second. If the buffer is full, then a true value\nis returned and no messages was sent (i.e. the switch was not changed)."}], "notes": [], "since": "2.6"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function setStickySwitch(id, value) + +@param id: integer identifying the sticky logical switch (zero for LS1 etc.). + +@param value: true/false. The new value of the sticky logical switch. + +@retval bufferFull: true/false. This function sends a message from Lua to the logical switch processor +via a buffer with eight slots that are read 10 times per second. If the buffer is full, then a true value +is returned and no messages was sent (i.e. the switch was not changed). + +Sets the value of a sticky logical switch. + +@status current Introduced in 2.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `integer` | identifying the sticky logical switch (zero for LS1 etc.). | +| `value` | yes | `integer` | . The new value of the sticky logical switch. | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `bufferFull` | `true/false` | . This function sends a message from Lua to the logical switch processor via a buffer with eight slots that are read 10 times per second. If the buffer is full, then a true value is returned and no messages was sent (i.e. the switch was not changed). | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function setStickySwitch([id, value]) + +@param id (integer) identifying the sticky logical switch (zero for LS1 etc.). + +@param value (integer) . The new value of the sticky logical switch. + +@retval bufferFull (true/false) . This function sends a message from Lua to the logical switch processor via a buffer with eight slots that are read 10 times per second. If the buffer is full, then a true value +is returned and no messages was sent (i.e. the switch was not changed). + +@status current Introduced in 2.6 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-set-telemetry-value.md b/website/md-docs/api-reference/review-runtime-set-telemetry-value.md new file mode 100644 index 000000000..a958d115d --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-set-telemetry-value.md @@ -0,0 +1,151 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: setTelemetryValue + +[Back to dashboard](review.md) | [Open API page](telemetry/set-telemetry-value.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `setTelemetryValue` +- Doc id: `runtime.set-telemetry-value` +- Source: `radio/src/lua/api_general.cpp:1980` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: id, subID, instance, value, unit, precision; unknown return types: true, + +## Decide + +- Unknown params to decide: `id, subID, instance, value, unit, precision` +- Unknown returns to decide: `true,` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="setTelemetryValue"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>id</code></td><td>param</td><td><code>unknown</code></td><td>Id of the sensor, valid range is from 0 to 0xFFFF</td><td><select data-field-kind="param" data-field-name="id" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="id" data-custom-type="true" /></td></tr> +<tr><td><code>subID</code></td><td>param</td><td><code>unknown</code></td><td>subID of the sensor, usually 0, valid range is from 0 to 7</td><td><select data-field-kind="param" data-field-name="subID" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="subID" data-custom-type="true" /></td></tr> +<tr><td><code>instance</code></td><td>param</td><td><code>unknown</code></td><td>instance of the sensor (SensorID), valid range is from 0 to 0xFF</td><td><select data-field-kind="param" data-field-name="instance" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="instance" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>param</td><td><code>unknown</code></td><td>fed to the sensor</td><td><select data-field-kind="param" data-field-name="value" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +<tr><td><code>unit</code></td><td>param</td><td><code>unknown</code></td><td>unit of the sensor, see the Units reference for the full list</td><td><select data-field-kind="param" data-field-name="unit" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="unit" data-custom-type="true" /></td></tr> +<tr><td><code>precision</code></td><td>param</td><td><code>unknown</code></td><td>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.</td><td><select data-field-kind="param" data-field-name="precision" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="precision" data-custom-type="true" /></td></tr> +<tr><td><code>name</code></td><td>param</td><td><code>string</code></td><td>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"</td><td><select data-field-kind="param" data-field-name="name" data-current-type="string"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="name" data-custom-type="true" /></td></tr> +<tr><td><code>true,</code></td><td>return</td><td><code>unknown</code></td><td>if the sensor was just added. In this case the value is ignored (subsequent call will set the value)</td><td><select data-field-kind="return" data-field-name="true," data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="true," data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "setTelemetryValue", "symbol": "setTelemetryValue", "summary": "", "parameters": [{"name": "id", "type": "unknown", "required": true, "description": "Id of the sensor, valid range is from 0 to 0xFFFF"}, {"name": "subID", "type": "unknown", "required": true, "description": "subID of the sensor, usually 0, valid range is from 0 to 7"}, {"name": "instance", "type": "unknown", "required": true, "description": "instance of the sensor (SensorID), valid range is from 0 to 0xFF"}, {"name": "value", "type": "unknown", "required": true, "description": "fed to the sensor"}, {"name": "unit", "type": "unknown", "required": false, "description": "unit of the sensor, see the Units reference for the full list"}, {"name": "precision", "type": "unknown", "required": false, "description": "the precision of the sensor\n* `0 or not present` no decimal precision.\n * `!= 0` value is divided by 10^precision, e.g. value=1000, prec=2 => 10.00."}, {"name": "name", "type": "string", "required": false, "description": "Name of the sensor if it does not yet exist (4 chars).\n* `not present` Name defaults to the Id.\n * `present` Sensor takes name of the argument. Argument must have name surrounded by quotes: e.g., \"Name\""}], "returns": [{"name": "true,", "type": "unknown", "description": "if the sensor was just added. In this case the value is ignored (subsequent call will set the value)"}], "notes": ["All three parameters `id`, `subID` and `instance` can't be zero at the same time. At least one of them\nmust be different from zero."], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function setTelemetryValue(id, subID, instance, value [, unit [, precision [, name]]]) + +@param id Id of the sensor, valid range is from 0 to 0xFFFF + +@param subID subID of the sensor, usually 0, valid range is from 0 to 7 + +@param instance instance of the sensor (SensorID), valid range is from 0 to 0xFF + +@param value fed to the sensor + +@param unit unit of the sensor, see the Units reference for the full list + +@param precision 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" + +@retval true, if the sensor was just added. In this case the value is ignored (subsequent call will set the value) + +@notice All three parameters `id`, `subID` and `instance` can't be zero at the same time. At least one of them +must be different from zero. + +@status current Introduced in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `unknown` | Id of the sensor, valid range is from 0 to 0xFFFF | +| `subID` | yes | `unknown` | subID of the sensor, usually 0, valid range is from 0 to 7 | +| `instance` | yes | `unknown` | instance of the sensor (SensorID), valid range is from 0 to 0xFF | +| `value` | yes | `unknown` | fed to the sensor | +| `unit` | no | `unknown` | unit of the sensor, see the Units reference for the full list | +| `precision` | no | `unknown` | 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" | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `true,` | `unknown` | if the sensor was just added. In this case the value is ignored (subsequent call will set the value) | + +#### Notes + +- All three parameters `id`, `subID` and `instance` can't be zero at the same time. At least one of them +must be different from zero. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function setTelemetryValue([id, subID, instance, value, unit, precision, name]) + +@param id (TODO) Id of the sensor, valid range is from 0 to 0xFFFF + +@param subID (TODO) subID of the sensor, usually 0, valid range is from 0 to 7 + +@param instance (TODO) instance of the sensor (SensorID), valid range is from 0 to 0xFF + +@param value (TODO) fed to the sensor + +@param unit (TODO) unit of the sensor, see the Units reference for the full list + +@param precision (TODO) 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" + +@retval true, (TODO) if the sensor was just added. In this case the value is ignored (subsequent call will set the value) + +@notice All three parameters `id`, `subID` and `instance` can't be zero at the same time. At least one of them +must be different from zero. + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-sources.md b/website/md-docs/api-reference/review-runtime-sources.md new file mode 100644 index 000000000..d32865685 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-sources.md @@ -0,0 +1,95 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: sources + +[Back to dashboard](review.md) | [Open API page](sources/sources.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `sources` +- Doc id: `runtime.sources` +- Source: `radio/src/lua/api_general.cpp:2797` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="sources"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>first</code></td><td>param</td><td><code>integer</code></td><td>first source index. If `nil` or omitted, the first available source is used.</td><td><select data-field-kind="param" data-field-name="first" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="first" data-custom-type="true" /></td></tr> +<tr><td><code>last</code></td><td>param</td><td><code>integer</code></td><td>last soure index. If `nil` or omitted, the last available source is used.</td><td><select data-field-kind="param" data-field-name="last" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="last" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "sources", "symbol": "sources", "summary": "", "parameters": [{"name": "first", "type": "integer", "required": false, "description": "first source index. If `nil` or omitted, the first available source is used."}, {"name": "last", "type": "integer", "required": false, "description": "last soure index. If `nil` or omitted, the last available source is used."}], "returns": [], "notes": [], "since": "2.6"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function sources([first[, last]]) + +@param first: the first source index. If `nil` or omitted, the first available source is used. + +@param last: the last soure index. If `nil` or omitted, the last available source is used. + +This is an iterator function over value sources. `for sourceIndex, sourceName in sources() do ...` will iterate over all available value sources. + +@status current Introduced in 2.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `first` | no | `integer` | first source index. If `nil` or omitted, the first available source is used. | +| `last` | no | `integer` | last soure index. If `nil` or omitted, the last available source is used. | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function sources([first, last]) + +@param first (integer) first source index. If `nil` or omitted, the first available source is used. + +@param last (integer) last soure index. If `nil` or omitted, the last available source is used. + +@status current Introduced in 2.6 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-sport-telemetry-pop.md b/website/md-docs/api-reference/review-runtime-sport-telemetry-pop.md new file mode 100644 index 000000000..d1b2659b8 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-sport-telemetry-pop.md @@ -0,0 +1,119 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: sportTelemetryPop + +[Back to dashboard](review.md) | [Open API page](telemetry/sport-telemetry-pop.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `sportTelemetryPop` +- Doc id: `runtime.sport-telemetry-pop` +- Source: `radio/src/lua/api_general.cpp:912` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="sportTelemetryPop"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>queue does not contain any (or enough) bytes to form a whole packet</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>sensor_id</code></td><td>return</td><td><code>integer</code></td><td></td><td><select data-field-kind="return" data-field-name="sensor_id" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="sensor_id" data-custom-type="true" /></td></tr> +<tr><td><code>frame_id</code></td><td>return</td><td><code>integer</code></td><td></td><td><select data-field-kind="return" data-field-name="frame_id" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="frame_id" data-custom-type="true" /></td></tr> +<tr><td><code>data_id</code></td><td>return</td><td><code>integer</code></td><td></td><td><select data-field-kind="return" data-field-name="data_id" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="data_id" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>return</td><td><code>integer</code></td><td></td><td><select data-field-kind="return" data-field-name="value" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="value" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "sportTelemetryPop", "symbol": "sportTelemetryPop", "summary": "Pops a received SPORT packet from the queue. Please note that only packets using a data ID within 0x5000 to 0x50FF\n(frame ID == 0x10), as well as packets with a frame ID equal 0x32 (regardless of the data ID) will be passed to\nthe LUA telemetry receive queue.", "parameters": [], "returns": [{"name": "", "type": "nil", "description": "queue does not contain any (or enough) bytes to form a whole packet"}, {"name": "sensor_id", "type": "integer", "description": ""}, {"name": "frame_id", "type": "integer", "description": ""}, {"name": "data_id", "type": "integer", "description": ""}, {"name": "value", "type": "integer", "description": ""}], "notes": [], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function sportTelemetryPop() + +Pops a received SPORT packet from the queue. Please note that only packets using a data ID within 0x5000 to 0x50FF +(frame ID == 0x10), as well as packets with a frame ID equal 0x32 (regardless of the data ID) will be passed to +the LUA telemetry receive queue. + +@retval nil queue does not contain any (or enough) bytes to form a whole packet + +@retval multiple returns 4 values: + * sensor ID (number) + * frame ID (number) + * data ID (number) + * value (number) + +@status current Introduced in 2.2.0 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +Pops a received SPORT packet from the queue. Please note that only packets using a data ID within 0x5000 to 0x50FF +(frame ID == 0x10), as well as packets with a frame ID equal 0x32 (regardless of the data ID) will be passed to +the LUA telemetry receive queue. + +#### Parameters + +None. + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | queue does not contain any (or enough) bytes to form a whole packet | +| `sensor_id` | `integer` | | +| `frame_id` | `integer` | | +| `data_id` | `integer` | | +| `value` | `integer` | | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function sportTelemetryPop() + +Pops a received SPORT packet from the queue. Please note that only packets using a data ID within 0x5000 to 0x50FF +(frame ID == 0x10), as well as packets with a frame ID equal 0x32 (regardless of the data ID) will be passed to +the LUA telemetry receive queue. + +@retval (nil) queue does not contain any (or enough) bytes to form a whole packet + +@retval sensor_id (integer) + +@retval frame_id (integer) + +@retval data_id (integer) + +@retval value (integer) + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-sport-telemetry-push.md b/website/md-docs/api-reference/review-runtime-sport-telemetry-push.md new file mode 100644 index 000000000..1f352529a --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-sport-telemetry-push.md @@ -0,0 +1,128 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: sportTelemetryPush + +[Back to dashboard](review.md) | [Open API page](rf-module/sport-telemetry-push.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `sportTelemetryPush` +- Doc id: `runtime.sport-telemetry-push` +- Source: `radio/src/lua/api_general.cpp:960` +- Recommended action: **Fix C++ annotation first** +- Why: unknown param types: sensorId, frameId, dataId, value + +## Decide + +- Unknown params to decide: `sensorId, frameId, dataId, value` +- Use the selector table below. Your choices are saved into `docs-system/generated/review-decisions.json`, which I can read later to patch the C++ `luadoc` block. + +### Decision Controls + +<div class="decision-panel" data-item-id="sportTelemetryPush"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>sensorId</code></td><td>param</td><td><code>unknown</code></td><td>physical sensor ID</td><td><select data-field-kind="param" data-field-name="sensorId" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="sensorId" data-custom-type="true" /></td></tr> +<tr><td><code>frameId</code></td><td>param</td><td><code>unknown</code></td><td>frame ID</td><td><select data-field-kind="param" data-field-name="frameId" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="frameId" data-custom-type="true" /></td></tr> +<tr><td><code>dataId</code></td><td>param</td><td><code>unknown</code></td><td>data ID</td><td><select data-field-kind="param" data-field-name="dataId" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="dataId" data-custom-type="true" /></td></tr> +<tr><td><code>value</code></td><td>param</td><td><code>unknown</code></td><td>value</td><td><select data-field-kind="param" data-field-name="value" data-current-type="TODO"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="value" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>boolean</code></td><td>data queued in output buffer or not.</td><td><select data-field-kind="return" data-field-name="-" data-current-type="boolean"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +<tr><td><code>-</code></td><td>return</td><td><code>nil</code></td><td>incorrect telemetry protocol.</td><td><select data-field-kind="return" data-field-name="-" data-current-type="nil"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="return" data-field-name="-" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "sportTelemetryPush", "symbol": "sportTelemetryPush", "summary": "This functions allows for sending SPORT telemetry data toward the receiver,\nand more generally, to anything connected SPORT bus on the receiver or transmitter.", "parameters": [{"name": "sensorId", "type": "unknown", "required": true, "description": "physical sensor ID"}, {"name": "frameId", "type": "unknown", "required": true, "description": "frame ID"}, {"name": "dataId", "type": "unknown", "required": true, "description": "data ID"}, {"name": "value", "type": "unknown", "required": true, "description": "value"}], "returns": [{"name": "", "type": "boolean", "description": "data queued in output buffer or not."}, {"name": "", "type": "nil", "description": "incorrect telemetry protocol."}], "notes": [], "since": "2.2.0"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function sportTelemetryPush() + +This functions allows for sending SPORT telemetry data toward the receiver, +and more generally, to anything connected SPORT bus on the receiver or transmitter. + +When called without parameters, it will only return the status of the output buffer without sending anything. + +@param sensorId physical sensor ID + +@param frameId frame ID + +@param dataId data ID + +@param value value + +@retval boolean data queued in output buffer or not. + +@retval nil incorrect telemetry protocol. + +@status current Introduced in 2.2.0, retval nil added in 2.3.4 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +This functions allows for sending SPORT telemetry data toward the receiver, +and more generally, to anything connected SPORT bus on the receiver or transmitter. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sensorId` | yes | `unknown` | physical sensor ID | +| `frameId` | yes | `unknown` | frame ID | +| `dataId` | yes | `unknown` | data ID | +| `value` | yes | `unknown` | value | + +#### Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `boolean` | data queued in output buffer or not. | +| `-` | `nil` | incorrect telemetry protocol. | + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function sportTelemetryPush([sensorId, frameId, dataId, value]) + +This functions allows for sending SPORT telemetry data toward the receiver, +and more generally, to anything connected SPORT bus on the receiver or transmitter. + +@param sensorId (TODO) physical sensor ID + +@param frameId (TODO) frame ID + +@param dataId (TODO) data ID + +@param value (TODO) value + +@retval (boolean) data queued in output buffer or not. + +@retval (nil) incorrect telemetry protocol. + +@status current Introduced in 2.2.0 +~~~~ diff --git a/website/md-docs/api-reference/review-runtime-switches.md b/website/md-docs/api-reference/review-runtime-switches.md new file mode 100644 index 000000000..37b2bf8a0 --- /dev/null +++ b/website/md-docs/api-reference/review-runtime-switches.md @@ -0,0 +1,95 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Review: switches + +[Back to dashboard](review.md) | [Open API page](switches/switches.md) + +## Snapshot + +- Module: `runtime` +- Current symbol: `switches` +- Doc id: `runtime.switches` +- Source: `radio/src/lua/api_general.cpp:2692` +- Recommended action: **No action needed** +- Why: Parsed output looks structurally healthy. + +## Decide + +- This one looks structurally complete, but you can still change any param or return type below if you want to override it. + +### Decision Controls + +<div class="decision-panel" data-item-id="switches"> +<div class="decision-status" data-role="status">Decision server not connected yet.</div> +<table class="decision-table"> +<thead><tr><th>Field</th><th>Kind</th><th>Current Type</th><th>Description</th><th>Select Type</th></tr></thead> +<tbody> +<tr><td><code>first</code></td><td>param</td><td><code>integer</code></td><td>first switch index. If `nil` or omitted, the first available switch is used.</td><td><select data-field-kind="param" data-field-name="first" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="first" data-custom-type="true" /></td></tr> +<tr><td><code>last</code></td><td>param</td><td><code>integer</code></td><td>last switch index. If `nil` or omitted, the last available switch is used.</td><td><select data-field-kind="param" data-field-name="last" data-current-type="integer"><option value="TODO">TODO</option><option value="integer">integer</option><option value="number">number</option><option value="string">string</option><option value="boolean">boolean</option><option value="table">table</option><option value="function">function</option><option value="pointer">pointer</option><option value="nil">nil</option><option value="integer|string">integer|string</option><option value="table|nil">table|nil</option><option value="function|nil">function|nil</option><option value="string|nil">string|nil</option></select><input type="text" placeholder="Custom type" data-field-kind="param" data-field-name="last" data-custom-type="true" /></td></tr> +</tbody> +</table> +<div class="decision-actions"><button type="button" data-role="save">Save Decisions</button></div> +<script type="application/json" class="decision-payload">{"item_id": "switches", "symbol": "switches", "summary": "", "parameters": [{"name": "first", "type": "integer", "required": false, "description": "first switch index. If `nil` or omitted, the first available switch is used."}, {"name": "last", "type": "integer", "required": false, "description": "last switch index. If `nil` or omitted, the last available switch is used."}], "returns": [], "notes": [], "since": "2.6"}</script> +</div> + +<div class="review-workbench"> +<section class="review-panel"> +### Source luadoc + +~~~~text +@function switches([first[, last]]) + +@param first: the first switch index. If `nil` or omitted, the first available switch is used. + +@param last: the last switch index. If `nil` or omitted, the last available switch is used. + +This is an iterator function over switch positions. `for switchIndex, switchName in switches() do ...` will iterate over all available switch positions. + +@status current Introduced in 2.6 +~~~~ +</section> +<section class="review-panel"> +### Parsed doc + +#### Summary + +None. + +#### Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `first` | no | `integer` | first switch index. If `nil` or omitted, the first available switch is used. | +| `last` | no | `integer` | last switch index. If `nil` or omitted, the last available switch is used. | + +#### Returns + +None. + +#### Notes + +None. + +</section> +</div> + +## Suggested luadoc patch + +Use this as a starting point when the issue is in the C++ annotation. `TODO` means you still need to choose the real type. + +~~~~text +@function switches([first, last]) + +@param first (integer) first switch index. If `nil` or omitted, the first available switch is used. + +@param last (integer) last switch index. If `nil` or omitted, the last available switch is used. + +@status current Introduced in 2.6 +~~~~ diff --git a/website/md-docs/api-reference/review.md b/website/md-docs/api-reference/review.md new file mode 100644 index 000000000..8af876a97 --- /dev/null +++ b/website/md-docs/api-reference/review.md @@ -0,0 +1,121 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# API Review Dashboard + +This page is generated from the extracted API model and is meant to speed up review of the real source-derived docs. + +## Snapshot + +- Docs version: `2.12` +- Upstream ref: `2.12@8718d2473a` +- Generated at: `2026-09-09T02:38:02.672726Z` +- Total items: `198` +- Review backlog entries: `31` +- Backlog items with saved decisions: `26` + +## Module Health + +| Module | Items | Unknown Param Types | Unknown Return Types | +| --- | ---: | ---: | ---: | +| `lcd` | 39 | 7 | 0 | +| `model` | 37 | 5 | 1 | +| `runtime` | 73 | 19 | 16 | + +## Review Backlog + +| API | Status | Module | Parser Fixable | Upstream Fix Likely | +| --- | --- | --- | --- | --- | +| [`accessTelemetryPush`](review-runtime-access-telemetry-push.md) | `pending` | `runtime` | `-` | `unknown_param_type` | +| [`crossfireTelemetryPush`](review-runtime-crossfire-telemetry-push.md) | `reviewed` (2026-03-23T10:02:19.598966Z) | `runtime` | `-` | `unknown_param_type` | +| [`getRSSI`](review-runtime-get-rssi.md) | `reviewed` (2026-03-23T11:54:46.884698Z) | `runtime` | `-` | `unknown_return_type` | +| [`getSourceValue`](review-runtime-get-source-value.md) | `reviewed` (2026-03-23T11:55:03.700845Z) | `runtime` | `-` | `unknown_return_type` | +| [`ghostTelemetryPush`](review-runtime-ghost-telemetry-push.md) | `reviewed` (2026-03-23T10:05:01.958812Z) | `runtime` | `-` | `unknown_param_type` | +| [`lcd.clear`](review-lcd-clear.md) | `reviewed` (2026-03-23T10:58:31.883283Z) | `lcd` | `-` | `unknown_param_type` | +| [`lcd.drawBitmapPatternPie`](review-lcd-draw-bitmap-pattern-pie.md) | `reviewed` (2026-03-23T10:14:09.212270Z) | `lcd` | `-` | `unknown_param_type` | +| [`lcd.drawLine`](review-lcd-draw-line.md) | `reviewed` (2026-03-23T10:18:24.247064Z) | `lcd` | `-` | `unknown_param_type` | +| [`lcd.drawNumber`](review-lcd-draw-number.md) | `reviewed` (2026-03-23T10:22:58.185744Z) | `lcd` | `-` | `unknown_param_type` | +| [`lcd.drawText`](review-lcd-draw-text.md) | `reviewed` (2026-03-23T10:35:56.488913Z) | `lcd` | `-` | `unknown_param_type` | +| [`lcd.drawTimer`](review-lcd-draw-timer.md) | `reviewed` (2026-03-23T10:37:02.496078Z) | `lcd` | `-` | `unknown_param_type` | +| [`model.setFlightMode`](review-model-set-flight-mode.md) | `reviewed` (2026-03-23T10:37:50.476973Z) | `model` | `-` | `unknown_param_type` | +| [`model.setGlobalVariable`](review-model-set-global-variable.md) | `reviewed` (2026-03-23T10:39:17.241194Z) | `model` | `-` | `unknown_param_type` | +| [`model.setGlobalVariableDetails`](review-model-set-global-variable-details.md) | `pending` | `model` | `-` | `unknown_return_type` | +| [`model.setInfo`](review-model-set-info.md) | `reviewed` (2026-03-23T10:40:07.014503Z) | `model` | `-` | `unknown_param_type` | +| [`model.setModule`](review-model-set-module.md) | `reviewed` (2026-03-23T11:55:17.006779Z) | `model` | `-` | `unknown_param_type` | +| [`model.setTimer`](review-model-set-timer.md) | `reviewed` (2026-03-23T10:41:44.156685Z) | `model` | `-` | `unknown_param_type` | +| [`multiBuffer`](review-runtime-multi-buffer.md) | `pending` | `runtime` | `-` | `unknown_param_type` | +| [`playDuration`](review-runtime-play-duration.md) | `reviewed` (2026-03-23T10:43:10.209312Z) | `runtime` | `-` | `unknown_return_type` | +| [`playFile`](review-runtime-play-file.md) | `reviewed` (2026-03-23T10:43:27.421213Z) | `runtime` | `-` | `unknown_return_type` | +| [`playNumber`](review-runtime-play-number.md) | `reviewed` (2026-03-23T10:43:56.140304Z) | `runtime` | `-` | `unknown_return_type` | +| [`playTone`](review-runtime-play-tone.md) | `reviewed` (2026-03-23T10:44:10.001111Z) | `runtime` | `-` | `unknown_return_type` | +| [`popupConfirmation`](review-runtime-popup-confirmation.md) | `reviewed` (2026-03-23T10:45:15.847558Z) | `runtime` | `-` | `unknown_return_type` | +| [`popupInput`](review-runtime-popup-input.md) | `reviewed` (2026-03-23T10:58:41.158564Z) | `runtime` | `-` | `unknown_return_type` | +| [`popupWarning`](review-runtime-popup-warning.md) | `reviewed` (2026-03-23T10:58:47.706841Z) | `runtime` | `-` | `unknown_return_type` | +| [`resetGlobalTimer`](review-runtime-reset-global-timer.md) | `reviewed` (2026-03-23T10:58:56.856594Z) | `runtime` | `-` | `unknown_param_type` | +| [`screenshot`](review-runtime-screenshot.md) | `pending` | `runtime` | `-` | `unknown_return_type` | +| [`serialRead`](review-runtime-serial-read.md) | `reviewed` (2026-03-23T10:47:32.219058Z) | `runtime` | `-` | `unknown_return_type` | +| [`setSerialBaudrate`](review-runtime-set-serial-baudrate.md) | `reviewed` (2026-03-23T10:48:10.606542Z) | `runtime` | `-` | `unknown_param_type` | +| [`setTelemetryValue`](review-runtime-set-telemetry-value.md) | `reviewed` (2026-03-23T10:50:17.174214Z) | `runtime` | `-` | `unknown_return_type, unknown_param_type` | +| [`sportTelemetryPush`](review-runtime-sport-telemetry-push.md) | `pending` | `runtime` | `-` | `unknown_param_type` | + +## Suspicious Items By Module + +### lcd + +| API | Issues | Source | +| --- | --- | --- | +| [`lcd.clear`](review-lcd-clear.md) | `unknown_param_type` | `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:57` | +| [`lcd.drawBitmapPatternPie`](review-lcd-draw-bitmap-pattern-pie.md) | `unknown_param_type` | `radio/src/lua/api_colorlcd.cpp:743` | +| [`lcd.drawLine`](review-lcd-draw-line.md) | `unknown_param_type` | `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:125` | +| [`lcd.drawNumber`](review-lcd-draw-number.md) | `unknown_param_type` | `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:365` | +| [`lcd.drawText`](review-lcd-draw-text.md) | `unknown_param_type` | `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:224` | +| [`lcd.drawTimer`](review-lcd-draw-timer.md) | `unknown_param_type` | `radio/src/lua/api_colorlcd.cpp; radio/src/lua/api_stdlcd.cpp:338` | + +### model + +| API | Issues | Source | +| --- | --- | --- | +| [`model.setFlightMode`](review-model-set-flight-mode.md) | `unknown_param_type` | `radio/src/lua/api_model.cpp:526` | +| [`model.setGlobalVariable`](review-model-set-global-variable.md) | `unknown_param_type` | `radio/src/lua/api_model.cpp:1622` | +| [`model.setGlobalVariableDetails`](review-model-set-global-variable-details.md) | `unknown_return_type` | `radio/src/lua/api_model.cpp:1684` | +| [`model.setInfo`](review-model-set-info.md) | `unknown_param_type` | `radio/src/lua/api_model.cpp:83` | +| [`model.setModule`](review-model-set-module.md) | `unknown_param_type` | `radio/src/lua/api_model.cpp:219` | +| [`model.setTimer`](review-model-set-timer.md) | `unknown_param_type` | `radio/src/lua/api_model.cpp:329` | + +### runtime + +| API | Issues | Source | +| --- | --- | --- | +| [`accessTelemetryPush`](review-runtime-access-telemetry-push.md) | `unknown_param_type` | `radio/src/lua/api_general.cpp:1062` | +| [`crossfireTelemetryPush`](review-runtime-crossfire-telemetry-push.md) | `unknown_param_type` | `radio/src/lua/api_general.cpp:1178` | +| [`getRSSI`](review-runtime-get-rssi.md) | `unknown_return_type` | `radio/src/lua/api_general.cpp:2087` | +| [`getSourceValue`](review-runtime-get-source-value.md) | `unknown_return_type` | `radio/src/lua/api_general.cpp:726` | +| [`ghostTelemetryPush`](review-runtime-ghost-telemetry-push.md) | `unknown_param_type` | `radio/src/lua/api_general.cpp:1299` | +| [`multiBuffer`](review-runtime-multi-buffer.md) | `unknown_param_type` | `radio/src/lua/api_general.cpp:2265` | +| [`playDuration`](review-runtime-play-duration.md) | `unknown_return_type` | `radio/src/lua/api_general.cpp:1545` | +| [`playFile`](review-runtime-play-file.md) | `unknown_return_type` | `radio/src/lua/api_general.cpp:1455` | +| [`playNumber`](review-runtime-play-number.md) | `unknown_return_type` | `radio/src/lua/api_general.cpp:1501` | +| [`playTone`](review-runtime-play-tone.md) | `unknown_return_type` | `radio/src/lua/api_general.cpp:1585` | +| [`popupConfirmation`](review-runtime-popup-confirmation.md) | `unknown_return_type` | `radio/src/lua/api_general.cpp:1899` | +| [`popupInput`](review-runtime-popup-input.md) | `unknown_return_type` | `radio/src/lua/api_general.cpp:1800` | +| [`popupWarning`](review-runtime-popup-warning.md) | `unknown_return_type` | `radio/src/lua/api_general.cpp:1852` | +| [`resetGlobalTimer`](review-runtime-reset-global-timer.md) | `unknown_param_type` | `radio/src/lua/api_general.cpp:2226` | +| [`screenshot`](review-runtime-screenshot.md) | `unknown_return_type` | `radio/src/lua/api_general.cpp:1636` | +| [`serialRead`](review-runtime-serial-read.md) | `unknown_return_type` | `radio/src/lua/api_general.cpp:2346` | +| [`setSerialBaudrate`](review-runtime-set-serial-baudrate.md) | `unknown_param_type` | `radio/src/lua/api_general.cpp:2299` | +| [`setTelemetryValue`](review-runtime-set-telemetry-value.md) | `unknown_return_type, unknown_param_type` | `radio/src/lua/api_general.cpp:1980` | +| [`sportTelemetryPush`](review-runtime-sport-telemetry-push.md) | `unknown_param_type` | `radio/src/lua/api_general.cpp:960` | + +## Suggested Spot Checks + +- [`getRSSI`](review-runtime-get-rssi.md) - Get RSSI value as well as low and critical RSSI alarm levels (in dB) +- [`getSourceValue`](review-runtime-get-source-value.md) - Returns the value of a source. Superseeds getValue. +- [`popupConfirmation`](review-runtime-popup-confirmation.md) - Raises a pop-up on screen that asks for confirmation +- [`lcd.drawText`](review-lcd-draw-text.md) - Draw a text beginning at (x,y) +- [`model.setModule`](review-model-set-module.md) - Set RF module parameters diff --git a/website/md-docs/api-reference/rf-module/access-telemetry-push.md b/website/md-docs/api-reference/rf-module/access-telemetry-push.md new file mode 100644 index 000000000..82b419354 --- /dev/null +++ b/website/md-docs/api-reference/rf-module/access-telemetry-push.md @@ -0,0 +1,41 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# accessTelemetryPush + +`accessTelemetryPush()` + +This functions allows for sending SPORT / ACCESS telemetry data toward the receiver, +and more generally, to anything connected SPORT bus on the receiver or transmitter. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `module` | yes | `integer` | module index (0 = internal, 1 = external) | +| `rxUid` | yes | `integer` | receiver index | +| `sensorId` | yes | `unknown` | physical sensor ID | +| `frameId` | yes | `unknown` | frame ID | +| `dataId` | yes | `unknown` | data ID | +| `value` | yes | `unknown` | value | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `boolean` | data queued in output buffer or not. | + +## Availability + +- Since: `2.3` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/rf-module/crossfire-telemetry-push.md b/website/md-docs/api-reference/rf-module/crossfire-telemetry-push.md new file mode 100644 index 000000000..cb658745c --- /dev/null +++ b/website/md-docs/api-reference/rf-module/crossfire-telemetry-push.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# crossfireTelemetryPush + +`crossfireTelemetryPush()` + +This functions allows for sending telemetry data toward the TBS Crossfire link. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `command` | yes | `unknown` | command | +| `data` | yes | `table` | table of data bytes | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `boolean` | data queued in output buffer or not. | +| `-` | `nil` | incorrect telemetry protocol. | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/rf-module/ghost-telemetry-push.md b/website/md-docs/api-reference/rf-module/ghost-telemetry-push.md new file mode 100644 index 000000000..ca6c09c9a --- /dev/null +++ b/website/md-docs/api-reference/rf-module/ghost-telemetry-push.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# ghostTelemetryPush + +`ghostTelemetryPush()` + +This functions allows for sending telemetry data toward the Ghost link. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `command` | yes | `unknown` | command | +| `data` | yes | `table` | table of data bytes | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `boolean` | data queued in output buffer or not. | +| `-` | `nil` | incorrect telemetry protocol. | + +## Availability + +- Since: `2.7.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/rf-module/index.md b/website/md-docs/api-reference/rf-module/index.md new file mode 100644 index 000000000..2db5d5937 --- /dev/null +++ b/website/md-docs/api-reference/rf-module/index.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# RF module + +RF link and module transport helpers. + +<div class="api-grid"> +<a class="api-card" href="access-telemetry-push/"> +<span class="api-card-title">accessTelemetryPush</span> +<span class="api-card-summary">This functions allows for sending SPORT / ACCESS telemetry data toward the receiver, and more generally, to anything...</span> +</a> +<a class="api-card" href="crossfire-telemetry-push/"> +<span class="api-card-title">crossfireTelemetryPush</span> +<span class="api-card-summary">This functions allows for sending telemetry data toward the TBS Crossfire link.</span> +</a> +<a class="api-card" href="ghost-telemetry-push/"> +<span class="api-card-title">ghostTelemetryPush</span> +<span class="api-card-summary">This functions allows for sending telemetry data toward the Ghost link.</span> +</a> +<a class="api-card" href="multi-buffer/"> +<span class="api-card-title">multiBuffer</span> +<span class="api-card-summary">This function reads/writes the Multi protocol buffer to interact with a protocol.</span> +</a> +<a class="api-card" href="sport-telemetry-push/"> +<span class="api-card-title">sportTelemetryPush</span> +<span class="api-card-summary">This functions allows for sending SPORT telemetry data toward the receiver, and more generally, to anything...</span> +</a> +</div> diff --git a/website/md-docs/api-reference/rf-module/multi-buffer.md b/website/md-docs/api-reference/rf-module/multi-buffer.md new file mode 100644 index 000000000..935a61314 --- /dev/null +++ b/website/md-docs/api-reference/rf-module/multi-buffer.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# multiBuffer + +`multiBuffer(address[,value])` + +This function reads/writes the Multi protocol buffer to interact with a protocol. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `address` | yes | `unknown` | to read/write in the buffer @param (optional): value to write in the buffer | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | value (number) | + +## Availability + +- Since: `2.3.2` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/rf-module/sport-telemetry-push.md b/website/md-docs/api-reference/rf-module/sport-telemetry-push.md new file mode 100644 index 000000000..60d5a466f --- /dev/null +++ b/website/md-docs/api-reference/rf-module/sport-telemetry-push.md @@ -0,0 +1,40 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# sportTelemetryPush + +`sportTelemetryPush()` + +This functions allows for sending SPORT telemetry data toward the receiver, +and more generally, to anything connected SPORT bus on the receiver or transmitter. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sensorId` | yes | `unknown` | physical sensor ID | +| `frameId` | yes | `unknown` | frame ID | +| `dataId` | yes | `unknown` | data ID | +| `value` | yes | `unknown` | value | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `boolean` | data queued in output buffer or not. | +| `-` | `nil` | incorrect telemetry protocol. | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/serial-ports/index.md b/website/md-docs/api-reference/serial-ports/index.md new file mode 100644 index 000000000..10566cbfd --- /dev/null +++ b/website/md-docs/api-reference/serial-ports/index.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Serial Ports + +Serial transport configuration and I/O. + +<div class="api-grid"> +<a class="api-card" href="serial-get-power/"> +<span class="api-card-title">serialGetPower</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="serial-read/"> +<span class="api-card-title">serialRead</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="serial-set-power/"> +<span class="api-card-title">serialSetPower</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="serial-write/"> +<span class="api-card-title">serialWrite</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="set-serial-baudrate/"> +<span class="api-card-title">setSerialBaudrate</span> +<span class="api-card-summary">Needs summary review</span> +</a> +</div> diff --git a/website/md-docs/api-reference/serial-ports/serial-get-power.md b/website/md-docs/api-reference/serial-ports/serial-get-power.md new file mode 100644 index 000000000..7f9330817 --- /dev/null +++ b/website/md-docs/api-reference/serial-ports/serial-get-power.md @@ -0,0 +1,36 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# serialGetPower + +`serialGetPower(port_nr)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `port_nr` | yes | `valid` | values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1<br>1 - second serial port, e.g. on TX16S AUX2 | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `true` | for power enabled, false for power disabled. | +| `-` | `nil` | the serial port power control not available on this radio | + +## Availability + +- Since: `2.9.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/serial-ports/serial-read.md b/website/md-docs/api-reference/serial-ports/serial-read.md new file mode 100644 index 000000000..1073d0278 --- /dev/null +++ b/website/md-docs/api-reference/serial-ports/serial-read.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# serialRead + +`serialRead([num])` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `num` | no | `integer` | maximum number of bytes to read. If non-zero, serialRead will read up to num characters from the buffer.<br>If 0 or left out, serialRead will read up to and including the first newline character or the end of the buffer.<br>Note that the returned string may not end in a newline if this character is not present in the buffer. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `str` | `unknown` | string. Empty if no new characters were available. | + +## Availability + +- Since: `2.3.8` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/serial-ports/serial-set-power.md b/website/md-docs/api-reference/serial-ports/serial-set-power.md new file mode 100644 index 000000000..1006b5053 --- /dev/null +++ b/website/md-docs/api-reference/serial-ports/serial-set-power.md @@ -0,0 +1,36 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# serialSetPower + +`serialSetPower(port_nr, value)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `port_nr` | yes | `valid` | values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1<br>1 - second serial port, e.g. on TX16S AUX2 | +| `value` | yes | `0` | <ul><li>disable power 1 - enable power</li></ul> | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `success` | `true/false` | . | + +## Availability + +- Since: `2.9.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/serial-ports/serial-write.md b/website/md-docs/api-reference/serial-ports/serial-write.md new file mode 100644 index 000000000..f6589c616 --- /dev/null +++ b/website/md-docs/api-reference/serial-ports/serial-write.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# serialWrite + +`serialWrite(str)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `str` | yes | `string` | String to be written to the serial port. | + +## Returns + +None. + +## Availability + +- Since: `2.3.10` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/serial-ports/set-serial-baudrate.md b/website/md-docs/api-reference/serial-ports/set-serial-baudrate.md new file mode 100644 index 000000000..507519b93 --- /dev/null +++ b/website/md-docs/api-reference/serial-ports/set-serial-baudrate.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# setSerialBaudrate + +`setSerialBaudrate(baudrate)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `baudrate` | yes | `unknown` | Desired baurate | + +## Returns + +None. + +## Availability + +- Since: `2.3.12` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/sources/get-field-info.md b/website/md-docs/api-reference/sources/get-field-info.md new file mode 100644 index 000000000..2baa41422 --- /dev/null +++ b/website/md-docs/api-reference/sources/get-field-info.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getFieldInfo + +`getFieldInfo(source)` + +Return detailed information about field (source) + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `source` | yes | `string` | can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source. | + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>table</code></td><td>information about requested field, table elements:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>id</code></td><td><code>number</code></td><td>field identifier</td></tr><tr><td><code>name</code></td><td><code>string</code></td><td>field name</td></tr><tr><td><code>desc</code></td><td><code>string</code></td><td>field description</td></tr><tr><td><code>unit</code></td><td><code>number</code></td><td>unit identifier, see the Units reference for the full list</td></tr></tbody></table></td></tr><tr><td><code>-</code></td><td><code>nil</code></td><td>the requested field was not found</td></tr></tbody></table> + +## Availability + +- Since: `2.0.8` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/sources/get-source-index.md b/website/md-docs/api-reference/sources/get-source-index.md new file mode 100644 index 000000000..61d4f6445 --- /dev/null +++ b/website/md-docs/api-reference/sources/get-source-index.md @@ -0,0 +1,40 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getSourceIndex + +`getSourceIndex(sourceName)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sourceName` | yes | `string` | naming a value source as it is shown on radio menus where you can select it. Notice that many names have special characters in them. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `sourceIndex` | `integer` | . The source index, which can be used as input for `getSourceName(sourceIndex)`, `getValue(sourceIndex)`, and `getFieldInfo(sourceIndex)`. | + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Notes + +- the source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so `getValue(index)` will work with the indices obtained here. +This function is rather time consuming, and should not be used repeatedly in a script, if it can be avoided. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/sources/get-source-name.md b/website/md-docs/api-reference/sources/get-source-name.md new file mode 100644 index 000000000..26a83d416 --- /dev/null +++ b/website/md-docs/api-reference/sources/get-source-name.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getSourceName + +`getSourceName(sourceIndex)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sourceIndex` | yes | `integer` | identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `sourceName` | `string` | naming the value source as it is shown on radio menus where a source can be chosen. | + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Notes + +- the source names shown on the screen are not the same as the names used by `getFieldInfo` and `getValue`. But the indices are the same, so `getValue(index)` will work with the indices used here. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/sources/get-source-value.md b/website/md-docs/api-reference/sources/get-source-value.md new file mode 100644 index 000000000..d1d09ac92 --- /dev/null +++ b/website/md-docs/api-reference/sources/get-source-value.md @@ -0,0 +1,43 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getSourceValue + +`getSourceValue(source)` + +Returns the value of a source. Superseeds getValue. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `source` | yes | `string` | can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | current source value (number), or last known telemetry item value. | +| `isCurrent` | `unknown` | is true for telemetry sources that are within the "Sensor Lost" duration and telemetry is streaming . Always true for non-telemetry items. | +| `isFresh` | `unknown` | is true for telemetry sources which have been recently updated and telemetry is streaming. Always true for non-telemetry items. | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Notes + +- Getting a value by its numerical identifier is much faster than by its name. +While `Cels` sensor returns current values of all cells in a table, a `Cels+` or +`Cels-` will return a single value - the maximum or minimum Cels value. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/sources/get-value.md b/website/md-docs/api-reference/sources/get-value.md new file mode 100644 index 000000000..7774f3555 --- /dev/null +++ b/website/md-docs/api-reference/sources/get-value.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getValue + +`getValue(source)` + +Returns the value of a source. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `source` | yes | `string` | can be an index (number) (which was obtained by `getFieldInfo` or `getSourceIndex`) or a name (string) of the source. | + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>integer</code></td><td>current source value (number). Zero is returned for:<ul><li>non-existing sources</li><li>for all telemetry source when the telemetry stream is not received</li><li>far all non allowed sensors while FAI MODE is active</li></ul></td></tr><tr><td><code>-</code></td><td><code>table</code></td><td>GPS position is returned in a table:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>lat</code></td><td><code>number</code></td><td>latitude, positive is North</td></tr><tr><td><code>lon</code></td><td><code>number</code></td><td>longitude, positive is East</td></tr><tr><td><code>pilot-lat</code></td><td><code>number</code></td><td>pilot latitude, positive is North</td></tr><tr><td><code>pilot-lon</code></td><td><code>number</code></td><td>pilot longitude, positive is East</td></tr></tbody></table></td></tr><tr><td><code>-</code></td><td><code>table</code></td><td>GPS date/time, see getDateTime()</td></tr><tr><td><code>-</code></td><td><code>table</code></td><td>Cells are returned in a table (except where no cells were detected in which<br>case the returned value is 0):<ul><li>table has one item for each detected cell:</li><li>key (number) cell number (1 to number of cells)</li><li>value (number) current cell voltage</li></ul></td></tr></tbody></table> + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Notes + +- Getting a value by its numerical identifier is faster then by its name. +While `Cels` sensor returns current values of all cells in a table, a `Cels+` or +`Cels-` will return a single value - the maximum or minimum Cels value. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/sources/index.md b/website/md-docs/api-reference/sources/index.md new file mode 100644 index 000000000..831ce0239 --- /dev/null +++ b/website/md-docs/api-reference/sources/index.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Sources + +Source identification and value lookup for telemetry and other data sources. + +<div class="api-grid"> +<a class="api-card" href="get-field-info/"> +<span class="api-card-title">getFieldInfo</span> +<span class="api-card-summary">Return detailed information about field (source)</span> +</a> +<a class="api-card" href="get-source-index/"> +<span class="api-card-title">getSourceIndex</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="get-source-name/"> +<span class="api-card-title">getSourceName</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="get-source-value/"> +<span class="api-card-title">getSourceValue</span> +<span class="api-card-summary">Returns the value of a source.</span> +</a> +<a class="api-card" href="get-value/"> +<span class="api-card-title">getValue</span> +<span class="api-card-summary">Returns the value of a source.</span> +</a> +<a class="api-card" href="sources/"> +<span class="api-card-title">sources</span> +<span class="api-card-summary">Needs summary review</span> +</a> +</div> diff --git a/website/md-docs/api-reference/sources/sources.md b/website/md-docs/api-reference/sources/sources.md new file mode 100644 index 000000000..539d085e2 --- /dev/null +++ b/website/md-docs/api-reference/sources/sources.md @@ -0,0 +1,34 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# sources + +`sources([first[, last]])` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `first` | no | `integer` | first source index. If `nil` or omitted, the first available source is used. | +| `last` | no | `integer` | last soure index. If `nil` or omitted, the last available source is used. | + +## Returns + +None. + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/switches/get-logical-switch-value.md b/website/md-docs/api-reference/switches/get-logical-switch-value.md new file mode 100644 index 000000000..89018ef70 --- /dev/null +++ b/website/md-docs/api-reference/switches/get-logical-switch-value.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getLogicalSwitchValue + +`getLogicalSwitchValue(id)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `integer` | identifying the logical switch (zero for LS1 etc.). | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `true/false` | . | + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/switches/get-switch-index.md b/website/md-docs/api-reference/switches/get-switch-index.md new file mode 100644 index 000000000..4491ae6db --- /dev/null +++ b/website/md-docs/api-reference/switches/get-switch-index.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getSwitchIndex + +`getSwitchIndex(positionName)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `positionName` | yes | `string` | naming a switch position as it is shown on radio menus where you can select a switch. Notice that many names have special characters in them like arrow up/down etc. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `integer` | . The switchIndex, which can be used as input for `getSwitchName(switchIndex)` and `getSwitchValue(switchIndex)`. Also corresponds to the fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches. | + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/switches/get-switch-info.md b/website/md-docs/api-reference/switches/get-switch-info.md new file mode 100644 index 000000000..f0661a35d --- /dev/null +++ b/website/md-docs/api-reference/switches/get-switch-info.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getSwitchInfo + +`getSwitchInfo(sourceIndex)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `sourceIndex` | yes | `integer` | identifying a value source as returned by `getSourceIndex(sourceName)` or the `id` field in the table returned by `getFieldInfo`. | + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>table</code></td><td>information about requested field, table elements:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>type</code></td><td><code>number</code></td><td>field identifier 0 = SWITCH_NONE 1 = SWITCH_TOGGLE 2 = SWITCH_2POS 3 = SWITCH_3POS</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `2.12` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/switches/get-switch-name.md b/website/md-docs/api-reference/switches/get-switch-name.md new file mode 100644 index 000000000..a6556239d --- /dev/null +++ b/website/md-docs/api-reference/switches/get-switch-name.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getSwitchName + +`getSwitchName(switchIndex)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `switchIndex` | yes | `integer` | identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `string` | naming the switch position as it is shown on radio menus where a switch can be chosen. | + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/switches/get-switch-value.md b/website/md-docs/api-reference/switches/get-switch-value.md new file mode 100644 index 000000000..ccfcc8030 --- /dev/null +++ b/website/md-docs/api-reference/switches/get-switch-value.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getSwitchValue + +`getSwitchValue(switchIndex)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `switchIndex` | yes | `integer` | identifying a switch as returned by `getSwitchIndex(positionName)` or fields in the table returned by `model.getLogicalSwitch(switch)` identifying switches. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `integer` | . The value of the switch. | + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/switches/index.md b/website/md-docs/api-reference/switches/index.md new file mode 100644 index 000000000..46b22f719 --- /dev/null +++ b/website/md-docs/api-reference/switches/index.md @@ -0,0 +1,43 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Switches + +Switch identification, value lookup, and sticky-switch helpers. + +<div class="api-grid"> +<a class="api-card" href="get-logical-switch-value/"> +<span class="api-card-title">getLogicalSwitchValue</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="get-switch-index/"> +<span class="api-card-title">getSwitchIndex</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="get-switch-info/"> +<span class="api-card-title">getSwitchInfo</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="get-switch-name/"> +<span class="api-card-title">getSwitchName</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="get-switch-value/"> +<span class="api-card-title">getSwitchValue</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="set-sticky-switch/"> +<span class="api-card-title">setStickySwitch</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="switches/"> +<span class="api-card-title">switches</span> +<span class="api-card-summary">Needs summary review</span> +</a> +</div> diff --git a/website/md-docs/api-reference/switches/set-sticky-switch.md b/website/md-docs/api-reference/switches/set-sticky-switch.md new file mode 100644 index 000000000..507011a2a --- /dev/null +++ b/website/md-docs/api-reference/switches/set-sticky-switch.md @@ -0,0 +1,36 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# setStickySwitch + +`setStickySwitch(id, value)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `integer` | identifying the sticky logical switch (zero for LS1 etc.). | +| `value` | yes | `integer` | . The new value of the sticky logical switch. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `bufferFull` | `true/false` | . This function sends a message from Lua to the logical switch processor via a buffer with eight slots that are read 10 times per second. If the buffer is full, then a true value<br>is returned and no messages was sent (i.e. the switch was not changed). | + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/switches/switches.md b/website/md-docs/api-reference/switches/switches.md new file mode 100644 index 000000000..daf2a1929 --- /dev/null +++ b/website/md-docs/api-reference/switches/switches.md @@ -0,0 +1,34 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# switches + +`switches([first[, last]])` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `first` | no | `integer` | first switch index. If `nil` or omitted, the first available switch is used. | +| `last` | no | `integer` | last switch index. If `nil` or omitted, the last available switch is used. | + +## Returns + +None. + +## Availability + +- Since: `2.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/system/get-available-memory.md b/website/md-docs/api-reference/system/get-available-memory.md new file mode 100644 index 000000000..513cc5f6f --- /dev/null +++ b/website/md-docs/api-reference/system/get-available-memory.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getAvailableMemory + +`getAvailableMemory()` + +Get available memory remaining in the Heap for Lua. + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `usage` | `integer` | a value returned in b | + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/system/get-general-settings.md b/website/md-docs/api-reference/system/get-general-settings.md new file mode 100644 index 000000000..5325f9620 --- /dev/null +++ b/website/md-docs/api-reference/system/get-general-settings.md @@ -0,0 +1,31 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getGeneralSettings + +`getGeneralSettings()` + +Returns (some of) the general radio settings + +## Parameters + +None. + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>table</code></td><td>with elements:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>battWarn</code></td><td><code>number</code></td><td>radio battery range - warning value</td></tr><tr><td><code>battMin</code></td><td><code>number</code></td><td>radio battery range - minimum value</td></tr><tr><td><code>battMax</code></td><td><code>number</code></td><td>radio battery range - maximum value</td></tr><tr><td><code>imperial</code></td><td><code>number</code></td><td>set to a value different from 0 if the radio is set to the IMPERIAL units</td></tr><tr><td><code>language</code></td><td><code>string</code></td><td>radio language (used for menus)</td></tr><tr><td><code>voice</code></td><td><code>string</code></td><td>voice language (used for speech)</td></tr><tr><td><code>gtimer</code></td><td><code>number</code></td><td>radio global timer in seconds (does not include current session)</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `2.0.6` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/system/get-usage.md b/website/md-docs/api-reference/system/get-usage.md new file mode 100644 index 000000000..2d2d9ec48 --- /dev/null +++ b/website/md-docs/api-reference/system/get-usage.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getUsage + +`getUsage()` + +Get percent of already used Lua instructions in current script execution cycle. + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `usage` | `integer` | a value from 0 to 100 (percent) | + +## Availability + +- Since: `2.2.1` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/system/get-version.md b/website/md-docs/api-reference/system/get-version.md new file mode 100644 index 000000000..b260a3648 --- /dev/null +++ b/website/md-docs/api-reference/system/get-version.md @@ -0,0 +1,77 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getVersion + +`getVersion()` + +Return OpenTX version + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `string` | OpenTX version (ie "2.1.5") | +| `opentx_version_ie_2` | `string` | OpenTX version (ie "2.1.5") | +| `radio_type_x12s_x10_x9e_x9d_x9d_or_x7` | `string` | radio type: `x12s`, `x10`, `x9e`, `x9d+`, `x9d` or `x7`. | +| `major_version_ie_2_if_version_2` | `integer` | major version (ie 2 if version 2.1.5) | +| `minor_version_ie_1_if_version_2` | `integer` | minor version (ie 1 if version 2.1.5) | +| `revision_number_ie_5_if_version_2` | `integer` | revision number (ie 5 if version 2.1.5) | +| `os_name_i` | `string` | OS name (i.e. EdgeTX or nil if OpenTX) | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` + +## Extended Description + +`runtime.get-version` keeps one docs page even if the preferred callable name changes over time. The generated API truth shows the current symbol, while older names remain documented here as compatibility guidance. + +## Examples + +This example shows the multi-value form used in modern EdgeTX releases such as `2.4.0`: + +```lua +local function run(event) + local ver, radio, maj, minor, rev, osname = getVersion() + print("version: "..ver) + if radio then print("radio: "..radio) end + if maj then print("maj: "..maj) end + if minor then print("minor: "..minor) end + if rev then print("rev: "..rev) end + if osname then print("osname: "..osname) end + return 1 +end + +return { run=run } +``` + +Output of the above script in simulator: + +```text +version: 2.4.0 +radio: tx16s-simu +maj: 2 +minor: 4 +rev: 0 +osname: EdgeTX +``` + +## Compatibility Notes + +Keep the preferred callable name in generated API metadata and use this page for return-shape clarification and examples. diff --git a/website/md-docs/api-reference/system/index.md b/website/md-docs/api-reference/system/index.md new file mode 100644 index 000000000..71d86b3b2 --- /dev/null +++ b/website/md-docs/api-reference/system/index.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# System + +General runtime, device, and system-level helpers. + +<div class="api-grid"> +<a class="api-card" href="get-available-memory/"> +<span class="api-card-title">getAvailableMemory</span> +<span class="api-card-summary">Get available memory remaining in the Heap for Lua.</span> +</a> +<a class="api-card" href="get-general-settings/"> +<span class="api-card-title">getGeneralSettings</span> +<span class="api-card-summary">Returns (some of) the general radio settings</span> +</a> +<a class="api-card" href="get-usage/"> +<span class="api-card-title">getUsage</span> +<span class="api-card-summary">Get percent of already used Lua instructions in current script execution cycle.</span> +</a> +<a class="api-card" href="get-version/"> +<span class="api-card-title">getVersion</span> +<span class="api-card-summary">Return OpenTX version</span> +</a> +<a class="api-card" href="screenshot/"> +<span class="api-card-title">screenshot</span> +<span class="api-card-summary">Takes a screenshot, which is saved to the SCREENSHOTS folder on the radio SD card.</span> +</a> +</div> diff --git a/website/md-docs/api-reference/system/screenshot.md b/website/md-docs/api-reference/system/screenshot.md new file mode 100644 index 000000000..788fe892f --- /dev/null +++ b/website/md-docs/api-reference/system/screenshot.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# screenshot + +`screenshot()` + +Takes a screenshot, which is saved to the SCREENSHOTS folder on the radio SD card. + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `none` | `unknown` | | + +## Availability + +- Since: `2.11` +- Radio support: `all` + +## Notes + +- This command is currently not rate limited, so repeated frequent calls will slow down the UI and can even freeze the entire radio, so should be used with care. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/telemetry/crossfire-telemetry-pop.md b/website/md-docs/api-reference/telemetry/crossfire-telemetry-pop.md new file mode 100644 index 000000000..aa0fad43a --- /dev/null +++ b/website/md-docs/api-reference/telemetry/crossfire-telemetry-pop.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# crossfireTelemetryPop + +`crossfireTelemetryPop()` + +Pops a received Crossfire Telemetry packet from the queue. + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | queue does not contain any (or enough) bytes to form a whole packet | +| `command` | `integer` | | +| `packet` | `table` | data bytes | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/telemetry/get-ras.md b/website/md-docs/api-reference/telemetry/get-ras.md new file mode 100644 index 000000000..40931ee5e --- /dev/null +++ b/website/md-docs/api-reference/telemetry/get-ras.md @@ -0,0 +1,37 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getRAS + +`getRAS()` + +Return the RAS value or nil if no valid hardware found + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | representing RAS value. Value bellow 0x33 (51 decimal) are all ok, value above 0x33 indicate a hardware antenna issue. This is just a hardware pass/fail measure and does not represent the quality of the radio link | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Notes + +- RAS was called SWR in the past + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/telemetry/get-rssi.md b/website/md-docs/api-reference/telemetry/get-rssi.md new file mode 100644 index 000000000..e43d9997c --- /dev/null +++ b/website/md-docs/api-reference/telemetry/get-rssi.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getRSSI + +`getRSSI()` + +Get RSSI value as well as low and critical RSSI alarm levels (in dB) + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `rssi` | `unknown` | RSSI value (0 if no link) | +| `alarm_low` | `unknown` | Configured low RSSI alarm level | +| `alarm_crit` | `unknown` | Configured critical RSSI alarm level | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/telemetry/get-trainer-status.md b/website/md-docs/api-reference/telemetry/get-trainer-status.md new file mode 100644 index 000000000..c5741db12 --- /dev/null +++ b/website/md-docs/api-reference/telemetry/get-trainer-status.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getTrainerStatus + +`getTrainerStatus()` + + + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | current output value (number). 0 - Not Connected<br>1 - Connected<br>2 - Disconnected<br>3 - Reconnected | + +## Availability + +- Since: `2.9.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/telemetry/ghost-telemetry-pop.md b/website/md-docs/api-reference/telemetry/ghost-telemetry-pop.md new file mode 100644 index 000000000..1f9f1b302 --- /dev/null +++ b/website/md-docs/api-reference/telemetry/ghost-telemetry-pop.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# ghostTelemetryPop + +`ghostTelemetryPop()` + +Pops a received Ghost Telemetry packet from the queue. + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | queue does not contain any (or enough) bytes to form a whole packet | +| `type` | `integer` | | +| `packet` | `table` | data bytes | + +## Availability + +- Since: `2.7.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/telemetry/index.md b/website/md-docs/api-reference/telemetry/index.md new file mode 100644 index 000000000..3286e2292 --- /dev/null +++ b/website/md-docs/api-reference/telemetry/index.md @@ -0,0 +1,43 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Telemetry + +Telemetry value access, injection, and protocol helpers. + +<div class="api-grid"> +<a class="api-card" href="crossfire-telemetry-pop/"> +<span class="api-card-title">crossfireTelemetryPop</span> +<span class="api-card-summary">Pops a received Crossfire Telemetry packet from the queue.</span> +</a> +<a class="api-card" href="get-ras/"> +<span class="api-card-title">getRAS</span> +<span class="api-card-summary">Return the RAS value or nil if no valid hardware found</span> +</a> +<a class="api-card" href="get-rssi/"> +<span class="api-card-title">getRSSI</span> +<span class="api-card-summary">Get RSSI value as well as low and critical RSSI alarm levels (in dB)</span> +</a> +<a class="api-card" href="get-trainer-status/"> +<span class="api-card-title">getTrainerStatus</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="ghost-telemetry-pop/"> +<span class="api-card-title">ghostTelemetryPop</span> +<span class="api-card-summary">Pops a received Ghost Telemetry packet from the queue.</span> +</a> +<a class="api-card" href="set-telemetry-value/"> +<span class="api-card-title">setTelemetryValue</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="sport-telemetry-pop/"> +<span class="api-card-title">sportTelemetryPop</span> +<span class="api-card-summary">Pops a received SPORT packet from the queue.</span> +</a> +</div> diff --git a/website/md-docs/api-reference/telemetry/set-telemetry-value.md b/website/md-docs/api-reference/telemetry/set-telemetry-value.md new file mode 100644 index 000000000..d837d85e8 --- /dev/null +++ b/website/md-docs/api-reference/telemetry/set-telemetry-value.md @@ -0,0 +1,46 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# setTelemetryValue + +`setTelemetryValue(id, subID, instance, value [, unit [, precision [, name]]])` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `unknown` | Id of the sensor, valid range is from 0 to 0xFFFF | +| `subID` | yes | `unknown` | subID of the sensor, usually 0, valid range is from 0 to 7 | +| `instance` | yes | `unknown` | instance of the sensor (SensorID), valid range is from 0 to 0xFF | +| `value` | yes | `unknown` | fed to the sensor | +| `unit` | no | `unknown` | unit of the sensor, see the Units reference for the full list | +| `precision` | no | `unknown` | the precision of the sensor<ul><li>`0 or not present` no decimal precision.</li><li>`!= 0` value is divided by 10^precision, e.g. value=1000, prec=2 => 10.00.</li></ul> | +| `name` | no | `string` | Name of the sensor if it does not yet exist (4 chars).<ul><li>`not present` Name defaults to the Id.</li><li>`present` Sensor takes name of the argument. Argument must have name surrounded by quotes: e.g., "Name"</li></ul> | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `true,` | `unknown` | if the sensor was just added. In this case the value is ignored (subsequent call will set the value) | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Notes + +- All three parameters `id`, `subID` and `instance` can't be zero at the same time. At least one of them +must be different from zero. + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/telemetry/sport-telemetry-pop.md b/website/md-docs/api-reference/telemetry/sport-telemetry-pop.md new file mode 100644 index 000000000..9349b54c7 --- /dev/null +++ b/website/md-docs/api-reference/telemetry/sport-telemetry-pop.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# sportTelemetryPop + +`sportTelemetryPop()` + +Pops a received SPORT packet from the queue. Please note that only packets using a data ID within 0x5000 to 0x50FF +(frame ID == 0x10), as well as packets with a frame ID equal 0x32 (regardless of the data ID) will be passed to +the LUA telemetry receive queue. + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `nil` | queue does not contain any (or enough) bytes to form a whole packet | +| `sensor_id` | `integer` | | +| `frame_id` | `integer` | | +| `data_id` | `integer` | | +| `value` | `integer` | | + +## Availability + +- Since: `2.2.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/time/get-date-time.md b/website/md-docs/api-reference/time/get-date-time.md new file mode 100644 index 000000000..77cb0a51c --- /dev/null +++ b/website/md-docs/api-reference/time/get-date-time.md @@ -0,0 +1,31 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getDateTime + +`getDateTime()` + +Return current system date and time that is kept by the RTC unit + +## Parameters + +None. + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>table</code></td><td>current date and time, table elements:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>year</code></td><td><code>number</code></td><td>year</td></tr><tr><td><code>mon</code></td><td><code>number</code></td><td>month</td></tr><tr><td><code>day</code></td><td><code>number</code></td><td>day of month</td></tr><tr><td><code>hour</code></td><td><code>number</code></td><td>hours</td></tr><tr><td><code>hour12</code></td><td><code>number</code></td><td>hours in US format</td></tr><tr><td><code>min</code></td><td><code>number</code></td><td>minutes</td></tr><tr><td><code>sec</code></td><td><code>number</code></td><td>seconds</td></tr><tr><td><code>suffix</code></td><td><code>text</code></td><td>am or pm</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/time/get-global-timer.md b/website/md-docs/api-reference/time/get-global-timer.md new file mode 100644 index 000000000..600b59b8f --- /dev/null +++ b/website/md-docs/api-reference/time/get-global-timer.md @@ -0,0 +1,31 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getGlobalTimer + +`getGlobalTimer()` + +Returns radio timers + +## Parameters + +None. + +## Returns + +<table><thead><tr><th>Name</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>-</code></td><td><code>table</code></td><td>with elements:</td></tr><tr class="lua-nested-field-row"><td colspan="3"><table class="lua-nested-field-table"><thead><tr><th>Field</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>gtimer</code></td><td><code>number</code></td><td>radio global timer in seconds</td></tr><tr><td><code>session</code></td><td><code>number</code></td><td>radio session in seconds</td></tr><tr><td><code>ttimer</code></td><td><code>number</code></td><td>radio throttle timer in seconds</td></tr><tr><td><code>tptimer</code></td><td><code>number</code></td><td>radio throttle percent timer in seconds</td></tr></tbody></table></td></tr></tbody></table> + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/time/get-rtc-time.md b/website/md-docs/api-reference/time/get-rtc-time.md new file mode 100644 index 000000000..8930c07fd --- /dev/null +++ b/website/md-docs/api-reference/time/get-rtc-time.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getRtcTime + +`getRtcTime()` + +Return current RTC system date as unix timstamp (in seconds since 1. Jan 1970) + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | Number of seconds elapsed since 1. Jan 1970 | + +## Availability + +- Since: `unknown` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/time/get-time.md b/website/md-docs/api-reference/time/get-time.md new file mode 100644 index 000000000..a3755cb7f --- /dev/null +++ b/website/md-docs/api-reference/time/get-time.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getTime + +`getTime()` + +Return the time since the radio was started in multiple of 10ms + +## Parameters + +None. + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `-` | `integer` | Number of 10ms ticks since the radio was started Example: run time: 12.54 seconds, return value: 1254 | + +## Availability + +- Since: `2.0.0` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/time/index.md b/website/md-docs/api-reference/time/index.md new file mode 100644 index 000000000..bbaed7e69 --- /dev/null +++ b/website/md-docs/api-reference/time/index.md @@ -0,0 +1,35 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Time + +Date, clock, and timer helpers. + +<div class="api-grid"> +<a class="api-card" href="get-date-time/"> +<span class="api-card-title">getDateTime</span> +<span class="api-card-summary">Return current system date and time that is kept by the RTC unit</span> +</a> +<a class="api-card" href="get-global-timer/"> +<span class="api-card-title">getGlobalTimer</span> +<span class="api-card-summary">Returns radio timers</span> +</a> +<a class="api-card" href="get-rtc-time/"> +<span class="api-card-title">getRtcTime</span> +<span class="api-card-summary">Return current RTC system date as unix timstamp (in seconds since 1.</span> +</a> +<a class="api-card" href="get-time/"> +<span class="api-card-title">getTime</span> +<span class="api-card-summary">Return the time since the radio was started in multiple of 10ms</span> +</a> +<a class="api-card" href="reset-global-timer/"> +<span class="api-card-title">resetGlobalTimer</span> +<span class="api-card-summary">Resets the radio global timer to 0.</span> +</a> +</div> diff --git a/website/md-docs/api-reference/time/reset-global-timer.md b/website/md-docs/api-reference/time/reset-global-timer.md new file mode 100644 index 000000000..dd9b6ebcd --- /dev/null +++ b/website/md-docs/api-reference/time/reset-global-timer.md @@ -0,0 +1,33 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# resetGlobalTimer + +`resetGlobalTimer([type])` + +Resets the radio global timer to 0. + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `type` | no | `unknown` | : if set to 'all', throttle ,throttle percent and session timers are reset too if set to 'session', radio session timer is reset too<br>if set to 'ttimer', radio throttle timer is reset too<br>if set to 'tptimer', radio throttle percent timer is reset too | + +## Returns + +None. + +## Availability + +- Since: `2.2.2` +- Radio support: `all` + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/variables/get-shm-var.md b/website/md-docs/api-reference/variables/get-shm-var.md new file mode 100644 index 000000000..fb90d36fd --- /dev/null +++ b/website/md-docs/api-reference/variables/get-shm-var.md @@ -0,0 +1,39 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# getShmVar + +`getShmVar(id)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `integer` | between 1 and 16 identifying the shared memory variable. | + +## Returns + +| Name | Type | Description | +| --- | --- | --- | +| `value` | `integer` | . The value of the shared memory variable. | + +## Availability + +- Since: `2.6` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/api-reference/variables/index.md b/website/md-docs/api-reference/variables/index.md new file mode 100644 index 000000000..4598bfa19 --- /dev/null +++ b/website/md-docs/api-reference/variables/index.md @@ -0,0 +1,23 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# Variables + +Shared-memory variables exposed to scripts. + +<div class="api-grid"> +<a class="api-card" href="get-shm-var/"> +<span class="api-card-title">getShmVar</span> +<span class="api-card-summary">Needs summary review</span> +</a> +<a class="api-card" href="set-shm-var/"> +<span class="api-card-title">setShmVar</span> +<span class="api-card-summary">Needs summary review</span> +</a> +</div> diff --git a/website/md-docs/api-reference/variables/set-shm-var.md b/website/md-docs/api-reference/variables/set-shm-var.md new file mode 100644 index 000000000..430ed3ba3 --- /dev/null +++ b/website/md-docs/api-reference/variables/set-shm-var.md @@ -0,0 +1,38 @@ +<!-- +GENERATED FILE — do not hand-edit. +Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +To fix API facts (syntax, params, returns, availability): edit the upstream +EdgeTX /*luadoc*/ comment, then re-extract and rebuild. +To add narrative content (examples, long description, compat notes): add or +edit docs-system/overlays/<doc_id>.md, then rebuild. +--> + +# setShmVar + +`setShmVar(id, value)` + + + +## Parameters + +| Name | Req | Type | Description | +| --- | --- | --- | --- | +| `id` | yes | `integer` | between 1 and 16 identifying the shared memory variable. | +| `value` | yes | `integer` | . The value of the shared memory variable. | + +## Returns + +None. + +## Availability + +- Since: `2.6` +- Radio support: `color-lcd` + +## Notes + +- Only available on radios with color display + +## Source + +`radio/src/lua/api_general.cpp` diff --git a/website/md-docs/assets/edgetx-logo.svg b/website/md-docs/assets/edgetx-logo.svg new file mode 100644 index 000000000..2f0adba37 --- /dev/null +++ b/website/md-docs/assets/edgetx-logo.svg @@ -0,0 +1,143 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<!-- Created with Inkscape (http://www.inkscape.org/) --> + +<svg + width="79.0271mm" + height="82.240181mm" + viewBox="0 0 79.0271 82.240181" + version="1.1" + id="svg711" + inkscape:version="1.2.2 (732a01da63, 2022-12-09)" + sodipodi:docname="ETX_color_logo.svg" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <sodipodi:namedview + id="namedview713" + pagecolor="#ffffff" + bordercolor="#000000" + borderopacity="0.25" + inkscape:showpageshadow="2" + inkscape:pageopacity="0.0" + inkscape:pagecheckerboard="0" + inkscape:deskcolor="#d1d1d1" + inkscape:document-units="mm" + showgrid="false" + inkscape:zoom="0.71624579" + inkscape:cx="152.1824" + inkscape:cy="353.2307" + inkscape:window-width="1450" + inkscape:window-height="1020" + inkscape:window-x="328" + inkscape:window-y="0" + inkscape:window-maximized="0" + inkscape:current-layer="layer1" /> + <defs + id="defs708" /> + <g + inkscape:label="Layer 1" + inkscape:groupmode="layer" + id="layer1" + transform="translate(-64.658089,-54.924687)"> + <g + id="g39192" + transform="matrix(1.4846207,0,0,1.4846207,-266.72824,551.23217)"> + <path + style="fill:#14171c;fill-opacity:1;stroke:none;stroke-width:0.25281px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 230.24642,-306.87496 -0.91536,-17.23254 10.30282,0.55051 15.1524,-9.46286 5.21449,9.61769 15.39945,7.94368 -5.83942,9.23076 0.486,16.97822 -10.88654,-0.098 -14.084,8.87579 -5.06115,-8.93924 -15.77356,-8.15969 z" + id="path5326-7-0-7" + sodipodi:nodetypes="ccccccccccccc" /> + <g + aria-label="X" + transform="scale(0.89349519,1.1192002)" + id="text46893-8-8-7-8-3-4-5-5-8-7-0-8-4-8-3-7-9-4-5-7-9-3-5" + style="font-weight:800;font-size:23.0043px;line-height:1.25;font-family:'Open Sans';-inkscape-font-specification:'Open Sans, Ultra-Bold';letter-spacing:0px;word-spacing:0px;fill:#ffffff;stroke-width:0.237896"> + <path + d="m 294.61482,-261.57199 h -5.13328 l -3.20128,-5.13328 -3.16759,5.13328 h -5.02096 l 5.4478,-8.40196 -5.12205,-8.02006 h 4.91986 l 2.9654,5.07713 2.85307,-5.07713 h 5.06589 l -5.20068,8.36827 z" + id="path3019" /> + </g> + <g + aria-label="T" + transform="scale(0.90235588,1.1082102)" + id="text46893-8-8-7-8-3-4-5-5-8-5-0-2-2-0-4-9-1-2-9-6-0-9" + style="font-weight:800;font-size:23.3472px;line-height:1.25;font-family:'Open Sans';-inkscape-font-specification:'Open Sans, Ultra-Bold';letter-spacing:0px;word-spacing:0px;fill:#ffffff;stroke-width:0.264838"> + <path + d="m 270.59011,-264.19733 h -4.503 v -12.9846 h -4.0698 v -3.6822 h 12.6312 v 3.6822 h -4.0584 z" + id="path3016" /> + </g> + <g + aria-label="EDGE" + transform="scale(0.91200302,1.0964876)" + id="text43103-3-6-3-0-9-7-7-6-1-9-1-0-7-4-8-0-2-6-6-6-2-7" + style="font-size:12.3452px;line-height:1.25;font-family:'Cobalt Alien';-inkscape-font-specification:'Cobalt Alien, Normal';letter-spacing:0px;word-spacing:0px;fill:#fffefa;stroke-width:0.213263"> + <path + d="m 264.66253,-288.94842 h -3.01223 v -1.19749 h 3.81467 v -1.20983 h -4.39489 q -0.9012,0 -1.37032,0.29629 -0.46912,0.29628 -0.46912,0.9012 v 4.24675 q 0,0.60491 0.46912,0.9012 0.46912,0.29628 1.37032,0.29628 h 4.39489 v -1.20983 h -3.81467 v -1.8024 h 3.01223 z" + id="path2958" /> + <path + d="m 270.82278,-290.14591 h -4.24675 v -1.20983 h 4.82697 q 0.9012,0 1.37032,0.29629 0.46912,0.29628 0.46912,0.9012 v 4.24675 q 0,0.60491 -0.46912,0.9012 -0.46912,0.29628 -1.37032,0.29628 h -4.82697 v -4.82697 h 2.41966 v 3.61714 h 1.82709 z" + id="path2960" /> + <path + d="m 278.60024,-285.92385 h -1.82709 v -4.22206 h 4.24675 v -1.20983 h -4.82697 q -0.9012,0 -1.37032,0.29629 -0.46912,0.29628 -0.46912,0.9012 v 4.24675 q 0,0.60491 0.46912,0.9012 0.46912,0.29628 1.37032,0.29628 h 2.98754 q 0.9012,0 1.37031,-0.29628 0.46912,-0.29629 0.46912,-0.9012 v -3.03692 h -2.41966 z" + id="path2962" /> + <path + d="m 287.56285,-288.94842 h -3.01223 v -1.19749 h 3.81467 v -1.20983 h -4.3949 q -0.90119,0 -1.37031,0.29629 -0.46912,0.29628 -0.46912,0.9012 v 4.24675 q 0,0.60491 0.46912,0.9012 0.46912,0.29628 1.37031,0.29628 h 4.3949 v -1.20983 h -3.81467 v -1.8024 h 3.01223 z" + id="path2964" /> + </g> + <path + style="fill:#359ac8;fill-opacity:1;stroke:none;stroke-width:0.199459px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 239.15219,-325.10027 15.933,-9.19891 10.6816,18.50107 -12.1759,-12.17606 z" + id="path43050-7-4-6-1-5" + inkscape:transform-center-x="-5.1930621" + inkscape:transform-center-y="-36.404377" + inkscape:export-filename="/home/martin/Dokumenty/ExDokumenty/MojeDokumenty/OpenTXwip/Grafika/svg/logo/rect33036-7-2-7.png" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96" /> + <path + style="fill:#3bceae;fill-opacity:1;stroke:none;stroke-width:0.199459px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 260.51019,-325.09664 15.9331,9.19893 -10.6816,18.50105 4.4567,-16.63277 z" + id="path43052-8-2-1-8-2" + inkscape:transform-center-x="-36.802735" + inkscape:transform-center-y="-9.1664762" + inkscape:export-filename="/home/martin/Dokumenty/ExDokumenty/MojeDokumenty/OpenTXwip/Grafika/svg/logo/rect33036-7-2-7.png" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96" /> + <path + style="fill:#3b56c8;fill-opacity:1;stroke:none;stroke-width:0.199459px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 228.46999,-306.60541 v -18.39786 h 21.3632 l -16.6328,4.45672 z" + id="path2282-9-7-3-9-1-2-5" + inkscape:transform-center-x="21.069826" + inkscape:transform-center-y="-18.160978" + inkscape:export-filename="/home/martin/Dokumenty/ExDokumenty/MojeDokumenty/OpenTXwip/Grafika/svg/logo/rect33036-7-2-7.png" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96" /> + <path + style="fill:#c2b035;fill-opacity:1;stroke:none;stroke-width:0.199459px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 271.18619,-306.59821 v 18.39786 l -21.3633,-2e-5 16.6329,-4.4567 z" + id="path43054-8-2-7-8-4" + inkscape:transform-center-x="-21.06974" + inkscape:transform-center-y="18.160967" + inkscape:export-filename="/home/martin/Dokumenty/ExDokumenty/MojeDokumenty/OpenTXwip/Grafika/svg/logo/rect33036-7-2-7.png" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96" /> + <path + style="fill:#b54d65;fill-opacity:1;stroke:none;stroke-width:0.199459px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 260.50399,-288.10337 -15.9329,9.19893 -10.6818,-18.5011 12.1761,12.17608 z" + id="path43056-6-6-1-0-7" + inkscape:transform-center-x="5.1929982" + inkscape:transform-center-y="36.404332" + inkscape:export-filename="/home/martin/Dokumenty/ExDokumenty/MojeDokumenty/OpenTXwip/Grafika/svg/logo/rect33036-7-2-7.png" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96" /> + <path + style="fill:#a839c7;fill-opacity:1;stroke:none;stroke-width:0.199459px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + d="m 239.14579,-288.10698 -15.933,-9.19893 10.6817,-18.50108 -4.4568,16.63278 z" + id="path43058-0-8-3-2-4" + inkscape:transform-center-x="36.802772" + inkscape:transform-center-y="9.1664399" + inkscape:export-filename="/home/martin/Dokumenty/ExDokumenty/MojeDokumenty/OpenTXwip/Grafika/svg/logo/rect33036-7-2-7.png" + inkscape:export-xdpi="96" + inkscape:export-ydpi="96" /> + </g> + </g> +</svg> diff --git a/website/md-docs/assets/fonts/Roboto-Bold.ttf b/website/md-docs/assets/fonts/Roboto-Bold.ttf new file mode 100644 index 000000000..d3f01ad24 Binary files /dev/null and b/website/md-docs/assets/fonts/Roboto-Bold.ttf differ diff --git a/website/md-docs/assets/fonts/Roboto-Regular.ttf b/website/md-docs/assets/fonts/Roboto-Regular.ttf new file mode 100644 index 000000000..2c97eeadf Binary files /dev/null and b/website/md-docs/assets/fonts/Roboto-Regular.ttf differ diff --git a/website/md-docs/assets/luals/Bitmap.d.lua b/website/md-docs/assets/luals/Bitmap.d.lua new file mode 100644 index 000000000..7b72a925b --- /dev/null +++ b/website/md-docs/assets/luals/Bitmap.d.lua @@ -0,0 +1,59 @@ +---@meta + +-- GENERATED FILE — do not hand-edit. +-- Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +-- To fix API facts: edit the upstream EdgeTX /*luadoc*/ comment, then +-- re-extract and rebuild. To add narrative content: edit +-- docs-system/overlays/<doc_id>.md, then rebuild. + +--- LCD line pattern selector such as SOLID or DOTTED. +---@alias pen_type integer +--- Text rendering flags used by legacy LCD number APIs. +---@alias text_flags integer +--- Packed 16-bit RGB color value for color LCD APIs. +---@alias lcd_color_RGB565 integer +--- Font size selector such as XXLSIZE, DBLSIZE, MIDSIZE, or SMLSIZE. +---@alias lcd_font_size integer +--- Bitmask of LCD text rendering flags such as INVERS, BLINK, and SHADOWED. +---@alias lcd_text_flags integer +--- Combined LCD text formatting bitmask covering font size and text flags. +---@alias lcd_text_format integer +--- Signed EdgeTX source value in the normalized range from -1024 to 1024. +---@alias source_range_1024 integer +--- Global timer selector such as all, total, session, throttle, or throttlepct. +---@alias timer_type string +--- Telemetry unit identifier from the EdgeTX unit list. +---@alias unit_type integer +--- Telemetry precision selector controlling decimal places. +---@alias prec_type integer + +---@class Bitmap +Bitmap = {} + +--- Return width, height of a bitmap object +--- @since 2.2.0 +---@param name pointer point to a bitmap previously opened with Bitmap.open() +---@return integer width_in_pixels +---@return integer height_in_pixels +function Bitmap.getSize(name) end + +--- Loads a bitmap in memory, for later use with lcd.drawBitmap(). Bitmaps should be loaded only +once, returned object should be stored and used for drawing. If loading fails for whatever +reason the resulting bitmap object will have width and height set to zero. +--- @since 2.2.0 +---@param name string full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) +---@return object bitmap +function Bitmap.open(name) end + +--- Return a resized bitmap object +--- @since 2.8.0 +---@param bitmap pointer point to a bitmap previously opened with Bitmap.open() +---@param width integer the new bitmap width +---@param height integer the new bitmap height +function Bitmap.resize(bitmap, width, height) end + +--- Return a 8bit bitmap mask that can be used with lcd.drawBitmapPattern() +--- @since 2.8.0 +---@param bitmap pointer point to a bitmap previously opened with Bitmap.open() +---@return unknown a +function Bitmap.toMask(bitmap) end diff --git a/website/md-docs/assets/luals/lcd.d.lua b/website/md-docs/assets/luals/lcd.d.lua new file mode 100644 index 000000000..d845fa01f --- /dev/null +++ b/website/md-docs/assets/luals/lcd.d.lua @@ -0,0 +1,353 @@ +---@meta + +-- GENERATED FILE — do not hand-edit. +-- Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +-- To fix API facts: edit the upstream EdgeTX /*luadoc*/ comment, then +-- re-extract and rebuild. To add narrative content: edit +-- docs-system/overlays/<doc_id>.md, then rebuild. + +--- LCD line pattern selector such as SOLID or DOTTED. +---@alias pen_type integer +--- Text rendering flags used by legacy LCD number APIs. +---@alias text_flags integer +--- Packed 16-bit RGB color value for color LCD APIs. +---@alias lcd_color_RGB565 integer +--- Font size selector such as XXLSIZE, DBLSIZE, MIDSIZE, or SMLSIZE. +---@alias lcd_font_size integer +--- Bitmask of LCD text rendering flags such as INVERS, BLINK, and SHADOWED. +---@alias lcd_text_flags integer +--- Combined LCD text formatting bitmask covering font size and text flags. +---@alias lcd_text_format integer +--- Signed EdgeTX source value in the normalized range from -1024 to 1024. +---@alias source_range_1024 integer +--- Global timer selector such as all, total, session, throttle, or throttlepct. +---@alias timer_type string +--- Telemetry unit identifier from the EdgeTX unit list. +---@alias unit_type integer +--- Telemetry precision selector controlling decimal places. +---@alias prec_type integer + +---@class lcd +lcd = {} + +--- Returns a drawing flag with RGB color code +--- @since 2.2.0 +---@param r integer a number between 0 and 255 that expresses the amount of red in the color +---@param g integer a number between 0 and 255 that expresses the amount of green in the color +---@param b integer a number between 0 and 255 that expresses the amount of blue in the color +---@param rgb integer a number between 0 and 0xFFFFFF that expresses the RGB value (0xFF000=RED, 0x00FF00=GREEN, 0x0000FF=BLUE) +---@return integer flag +function lcd.RGB(r, g, b, rgb) end + +--- Clear the LCD screen +--- @since 2.0.0 +---@param color? unknown +function lcd.clear(color) end + +--- Draw an arc +--- @since 2.4.0 +---@param x integer coordinates of the center +---@param y integer coordinates of the center +---@param r1 integer radii of the inside and outside of the annulus +---@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 the Lcd functions overview +function lcd.drawAnnulus(x, y, r1, r2, start, end, flags) end + +--- Draw an arc +--- @since 2.4.0 +---@param x integer coordinates of the center +---@param y integer coordinates of the center +---@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 the Lcd functions overview +function lcd.drawArc(x, y, r, start, end, flags) end + +--- Displays a bitmap at (x,y) +--- @since 2.2.0 +---@param bitmap pointer point to a bitmap previously opened with Bitmap.open() +---@param x integer starting coordinates +---@param y integer starting coordinates +---@param scale? integer scale in %, 50 divides size by two, 100 is unchanged, 200 doubles size. Omitting scale draws image in 1:1 scale and is faster than specifying 100 for scale. +function lcd.drawBitmap(bitmap, x, y, scale) end + +--- Displays a bitmap pattern at (x,y) +--- @since 2.8.0 +---@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 the Lcd functions overview +function lcd.drawBitmapPattern(bitmap, x, y, flags) end + +--- Displays a bitmap pattern pie at (x,y) +--- @since 2.8.0 +---@param bitmap pointer point to a bitmap previously opened with Bitmap.open() +---@param x integer starting coordinates +---@param y integer starting coordinates +---@param startangle unknown Start angle +---@param endangle unknown End angle +---@param flags? integer please see the Lcd functions overview +function lcd.drawBitmapPatternPie(bitmap, x, y, startangle, endangle, flags) end + +--- Display a telemetry value at (x,y) +--- @since 2.0.6 +---@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 the Lcd functions overview +function lcd.drawChannel(x, y, source, flags) end + +--- Draw a circle at (x, y) of specified radius +--- @since 2.4.0 +---@param x integer center position +---@param y integer center position +---@param r integer radius in pixels +---@param flags? integer please see the Lcd functions overview +function lcd.drawCircle(x, y, r, flags) end + +--- Draw a combo box +--- @since 2.0.0 +---@param x integer top left corner position +---@param y integer top left corner position +---@param w integer width of combo box in pixels +---@param list table combo box elements, each element is a string +---@param idx integer index of entry to highlight +---@param flags? integer drawing flags, the flags can not be combined: * BLINK combo box is expanded * INVERS combo box collapsed, text inversed * 0 or not present combo box collapsed, text normal +function lcd.drawCombobox(x, y, w, list, idx, flags) end + +--- Draw a filled circle at (x, y) of specified radius +--- @since 2.4.0 +---@param x integer center position +---@param y integer center position +---@param r integer radius in pixels +---@param flags? integer please see the Lcd functions overview +function lcd.drawFilledCircle(x, y, r, flags) end + +--- Draw a solid rectangle from top left corner (x,y) of specified width and height +--- @since 2.0.0 +---@param x integer top left corner position +---@param y integer top left corner position +---@param w integer width in pixels +---@param h integer height in pixels +---@param flags? integer please see the Lcd functions overview +---@param opacity? integer opacity defaults to 0 (only on radios with color display) +function lcd.drawFilledRectangle(x, y, w, h, flags, opacity) end + +--- Draw a filled triangle +--- @since 2.4.0 +---@param x1 integer coordinates of the three vertices +---@param y1 integer coordinates of the three vertices +---@param x2 integer coordinates of the three vertices +---@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 the Lcd functions overview +function lcd.drawFilledTriangle(x1, y1, x2, y2, x3, y3, flags) end + +--- Draw a simple gauge that is filled based upon fill value +--- @since 2.0.0 +---@param x integer top left corner position +---@param y integer top left corner position +---@param w integer width in pixels +---@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 the Lcd functions overview +function lcd.drawGauge(x, y, w, h, fill, maxfill, flags) end + +--- Draw a rectangle in perspective +--- @since 2.4.0 +---@param pitch integer pitch and roll to define the orientation of the rectangle +---@param roll integer pitch and roll to define the orientation of the rectangle +---@param xmin integer the limits of the rectangle +---@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 the Lcd functions overview +function lcd.drawHudRectangle(pitch, roll, xmin, xmax, ymin, ymax, flags) end + +--- Draw a straight line on LCD +--- @since 2.0.0 +---@param x1 integer starting coordinate +---@param y1 integer starting coordinate +---@param x2 integer end coordinate +---@param y2 integer end coordinate +---@param pattern unknown SOLID or DOTTED +---@param flags? integer lcdflags +function lcd.drawLine(x1, y1, x2, y2, pattern, flags) end + +--- Draw a line only inside a rectangle +--- @since 2.4.0 +---@param x1 integer coordinates of the start and end of the unclipped line +---@param y1 integer coordinates of the start and end of the unclipped line +---@param x2 integer coordinates of the start and end of the unclipped line +---@param y2 integer coordinates of the start and end of the unclipped line +---@param xmin integer the limits of the rectangle inside which the line is drawn +---@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 the Lcd functions overview +---@param flags? integer please see the Lcd functions overview +function lcd.drawLineWithClipping(x1, y1, x2, y2, xmin, xmax, ymin, ymax, pattern, flags) end + +--- Display a number at (x,y) +--- @since 2.0.0 +---@param x integer starting coordinate +---@param y integer starting coordinate +---@param value integer value to display +---@param flags? integer please see the Lcd functions overview +---@param inverscolor? unknown overrides the inverse text color for INVERS +function lcd.drawNumber(x, y, value, flags, inverscolor) end + +--- Draw a pie slice +--- @since 2.4.0 +---@param x integer coordinates of the center +---@param y integer coordinates of the center +---@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 the Lcd functions overview +function lcd.drawPie(x, y, r, start, end, flags) end + +--- Draw a bitmap at (x,y) +--- @since 2.0.0 +---@param x integer starting coordinates +---@param y integer starting coordinates +---@param name string full path to the bitmap on SD card (i.e. “/IMAGES/test.bmp”) +function lcd.drawPixmap(x, y, name) end + +--- Draw a single pixel at (x,y) position +--- @since 2.0.0 +---@param x integer x position +---@param y integer y position +---@param flags? integer please see the Lcd functions overview +function lcd.drawPoint(x, y, flags) end + +--- Draw a rectangle from top left corner (x,y) of specified width and height +--- @since 2.0.0 +---@param x integer top left corner position +---@param y integer top left corner position +---@param w integer width in pixels +---@param h integer height in pixels +---@param flags? integer please see the Lcd functions overview +---@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 + +--- Draw a title bar +--- @since 2.0.0 +---@param title string text for the title +---@param page integer page number +---@param pages integer total number of pages. Only used as indicator on the right side of title bar. (i.e. idx=2, cnt=5, display 2/5) +function lcd.drawScreenTitle(title, page, pages) end + +--- Displays the name of the corresponding input as defined by the source at (x,y) +--- @since 2.0.0 +---@param x integer starting coordinate +---@param y integer starting coordinate +---@param source integer source index +---@param flags? integer please see the Lcd functions overview +function lcd.drawSource(x, y, source, flags) end + +--- Draw a text representation of switch at (x,y) +--- @since 2.0.0 +---@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 the Lcd functions overview, only SMLSIZE, BLINK and INVERS. +function lcd.drawSwitch(x, y, switch, flags) end + +--- Draw a text beginning at (x,y) +--- @since 2.0.0 +---@param x integer starting coordinate +---@param y integer starting coordinate +---@param text string text to display +---@param flags? integer please see the Lcd functions overview for drawing flags and colors, and the Appendix for available characters in each font set. +---@param inverscolor? unknown overrides the inverse text color for INVERS +function lcd.drawText(x, y, text, flags, inverscolor) end + +--- Draw text inside rectangle (x,y,w,h) with line breaks +--- @since 2.5.0 +---@param x integer starting coordinate +---@param y integer starting coordinate +---@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 the Lcd functions overview for drawing flags and colors, and the Appendix 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 + +--- Display a value formatted as time at (x,y) +--- @since 2.0.0 +---@param x integer starting coordinate +---@param y integer starting coordinate +---@param value integer time in seconds +---@param flags? integer please see the Lcd functions overview +---@param inverscolor? unknown overrides the inverse text color for INVERS +function lcd.drawTimer(x, y, value, flags, inverscolor) end + +--- Draw a triangle +--- @since 2.4.0 +---@param x1 integer coordinates of the three vertices +---@param y1 integer coordinates of the three vertices +---@param x2 integer coordinates of the three vertices +---@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 the Lcd functions overview +function lcd.drawTriangle(x1, y1, x2, y2, x3, y3, flags) end + +--- Exit full screen widget mode. +--- @since 2.5.0 +function lcd.exitFullScreen() end + +--- Get the color value from flags +--- @since 2.3.11 +---@param flags integer please see the Lcd functions overview +---@return integer color +function lcd.getColor(flags) end + +--- Returns the leftmost x position from previous drawtext or drawNumber output +--- @since 2.2.0 +---@return integer number +function lcd.getLastLeftPos() end + +--- Returns the rightmost x position from previous output +--- @since 2.0.0 +---@return integer number +function lcd.getLastPos() end + +--- Returns the rightest x position from previous drawtext or drawNumber output +--- @since 2.2.0 +---@return integer number +function lcd.getLastRightPos() end + +--- Invert a rectangle zone from top left corner (x,y) of specified width and height +--- @since 2.8.0 +---@param x integer top left corner position +---@param y integer top left corner position +---@param w integer width in pixels +---@param h integer height in pixels +---@param flags? integer please see the Lcd functions overview +function lcd.invertRect(x, y, w, h, flags) end + +--- Refresh the LCD screen +--- @since 2.2.0 +function lcd.refresh() end + +--- Reset the backlight timeout +--- @since 2.3.6 +function lcd.resetBacklightTimeout() end + +--- Change an indexed color (theme colors and CUSTOM_COLOR). Please see the Lcd functions overview for indexed color constants +--- @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 the Lcd functions overview +---@return integer w_h +function lcd.sizeText(text, flags) end diff --git a/website/md-docs/assets/luals/lvgl.d.lua b/website/md-docs/assets/luals/lvgl.d.lua new file mode 100644 index 000000000..d03f10350 --- /dev/null +++ b/website/md-docs/assets/luals/lvgl.d.lua @@ -0,0 +1,326 @@ +---@meta + +-- GENERATED FILE — do not hand-edit. +-- Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +-- To fix API facts: edit the upstream EdgeTX /*luadoc*/ comment, then +-- re-extract and rebuild. To add narrative content: edit +-- docs-system/overlays/<doc_id>.md, then rebuild. + +--- LCD line pattern selector such as SOLID or DOTTED. +---@alias pen_type integer +--- Text rendering flags used by legacy LCD number APIs. +---@alias text_flags integer +--- Packed 16-bit RGB color value for color LCD APIs. +---@alias lcd_color_RGB565 integer +--- Font size selector such as XXLSIZE, DBLSIZE, MIDSIZE, or SMLSIZE. +---@alias lcd_font_size integer +--- Bitmask of LCD text rendering flags such as INVERS, BLINK, and SHADOWED. +---@alias lcd_text_flags integer +--- Combined LCD text formatting bitmask covering font size and text flags. +---@alias lcd_text_format integer +--- Signed EdgeTX source value in the normalized range from -1024 to 1024. +---@alias source_range_1024 integer +--- Global timer selector such as all, total, session, throttle, or throttlepct. +---@alias timer_type string +--- Telemetry unit identifier from the EdgeTX unit list. +---@alias unit_type integer +--- Telemetry precision selector controlling decimal places. +---@alias prec_type integer + +---@class lvgl +lvgl = {} + +--- Display a button showing a text alignment name. Tapping it opens a popup menu to choose an alignment from, using EdgeTX styling. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * get (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected alignment, defaults to nil * set (function) called when the user taps an alignment in the popup; passed the selected alignment value, defaults to nil +---@return table +function lvgl.align(parent, params) end + +--- Display an arc. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * thickness (number) width of the arc's line, defaults to 1 * radius (number or function) radius of the arc, defaults to 0 * startAngle (number or function) starting angle in degrees (0-360), 0 is 3 o'clock, defaults to 0 * endAngle (number or function) ending angle in degrees, defaults to 360 * opacity (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 * rounded (boolean) if true the ends of the arc are rounded, defaults to false * bgColor (color or function) color of the background arc, not used by default * bgOpacity (number or function) opacity of the background arc, defaults to 0 (not visible) * bgStartAngle (number or function) starting angle of the background arc in degrees, defaults to 0 * bgEndAngle (number or function) ending angle of the background arc in degrees, defaults to 360 +---@return table +function lvgl.arc(parent, params) end + +--- Create a container for managing object layout. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * flexFlow (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default * flexPad (number) padding between rows/columns when flex layout is used; recommend using lvgl.PAD_xxx values, defaults to PAD_OUTLINE * scrollBar (boolean) enables/disables scroll bars, defaults to true * scrollDir (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the box bounds (stand alone scripts only), defaults to lvgl.SCROLL_ALL * scrolled (function) called when the box content is scrolled; passed x, y of the current scroll position, defaults to nil * scrollTo (function) overrides the box scroll position; must return x, y to scroll to, defaults to nil * align (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4); avoid combining an alignment with a scrollbar on the same axis, defaults to CENTER | VTOP * borderPad (number or table) border padding around the container edges; a single number applies to all sides, or a table {left=?, right=?, top=?, bottom=?} (added in 2.11.5), defaults to PAD_OUTLINE if flexFlow is set, otherwise 0 +---@return table +function lvgl.box(parent, params) end + +--- Build a complex UI in a single operation from a table of object definitions. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the built objects to; if omitted they attach to the top-level script window +---@param params table a table of tables, each defining one LVGL object: * type (string or type constant) mandatory, selects the kind of object to create, e.g. "rectangle" or lvgl.RECTANGLE; named type constants (e.g. lvgl.RECTANGLE) added in 2.11.4, string names work in all versions * name (string) optional name used to look up this object in the returned table, defaults to an empty string * children (table) optional nested table of the same shape, to create child objects * any other key accepted by the constructor function for the chosen type +---@return table +function lvgl.build(parent, params) end + +--- Add a text button using the EdgeTX style. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * text (string or function) text displayed in the button, defaults to an empty string * press (function) called when the user taps the button, after releasing ENTER or the screen; may optionally return a non-zero integer to display the button in the checked state, defaults to nil * longpress (function) called on a long tap; may optionally return a non-zero integer to display the button in the checked state, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * checked (boolean) sets the initial checked state; can be updated with lvgl.set(), defaults to false * color (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color * textColor (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color * cornerRadius (number) radius for the button's corners, defaults to the EdgeTX button style radius * font (font value or function) sets the font size, e.g. MIDSIZE, DBLSIZE; defaults to STDSIZE +---@return table +function lvgl.button(parent, params) end + +--- Display a button showing an option value. Tapping it opens a popup menu of options to choose from, using EdgeTX styling. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * title (string) text displayed in the popup menu's header, defaults to an empty string * values (table) simple table of option strings shown in the popup; can be changed via lvgl.set() since 2.11.6, defaults to an empty list * get (function) called on every refresh cycle to keep the displayed value in sync, to get the index of the currently selected option (1..number of values), defaults to nil * set (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * filter (function) called for each option when the popup opens, passed the option's index; return true to show it, false to hide it, defaults to nil * popupWidth (number) width of the popup window, defaults to 0 (use default width) +---@return table +function lvgl.choice(parent, params) end + +--- Display a solid or outlined circle. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * thickness (number) width of the border line, defaults to 1 * filled (boolean) if true the circle is filled with color, defaults to false * radius (number or function) radius of the circle, defaults to 0 * opacity (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 +---@return table +function lvgl.circle(parent, params) end + +--- Delete LVGL objects. +--- @since 2.11.0 +---@param parent? object optional LVGL object whose children should be deleted; if omitted, the entire script UI is deleted +---@return unknown none +function lvgl.clear(parent) end + +--- Close an LVGL object that represents a closable container or dialog. +--- @since 2.11.0 +---@param obj object LVGL object previously created by the lvgl library +---@return unknown none +function lvgl.close(obj) end + +--- Display a button showing a color swatch. Tapping it opens the color picker dialog, using EdgeTX styling. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * get (function) called once when the object is created, to get the initial color, defaults to nil * set (function) called when the user picks a color; passed the selected color value, defaults to nil +---@return table +function lvgl.color(parent, params) end + +--- Display a Yes/No confirmation dialog box. +--- @since 2.11.0 +---@param params table * title (string) text displayed in the dialog's header, defaults to an empty string * message (string) text displayed in the dialog's body, defaults to an empty string * confirm (function) called when the user taps Yes, defaults to nil * cancel (function) called when the user taps No, defaults to nil +---@return unknown none +function lvgl.confirm(params) end + +--- Display a dialog box. +--- @since 2.11.0 +---@param params table * title (string) text displayed in the dialog's header, defaults to an empty string * close (function) called when the dialog is closed, defaults to nil * flexFlow (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this box, not used by default * flexPad (number) padding between rows/columns when flex layout is used, defaults to PAD_OUTLINE +---@return table +function lvgl.dialog(params) end + +--- Disable interaction for an LVGL control object. +--- @since 2.11.0 +---@param obj object LVGL object previously created by the lvgl library +---@return unknown none +function lvgl.disable(obj) end + +--- Enable interaction for an LVGL control object. +--- @since 2.11.0 +---@param obj object LVGL object previously created by the lvgl library +---@return unknown none +function lvgl.enable(obj) end + +--- If the script is running in full screen mode, return it to normal mode. +--- @since 2.11.0 +---@return unknown none +function lvgl.exitFullScreen() end + +--- Display a button showing a filename. Tapping it opens a popup file picker, using EdgeTX styling. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * title (string) text displayed in the popup's header, defaults to an empty string * get (function) called when the popup is opened, and after the selection changes, to get the currently selected filename; must return a string, defaults to nil * set (function) called when the user picks a file; passed the selected filename (without path), defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * folder (string) SD card folder to browse for files, defaults to nil * extension (string) extension filter, e.g. .png or concatenated .png.bmp to match multiple, defaults to nil (no filter) * hideExtension (boolean) if true, the extension is stripped before set is called and hidden in the picker list, defaults to false * maxLen (number) maximum filename length (measured after hideExtension stripping, if set); files with longer names are not shown in the picker list, defaults to 255 +---@return table +function lvgl.file(parent, params) end + +--- Display a button showing a font name. Tapping it opens a popup menu to choose a font from, using EdgeTX styling. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * get (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected font, defaults to nil * set (function) called when the user taps a font in the popup; passed the selected font value, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil +---@return table +function lvgl.font(parent, params) end + +--- For a widget script, returns the local instance table created by (and returned from) the script's `create()` function. +--- @since 2.11.0 +---@return table +function lvgl.getContext() end + +--- Get the current scroll position of a container object. +--- @since 2.11.2 +---@param parent object LVGL container object (e.g. box, rectangle, or page) +---@return unknown number +function lvgl.getScrollPos(parent) end + +--- Hide an LVGL object. +--- @since 2.11.0 +---@param parent object LVGL object to hide +---@return unknown none +function lvgl.hide(parent) end + +--- Display a horizontal line. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * rounded (boolean) if true the line's end caps are rounded, defaults to false * opacity (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 * dashGap (number) gap size for dashed lines, defaults to 0 * dashWidth (number) dash size for dashed lines, defaults to 0; both dashGap and dashWidth must be > 0 to draw dashed lines +---@return table +function lvgl.hline(parent, params) end + +--- Display an image, centered in the frame `(x, y, w, h)`. Images can be scaled to fit entirely within the frame or to fill it completely. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * file (string) full path to the image file on the SD card, defaults to an empty string * fill (boolean) if true the image is scaled to completely fill the frame (may be cropped); if false it is scaled to fit entirely within the frame (may have empty borders), defaults to false +---@return table +function lvgl.image(parent, params) end + +--- Test if the script is running in App Mode. +--- @since 2.11.0 +---@return boolean +function lvgl.isAppMode() end + +--- Test if the script is running in full screen mode. +--- @since 2.11.0 +---@return boolean +function lvgl.isFullScreen() end + +--- Display a text label. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * text (string or function) text to display, defaults to an empty string * font (font value or function) sets the font size, e.g. MIDSIZE, DBLSIZE; defaults to STDSIZE * align (text alignment value or function) sets the text justification, e.g. RIGHT, VCENTER; defaults to LEFT. RIGHT/CENTER require w to be set. LEFT/RIGHT/CENTER align text horizontally within the label's bounding box (x,y,w,h); VCENTER/VTOP/VBOTTOM align the label's bounding box vertically within the parent object +---@return table +function lvgl.label(parent, params) end + +--- Display one or more connected line segments. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * rounded (boolean) if true the line's end caps are rounded, defaults to false * thickness (number) thickness of each line segment, defaults to 1 * opacity (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 * pts (table or function) table of points, each a {x, y} pair; at least two points are required, defaults to nil +---@return table +function lvgl.line(parent, params) end + +--- Open a popup menu with multiple options to choose from, using EdgeTX styling. +--- @since 2.11.1 +---@param params table * title (string) text displayed in the popup's header, defaults to an empty string * values (table) simple table of option strings shown in the popup, defaults to an empty list * get (function) called when the popup is opened, to get the index of the currently selected option (1..number of values), defaults to nil * set (function) called when the user taps a menu item; passed the selected item's index (1..number of values), defaults to nil +---@return unknown none +function lvgl.menu(params) end + +--- Display a message dialog box. +--- @since 2.11.0 +---@param params table * title (string) text displayed in the dialog's header, defaults to an empty string * message (string) text displayed in the dialog's body, defaults to an empty string * details (string) additional text displayed in the dialog's body, defaults to an empty string +---@return unknown none +function lvgl.message(params) end + +--- Add a momentary text button using the EdgeTX style. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * text (string or function) text displayed in the button, defaults to an empty string * press (function) called immediately when the user first taps the button or presses ENTER, defaults to nil * release (function) called when the user releases ENTER or stops touching the screen, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * color (color or function) background color, defaults to the EdgeTX button style PRIMARY2 theme color * textColor (color or function) text color, defaults to the EdgeTX button style SECONDARY1 theme color * cornerRadius (number) radius for the button's corners, defaults to the EdgeTX button style radius * font (font value or function) sets the font size, e.g. MIDSIZE, DBLSIZE; defaults to STDSIZE +---@return table +function lvgl.momentaryButton(parent, params) end + +--- Add a number edit box using the EdgeTX style. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * get (function) called to get the current value to display, defaults to nil * set (function) called for every change to the number while editing; passed the new value, defaults to nil * edited (function) called after the user finishes editing; passed the final value (added in 2.11.5), defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * min (number) minimum allowed value, defaults to -1024 * max (number) maximum allowed value, defaults to 1024 * display (function) overrides how the value is displayed; passed the current value, must return a string, defaults to nil +---@return table +function lvgl.numberEdit(parent, params) end + +--- Create a page layout for a One-Time script using EdgeTX styling: a header with title/sub-title lines and a back button in the top-left corner. Should be created as the top-level LVGL object, with all other objects added as its children. +--- @since 2.11.0 +---@param params table * title (string or function) title text in the header; function support added in 2.11.4, defaults to an empty string * subtitle (string or function) sub-title text in the header; function support added in 2.11.4, defaults to an empty string * icon (string) full path to a 30x30 grey-scale mask image for the back button icon (white = transparent, black = opaque); defaults to the EdgeTX logo icon * back (function) called when RTN is pressed, or when the back button is tapped -- the top-left header button if backButton is not set, otherwise a second button on the top-right, defaults to nil * menu (function) called when the top-left header button is tapped, but only if backButton is set to true -- in that case back moves to a second button on the top-right, defaults to nil * prevButton (table) adds a prev navigation button; table has a press function and optional active function (added in 2.11.4), defaults to nil * nextButton (table) adds a next navigation button; table has a press function and optional active function (added in 2.11.4), defaults to nil * flexFlow (lvgl.FLOW_COLUMN or lvgl.FLOW_ROW) enables flex layout for this page, not used by default * flexPad (number) padding between rows/columns when flex layout is used, defaults to PAD_OUTLINE * scrollBar (boolean) enables/disables scroll bars, defaults to true * scrollDir (lvgl.SCROLL_xx) allowed scroll directions when child objects extend past the page bounds (stand alone scripts only), defaults to lvgl.SCROLL_ALL * scrolled (function) called when the page content is scrolled; passed x, y of the current scroll position, defaults to nil * scrollTo (function) overrides the page scroll position; must return x, y to scroll to, defaults to nil * align (alignment type (LEFT, RIGHT, CENTER, VTOP, VBOTTOM, VCENTER)) alignment used with flex layouts (added in 2.11.4), defaults to CENTER | VTOP * backButton (boolean) if true, adds a second header button on the top-right calling back, and repurposes the top-left button to call menu instead (added in 2.11.4), defaults to false * borderPad (number or table) border padding around the container edges; a single number applies to all sides, or a table {left=?, right=?, top=?, bottom=?} (added in 2.11.5), defaults to PAD_OUTLINE if flexFlow is set, otherwise 0 +---@return table +function lvgl.page(params) end + +--- Display a QR code. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * data (string) URL or other content to encode, defaults to an empty string * bgColor (color) background color for the QR code image, defaults to COLOR_THEME_SECONDARY3 +---@return table +function lvgl.qrcode(parent, params) end + +--- Display a rectangle. Based on `lvgl.box`, so all `lvgl.box` settings also apply. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * thickness (number) width of the border line, defaults to 1 * filled (boolean or function) if true the rectangle is filled with color, defaults to false (function support added in 2.11.4) * rounded (number) if greater than 0, rounds the corners with this radius; must be >= thickness if set, defaults to 0 * opacity (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 +---@return table +function lvgl.rectangle(parent, params) end + +--- Update the settings of an existing LVGL object. Can also be used to change settings that have no dedicated update function (e.g. rectangle thickness). Can also be called as `parent:set(params)`. +--- @since 2.11.0 +---@param parent object LVGL object to update; unlike the constructor functions, this parameter is required, not optional +---@param params table settings to update; use the same keys documented for the object's constructor function +---@return unknown none +function lvgl.set(parent, params) end + +--- Create a container for a single row of a settings page, automatically padded for controls such as toggle/textEdit/button. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * title (string or function) text displayed on the left; function support added in 2.11.6, defaults to an empty string +---@return table +function lvgl.setting(parent, params) end + +--- Show an LVGL object. +--- @since 2.11.0 +---@param parent object LVGL object to show +---@return unknown none +function lvgl.show(parent) end + +--- Add a horizontal slider using the EdgeTX style. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * min (number) minimum value at the left end of the range, defaults to 0 * max (number) maximum value at the right end of the range, defaults to 100 * get (function) called to get the current knob value; should return a value between min and max inclusive, defaults to nil * set (function) called when the user moves the knob; passed the new value, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil +---@return table +function lvgl.slider(parent, params) end + +--- Display a button showing a source name. Tapping it opens the source-select popup, using EdgeTX styling. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * get (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected source, defaults to nil * set (function) called when the user picks a source; passed the selected source value, defaults to nil * filter (number) controls which source types the user can pick; combine lvgl.SRC_xxx constants to build a custom filter, defaults to lvgl.SRC_ALL +---@return table +function lvgl.source(parent, params) end + +--- Display a button showing a switch name. Tapping it opens the switch-select popup, using EdgeTX styling. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * get (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected switch, defaults to nil * set (function) called when the user picks a switch; passed the selected switch value, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil * filter (number) controls which switch types the user can pick; combine lvgl.SW_xxx constants to build a custom filter, defaults to lvgl.SW_ALL +---@return table +function lvgl.switch(parent, params) end + +--- Add a text edit box using the EdgeTX style. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * value (string or function) text to edit; if a function, the text can be changed by both script and user, defaults to an empty string * length (number) maximum editable text length, 1 to 128, defaults to 32 * set (function) called when the user edits the text; passed the new string content, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil +---@return table +function lvgl.textEdit(parent, params) end + +--- Display a button showing a timer name. Tapping it opens a popup menu to choose a timer from, using EdgeTX styling. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * get (function) called on every refresh cycle to keep the displayed value in sync, to get the currently selected timer, defaults to nil * set (function) called when the user taps a timer in the popup; passed the selected timer value, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil +---@return table +function lvgl.timer(parent, params) end + +--- Add a toggle switch using the EdgeTX style. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * get (function) called to get the current state; must return a boolean or number (0/false = off, 1/true = on), defaults to nil * set (function) called when the user interacts with the switch; passed a single number, 0 = off, 1 = on, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil +---@return table +function lvgl.toggle(parent, params) end + +--- Display a filled triangle. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * opacity (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 * pts (table or function) table of exactly three points, each a {x, y} pair, defaults to nil +---@return table +function lvgl.triangle(parent, params) end + +--- Add a vertical slider using the EdgeTX style. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * min (number) minimum value at the bottom end of the range, defaults to 0 * max (number) maximum value at the top end of the range, defaults to 100 * get (function) called to get the current knob value; should return a value between min and max inclusive, defaults to nil * set (function) called when the user moves the knob; passed the new value, defaults to nil * active (function) sets the enabled/disabled state; must return a boolean, true to enable, defaults to nil +---@return table +function lvgl.verticalSlider(parent, params) end + +--- Display a vertical line. +--- @since 2.11.0 +---@param parent? object optional LVGL object to attach the new object to; if omitted the object is created in the top-level script window +---@param params table * x (number) position relative to the top-left of the parent * y (number) position relative to the top-left of the parent * w (number) width * h (number) height * color (color or function) primary color for the object * pos (function) dynamic position callback returning x, y * size (function) dynamic size callback returning w, h * visible (function) dynamic visibility callback * floating (boolean) keep the object fixed inside a scrollable container, added in 2.11.6, defaults to false * rounded (boolean) if true the line's end caps are rounded, defaults to false * opacity (number or function) opacity from 0 (transparent) to 255 (opaque), defaults to 255 * dashGap (number) gap size for dashed lines, defaults to 0 * dashWidth (number) dash size for dashed lines, defaults to 0; both dashGap and dashWidth must be > 0 to draw dashed lines +---@return table +function lvgl.vline(parent, params) end diff --git a/website/md-docs/assets/luals/model.d.lua b/website/md-docs/assets/luals/model.d.lua new file mode 100644 index 000000000..7eb9437f7 --- /dev/null +++ b/website/md-docs/assets/luals/model.d.lua @@ -0,0 +1,259 @@ +---@meta + +-- GENERATED FILE — do not hand-edit. +-- Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +-- To fix API facts: edit the upstream EdgeTX /*luadoc*/ comment, then +-- re-extract and rebuild. To add narrative content: edit +-- docs-system/overlays/<doc_id>.md, then rebuild. + +--- LCD line pattern selector such as SOLID or DOTTED. +---@alias pen_type integer +--- Text rendering flags used by legacy LCD number APIs. +---@alias text_flags integer +--- Packed 16-bit RGB color value for color LCD APIs. +---@alias lcd_color_RGB565 integer +--- Font size selector such as XXLSIZE, DBLSIZE, MIDSIZE, or SMLSIZE. +---@alias lcd_font_size integer +--- Bitmask of LCD text rendering flags such as INVERS, BLINK, and SHADOWED. +---@alias lcd_text_flags integer +--- Combined LCD text formatting bitmask covering font size and text flags. +---@alias lcd_text_format integer +--- Signed EdgeTX source value in the normalized range from -1024 to 1024. +---@alias source_range_1024 integer +--- Global timer selector such as all, total, session, throttle, or throttlepct. +---@alias timer_type string +--- Telemetry unit identifier from the EdgeTX unit list. +---@alias unit_type integer +--- Telemetry precision selector controlling decimal places. +---@alias prec_type integer + +---@class model +model = {} + +--- Set all inputs to defaults +--- @since 2.0.0 +function model.defaultInputs() end + +--- Clear all flightModes +--- @since 2.3.10 +function model.deleteFlightModes() end + +--- Delete line from specified input +--- @since 2.0.0 +---@param input integer input number (use 0 for Input1) +---@param line integer input line (use 0 for first line) +function model.deleteInput(input, line) end + +--- Delete all Inputs +--- @since 2.0.0 +function model.deleteInputs() end + +--- Delete mixer line from specified Channel +--- @since 2.0.0 +---@param channel integer channel number (use 0 for CH1) +---@param line integer mix number (use 0 for first line(mix)) +function model.deleteMix(channel, line) end + +--- Remove all mixers +--- @since 2.0.0 +function model.deleteMixes() end + +--- Get Curve parameters +--- @since 2.0.12 +---@param curve integer curve number (use 0 for Curve1) +---@return nil +---@return table +function model.getCurve(curve) end + +--- Get Custom Function parameters +--- @since 2.0.0 +---@param function integer custom function number (use 0 for CF1) +---@return nil +---@return table +function model.getCustomFunction(function) end + +--- +--- @since 2.3.10 +---@param index integer flight mode number (use 0 for FM0) +---@return nil +---@return table +function model.getFlightMode(index) end + +--- Return current global variable value +--- @since unknown +---@param index integer zero based global variable index, use 0 for GV1, 8 for GV9 +---@param flight_mode integer Flight mode number (0 = FM0, 8 = FM8) +---@return nil +---@return integer +function model.getGlobalVariable(index, flight_mode) end + +--- Returns details about a Global Variable, but not values +--- @since 2.11.0 +---@param index integer zero based global variable index, use 0 for GV1, 8 for GV9 +---@return table +function model.getGlobalVariableDetails(index) end + +--- Get current Model information +--- @since 2.0.6 +---@return table +function model.getInfo() end + +--- Return input data for given input and line number +--- @since 2.0.0 +---@param input integer input number (use 0 for Input1) +---@param line integer input line (use 0 for first line) +---@return nil +---@return table +function model.getInput(input, line) end + +--- Return number of lines for given input +--- @since 2.0.0 +---@param input integer input number (use 0 for Input1) +---@return integer +function model.getInputsCount(input) end + +--- Get Logical Switch parameters +--- @since 2.0.0 +---@param switch integer logical switch number (use 0 for LS1) +---@return nil +---@return table +function model.getLogicalSwitch(switch) end + +--- Get configuration for specified Mix +--- @since 2.0.0 +---@param channel integer channel number (use 0 for CH1) +---@param line integer mix number (use 0 for first line(mix)) +---@return nil +---@return table +function model.getMix(channel, line) end + +--- Get the number of Mixer lines that the specified Channel has +--- @since 2.0.0 +---@param channel integer channel number (use 0 for CH1) +---@return integer +function model.getMixesCount(channel) end + +--- Get RF module parameters +--- @since 2.2.0 +---@param index integer module index (0 for internal, 1 for external) +---@return nil +---@return table +function model.getModule(index) end + +--- Get servo parameters +--- @since 2.0.0 +---@param index integer output number (use 0 for CH1) +---@return nil +---@return table +function model.getOutput(index) end + +--- Get Telemetry Sensor parameters +--- @since 2.3.0 +---@param sensor integer sensor number (use 0 for sensor 1) +---@return nil +---@return table +function model.getSensor(sensor) end + +--- Get heli swash parameters +--- @since 2.8.0 +---@return table +function model.getSwashRing() end + +--- Get model timer parameters +--- @since 2.0.0 +---@param timer integer timer index (0 for Timer 1) +---@return nil +---@return table +function model.getTimer(timer) end + +--- Insert an Input at specified line +--- @since 2.0.0 +---@param input integer input number (use 0 for Input1) +---@param line integer input line (use 0 for first line) +---@param value table input data, see model.getInput() +function model.insertInput(input, line, value) end + +--- Insert a mixer line into Channel +--- @since 2.0.0 +---@param channel integer channel number (use 0 for CH1) +---@param line integer mix number (use 0 for first line(mix)) +---@param value table see model.getMix() for table format +function model.insertMix(channel, line, value) end + +--- Reset Telemetry Sensor parameters +--- @since 2.3.11 +---@param sensor integer sensor number (use 0 for sensor 1) +---@return nil +function model.resetSensor(sensor) end + +--- Reset model timer to a startup value +--- @since unknown +---@param timer integer timer index (0 for Timer 1) +function model.resetTimer(timer) end + +--- Set Curve parameters +--- @since 2.2.0 +---@param curve integer curve number (use 0 for Curve1) +---@param params integer see model.getCurve return format for table format. setCurve uses standard lua array indexing and arrays start at index 1 +---@return integer 0 +function model.setCurve(curve, params) end + +--- Set Custom Function parameters +--- @since 2.0.0 +---@param function integer custom function number (use 0 for CF1) +---@param value table custom function parameters, see model.getCustomFunction() for table format +function model.setCustomFunction(function, value) end + +--- Set Flight mode parameters +--- @since 2.3.10 +---@param index integer flight mode number (use 0 for FM0) +---@param params unknown see model.getFlightMode return format for table format. +function model.setFlightMode(index, params) end + +--- Sets current global variable value. See also model.getGlobalVariable() +--- @since unknown +---@param index integer zero based global variable index, use 0 for GV1, 8 for GV9 +---@param flight_mode integer Flight mode number (0 = FM0, 8 = FM8) +---@param value unknown new value for global variable. Permitted range is from -1024 to 1024. +function model.setGlobalVariable(index, flight_mode, value) end + +--- Sets details about a Global Variable, but not values +--- @since 2.11.0 +---@param index integer zero based global variable index, use 0 for GV1, 8 for GV9 +---@param params table see model.getGlobalVariableDetails(index) return format for table format +---@return unknown none +function model.setGlobalVariableDetails(index, params) end + +--- Set the current Model information +--- @since 2.0.6 +---@param value unknown model information data, see model.getInfo() +function model.setInfo(value) end + +--- Set Logical Switch parameters +--- @since 2.0.0 +---@param switch integer logical switch number (use 0 for LS1) +---@param value table see model.getLogicalSwitch() for table format +function model.setLogicalSwitch(switch, value) end + +--- Set RF module parameters +--- @since 2.2.0 +---@param index integer module index (0 for internal, 1 for external) +---@param value unknown module parameters, see model.getModule() +function model.setModule(index, value) end + +--- Set servo parameters +--- @since 2.0.0 +---@param index integer channel number (use 0 for CH1) +---@param value table servo parameters, see model.getOutput() for table format +function model.setOutput(index, value) end + +--- Set heli swash parameters +--- @since 2.8.0 +---@param params table swash ring parameters, see model.getSwashRing() for table format +function model.setSwashRing(params) end + +--- Set model timer parameters +--- @since 2.0.0 +---@param timer integer timer index (0 for Timer 1) +---@param value unknown timer parameters, see model.getTimer() +function model.setTimer(timer, value) end diff --git a/website/md-docs/assets/luals/runtime.d.lua b/website/md-docs/assets/luals/runtime.d.lua new file mode 100644 index 000000000..0f16167c9 --- /dev/null +++ b/website/md-docs/assets/luals/runtime.d.lua @@ -0,0 +1,514 @@ +---@meta + +-- GENERATED FILE — do not hand-edit. +-- Regenerated by `tools/docs_pipeline.py build` (see docs-system/README.md). +-- To fix API facts: edit the upstream EdgeTX /*luadoc*/ comment, then +-- re-extract and rebuild. To add narrative content: edit +-- docs-system/overlays/<doc_id>.md, then rebuild. + +--- LCD line pattern selector such as SOLID or DOTTED. +---@alias pen_type integer +--- Text rendering flags used by legacy LCD number APIs. +---@alias text_flags integer +--- Packed 16-bit RGB color value for color LCD APIs. +---@alias lcd_color_RGB565 integer +--- Font size selector such as XXLSIZE, DBLSIZE, MIDSIZE, or SMLSIZE. +---@alias lcd_font_size integer +--- Bitmask of LCD text rendering flags such as INVERS, BLINK, and SHADOWED. +---@alias lcd_text_flags integer +--- Combined LCD text formatting bitmask covering font size and text flags. +---@alias lcd_text_format integer +--- Signed EdgeTX source value in the normalized range from -1024 to 1024. +---@alias source_range_1024 integer +--- Global timer selector such as all, total, session, throttle, or throttlepct. +---@alias timer_type string +--- Telemetry unit identifier from the EdgeTX unit list. +---@alias unit_type integer +--- Telemetry precision selector controlling decimal places. +---@alias prec_type integer + +--- Returns gray value which can be used in LCD functions +--- @since 2.0.13 +---@return integer +function GREY() end + +--- This functions allows for sending SPORT / ACCESS telemetry data toward the receiver, +and more generally, to anything connected SPORT bus on the receiver or transmitter. +--- @since 2.3 +---@param module integer module index (0 = internal, 1 = external) +---@param rxuid integer receiver index +---@param sensorid unknown physical sensor ID +---@param frameid unknown frame ID +---@param dataid unknown data ID +---@param value unknown value +---@return boolean +function accessTelemetryPush(module, rxuid, sensorid, frameid, dataid, value) end + +--- Apply RGB led colors previously defined by setRGBLedColor +--- @since 2.10 +function applyRGBLedColors() end + +--- Change the working directory +--- @since 2.3.0 +---@param directory string New working directory +function chdir(directory) end + +--- Pops a received Crossfire Telemetry packet from the queue. +--- @since 2.2.0 +---@return nil +---@return integer command +---@return table packet +function crossfireTelemetryPop() end + +--- This functions allows for sending telemetry data toward the TBS Crossfire link. +--- @since 2.2.0 +---@param command unknown command +---@param data table table of data bytes +---@return boolean +---@return nil +function crossfireTelemetryPush(command, data) end + +--- Get channel assigned to stick. See Default Channel Order in General Settings +--- @since 2.0.0 +---@param stick integer stick number (from 0 to 3) +---@return integer +---@return nil +function defaultChannel(stick) end + +--- Get stick that is assigned to a channel. See Default Channel Order in General Settings. +--- @since 2.0.0 +---@param channel integer channel number (0 means CH1) +---@return integer +function defaultStick(channel) end + +--- Returns FRESULT (e.g. 0=OK, 4=File not found, 5=Path not found, 6=Path invalid) +--- @since 2.9.0 +function del() end + +--- Return an iterator listing all the files and directories name in a directory +--- @since 2.5.0 +---@param directory string Working directory +function dir(directory) end + +--- flushes audio queue +--- @since unknown +function flushAudio() end + +--- Checks the existence of file or directory. + If not exist, return nil. + If exist, return the object information. +--- @since 2.5.0 +---@param path string path to the object +---@return table +function fstat(path) end + +--- Get available memory remaining in the Heap for Lua. +--- @since unknown +---@return integer usage +function getAvailableMemory() end + +--- Return current system date and time that is kept by the RTC unit +--- @since unknown +---@return table +function getDateTime() end + +--- Return detailed information about field (source) +--- @since 2.0.8 +---@param source string can be an index (number) (which was obtained by getFieldInfo or getSourceIndex) or a name (string) of the source. +---@return table +---@return nil +function getFieldInfo(source) end + +--- Return flight mode data. +--- @since 2.1.7 +---@param mode integer flight mode number to return (0 - 8). If mode parameter is not specified (or contains invalid value), then the current flight mode data is returned. +---@return integer current_flight_mode_number_0_8 +---@return string current_flight_mode_name +function getFlightMode(mode) end + +--- Returns (some of) the general radio settings +--- @since 2.0.6 +---@return table +function getGeneralSettings() end + +--- Returns radio timers +--- @since unknown +---@return table +function getGlobalTimer() end + +--- +--- @since 2.6 +---@param id integer identifying the logical switch (zero for LS1 etc.). +---@return true/false value +function getLogicalSwitchValue(id) end + +--- +--- @since 2.8.0 +---@param outputindex integer identifying the output channel number 0 for CH1, up to MAX_OUTPUT_CHANNELS - 1. +---@return integer +function getOutputValue(outputindex) end + +--- Return the RAS value or nil if no valid hardware found +--- @since 2.2.0 +---@return integer +function getRAS() end + +--- Get RSSI value as well as low and critical RSSI alarm levels (in dB) +--- @since 2.2.0 +---@return unknown rssi +---@return unknown alarm_low +---@return unknown alarm_crit +function getRSSI() end + +--- Return rotary encoder mode +--- @since 2.8.0 +---@return integer +function getRotEncMode() end + +--- Return rotary encoder current speed +--- @since 2.3.10 +---@return integer +function getRotEncSpeed() end + +--- Return current RTC system date as unix timstamp (in seconds since 1. Jan 1970) +--- @since unknown +---@return integer +function getRtcTime() end + +--- +--- @since 2.6 +---@param id integer between 1 and 16 identifying the shared memory variable. +---@return integer value +function getShmVar(id) end + +--- +--- @since 2.6 +---@param sourcename string naming a value source as it is shown on radio menus where you can select it. Notice that many names have special characters in them. +---@return integer sourceindex +function getSourceIndex(sourcename) end + +--- +--- @since 2.6 +---@param sourceindex integer identifying a value source as returned by getSourceIndex(sourceName) or the id field in the table returned by getFieldInfo. +---@return string sourcename +function getSourceName(sourceindex) end + +--- Returns the value of a source. Superseeds getValue. +--- @since 2.0.0 +---@param source string can be an index (number) (which was obtained by getFieldInfo or getSourceIndex) or a name (string) of the source. +---@return integer +---@return unknown iscurrent +---@return unknown isfresh +function getSourceValue(source) end + +--- +--- @since 3.0 +---@return integer +function getStickMode() end + +--- +--- @since 2.6 +---@param positionname string naming a switch position as it is shown on radio menus where you can select a switch. Notice that many names have special characters in them like arrow up/down etc. +---@return integer value +function getSwitchIndex(positionname) end + +--- +--- @since 2.12 +---@param sourceindex integer identifying a value source as returned by getSourceIndex(sourceName) or the id field in the table returned by getFieldInfo. +---@return table +function getSwitchInfo(sourceindex) end + +--- +--- @since 2.6 +---@param switchindex integer identifying a switch as returned by getSwitchIndex(positionName) or fields in the table returned by model.getLogicalSwitch(switch) identifying switches. +---@return string value +function getSwitchName(switchindex) end + +--- +--- @since 2.6 +---@param switchindex integer identifying a switch as returned by getSwitchIndex(positionName) or fields in the table returned by model.getLogicalSwitch(switch) identifying switches. +---@return integer value +function getSwitchValue(switchindex) end + +--- Return the time since the radio was started in multiple of 10ms +--- @since 2.0.0 +---@return integer +function getTime() end + +--- +--- @since 2.9.0 +---@return integer +function getTrainerStatus() end + +--- Return the internal GPS position or nil if no valid hardware found +--- @since 2.2.2 +---@return table +function getTxGPS() end + +--- Get percent of already used Lua instructions in current script execution cycle. +--- @since 2.2.1 +---@return integer usage +function getUsage() end + +--- Returns the value of a source. +--- @since 2.0.0 +---@param source string can be an index (number) (which was obtained by getFieldInfo or getSourceIndex) or a name (string) of the source. +---@return integer +---@return table +---@return table +---@return table +function getValue(source) end + +--- Return OpenTX version +--- @since 2.0.0 +---@return string +---@return string opentx_version_ie_2 +---@return string radio_type_x12s_x10_x9e_x9d_x9d_or_x7 +---@return integer major_version_ie_2_if_version_2 +---@return integer minor_version_ie_1_if_version_2 +---@return integer revision_number_ie_5_if_version_2 +---@return string os_name_i +function getVersion() end + +--- Pops a received Ghost Telemetry packet from the queue. +--- @since 2.7.0 +---@return nil +---@return integer type +---@return table packet +function ghostTelemetryPop() end + +--- This functions allows for sending telemetry data toward the Ghost link. +--- @since 2.7.0 +---@param command unknown command +---@param data table table of data bytes +---@return boolean +---@return nil +function ghostTelemetryPush(command, data) end + +--- Stops key state machine. See [Key Events](../key_events.md) for the detailed description. +--- @since 2.0.0 +---@param key integer key to be killed, can also include event type (only the key part is used) +function killEvents(key) end + +--- Load a Lua script file. This is similar to Lua's own [loadfile()](https://www.lua.org/manual/5.2/manual.html#pdf-loadfile) +API method, but it uses OpenTx's optional pre-compilation feature to save memory and time during load. +--- @since 2.2.0 +---@param file string Full path and file name of script. The file extension is optional and ignored (see mode param to control which extension will be used). However, if an extension is specified, it should be ".lua" (or ".luac"), otherwise it is treated as part of the file name and the .lua/.luac will be appended to that. +---@param mode? string (optional) Controls whether to force loading the text (.lua) or pre-compiled binary (.luac) version of the script. By default ETX will load the newest version and compile a new binary if necessary (overwriting any existing .luac version of the same script, and stripping some debug info like line numbers). You can use mode to control the loading behavior more specifically. Possible values are: * b only binary. * t only text. * T (default on simulator) prefer text but load binary if that is the only version available. * bt (default on radio) either binary or text, whichever is newer (binary preferred when timestamps are equal). * Add x to avoid automatic compilation of source file to .luac version. Eg: "tx", "bx", or "btx". * Add c to force compilation of source file to .luac version (even if existing version is newer than source file). Eg: "tc" or "btc" (forces "t", overrides "x"). * Add d to keep extra debug info in the compiled binary. Eg: "td", "btd", or "tcd" (no effect with just "b" or with "x"). +---@param env? integer See documentation for Lua function loadfile(). +---@return function|nil +---@return string|nil +function loadScript(file, mode, env) end + +--- Create a directory +--- @since 2.11.0 +---@param directory string Directory to create +function mkdir(directory) end + +--- This function reads/writes the Multi protocol buffer to interact with a protocol. +--- @since 2.3.2 +---@param address unknown to read/write in the buffer @param (optional): value to write in the buffer +---@return integer +function multiBuffer(address) end + +--- Play a time value (text to speech) +--- @since 2.1.0 +---@param duration integer number of seconds to play. Only integral part is used. +---@param hourformat? integer * 0 or not present play format: minutes and seconds. * != 0 play format: hours, minutes and seconds. * @param volume (number): - (1..5) override radio settings Wav volume for the duration of file - omitting the parameter uses radio settings Wav volume +---@return unknown none +function playDuration(duration, hourformat) end + +--- Play a file from the SD card +--- @since 2.0.0 +---@param filename string full path to wav file (i.e. "/SOUNDS/en/system/tada.wav") Introduced in 2.1.0: If you use a relative path, the current language is prepended to the path (example: for English language: /SOUNDS/en is prepended) +---@param volume? integer - (1..5) override radio settings Wav volume for the duration of file - omitting the parameter uses radio settings Wav volume +---@return unknown none +function playFile(filename, volume) end + +--- Generate haptic feedback +--- @since 2.2.0 +---@param duration integer length of the haptic feedback in milliseconds +---@param pause integer length of the silence after haptic feedback in milliseconds +---@param flags? integer * 0 or not present play with normal priority * PLAY_NOW play immediately +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, see the Units reference for the full list +---@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) +---@param volume? integer - (1..5) override radio settings Wav volume for the duration of file - omitting the parameter uses radio settings Wav volume +---@return unknown none +function playNumber(value, unit, attributes, volume) end + +--- Play a tone +--- @since 2.1.0 +---@param frequency integer tone frequency in Hz (from 150 to 15000) +---@param duration integer length of the tone in milliseconds +---@param pause integer length of the silence after the tone in milliseconds +---@param flags? integer * 0 or not present play with normal priority. * PLAY_BACKGROUND play in background (built in vario function uses this context) * PLAY_NOW play immediately +---@param freqincr? integer positive number increases the tone pitch (frequency with time), negative number decreases it. The frequency changes every 10 milliseconds, the change is freqIncr * 10Hz. The valid range is from -127 to 127. +---@param volume? integer - (1..5) override radio settings Beep volume for the duration of file - omitting the parameter uses radio settings Beep volume +---@return unknown none +function playTone(frequency, duration, pause, flags, freqincr, volume) end + +--- Raises a pop-up on screen that asks for confirmation +--- @since 2.2.0 +---@param title string title to display +---@param message string text to display +---@param event integer the event variable that is passed in from the Run function (key pressed) +---@return unknown cancel +function popupConfirmation(title, message, event) end + +--- Raises a pop-up on screen that allows uses input +--- @since 2.0.0 +---@param title string text to display +---@param event integer the event variable that is passed in from the Run function (key pressed) +---@param input integer value that can be adjusted by the +/- keys +---@param min integer min value that input can reach (by pressing the - key) +---@param max integer max value that input can reach +---@return integer +---@return unknown ok +---@return unknown cancel +function popupInput(title, event, input, min, max) end + +--- Raises a pop-up on screen that shows a warning +--- @since 2.2.0 +---@param title string text to display +---@param event integer the event variable that is passed in from the Run function (key pressed) +---@return unknown cancel +function popupWarning(title, event) end + +--- Rename a file or directory + If the file or directory is being moved to a new parent directory, then the new parent + directory must already exist. +--- @since 2.11.0 +---@param from_path string Current path to rename @param to_path (string) Path to rename to +function rename(from_path) end + +--- Resets the radio global timer to 0. +--- @since 2.2.2 +---@param type? unknown : if set to 'all', throttle ,throttle percent and session timers are reset too if set to 'session', radio session timer is reset too if set to 'ttimer', radio throttle timer is reset too if set to 'tptimer', radio throttle percent timer is reset too +function resetGlobalTimer(type) end + +--- Takes a screenshot, which is saved to the SCREENSHOTS folder on the radio SD card. +--- @since 2.11 +---@return unknown none +function screenshot() end + +--- +--- @since 2.9.0 +---@param port_nr valid values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1 1 - second serial port, e.g. on TX16S AUX2 +---@return true value +---@return nil +function serialGetPower(port_nr) end + +--- +--- @since 2.3.8 +---@param num? integer maximum number of bytes to read. If non-zero, serialRead will read up to num characters from the buffer. If 0 or left out, serialRead will read up to and including the first newline character or the end of the buffer. Note that the returned string may not end in a newline if this character is not present in the buffer. +---@return unknown str +function serialRead(num) end + +--- +--- @since 2.9.0 +---@param port_nr valid values are only 0 and 1 on radios that have SWSERIALPOWER defined 0 - first serial port, e.g. on TX16S AUX1 1 - second serial port, e.g. on TX16S AUX2 +---@param value 0 - disable power 1 - enable power +---@return true/false success +function serialSetPower(port_nr, value) end + +--- +--- @since 2.3.10 +---@param str string String to be written to the serial port. +function serialWrite(str) end + +--- Overrides the LED color for a custom function switch +--- @since 3.0.0 +---@param id string identifying a custom function switch name +---@param rvalue integer value of red channel +---@param bvalue integer value of green channel +---@param cvalue integer value of blue channel +function setCFSLedColor(id, rvalue, bvalue, cvalue) end + +--- +--- @since 3.0 +---@param offset integer offset in angular degree. -1 to offset to current X position +---@param range integer range in angular degree. 180° max.90 means min/max value will be reached at 45° from offset position +function setIMU_X(offset, range) end + +--- +--- @since 3.0 +---@param offset integer offset in angular degree. -1 to offset to current Y position +---@param range integer range in angular degree, 180° max. 90 means min/max value will be reached at 45° from offset position +function setIMU_Y(offset, range) end + +--- +--- @since 2.10 +---@param id integer identifying a led in the led chain +---@param rvalue integer value of red channel +---@param bvalue integer value of green channel +---@param cvalue integer value of blue channel +function setRGBLedColor(id, rvalue, bvalue, cvalue) end + +--- +--- @since 2.3.12 +---@param baudrate unknown Desired baurate +function setSerialBaudrate(baudrate) end + +--- +--- @since 2.6 +---@param id integer between 1 and 16 identifying the shared memory variable. +---@param value integer . The value of the shared memory variable. +function setShmVar(id, value) end + +--- +--- @since 2.6 +---@param id integer identifying the sticky logical switch (zero for LS1 etc.). +---@param value integer . The new value of the sticky logical switch. +---@return true/false bufferfull +function setStickySwitch(id, value) end + +--- +--- @since 2.2.0 +---@param id unknown Id of the sensor, valid range is from 0 to 0xFFFF +---@param subid unknown subID of the sensor, usually 0, valid range is from 0 to 7 +---@param instance unknown instance of the sensor (SensorID), valid range is from 0 to 0xFF +---@param value unknown fed to the sensor +---@param unit? unknown unit of the sensor, see the Units reference for the full list +---@param precision? unknown 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 unknown true +function setTelemetryValue(id, subid, instance, value, unit, precision, name) end + +--- +--- @since 2.6 +---@param first? integer first source index. If nil or omitted, the first available source is used. +---@param last? integer last soure index. If nil or omitted, the last available source is used. +function sources(first, last) end + +--- Pops a received SPORT packet from the queue. Please note that only packets using a data ID within 0x5000 to 0x50FF +(frame ID == 0x10), as well as packets with a frame ID equal 0x32 (regardless of the data ID) will be passed to +the LUA telemetry receive queue. +--- @since 2.2.0 +---@return nil +---@return integer sensor_id +---@return integer frame_id +---@return integer data_id +---@return integer value +function sportTelemetryPop() end + +--- This functions allows for sending SPORT telemetry data toward the receiver, +and more generally, to anything connected SPORT bus on the receiver or transmitter. +--- @since 2.2.0 +---@param sensorid unknown physical sensor ID +---@param frameid unknown frame ID +---@param dataid unknown data ID +---@param value unknown value +---@return boolean +---@return nil +function sportTelemetryPush(sensorid, frameid, dataid, value) end + +--- +--- @since 2.6 +---@param first? integer first switch index. If nil or omitted, the first available switch is used. +---@param last? integer last switch index. If nil or omitted, the last available switch is used. +function switches(first, last) end diff --git a/website/md-docs/assets/radios/betafpv-literadio-3-pro-500.png b/website/md-docs/assets/radios/betafpv-literadio-3-pro-500.png new file mode 100644 index 000000000..1ccf8a21b Binary files /dev/null and b/website/md-docs/assets/radios/betafpv-literadio-3-pro-500.png differ diff --git a/website/md-docs/assets/radios/fatfish-f16-500.png b/website/md-docs/assets/radios/fatfish-f16-500.png new file mode 100644 index 000000000..0c469ba97 Binary files /dev/null and b/website/md-docs/assets/radios/fatfish-f16-500.png differ diff --git a/website/md-docs/assets/radios/flysky-el18-500.png b/website/md-docs/assets/radios/flysky-el18-500.png new file mode 100644 index 000000000..8df8f1ffe Binary files /dev/null and b/website/md-docs/assets/radios/flysky-el18-500.png differ diff --git a/website/md-docs/assets/radios/flysky-nb4-500.png b/website/md-docs/assets/radios/flysky-nb4-500.png new file mode 100644 index 000000000..e31c7d174 Binary files /dev/null and b/website/md-docs/assets/radios/flysky-nb4-500.png differ diff --git a/website/md-docs/assets/radios/flysky-nv14-500.png b/website/md-docs/assets/radios/flysky-nv14-500.png new file mode 100644 index 000000000..1a0055799 Binary files /dev/null and b/website/md-docs/assets/radios/flysky-nv14-500.png differ diff --git a/website/md-docs/assets/radios/flysky-pa01-500.png b/website/md-docs/assets/radios/flysky-pa01-500.png new file mode 100644 index 000000000..8ddbe074e Binary files /dev/null and b/website/md-docs/assets/radios/flysky-pa01-500.png differ diff --git a/website/md-docs/assets/radios/flysky-pl18-500.png b/website/md-docs/assets/radios/flysky-pl18-500.png new file mode 100644 index 000000000..905beb4f8 Binary files /dev/null and b/website/md-docs/assets/radios/flysky-pl18-500.png differ diff --git a/website/md-docs/assets/radios/flysky-pl18u-500.png b/website/md-docs/assets/radios/flysky-pl18u-500.png new file mode 100644 index 000000000..02389bbf4 Binary files /dev/null and b/website/md-docs/assets/radios/flysky-pl18u-500.png differ diff --git a/website/md-docs/assets/radios/flysky-st16-500.png b/website/md-docs/assets/radios/flysky-st16-500.png new file mode 100644 index 000000000..6d30321b9 Binary files /dev/null and b/website/md-docs/assets/radios/flysky-st16-500.png differ diff --git a/website/md-docs/assets/radios/frsky-qx7-500.png b/website/md-docs/assets/radios/frsky-qx7-500.png new file mode 100644 index 000000000..d77e04d98 Binary files /dev/null and b/website/md-docs/assets/radios/frsky-qx7-500.png differ diff --git a/website/md-docs/assets/radios/frsky-x10-500.png b/website/md-docs/assets/radios/frsky-x10-500.png new file mode 100644 index 000000000..51775c634 Binary files /dev/null and b/website/md-docs/assets/radios/frsky-x10-500.png differ diff --git a/website/md-docs/assets/radios/frsky-x12s-500.png b/website/md-docs/assets/radios/frsky-x12s-500.png new file mode 100644 index 000000000..95830a1c4 Binary files /dev/null and b/website/md-docs/assets/radios/frsky-x12s-500.png differ diff --git a/website/md-docs/assets/radios/frsky-x9-lite-500.png b/website/md-docs/assets/radios/frsky-x9-lite-500.png new file mode 100644 index 000000000..450b3f59f Binary files /dev/null and b/website/md-docs/assets/radios/frsky-x9-lite-500.png differ diff --git a/website/md-docs/assets/radios/frsky-x9d-2019-500.png b/website/md-docs/assets/radios/frsky-x9d-2019-500.png new file mode 100644 index 000000000..f04ac7d43 Binary files /dev/null and b/website/md-docs/assets/radios/frsky-x9d-2019-500.png differ diff --git a/website/md-docs/assets/radios/frsky-x9d-500.png b/website/md-docs/assets/radios/frsky-x9d-500.png new file mode 100644 index 000000000..d3dbdf2e1 Binary files /dev/null and b/website/md-docs/assets/radios/frsky-x9d-500.png differ diff --git a/website/md-docs/assets/radios/frsky-x9e-500.png b/website/md-docs/assets/radios/frsky-x9e-500.png new file mode 100644 index 000000000..34fceec79 Binary files /dev/null and b/website/md-docs/assets/radios/frsky-x9e-500.png differ diff --git a/website/md-docs/assets/radios/frsky-xlite-pro-500.png b/website/md-docs/assets/radios/frsky-xlite-pro-500.png new file mode 100644 index 000000000..ee9f8f729 Binary files /dev/null and b/website/md-docs/assets/radios/frsky-xlite-pro-500.png differ diff --git a/website/md-docs/assets/radios/hrs-v12-500.png b/website/md-docs/assets/radios/hrs-v12-500.png new file mode 100644 index 000000000..38bfeaf0e Binary files /dev/null and b/website/md-docs/assets/radios/hrs-v12-500.png differ diff --git a/website/md-docs/assets/radios/hrs-v14-500.png b/website/md-docs/assets/radios/hrs-v14-500.png new file mode 100644 index 000000000..9825353ec Binary files /dev/null and b/website/md-docs/assets/radios/hrs-v14-500.png differ diff --git a/website/md-docs/assets/radios/hrs-v16-500.png b/website/md-docs/assets/radios/hrs-v16-500.png new file mode 100644 index 000000000..ee9f75246 Binary files /dev/null and b/website/md-docs/assets/radios/hrs-v16-500.png differ diff --git a/website/md-docs/assets/radios/iflight-commando-14-500.png b/website/md-docs/assets/radios/iflight-commando-14-500.png new file mode 100644 index 000000000..cb2e8e92b Binary files /dev/null and b/website/md-docs/assets/radios/iflight-commando-14-500.png differ diff --git a/website/md-docs/assets/radios/iflight-commando-8-500.png b/website/md-docs/assets/radios/iflight-commando-8-500.png new file mode 100644 index 000000000..a94109fc7 Binary files /dev/null and b/website/md-docs/assets/radios/iflight-commando-8-500.png differ diff --git a/website/md-docs/assets/radios/jumper-bumblebee-500.png b/website/md-docs/assets/radios/jumper-bumblebee-500.png new file mode 100644 index 000000000..5248e450b Binary files /dev/null and b/website/md-docs/assets/radios/jumper-bumblebee-500.png differ diff --git a/website/md-docs/assets/radios/jumper-t-lite-500.png b/website/md-docs/assets/radios/jumper-t-lite-500.png new file mode 100644 index 000000000..75d667706 Binary files /dev/null and b/website/md-docs/assets/radios/jumper-t-lite-500.png differ diff --git a/website/md-docs/assets/radios/jumper-t12-500.png b/website/md-docs/assets/radios/jumper-t12-500.png new file mode 100644 index 000000000..1b6865365 Binary files /dev/null and b/website/md-docs/assets/radios/jumper-t12-500.png differ diff --git a/website/md-docs/assets/radios/jumper-t14-500.png b/website/md-docs/assets/radios/jumper-t14-500.png new file mode 100644 index 000000000..daecb7e10 Binary files /dev/null and b/website/md-docs/assets/radios/jumper-t14-500.png differ diff --git a/website/md-docs/assets/radios/jumper-t15-500.png b/website/md-docs/assets/radios/jumper-t15-500.png new file mode 100644 index 000000000..bced67014 Binary files /dev/null and b/website/md-docs/assets/radios/jumper-t15-500.png differ diff --git a/website/md-docs/assets/radios/jumper-t15-pro-500.png b/website/md-docs/assets/radios/jumper-t15-pro-500.png new file mode 100644 index 000000000..d50b6f6ab Binary files /dev/null and b/website/md-docs/assets/radios/jumper-t15-pro-500.png differ diff --git a/website/md-docs/assets/radios/jumper-t16-500.png b/website/md-docs/assets/radios/jumper-t16-500.png new file mode 100644 index 000000000..d6bf9633d Binary files /dev/null and b/website/md-docs/assets/radios/jumper-t16-500.png differ diff --git a/website/md-docs/assets/radios/jumper-t18-500.png b/website/md-docs/assets/radios/jumper-t18-500.png new file mode 100644 index 000000000..e5ae77d1a Binary files /dev/null and b/website/md-docs/assets/radios/jumper-t18-500.png differ diff --git a/website/md-docs/assets/radios/jumper-t20-500.png b/website/md-docs/assets/radios/jumper-t20-500.png new file mode 100644 index 000000000..7747e5070 Binary files /dev/null and b/website/md-docs/assets/radios/jumper-t20-500.png differ diff --git a/website/md-docs/assets/radios/jumper-tpro-500.png b/website/md-docs/assets/radios/jumper-tpro-500.png new file mode 100644 index 000000000..99e217286 Binary files /dev/null and b/website/md-docs/assets/radios/jumper-tpro-500.png differ diff --git a/website/md-docs/assets/radios/radiomaster-boxer-500.png b/website/md-docs/assets/radios/radiomaster-boxer-500.png new file mode 100644 index 000000000..cc82c1a2b Binary files /dev/null and b/website/md-docs/assets/radios/radiomaster-boxer-500.png differ diff --git a/website/md-docs/assets/radios/radiomaster-gx12-500.png b/website/md-docs/assets/radios/radiomaster-gx12-500.png new file mode 100644 index 000000000..1c05bd228 Binary files /dev/null and b/website/md-docs/assets/radios/radiomaster-gx12-500.png differ diff --git a/website/md-docs/assets/radios/radiomaster-mt12-500.png b/website/md-docs/assets/radios/radiomaster-mt12-500.png new file mode 100644 index 000000000..c09cc6cbe Binary files /dev/null and b/website/md-docs/assets/radios/radiomaster-mt12-500.png differ diff --git a/website/md-docs/assets/radios/radiomaster-pocket-500.png b/website/md-docs/assets/radios/radiomaster-pocket-500.png new file mode 100644 index 000000000..f72c17ed4 Binary files /dev/null and b/website/md-docs/assets/radios/radiomaster-pocket-500.png differ diff --git a/website/md-docs/assets/radios/radiomaster-t8pro-500.png b/website/md-docs/assets/radios/radiomaster-t8pro-500.png new file mode 100644 index 000000000..ff213c1b6 Binary files /dev/null and b/website/md-docs/assets/radios/radiomaster-t8pro-500.png differ diff --git a/website/md-docs/assets/radios/radiomaster-tx12-500.png b/website/md-docs/assets/radios/radiomaster-tx12-500.png new file mode 100644 index 000000000..7f696a386 Binary files /dev/null and b/website/md-docs/assets/radios/radiomaster-tx12-500.png differ diff --git a/website/md-docs/assets/radios/radiomaster-tx15-500.png b/website/md-docs/assets/radios/radiomaster-tx15-500.png new file mode 100644 index 000000000..45444c663 Binary files /dev/null and b/website/md-docs/assets/radios/radiomaster-tx15-500.png differ diff --git a/website/md-docs/assets/radios/radiomaster-tx16s-max-500.png b/website/md-docs/assets/radios/radiomaster-tx16s-max-500.png new file mode 100644 index 000000000..e5a6008e1 Binary files /dev/null and b/website/md-docs/assets/radios/radiomaster-tx16s-max-500.png differ diff --git a/website/md-docs/assets/radios/radiomaster-tx16s-mk3-max-500.png b/website/md-docs/assets/radios/radiomaster-tx16s-mk3-max-500.png new file mode 100644 index 000000000..050c970c3 Binary files /dev/null and b/website/md-docs/assets/radios/radiomaster-tx16s-mk3-max-500.png differ diff --git a/website/md-docs/assets/radios/radiomaster-zorro-500.png b/website/md-docs/assets/radios/radiomaster-zorro-500.png new file mode 100644 index 000000000..08f3a8d6c Binary files /dev/null and b/website/md-docs/assets/radios/radiomaster-zorro-500.png differ diff --git a/website/md-docs/index.md b/website/md-docs/index.md new file mode 100644 index 000000000..2a09e9c08 --- /dev/null +++ b/website/md-docs/index.md @@ -0,0 +1,34 @@ +# EdgeTX Lua Reference Guide + +This guide covers the development of user-written scripts for R/C transmitters running the EdgeTX operating system with Lua support. Readers should be familiar with EdgeTX, the EdgeTX Companion, and know how to transfer files to the SD card in the transmitter. + +!!! info + The latest version of this guide will always be available at [luadoc.edgetx.org](https://luadoc.edgetx.org). There is a version option in the header if you are running an older version of EdgeTX and need the docs for that specific version. + +## Sections + +| Chapter | Content | +| --- | --- | +| [API Overview](api-overview/README.md) | Covers various topics of Lua implementation in the EdgeTX operating system | +| [API Reference](api-reference/index.md) | Reference of all constants and functions available in the EdgeTX Lua API | +| [Programming](programming/README.md) | EdgeTX Lua programming guide that covers coding techniques with examples | +| [Radios](radios/README.md) | Hardware support overview with transmitter families, model pages, and EdgeTX version coverage | + +## EdgeTX Lua development support + +The quickest way to get support from seasoned EdgeTX Lua developers is to join the Discord server and ask in the dedicated `#lua` channel. + +[Join the chat on Discord](https://discord.gg/DrHkAn28sq) + +## Lua Reference Guide collaboration + +Please feel free to make suggestions or corrections to the documentation. + +- For simple typos or proofreading, submit a PR to the [lua-reference-guide repository on GitHub](https://github.com/EdgeTX/lua-reference-guide/pulls). +- For larger content improvements, this MkDocs site now accepts Markdown changes directly in the repo alongside the generated API pipeline. + +## Project support + +The EdgeTX team has no intention of making a profit from their work. EdgeTX is free and open source and will remain free and open source. However, the project is expensive to maintain because of the amount of hardware that must be integrated and supported, along with the tools required to develop and test it. + +Please visit [the OpenCollective page](https://opencollective.com/edgetx) if you would like to financially help support the project. diff --git a/website/md-docs/javascripts/legacy-version-banner.js b/website/md-docs/javascripts/legacy-version-banner.js new file mode 100644 index 000000000..aa99e476f --- /dev/null +++ b/website/md-docs/javascripts/legacy-version-banner.js @@ -0,0 +1,117 @@ +// Shows a notice above the page content when the version being viewed is +// the development build ("dev") or anything other than the one mike aliases +// as "latest". The version is worked out at runtime from the URL and mike's +// versions.json rather than from per-version config, so every version can +// ship the same mkdocs.yml (main is a straight copy of the release branch). +// Material doesn't expose `extra` in #__config, so config can't drive this. + +const DEV_VERSION = "dev"; +const LATEST_ALIAS = "latest"; + +function getSiteConfig() { + const configNode = document.querySelector("#__config"); + if (!configNode) return null; + + try { + return JSON.parse(configNode.textContent || "{}"); + } catch { + return null; + } +} + +function getVersionRoot(config) { + // config.base is the relative path from this page to the version root, + // e.g. "../.." -- resolving it against the page URL gives /<version>/. + const base = config?.base; + if (typeof base !== "string") return null; + return new URL(base.endsWith("/") ? base : `${base}/`, window.location.href); +} + +async function loadVersions(siteRoot) { + try { + const response = await fetch(new URL("versions.json", siteRoot)); + if (!response.ok) return null; + const versions = await response.json(); + return Array.isArray(versions) ? versions : null; + } catch { + return null; + } +} + +function buildBanner({ label, message, linkText, linkHref }) { + const banner = document.createElement("aside"); + banner.className = "legacy-version-banner"; + banner.setAttribute("role", "note"); + banner.setAttribute("aria-label", label); + + const labelNode = document.createElement("p"); + labelNode.className = "legacy-version-banner__label"; + labelNode.textContent = label; + + const messageNode = document.createElement("p"); + messageNode.className = "legacy-version-banner__message"; + messageNode.textContent = `${message} `; + + if (linkHref) { + const link = document.createElement("a"); + link.href = linkHref; + link.textContent = linkText; + messageNode.appendChild(link); + } + + banner.appendChild(labelNode); + banner.appendChild(messageNode); + return banner; +} + +async function mountVersionBanner() { + const container = document.querySelector(".md-content__inner"); + if (!container || container.querySelector(".legacy-version-banner")) return; + + const versionRoot = getVersionRoot(getSiteConfig()); + if (!versionRoot) return; + + // Not served through mike (e.g. plain `mkdocs serve`): no versions.json + // one level up, so no banner. + const siteRoot = new URL("../", versionRoot); + const versions = await loadVersions(siteRoot); + if (!versions) return; + + const segment = decodeURIComponent(versionRoot.pathname.split("/").filter(Boolean).pop() || ""); + const current = versions.find( + (entry) => entry.version === segment || (entry.aliases || []).includes(segment), + ); + if (!current) return; + + const latest = versions.find((entry) => (entry.aliases || []).includes(LATEST_ALIAS)); + const latestHref = latest ? new URL(`${LATEST_ALIAS}/`, siteRoot).href : null; + const latestTitle = latest?.title || latest?.version; + + let banner = null; + if (current.version === DEV_VERSION) { + banner = buildBanner({ + label: "Development version", + message: + "These docs track EdgeTX development and may describe features or changes that are not in a released version yet.", + linkText: latest ? `View the ${latestTitle} release docs.` : "", + linkHref: latestHref, + }); + } else if (latest && current.version !== latest.version) { + banner = buildBanner({ + label: "Legacy version", + message: `You are viewing the documentation for EdgeTX ${current.title || current.version}. It is kept for reference and may not include later corrections.`, + linkText: `Go to the latest version (${latestTitle}).`, + linkHref: latestHref, + }); + } + + if (banner && !container.querySelector(".legacy-version-banner")) { + container.insertBefore(banner, container.firstChild); + } +} + +if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", mountVersionBanner, { once: true }); +} else { + mountVersionBanner(); +} diff --git a/website/md-docs/javascripts/mobile-nav-inline.js b/website/md-docs/javascripts/mobile-nav-inline.js new file mode 100644 index 000000000..f6135777f --- /dev/null +++ b/website/md-docs/javascripts/mobile-nav-inline.js @@ -0,0 +1,265 @@ +(function () { + const mobileMedia = window.matchMedia("(max-width: 76.234375em)"); + const rootClass = "mobile-desktop-nav-active"; + + function directChild(element, selector) { + const children = Array.from(element.children); + return children.find((child) => child.matches(selector)) || null; + } + + function directChildren(element, selector) { + return Array.from(element.children).filter((child) => child.matches(selector)); + } + + function textOf(element) { + return (element?.textContent || "").trim(); + } + + // With the navigation.indexes theme feature enabled, a section that has + // its own index page gets its toggle <label> wrapped (alongside a real + // <a> link) inside a ".md-nav__container" div instead of being a direct + // child of the <li> -- and Material no longer renders a redundant first + // list entry duplicating the section name for those sections at all, so + // there's nothing left to hide. Sections without their own index page + // keep the plain unwrapped <label> structure. + function sectionLabel(item) { + return ( + directChild(item, "label.md-nav__link") || + item.querySelector(":scope > .md-nav__container > label.md-nav__link") + ); + } + + // A wrapped section's <label> is icon-only -- its visible title text + // lives on the sibling <a> inside the same .md-nav__container, not the + // label (confirmed empirically: label.querySelector(".md-ellipsis") and + // even label's own textContent are both empty for a wrapped section). + // Reading the label for text, as sectionLabel's callers used to, silently + // produced an empty button title for every wrapped section (e.g. "API + // Reference") in the rebuilt mobile nav. + function sectionLink(item) { + return ( + directChild(item, "a.md-nav__link") || + item.querySelector(":scope > .md-nav__container > a.md-nav__link") + ); + } + + function sectionLinkText(item) { + const link = sectionLink(item); + return textOf(link?.querySelector(".md-ellipsis")) || textOf(link); + } + + function buildLeafItem(sourceItem) { + const link = directChild(sourceItem, "a.md-nav__link[href]"); + if (!link) { + return null; + } + + const item = document.createElement("li"); + item.className = "mobile-desktop-nav__item"; + + if (sourceItem.classList.contains("md-nav__item--active")) { + item.classList.add("mobile-desktop-nav__item--active"); + } + + const anchor = document.createElement("a"); + anchor.className = "mobile-desktop-nav__link"; + anchor.href = link.href; + anchor.textContent = textOf(link.querySelector(".md-ellipsis")) || textOf(link); + + if (link.classList.contains("md-nav__link--active")) { + anchor.classList.add("mobile-desktop-nav__link--active"); + } + + item.appendChild(anchor); + return item; + } + + function buildNestedItem(sourceItem) { + const toggle = directChild(sourceItem, "input.md-nav__toggle"); + const label = sectionLabel(sourceItem); + const nestedNav = directChild(sourceItem, "nav.md-nav:not(.md-nav--secondary)"); + if (!label || !nestedNav) { + return null; + } + + const nestedListSource = directChild(nestedNav, "ul.md-nav__list"); + if (!nestedListSource) { + return null; + } + + const item = document.createElement("li"); + item.className = "mobile-desktop-nav__item mobile-desktop-nav__item--nested"; + + if (sourceItem.classList.contains("md-nav__item--migration")) { + item.classList.add("mobile-desktop-nav__item--migration"); + } + + const button = document.createElement("button"); + button.type = "button"; + button.className = "mobile-desktop-nav__toggle"; + button.innerHTML = '<span class="mobile-desktop-nav__icon" aria-hidden="true"></span>'; + + // A section with its own index page (navigation.indexes wraps its + // label alongside a real <a> in .md-nav__container -- see sectionLabel) + // needs the rebuilt mobile nav to offer that link too, not just a + // toggle. Every API Reference group used to be a flat leaf item with no + // children at all, so this path was never exercised before item pages + // were added to the nav tree -- the toggle button alone silently made + // every group's hub page completely unreachable from the mobile nav + // (clicking the header only ever toggled the list; the section's own + // page was only reachable via the duplicate first child buildList + // already renders inside the expanded list). + const hubLink = sectionLink(sourceItem); + let headerLabelHost = button; + if (hubLink) { + const header = document.createElement("div"); + header.className = "mobile-desktop-nav__header"; + + const anchor = document.createElement("a"); + anchor.className = "mobile-desktop-nav__link"; + anchor.href = hubLink.href; + + header.appendChild(anchor); + header.appendChild(button); + item.appendChild(header); + headerLabelHost = anchor; + } else { + item.appendChild(button); + } + + const labelSpan = document.createElement("span"); + labelSpan.className = "mobile-desktop-nav__label"; + labelSpan.textContent = sectionLinkText(sourceItem); + headerLabelHost.insertBefore(labelSpan, headerLabelHost.firstChild); + + const nestedList = buildList(nestedListSource); + nestedList.classList.add("mobile-desktop-nav__list--nested"); + + const expanded = + Boolean(toggle?.checked) || + sourceItem.classList.contains("md-nav__item--active") || + sourceItem.classList.contains("md-nav__item--section-active") || + Boolean(sourceItem.querySelector(".md-nav__link--active")); + + if (expanded) { + item.classList.add("mobile-desktop-nav__item--expanded"); + button.setAttribute("aria-expanded", "true"); + } else { + nestedList.hidden = true; + button.setAttribute("aria-expanded", "false"); + } + + button.addEventListener("click", () => { + const nowExpanded = item.classList.toggle("mobile-desktop-nav__item--expanded"); + nestedList.hidden = !nowExpanded; + button.setAttribute("aria-expanded", nowExpanded ? "true" : "false"); + }); + + item.appendChild(nestedList); + return item; + } + + function buildList(sourceList) { + const list = document.createElement("ul"); + list.className = "mobile-desktop-nav__list"; + + const sourceItems = directChildren(sourceList, "li.md-nav__item").filter( + (item) => !item.hidden, + ); + sourceItems.forEach((sourceItem) => { + const hasSecondaryToc = Boolean(directChild(sourceItem, "nav.md-nav--secondary")); + let item = null; + + if (hasSecondaryToc) { + item = buildLeafItem(sourceItem); + } else if (sourceItem.classList.contains("md-nav__item--nested")) { + item = buildNestedItem(sourceItem); + } else { + item = buildLeafItem(sourceItem); + } + + if (item) { + list.appendChild(item); + } + }); + + return list; + } + + function buildDesktopLikeNav(sourceNav) { + const wrapper = document.createElement("div"); + wrapper.className = "mobile-desktop-nav-shell"; + + const nav = document.createElement("nav"); + nav.className = "mobile-desktop-nav"; + nav.setAttribute("aria-label", "Navigation"); + + const sourceList = directChild(sourceNav, "ul.md-nav__list"); + if (!sourceList) { + return wrapper; + } + + nav.appendChild(buildList(sourceList)); + wrapper.appendChild(nav); + return wrapper; + } + + function applyMobileDesktopNav() { + const primarySidebar = document.querySelector(".md-sidebar--primary"); + const sidebarInner = document.querySelector(".md-sidebar--primary .md-sidebar__inner"); + const scrollwrap = document.querySelector(".md-sidebar--primary .md-sidebar__scrollwrap"); + const sourceNav = document.querySelector(".md-sidebar--primary .md-nav--primary"); + if (!primarySidebar || !sidebarInner || !sourceNav) { + return; + } + + const existing = sidebarInner.querySelector(".mobile-desktop-nav-shell"); + if (existing) { + existing.remove(); + } + + if (!mobileMedia.matches) { + document.documentElement.classList.remove(rootClass); + sourceNav.hidden = false; + return; + } + + document.documentElement.classList.add(rootClass); + const customNav = buildDesktopLikeNav(sourceNav); + const drawerWidth = Math.round( + (scrollwrap || sidebarInner || primarySidebar).getBoundingClientRect().width, + ); + if (drawerWidth > 0) { + primarySidebar.style.width = `${drawerWidth}px`; + sidebarInner.style.width = `${drawerWidth}px`; + sidebarInner.style.minWidth = `${drawerWidth}px`; + if (scrollwrap) { + scrollwrap.style.width = `${drawerWidth}px`; + scrollwrap.style.minWidth = `${drawerWidth}px`; + } + customNav.style.width = `${drawerWidth}px`; + customNav.style.minWidth = `${drawerWidth}px`; + const customInnerNav = customNav.querySelector(".mobile-desktop-nav"); + if (customInnerNav) { + customInnerNav.style.width = `${drawerWidth}px`; + customInnerNav.style.minWidth = `${drawerWidth}px`; + } + } + sourceNav.hidden = true; + sidebarInner.appendChild(customNav); + } + + if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", applyMobileDesktopNav); + } else { + applyMobileDesktopNav(); + } + + window.addEventListener("load", applyMobileDesktopNav); + + if (typeof mobileMedia.addEventListener === "function") { + mobileMedia.addEventListener("change", applyMobileDesktopNav); + } else if (typeof mobileMedia.addListener === "function") { + mobileMedia.addListener(applyMobileDesktopNav); + } +})(); diff --git a/website/md-docs/javascripts/review-workbench.js b/website/md-docs/javascripts/review-workbench.js new file mode 100644 index 000000000..f3024c6d3 --- /dev/null +++ b/website/md-docs/javascripts/review-workbench.js @@ -0,0 +1,206 @@ +const DECISION_SERVER = "http://127.0.0.1:8123"; +const LOCAL_STORAGE_KEY = "lua-review-decisions"; + +function loadLocalDecisions() { + try { + return JSON.parse(window.localStorage.getItem(LOCAL_STORAGE_KEY) || "{}"); + } catch { + return {}; + } +} + +function defaultTypeOptions() { + return { + common_types: [ + "TODO", + "integer", + "number", + "string", + "boolean", + "table", + "function", + "pointer", + "nil", + "integer|string", + "table|nil", + "function|nil", + "string|nil", + ], + custom_types: [], + }; +} + +function saveLocalDecisions(decisions) { + window.localStorage.setItem(LOCAL_STORAGE_KEY, JSON.stringify(decisions)); +} + +async function fetchServerDecisions() { + const response = await fetch(`${DECISION_SERVER}/decisions`); + if (!response.ok) { + throw new Error(`decision server returned ${response.status}`); + } + return response.json(); +} + +async function fetchTypeOptions() { + const response = await fetch(`${DECISION_SERVER}/types`); + if (!response.ok) { + throw new Error(`types server returned ${response.status}`); + } + return response.json(); +} + +async function saveServerDecision(itemId, payload) { + const response = await fetch(`${DECISION_SERVER}/decisions/save`, { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ item_id: itemId, ...payload }), + }); + if (!response.ok) { + throw new Error(`decision save failed with ${response.status}`); + } + return response.json(); +} + +function mergedTypeOptions(serverTypes) { + const base = defaultTypeOptions(); + const combined = [...base.common_types]; + const seen = new Set(combined); + for (const typeName of serverTypes?.custom_types || []) { + if (!seen.has(typeName)) { + combined.push(typeName); + seen.add(typeName); + } + } + return combined; +} + +function populateTypeOptions(panel, options) { + panel.querySelectorAll("select").forEach((select) => { + const current = select.dataset.currentType || select.value || "TODO"; + select.innerHTML = ""; + options.forEach((option) => { + const optionEl = document.createElement("option"); + optionEl.value = option; + optionEl.textContent = option; + select.appendChild(optionEl); + }); + if (options.includes(current)) { + select.value = current; + } else { + select.value = "TODO"; + } + }); +} + +function panelChoices(panel) { + const params = {}; + const returns = {}; + panel.querySelectorAll("select").forEach((select) => { + const value = select.value; + const fieldKind = select.dataset.fieldKind; + const fieldName = select.dataset.fieldName; + const customInput = panel.querySelector( + `input[data-custom-type="true"][data-field-kind="${fieldKind}"][data-field-name="${CSS.escape(fieldName)}"]`, + ); + const customValue = customInput?.value?.trim(); + const chosenValue = customValue || value; + if (!chosenValue || chosenValue === "TODO") { + return; + } + if (fieldKind === "param") { + params[fieldName] = chosenValue; + } else { + returns[fieldName] = chosenValue; + } + }); + return { params, returns }; +} + +function applySavedChoices(panel, saved) { + panel.querySelectorAll("select").forEach((select) => { + const fieldKind = select.dataset.fieldKind; + const fieldName = select.dataset.fieldName; + const value = fieldKind === "param" + ? saved?.params?.[fieldName] + : saved?.returns?.[fieldName]; + if (value) { + const optionValues = Array.from(select.options).map((option) => option.value); + const customInput = panel.querySelector( + `input[data-custom-type="true"][data-field-kind="${fieldKind}"][data-field-name="${CSS.escape(fieldName)}"]`, + ); + if (optionValues.includes(value)) { + select.value = value; + if (customInput) { + customInput.value = ""; + } + } else { + select.value = "TODO"; + if (customInput) { + customInput.value = value; + } + } + } + }); +} + +async function initDecisionPanels() { + const localDecisions = loadLocalDecisions(); + let serverDecisions = {}; + let serverOnline = false; + let typeOptions = defaultTypeOptions(); + + try { + serverDecisions = await fetchServerDecisions(); + serverOnline = true; + } catch { + serverOnline = false; + } + + try { + typeOptions = await fetchTypeOptions(); + } catch { + typeOptions = defaultTypeOptions(); + } + + document.querySelectorAll(".decision-panel").forEach((panel) => { + const itemId = panel.dataset.itemId; + const status = panel.querySelector('[data-role="status"]'); + populateTypeOptions(panel, mergedTypeOptions(typeOptions)); + const saved = serverDecisions[itemId] || localDecisions[itemId] || {}; + applySavedChoices(panel, saved); + status.textContent = serverOnline + ? "Decision server connected. Selections will be saved for Codex." + : "Decision server offline. Selections are only stored in this browser until the local save service starts."; + + const save = async () => { + const choices = panelChoices(panel); + localDecisions[itemId] = choices; + saveLocalDecisions(localDecisions); + if (serverOnline) { + try { + await saveServerDecision(itemId, choices); + status.textContent = "Saved to docs-system/generated/review-decisions.json"; + } catch { + status.textContent = "Save to server failed. Kept locally in this browser."; + } + } else { + status.textContent = "Saved locally in this browser."; + } + }; + + panel.querySelectorAll("select").forEach((select) => { + select.addEventListener("change", save); + }); + panel.querySelectorAll('input[data-custom-type="true"]').forEach((input) => { + input.addEventListener("change", save); + input.addEventListener("blur", save); + }); + const saveButton = panel.querySelector('[data-role="save"]'); + if (saveButton) { + saveButton.addEventListener("click", save); + } + }); +} + +document.addEventListener("DOMContentLoaded", initDecisionPanels); diff --git a/website/md-docs/javascripts/toc-visibility.js b/website/md-docs/javascripts/toc-visibility.js new file mode 100644 index 000000000..2051bc4b3 --- /dev/null +++ b/website/md-docs/javascripts/toc-visibility.js @@ -0,0 +1,17 @@ +function updateTocVisibility() { + const sidebar = document.querySelector('.md-sidebar--secondary[data-md-type="toc"]'); + const tocList = sidebar?.querySelector('.md-nav--secondary [data-md-component="toc"]'); + const hasItems = Boolean(tocList?.querySelector(".md-nav__item")); + + if (!sidebar) return; + + sidebar.hidden = !hasItems; +} + +if (typeof document$ !== "undefined") { + document$.subscribe(updateTocVisibility); +} else if (document.readyState === "loading") { + document.addEventListener("DOMContentLoaded", updateTocVisibility, { once: true }); +} else { + updateTocVisibility(); +} diff --git a/website/md-docs/migration/internal-review-tools/developer-questions.md b/website/md-docs/migration/internal-review-tools/developer-questions.md new file mode 100644 index 000000000..4495b349b --- /dev/null +++ b/website/md-docs/migration/internal-review-tools/developer-questions.md @@ -0,0 +1,7 @@ +# Developer Questions + +Open questions to clarify directly with EdgeTX developers while we refine API docs and source annotations. + +## Telemetry + +- Why is there `accessTelemetryPush`, but no matching `accessTelemetryPop` in the Lua API? diff --git a/website/md-docs/migration/overview.md b/website/md-docs/migration/overview.md new file mode 100644 index 000000000..a02dc65ab --- /dev/null +++ b/website/md-docs/migration/overview.md @@ -0,0 +1,13 @@ +# Migration Plan + +The detailed migration plan lives in the repository root at `MIGRATION-PLAN.md`. + +This MkDocs copy is a short navigation placeholder while the new site structure is being introduced. + +## Key decisions + +- upstream EdgeTX source is the owner of API truth +- first published output from the new pipeline is EdgeTX 2.12 +- GitBook is replaced by MkDocs Material +- richer descriptions and examples live in overlays, not in generated output +- LuaLS definitions are generated from the same extracted API model as Markdown docs diff --git a/website/md-docs/migration/pipeline/annotation-contract.md b/website/md-docs/migration/pipeline/annotation-contract.md new file mode 100644 index 000000000..f3d8570df --- /dev/null +++ b/website/md-docs/migration/pipeline/annotation-contract.md @@ -0,0 +1,63 @@ +# Annotation Contract + +The long-term annotation contract belongs in the upstream EdgeTX code repository. + +The generator introduced in this repository expects the source model to provide: + +- canonical API id +- current symbol name +- module or global namespace +- kind such as `function` +- syntax +- short summary +- parameters with names, required state, and practical types +- return values with practical types +- availability metadata +- source location + +Anything narrative-heavy should stay out of the source annotation layer and be added through overlays instead. + +## Recommended Split + +Keep this in upstream code annotations: + +- canonical syntax and signature +- one short summary sentence +- parameters and practical types +- return values and practical types +- version and availability +- short implementation-coupled notices only + +Keep this in downstream overlays: + +- examples +- compatibility notes +- rename and deprecation guidance +- longer explanations +- multi-paragraph descriptions +- lists and comparison tables +- screenshots +- teaching videos +- related topics +- workflow guidance + +## Enforcement In This Repo + +The extractor only promotes: + +- the first summary paragraph +- tagged API facts such as `@param`, `@retval`, `@status`, and `@notice` + +Unstructured rich prose such as extra paragraphs, lists, tables, and fenced examples should move to overlays instead of being embedded in C++ comments. + +## Stable Docs Identity + +The docs pipeline may assign a stable `doc_id` outside the C++ source tree. + +That `doc_id` is the long-lived identity for: + +- overlay lookup +- generated page paths +- future symbol renames and deprecations + +The upstream source annotation should continue to expose only the actual callable symbol and syntax. diff --git a/website/md-docs/migration/pipeline/api-schema.md b/website/md-docs/migration/pipeline/api-schema.md new file mode 100644 index 000000000..412eef5f9 --- /dev/null +++ b/website/md-docs/migration/pipeline/api-schema.md @@ -0,0 +1,26 @@ +# API Schema + +The normalized API schema is stored at `docs-system/schema/api-model-v1.schema.json`. + +The generator currently expects one top-level object with: + +- `docs_version` +- `upstream_ref` +- `generated_at` +- `items` + +Each API item includes: + +- `id` +- `symbol` +- `module` +- `kind` +- `syntax` +- `summary` +- `parameters` +- `returns` +- `availability` +- `notes` +- `source_location` + +The schema is intentionally small for the first implementation and can grow once the upstream extractor is ready. diff --git a/website/md-docs/migration/pipeline/index.md b/website/md-docs/migration/pipeline/index.md new file mode 100644 index 000000000..d897e8865 --- /dev/null +++ b/website/md-docs/migration/pipeline/index.md @@ -0,0 +1,34 @@ +# Pipeline Overview + +The migration introduces a deterministic docs pipeline with four layers: + +1. Upstream EdgeTX source annotations +2. Normalized API model +3. Generated outputs +4. Optional overlay content + +## Outputs + +- Markdown API reference pages for the docs site +- LuaLS `*.d.lua` declaration files + +## Overlay Layer + +The generated pages can be extended by downstream overlay files for examples, compatibility notes, screenshots, videos, and related topics. + +See the [Overlay Contract](overlay-contract.md) for the intended split between source-owned API truth and docs-owned learning material. + +## Source Boundary + +In the current pipeline, upstream C++ annotations are intentionally kept compact: + +- syntax and signature +- one short summary +- parameter and return metadata +- availability and source facts + +Richer authored material belongs in overlay markdown files, not in `/*luadoc */` prose blocks. + +## Current implementation + +The current repo implementation uses sample JSON input to validate the renderer and directory conventions before wiring in the upstream extractor. diff --git a/website/md-docs/migration/pipeline/lvgl-migration.md b/website/md-docs/migration/pipeline/lvgl-migration.md new file mode 100644 index 000000000..19e74a890 --- /dev/null +++ b/website/md-docs/migration/pipeline/lvgl-migration.md @@ -0,0 +1,45 @@ +# LVGL Migration Notes + +This page tracks the migration work for the `Display LVGL` section. + +## Current Status + +The LVGL binding exists in EdgeTX, and the docs site now includes a checked-in `Display LVGL` section with grouped links to generated `lvgl.*` pages. However, LVGL still does not yet have the same level of extractable LuaDoc coverage as the older `runtime`, `lcd`, and `model` APIs. + +## Upstream Source Of Truth + +The current LVGL Lua binding surface is defined primarily in these upstream files: + +- `radio/src/lua/api_colorlcd_lvgl.cpp` +- `radio/src/lua/lua_lvgl_widget.cpp` +- `radio/src/lua/lua_lvgl_widget.h` + +`api_colorlcd_lvgl.cpp` exposes the public `lvgl` Lua library. The widget implementation files define the supported object types and many of the accepted parameter keys. + +## Migration Goals + +The target state is: + +1. upstream C++ comments are the source of truth for LVGL syntax +2. the docs pipeline extracts `lvgl.*` APIs the same way it already extracts `runtime`, `lcd`, and `model` +3. the MkDocs `Display LVGL` section becomes a fully pipeline-driven user-facing reference with minimal manual maintenance + +## Current Gaps + +The remaining migration gaps are: + +- fuller LuaDoc coverage for the supported table keys of each object type +- better documentation coverage for exported constants that matter to script authors +- smoother alignment between generated LVGL output and the checked-in `API Reference` structure + +## Recommended Grouping + +The current API surface suggests this eventual user-facing grouping: + +1. Runtime Helpers +2. Drawing Primitives +3. Containers +4. Interactive Controls +5. Pickers And Selectors +6. Popup Helpers +7. Constants diff --git a/website/md-docs/migration/pipeline/overlay-contract.md b/website/md-docs/migration/pipeline/overlay-contract.md new file mode 100644 index 000000000..813209abc --- /dev/null +++ b/website/md-docs/migration/pipeline/overlay-contract.md @@ -0,0 +1,83 @@ +# Overlay Contract + +Overlays are the downstream enrichment layer for a generated API page. + +They are stored separately from the upstream source annotations and are merged into the final docs page after the generated API truth. + +## Purpose + +Use overlays for content that should stay outside C++ source comments: + +- examples +- compatibility notes +- screenshots +- teaching videos +- related topics +- longer guidance and practical usage notes +- multi-paragraph descriptions +- comparison tables +- migration notes + +## Source Of Truth Boundary + +Generated API truth always comes from upstream source annotations: + +- current symbol +- syntax +- short summary +- parameters +- returns +- availability +- short notices +- source location + +Overlays must not override that generated truth. + +Stable page identity comes from the docs-owned `doc_id`, so the overlay filename can stay the same even when the preferred Lua symbol changes. + +## Current File Layout + +Overlay files live in: + +- `docs-system/overlays/<api-id>.md` +- preferably `docs-system/overlays/<doc-id>.md` for stable page identity + +Examples: + +- `docs-system/overlays/runtime.get-version.md` +- `docs-system/overlays/lcd.drawBitmap.md` + +## Recommended Section Headings + +Use plain Markdown with `##` headings. + +Recommended headings: + +- `## Extended Description` +- `## Examples` +- `## Compatibility Notes` +- `## Related Topics` +- `## Additional Learning` + +The renderer treats these as enrichment content and places them after the generated API sections. + +## Example + +```md +## Extended Description + +`getVersion` returns version information for the running firmware. + +## Examples + +```lua +local ver = getVersion() +print(ver) +``` +``` + +## Editorial Rule + +If API facts are wrong, fix upstream source annotations first. + +If explanation quality is lacking, add or improve the overlay. diff --git a/website/md-docs/migration/pipeline/real-extraction-notes.md b/website/md-docs/migration/pipeline/real-extraction-notes.md new file mode 100644 index 000000000..b5b35e7a2 --- /dev/null +++ b/website/md-docs/migration/pipeline/real-extraction-notes.md @@ -0,0 +1,40 @@ +# Real Extraction Notes + +This page summarizes the first extraction run against a real local EdgeTX checkout, so the generated API section can be reviewed as a concrete preview instead of a sample-only scaffold. + +## Extraction Baseline + +- EdgeTX source: local checkout at `/Users/pfeerick/repos/EdgeTX/edgetx` +- Lua source dir: `radio/src/lua` +- Source branch at extraction time: `2.12` +- Source commit at extraction time: `8718d2473a` (EdgeTX/edgetx#7771 merged: adds `/*luadoc */` annotations for the LVGL Lua API) +- Docs version tag used for the local run: `2.12` + +## Current Results + +- Extracted API items: `198` +- Modules discovered: + - `runtime`: `73` + - `lcd`: `39` + - `model`: `37` + - `Bitmap`: `4` + - `lvgl`: `45` + +## Quality Snapshot + +- `runtime`: `19` unknown parameter types, `16` unknown return types +- `lcd`: `7` unknown parameter types, `0` unknown return types +- `model`: `5` unknown parameter types, `1` unknown return type +- backlog entries recorded: `31` + +## What This Proves + +- The extractor can parse the current upstream `/*luadoc */` format across the real Lua source tree. +- The normalized model is good enough to produce large-scale Markdown and LuaLS previews. +- The main remaining issues are annotation-quality gaps, especially in `runtime`, rather than missing site plumbing. + +## Next Cleanup Targets + +1. Improve `runtime` return typing for high-traffic APIs like `getRSSI`, `getSourceValue`, and popup helpers. +2. Improve upstream annotations for structured table parameters in functions like `model.setModule`, `model.setInfo`, and `model.setTimer`. +3. Add parser heuristics only where the upstream comments are already specific enough to support them safely. diff --git a/website/md-docs/programming/README.md b/website/md-docs/programming/README.md new file mode 100644 index 000000000..ebb11fce8 --- /dev/null +++ b/website/md-docs/programming/README.md @@ -0,0 +1,3 @@ +# Programming + +This section provides more specifics on the EdgeTX Lua implementation. Here you will find syntax rules for interface tables and functions. diff --git a/advanced-topics/README.md b/website/md-docs/programming/advanced-topics/README.md similarity index 100% rename from advanced-topics/README.md rename to website/md-docs/programming/advanced-topics/README.md diff --git a/advanced-topics/debugging-techniques.md b/website/md-docs/programming/advanced-topics/debugging-techniques.md similarity index 94% rename from advanced-topics/debugging-techniques.md rename to website/md-docs/programming/advanced-topics/debugging-techniques.md index fa24be67a..341014132 100644 --- a/advanced-topics/debugging-techniques.md +++ b/website/md-docs/programming/advanced-topics/debugging-techniques.md @@ -14,7 +14,7 @@ If you open a LUA file, you will already have some markup in your screen, indica The editor will have an "execute code" option, that will try to run the code on it's own interpreter \(code processing engine\). If there are any syntax errors, it will not be able to execute the code, and inform you about the errors. A common error in LUA is using a single equal sign \(=\) in a condition in an 'if' statement, whereas in LUA that should be a double equal sign \(==\). The interpreter will inform you about such an error ocurring, and mention the line where you made the error. -Since the OpenTX LUA environment has some own functions, like lcd.drawText\(\), the interpreter will 'complain' it cannot call an unspecified function, but it will check the entire syntax nonetheless. +Since the EdgeTX Lua environment has some own functions, like lcd.drawText\(\), the interpreter will 'complain' it cannot call an unspecified function, but it will check the entire syntax nonetheless. ### Ready to run the code @@ -43,7 +43,7 @@ An example of such a script is found under the notes. You can adapt it for other ### Script Loader -This script loader will load the file /SCRIPTS/TELEM/telem1.lua, run it, and wait for an Enter Break event. Once received, it will unload the code and wait for a next Enter Break event. +This script loader will load the file `/SCRIPTS/TELEM/telem1.lua`, run it, and wait for an Enter Break event. Once received, it will unload the code and wait for a next Enter Break event. ```lua local fileToLoad="/SCRIPTS/TELEM/telem1.lua" diff --git a/advanced-topics/lua-data-sharing-across-scripts.md b/website/md-docs/programming/advanced-topics/lua-data-sharing-across-scripts.md similarity index 87% rename from advanced-topics/lua-data-sharing-across-scripts.md rename to website/md-docs/programming/advanced-topics/lua-data-sharing-across-scripts.md index 9ee0c48c2..0e242a629 100644 --- a/advanced-topics/lua-data-sharing-across-scripts.md +++ b/website/md-docs/programming/advanced-topics/lua-data-sharing-across-scripts.md @@ -2,7 +2,7 @@ ## Overview: -OpenTX considers all function, mix, and telemetry scripts to be 'permanent' scripts that share the same runtime environment. They are typically loaded at power up or when a new model is selected. However, they are also reinitialized when a script is added or removed during model editing. +EdgeTX considers all function, mix, and telemetry scripts to be 'permanent' scripts that share the same runtime environment. They are typically loaded at power up or when a new model is selected. However, they are also reinitialized when a script is added or removed during model editing. ## Lua scoping rules: @@ -19,27 +19,21 @@ This example consists of three scripts ## Installation: * count-dn.lua - * copy to /SCRIPTS/MIXES + * copy to `/SCRIPTS/MIXES` * configure on the transmitter CUSTOM SCRIPT page * suggested switch = "SA" * suggested mins = 3 * suggested sw\_high = 0 - * screen image: - - ![count-dn.lua mix script](https://github.com/opentx/opentx-2-3-lua-reference-guide/tree/0d355d19f1961b689994cf78b84005864d33f9b5/count-dn.png) + * on screen, this script shows a countdown (and, once it reaches zero, a count-up) timer next to output values `ctup` and `ctdn` * count-up.lua - * copy to /SCRIPTS/FUNCTIONS + * copy to `/SCRIPTS/FUNCTIONS` * configure on the transmitter SPECIAL FUNCTIONS page * suggested switch SA\(down\) - * screen image: - - ![count-up.lua function script](https://github.com/opentx/opentx-2-3-lua-reference-guide/tree/0d355d19f1961b689994cf78b84005864d33f9b5/count-up.png) + * on screen, this script announces each count-up milestone as `gCountUp` reaches it * shocount.lua - * copy to /SCRIPTS/TELEMETRY + * copy to `/SCRIPTS/TELEMETRY` * configure on the transmitter TELEMETRY page - * screen image: - - ![shocount.lua function script](https://github.com/opentx/opentx-2-3-lua-reference-guide/tree/0d355d19f1961b689994cf78b84005864d33f9b5/shocount.png) + * on screen, this script shows the current `gCountUp` and `gCountDown` values as plain text ## Script sources: @@ -173,7 +167,7 @@ gCountDown = 0 local function run(e) lcd.clear() - lcd.drawText(1,1,"OpenTx Lua Data Sharing",0) + lcd.drawText(1,1,"EdgeTX Lua Data Sharing",0) lcd.drawText(1,11,"gCountUp:", 0) lcd.drawText(lcd.getLastPos()+2,11,gCountUp,0) diff --git a/website/md-docs/programming/advanced-topics/optimization-tricks.md b/website/md-docs/programming/advanced-topics/optimization-tricks.md new file mode 100644 index 000000000..ea9f1cc01 --- /dev/null +++ b/website/md-docs/programming/advanced-topics/optimization-tricks.md @@ -0,0 +1,27 @@ +# Speed/memory optimizaton tricks + +## Faster getValue() + +Normally one uses [getValue()](../../api-reference/sources/get-value.md) function with the source/filed name like so: + +```lua +local foo = getValue("bar") +``` + +This works and is recommended method for portability. But if a particular script needs to get the value of certain field a lot, then it is faster to use this syntax: + +```lua +local my_id = getFieldInfo("bar").id -- here we get the numerical id of the filed "bar" + +local function run_a_lot() + local my_value = getValue(my_id) -- exactly the same effect as local my_value = getValue("bar"), but faster +end +``` + +Why is this method faster? With the function [getFieldInfo(name)](../../api-reference/sources/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. + +So when the `getValue(my_id)` is called the search can be skipped and the requested value if fetched directly. + +Of course there is a trade-of, the second example uses little more memory (for variable `my_id`). diff --git a/website/md-docs/programming/basics/editor.md b/website/md-docs/programming/basics/editor.md new file mode 100644 index 000000000..ff9ed736b --- /dev/null +++ b/website/md-docs/programming/basics/editor.md @@ -0,0 +1,61 @@ +# Editor + +## Basic setup + +For basic Lua work, almost any plain-text editor is enough. + +Useful features are: + +- Lua syntax highlighting +- visible indentation +- fast search across the repo +- easy file copy to the SD card or simulator workspace + +Keep the setup simple at first. A lightweight editor with good search and file navigation is usually enough. + +Examples of user-friendly editors: + +- macOS: [CotEditor](https://coteditor.com/) or [BBEdit](https://www.barebones.com/products/bbedit/download.html) +- Linux: [Kate](https://kate-editor.org/get-it/) or [Gedit](https://help.gnome.org/users/gedit/stable/) +- Windows: [Notepad++](https://notepad-plus-plus.org/downloads/) + +## Advanced Setup + +If you want a more professional setup, use an editor with stronger code intelligence features. + +Practical examples are: + +- [Visual Studio Code](https://code.visualstudio.com/download) with the [`Lua` extension by `sumneko`](https://marketplace.visualstudio.com/items?itemName=sumneko.lua) +- [IntelliJ IDEA](https://www.jetbrains.com/idea/download/) with the `EmmyLua` plugin + +That gives you features such as: + +- symbol completion +- inline help while typing +- jump to definitions +- better navigation across modules + +## Lua Language Server + +For richer editing support, use Lua Language Server with the generated EdgeTX definition files from this project. + +In VS Code, the practical setup is: + +1. Open the Extensions view. +2. Search for `Lua` by `sumneko` and install it. +3. Add this project's generated definition files to your workspace setup. + +That gives you: + +- completions for EdgeTX Lua APIs +- better type hints +- fewer mistakes when calling functions or building tables + +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) + +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/basics/files-and-organization.md b/website/md-docs/programming/basics/files-and-organization.md new file mode 100644 index 000000000..d3f726d3e --- /dev/null +++ b/website/md-docs/programming/basics/files-and-organization.md @@ -0,0 +1,11 @@ +# Files and Organization + +Keep your local script layout close to the radio SD card layout. That makes it easier to copy files, test changes, and understand where a script belongs. + +Organize code so that: + +- entry scripts stay small +- reusable helper code lives in separate modules +- assets such as bitmaps stay near the script that uses them + +Small, predictable folder layouts are easier to maintain than deep custom structures. diff --git a/website/md-docs/programming/basics/memory.md b/website/md-docs/programming/basics/memory.md new file mode 100644 index 000000000..9dcefe1fb --- /dev/null +++ b/website/md-docs/programming/basics/memory.md @@ -0,0 +1,12 @@ +# Memory + +Lua memory is limited on radios, especially on lower-memory targets. + +Desktop environments such as Companion or the simulator can make a script look fine even when the same script will hit out-of-memory problems on real hardware. + +Keep memory usage under control by: + +- loading only what you need +- avoiding large temporary tables +- reusing data where possible +- testing on the real target radio diff --git a/website/md-docs/programming/basics/naming.md b/website/md-docs/programming/basics/naming.md new file mode 100644 index 000000000..a8819390b --- /dev/null +++ b/website/md-docs/programming/basics/naming.md @@ -0,0 +1,11 @@ +# Naming + +Use names that describe purpose, not just implementation details. + +Good naming helps with: + +- finding scripts on the SD card +- understanding module responsibilities +- keeping related files grouped naturally + +Prefer short, readable file names and consistent naming across script entry points, helpers, and assets. diff --git a/website/md-docs/programming/basics/performance.md b/website/md-docs/programming/basics/performance.md new file mode 100644 index 000000000..7d0d8b4c0 --- /dev/null +++ b/website/md-docs/programming/basics/performance.md @@ -0,0 +1,12 @@ +# Performance + +RC control always has priority over Lua execution. + +Lua scripts receive only a limited share of execution time in each radio cycle. If a script uses too much of that assigned time, the system may terminate the Lua process. + +Keep scripts responsive by: + +- doing less work per call +- spreading heavy work across multiple cycles +- avoiding repeated expensive lookups +- testing performance on the real target radio diff --git a/website/md-docs/programming/basics/practicing.md b/website/md-docs/programming/basics/practicing.md new file mode 100644 index 000000000..553f8aa71 --- /dev/null +++ b/website/md-docs/programming/basics/practicing.md @@ -0,0 +1,12 @@ +# Practicing + +Start with very small scripts and expand them gradually. + +A good practice loop is: + +1. change one thing +2. load the script +3. verify the behavior +4. keep or revert the change + +Small iterations make Lua development on radios much easier to debug. diff --git a/website/md-docs/programming/basics/testing.md b/website/md-docs/programming/basics/testing.md new file mode 100644 index 000000000..6768dda25 --- /dev/null +++ b/website/md-docs/programming/basics/testing.md @@ -0,0 +1,11 @@ +# Testing + +Simulator or desktop testing is useful for quick feedback, but it is not the same as running on a real radio. + +Real-hardware checks still matter for: + +- RF-related behavior +- serial devices +- performance and memory edge cases + +Use fast local testing first, then confirm important behavior on the actual target radio. diff --git a/website/md-docs/programming/basics/troubleshooting.md b/website/md-docs/programming/basics/troubleshooting.md new file mode 100644 index 000000000..19d00188c --- /dev/null +++ b/website/md-docs/programming/basics/troubleshooting.md @@ -0,0 +1,11 @@ +# Troubleshooting + +When a script does not behave as expected, check the basics first: + +- file location and file name +- returned table structure +- syntax errors +- missing required assets or modules +- target radio limitations + +Start with the simplest failure point before assuming the API itself is wrong. diff --git a/lua-api-programming/data-exchange-with-the-edgetx-model-setup.md b/website/md-docs/programming/core-concepts/data-exchange-with-the-edgetx-model-setup.md similarity index 76% rename from lua-api-programming/data-exchange-with-the-edgetx-model-setup.md rename to website/md-docs/programming/core-concepts/data-exchange-with-the-edgetx-model-setup.md index 115221d60..553755ba8 100644 --- a/lua-api-programming/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)`](../part\_iii\_-\_opentx\_lua\_api\_reference/model-functions-less-than-greater-than-luadoc-begin-model/getglobalvariable.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-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! Global Variables is a _value_ data source that can return a value between -1024 and 1024. Examples of value sources are: @@ -23,22 +23,22 @@ 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)`](../part\_iii\_-\_opentx\_lua\_api\_reference/general-functions-less-than-greater-than-luadoc-begin-general/getfieldinfo.md) where `name` can be any of the valid source names listed [here](../part\_iii\_-\_opentx\_lua\_api\_reference/general-functions-less-than-greater-than-luadoc-begin-general/getfieldinfo.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/sources/get-field-info.md) where `name` can be any of the valid source names listed [here](../../api-reference/sources/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)`](../part\_iii\_-\_opentx\_lua\_api\_reference/general-functions-less-than-greater-than-luadoc-begin-general/getvalue.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/sources/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)`](../part\_iii\_-\_opentx\_lua\_api\_reference/general-functions-less-than-greater-than-luadoc-begin-general/getlogicalswitchvalue-id.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/switches/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↑`. +* 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)`](../part\_iii\_-\_opentx\_lua\_api\_reference/general-functions-less-than-greater-than-luadoc-begin-general/getswitchindex-positionname.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/switches/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)`](../part\_iii\_-\_opentx\_lua\_api\_reference/general-functions-less-than-greater-than-luadoc-begin-general/getswitchvalue-switchindex.md) as a `true`/`false` value. +You can read the current value of a switch source with [`getSwitchValue(index)`](../../api-reference/switches/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_: +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_: ```lua local id = getFieldInfo("trim-ele") @@ -78,7 +78,7 @@ You can also send data the other way: from Lua to the EdgeTX model setup. To send a _value_, use a global variable: `model.setGlobalVariable(index, fm, value)`. If you use the default GV setting, where all other flight modes use the value of FM0, then you can use 0 for `fm`. -To send a _switch_, setup a `STICKY` type logical switch, and then use `setStickySwitch(index, true/false)`. +To send a _switch_, setup a `STICKY` type logical switch, and then use `setStickySwitch(index, true/false)`. The following table gives an overview of the Lua API functions that can be used to exchange data with the EdgeTX model setup. @@ -100,4 +100,3 @@ The following table gives an overview of the Lua API functions that can be used | `setShmVar(index, value)` | Set the value of a shared memory variable. | | `model.setTimer(timer, value)` | Set the timer to `value`. | | `model.getTimer(timer)` | Read the timer. | - diff --git a/lua-api-programming/drawing-flags-and-colors.md b/website/md-docs/programming/core-concepts/drawing-flags-and-colors.md similarity index 75% rename from lua-api-programming/drawing-flags-and-colors.md rename to website/md-docs/programming/core-concepts/drawing-flags-and-colors.md index 5c6047b12..88a431fda 100644 --- a/lua-api-programming/drawing-flags-and-colors.md +++ b/website/md-docs/programming/core-concepts/drawing-flags-and-colors.md @@ -2,28 +2,26 @@ description: This section will give some technical details for radios with a color screen. --- -# Drawing Flags and Colors +# Using Flags and Colors An argument with drawing flags can be given to the various functions that draw on the LCD screen. The lower half of the flags (bits 1-16) are the flag attributes shown below, and the upper half of the flags (bits 17-32) are a color value. -Not all of the flags below should be directly manipulated from Lua, but those that are meant to be set directly by Lua, are accessible by the [Lua flag constants](../lua-api-reference/constants/flags-and-pattern-constants.md#flags). - -![](<../.gitbook/assets/flags (1).png>) +Not all of the flags below should be directly manipulated from Lua, but those that are meant to be set directly by Lua, are accessible by the [Lua flag constants](../../api-overview/constants/flags-and-pattern-constants.md). Since the flags are bits, you can add them up to combine, as long as you only add each flag _one_ time. If you add the same flag twice, then it will add up to the next bit over, e.g. `INVERS + INVERS = VCENTER`. If you want to add a flag to a value where it may already be set, then use `flags = bit32.bor(flags, INVERS)`. 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`](../lua\_api\_reference/lcd-functions-less-than-greater-than-luadoc-begin-lcd/setcolor.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/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 = 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`](../lua\_api\_reference/lcd-functions-less-than-greater-than-luadoc-begin-lcd/setcolor.md) must have an [indexed color](../lua-api-reference/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/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. * 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` ](../lua\_api\_reference/lcd-functions-less-than-greater-than-luadoc-begin-lcd/getcolor.md)always returns a RGB color. This can be used to "save" an indexed color before you change it. -* [`lcd.RGB`](../lua\_api\_reference/lcd-functions-less-than-greater-than-luadoc-begin-lcd/rgb.md) obviously returns a RGB 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. ### 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 new file mode 100644 index 000000000..912f0440c --- /dev/null +++ b/website/md-docs/programming/core-concepts/loading-code-modules-dynamically.md @@ -0,0 +1,36 @@ +--- +description: >- + Lua makes it easy to load and unload code modules on the fly, to save memory + or to provide program extensions. +--- + +# Loading Code Modules Dynamically + +The [`loadScript(<file>)`](../../api-reference/lua-scripts/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 +local c = ... + +local function f(x) + return x + c +end + +return f +``` + +You can load and use the above file with the following code: + +```lua +local chunk = loadScript("/SCRIPTS/TestScript.lua") + +local f1 = chunk(1) +local y = f1(5) +-- y = 5 + 1 + +local f2 = chunk(3) +local z = f2(5) +-- z = 5 + 3 +``` + +So here we put together what we learned in the previous section. The body of the script is an anonymous function returned by `loadScript` and stored in the variable `chunk`. It returns the function `f` when it is called. The local variable `c` in the script is assigned to the first _vararg_ passed to the call. Since a new closure is created every time we call `chunk`, `f1` and `f2` have different closures with different values of `c`. diff --git a/website/md-docs/programming/core-concepts/lvgl-for-lua.md b/website/md-docs/programming/core-concepts/lvgl-for-lua.md new file mode 100644 index 000000000..bf0b42bd5 --- /dev/null +++ b/website/md-docs/programming/core-concepts/lvgl-for-lua.md @@ -0,0 +1,209 @@ +--- +description: How to enable and use the LVGL UI layer in EdgeTX Lua scripts. +--- + +# Using LVGL Library + +LVGL gives EdgeTX Lua scripts access to the same style of UI controls used by the firmware on color-screen radios. Instead of redrawing every element manually with the `lcd` API, a script can build a UI from objects such as labels, boxes, pages, buttons, toggles, sliders, and dialogs. + +The practical result is: + +- less manual redraw logic +- better support for state-driven UI updates +- a closer match to native EdgeTX screens + +For the detailed constructor pages, see [Display LVGL](../../api-reference/display-lvgl/index.md). For LVGL-specific constants, see [LVGL Constants](../../api-overview/constants/lvgl-constants.md). + +## Limitations + +- Direct drawing through the `lcd` API is not available inside scripts that use LVGL to create the UI. +- LVGL is only available on radios and builds that support the LVGL UI layer. + +## Activating the LVGL API + +A script must return `useLvgl = true` in the table it exports: + +```lua +return { init = init, run = run, useLvgl = true } +``` + +When LVGL is available, EdgeTX exposes a global `lvgl` object. This is the main entry point for building and updating the UI. + +Scripts should still check that `lvgl` is not `nil` before using it. If it is `nil`, the script is usually: + +- running on an earlier EdgeTX version +- running on a target without LVGL support +- missing `useLvgl = true` + +In that case, the script should show a clear error or fall back to a non-LVGL implementation. + +## Usage Patterns + +### One-Time scripts + +For One-Time scripts, `init()` should still prepare the initial script state, but it should also create the LVGL UI tree. The `run()` function can still handle events, but most interaction should be delegated to the LVGL objects themselves. + +When used this way, the UI updates automatically as state changes instead of being redrawn by hand every cycle. + +### Widget scripts + +Widget scripts should usually create or rebuild their LVGL UI in `update()`, using the widget zone size to decide layout. The `background()` and `refresh()` functions should focus on state updates that are not already managed by the LVGL objects. + +### Controls and focus + +Interactive controls such as buttons, toggles, and text editors show a focus outline when selected. Leave enough space between nearby controls so that outline remains visible and does not collide with surrounding content. + +## Common Call Pattern + +Most LVGL constructors follow this shape: + +```lua +lvgl.function([parent], { settings }) +``` + +The optional `parent` object determines where the new object is attached. If no parent is passed, the object is created in the top-level script window. + +Most functions return an LVGL object, so you can keep a reference and update it later or call object methods on it. + +LVGL functions can also be used with Lua OO syntax: + +```lua +lvgl.show(parent) +parent:show() +``` + +## Shared Settings + +Many LVGL objects share a few common settings: + +| Name | Type | Purpose | +| --- | --- | --- | +| `x`, `y` | `number` | Position relative to the top-left of the parent | +| `w`, `h` | `number` | Width and height | +| `color` | color or function | Primary color for the object | +| `pos` | function | Dynamic position callback returning `x, y` | +| `size` | function | Dynamic size callback returning `w, h` | +| `visible` | function | Dynamic visibility callback | +| `floating` | `boolean` | Keep an object fixed inside a scrollable container | + +Functions used for settings are called repeatedly by the firmware. When the function returns a new value, the object updates automatically. + +## Adapting To Different Screens + +EdgeTX supports several color-screen sizes and orientations, so fixed coordinates do not always scale cleanly. A few LVGL helpers make this easier: + +- flex layouts can reduce manual positioning +- `lvgl.PAGE_BODY_HEIGHT` gives the body height of a page container +- `lvgl.UI_ELEMENT_HEIGHT` gives the default control height +- `lvgl.LCD_SCALE` helps scale fixed values for the current screen +- `lvgl.PERCENT_SIZE + N` can be used for percentage-based sizes and positions + +Use percentage sizing carefully: the parent container must already have a defined size, and not every object type supports percentage-based values equally well. + +## Examples + +### One-Time script + +```lua +local exitTool = false + +local function close() + lvgl.confirm({ + title = "Exit", + message = "Really exit?", + confirm = function() + exitTool = true + end, + }) +end + +local function init() + if lvgl == nil then + return + end + + lvgl.clear() + + local pg = lvgl.page({ + title = "Test Tool", + subtitle = "Page 1", + back = close, + }) + + pg:label({ x = 70, y = 16, color = BLACK, font = DBLSIZE, text = "Test Page" }) + pg:button({ x = 200, y = 150, text = "CLOSE", press = close }) +end + +local function run() + if lvgl == nil then + lcd.drawText(0, 0, "LVGL support required", COLOR_THEME_WARNING) + end + + if exitTool then + return 2 + end + + return 0 +end + +return { init = init, run = run, useLvgl = true } +``` + +### Widget script + +```lua +local options = { + { "Color", COLOR, COLOR_THEME_SECONDARY1 }, + { "Shadow", BOOL, 0 }, +} + +local function create(zone, options) + return { zone = zone, options = options, counter = 0 } +end + +local function update(wgt, options) + wgt.options = options + + lvgl.clear() + + if wgt.options.Shadow ~= 0 then + lvgl.label({ + x = wgt.zone.x + 1, + y = wgt.zone.y + 1, + color = BLACK, + font = DBLSIZE, + text = function() + return wgt.counter + end, + }) + end + + lvgl.label({ + x = wgt.zone.x, + y = wgt.zone.y, + color = wgt.options.Color, + font = DBLSIZE, + text = function() + return wgt.counter + end, + }) +end + +local function background(wgt) + wgt.counter = wgt.counter + 1 +end + +local function refresh(wgt) + wgt.counter = wgt.counter + 1 +end + +return { + name = "CounterLVGL", + options = options, + create = create, + update = update, + refresh = refresh, + background = background, + useLvgl = true, +} +``` diff --git a/lua-api-programming/saving-memory.md b/website/md-docs/programming/core-concepts/saving-memory.md similarity index 91% rename from lua-api-programming/saving-memory.md rename to website/md-docs/programming/core-concepts/saving-memory.md index c196b9ab4..f86e11f8a 100644 --- a/lua-api-programming/saving-memory.md +++ b/website/md-docs/programming/core-concepts/saving-memory.md @@ -141,7 +141,7 @@ return { } ``` -The `create` function loads the file `loadable.lua` in the folder /WIDGETS/\<widget name>/, and calls it immediately as described in [the previous section](loading-code-modules-dynamically.md). It passes `zone` and `options` as arguments to `loadable.lua`. This scripts adds the functions `refresh`, `update` and (optionally) `background` to the `widget` table: +The `create` function loads the file `loadable.lua` in the folder `/WIDGETS/<widget name>/`, and calls it immediately as described in [the previous section](loading-code-modules-dynamically.md). It passes `zone` and `options` as arguments to `loadable.lua`. This scripts adds the functions `refresh`, `update` and (optionally) `background` to the `widget` table: ```lua -- loadable.lua @@ -167,7 +167,7 @@ end return widget ``` -`zone` and `options` are stored in the [closure](../overview/lua-basics.md#closures) of `loadable.lua`, therefore they do not need to be added to the `widget` table, as is commonly done. +`zone` and `options` are stored in the [closure](../../api-overview/lua-basics.md#closures) of `loadable.lua`, therefore they do not need to be added to the `widget` table, as is commonly done. Obviously, the bulk of the widget's code goes in `loadable.lua`, and is only loaded if the widgets is in fact being used. Therefore, if the widget is not used, only the small amount of code in `main.lua` is loaded into the radio's memory. diff --git a/lua-api-programming/using-key-and-touch-events.md b/website/md-docs/programming/core-concepts/using-key-and-touch-events.md similarity index 96% rename from lua-api-programming/using-key-and-touch-events.md rename to website/md-docs/programming/core-concepts/using-key-and-touch-events.md index a6faa70aa..031371168 100644 --- a/lua-api-programming/using-key-and-touch-events.md +++ b/website/md-docs/programming/core-concepts/using-key-and-touch-events.md @@ -66,7 +66,7 @@ LibGUI was created to support the SoarETX widgets, but it was made separate so e It is a widget that comes with a global library. Since all widgets are loaded, whether or not they are being used, global functions declared in the body of a widget script will always be available in any widget script in the `create` and `refresh` functions. It is not necessary to setup the widget to use the library, and the only purpose of the widget is to show how `LibGUI` can be used to create widget apps. -The library is implemented in the [loadable file](saving-memory.md#widget-script-radios) **/WIDGETS/LibGUI/libgui.lua.** The widget that demonstrates how to use the library is implemented in the [loadable file](saving-memory.md#widget-script-radios) **/WIDGETS/LibGUI/loadable.lua**. The file **/WIDGETS/LibGUI/main.lua** contains the standard functions needed for a widget and handles the loading of the two other files. +The library is implemented in the [loadable file](saving-memory.md#widget-script-radios) `/WIDGETS/LibGUI/libgui.lua`. The widget that demonstrates how to use the library is implemented in the [loadable file](saving-memory.md#widget-script-radios) `/WIDGETS/LibGUI/loadable.lua`. The file `/WIDGETS/LibGUI/main.lua` contains the standard functions needed for a widget and handles the loading of the two other files. The global function `loadGUI()` returns a new `libGUI` object. This object can be used to create new `GUI`objects, which are used to create screens with elements like buttons, menus, labels, numbers etc. @@ -131,7 +131,7 @@ It cannot trap the events `EVT_VIRTUAL_PREV`, `EVT_VIRTUAL_NEXT` as these events This function can be used to show a modal prompt window, or trap events (alternative to `setEventHandler`). `guiPrompt` is a `GUI` or another Lua table with a function `run(event, touchState`). -When it is set, the main GUI will first be drawn, and then it will call `guiPrompt.run(event, touchState)` instead of its own `onEvent` function. +When it is set, the main GUI will first be drawn, and then it will call `guiPrompt.run(event, touchState)` instead of its own `onEvent` function. #### GUI.dismissPrompt() @@ -189,7 +189,7 @@ The label does not respond to any events, but its `title` and `flags` can be cha #### GUI.menu(x, y, w, h, items, callBack \[, flags]) -Add a scrollable menu to the GUI. +Add a scrollable menu to the GUI. `items` is a table with the menu item texts. @@ -219,7 +219,7 @@ The same as the above, just vertical. #### gui.custom(self, x, y, w, h) -This can be used to create your own custom GUI elements. `self` is a table containing the element. You must define the functions `self.draw(focused)` and `self.onEvent(event, touchState)`. There is a function `self.drawFocus(color)` defined that can draw a border around the element (use if focused == true). +This can be used to create your own custom GUI elements. `self` is a table containing the element. You must define the functions `self.draw(focused)` and `self.onEvent(event, touchState)`. There is a function `self.drawFocus(color)` defined that can draw a border around the element (use if focused == true). #### gui.gui(x, y, w, h) diff --git a/website/md-docs/radios/README.md b/website/md-docs/radios/README.md new file mode 100644 index 000000000..587a7373b --- /dev/null +++ b/website/md-docs/radios/README.md @@ -0,0 +1,69 @@ +# Radios + +## Radios with B&W LCD screen + +<table class="radio-list-table radio-overview-list-table"> +<thead><tr><th>Model</th><th>Manufacturer</th><th>from EdgeTX</th></tr></thead> +<tbody> +<tr><td><div class="radio-list-model"><img src="../assets/radios/betafpv-literadio-3-pro-500.png" alt="BetaFPV LiteRadio3 Pro"><a href="betafpv/betafpv-literadio3-pro/">LiteRadio3 Pro</a></div></td><td>BetaFPV</td><td>-</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/frsky-qx7-500.png" alt="FrSky QX7"><a href="frsky/frsky-qx7-qx7s/">QX7 / QX7S / QX7 ACCESS / QX7S ACCESS</a></div></td><td>FrSky</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/frsky-xlite-pro-500.png" alt="FrSky X-Lite"><a href="frsky/frsky-x-lite-x-lite-s-x-lite-pro/">X-Lite / X-Lite S / X-Lite Pro</a></div></td><td>FrSky</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/frsky-x9-lite-500.png" alt="FrSky X9 Lite"><a href="frsky/frsky-x9-lite-x9-lite-s/">X9 Lite / X9 Lite S</a></div></td><td>FrSky</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/hrs-v14-500.png" alt="HelloRadioSky V14"><a href="helloradiosky/helloradiosky-v14/">V14</a></div></td><td>HelloRadioSky</td><td>2.11</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/iflight-commando-8-500.png" alt="iFlight Commando8"><a href="iflight/iflight-commando8/">Commando8</a></div></td><td>iFlight</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/jumper-bumblebee-500.png" alt="Jumper Bumblebee"><a href="jumper/jumper-bumblebee/">Bumblebee</a></div></td><td>Jumper</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/jumper-t-lite-500.png" alt="Jumper T-Lite"><a href="jumper/jumper-t-lite-t-lite-v2/">T-Lite / T-Lite v2</a></div></td><td>Jumper</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/jumper-tpro-500.png" alt="Jumper T-Pro"><a href="jumper/jumper-t-pro/">T-Pro</a></div></td><td>Jumper</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/jumper-t12-500.png" alt="Jumper T-12"><a href="jumper/jumper-t12-t12-plus-t12-pro-hall/">T-12 / T12 Plus / T12 Pro Hall</a></div></td><td>Jumper</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/jumper-t14-500.png" alt="Jumper T-14"><a href="jumper/jumper-t14/">T-14</a></div></td><td>Jumper</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/jumper-t20-500.png" alt="Jumper T-20"><a href="jumper/jumper-t20/">T-20</a></div></td><td>Jumper</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/jumper-t20-500.png" alt="Jumper T20 V2"><a href="jumper/jumper-t20-v2/">T20 V2</a></div></td><td>Jumper</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/radiomaster-boxer-500.png" alt="RadioMaster Boxer"><a href="radiomaster/radiomaster-boxer/">Boxer</a></div></td><td>RadioMaster</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/radiomaster-gx12-500.png" alt="RadioMaster GX12"><a href="radiomaster/radiomaster-gx12/">GX12</a></div></td><td>RadioMaster</td><td>2.11</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/radiomaster-mt12-500.png" alt="RadioMaster MT12"><a href="radiomaster/radiomaster-mt12/">MT12</a></div></td><td>RadioMaster</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/radiomaster-pocket-500.png" alt="RadioMaster Pocket"><a href="radiomaster/radiomaster-pocket/">Pocket</a></div></td><td>RadioMaster</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/radiomaster-t8pro-500.png" alt="RadioMaster T8 Pro"><a href="radiomaster/radiomaster-t8-pro/">T8 Pro</a></div></td><td>RadioMaster</td><td>-</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/radiomaster-tx12-500.png" alt="RadioMaster TX12"><a href="radiomaster/radiomaster-tx12/">TX12</a></div></td><td>RadioMaster</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/radiomaster-tx12-500.png" alt="RadioMaster TX12 Mark II"><a href="radiomaster/radiomaster-tx12-mark-ii/">TX12 Mark II</a></div></td><td>RadioMaster</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/radiomaster-zorro-500.png" alt="RadioMaster Zorro"><a href="radiomaster/radiomaster-zorro/">Zorro</a></div></td><td>RadioMaster</td><td>2.10</td></tr> +</tbody> +</table> + +## Radios with Grayscale LCD screen + +<table class="radio-list-table radio-overview-list-table"> +<thead><tr><th>Model</th><th>Manufacturer</th><th>from EdgeTX</th></tr></thead> +<tbody> +<tr><td><div class="radio-list-model"><img src="../assets/radios/frsky-x9d-500.png" alt="FrSky X9D"><a href="frsky/frsky-x9d-x9d-plus-x9d-plus-se/">X9D / X9D+ / X9D SE</a></div></td><td>FrSky</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/frsky-x9d-2019-500.png" alt="FrSky X9D+ 2019"><a href="frsky/frsky-x9dp2019/">X9D+ 2019 / X9D+ 2019 SE</a></div></td><td>FrSky</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/frsky-x9e-500.png" alt="FrSky X9E"><a href="frsky/frsky-x9e-x9e-hall/">X9E / X9E Hall</a></div></td><td>FrSky</td><td>2.10</td></tr> +</tbody> +</table> + +## Radios with COLOR LCD screen + +<table class="radio-list-table radio-overview-list-table"> +<thead><tr><th>Model</th><th>Manufacturer</th><th>from EdgeTX</th></tr></thead> +<tbody> +<tr><td><div class="radio-list-model"><img src="../assets/radios/fatfish-f16-500.png" alt="FatFish F16"><a href="fatfish/fatfish-f16/">F16</a></div></td><td>FatFish</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/flysky-el18-500.png" alt="FlySky EL18"><a href="flysky/flysky-el18/">EL18</a></div></td><td>FlySky</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/flysky-nb4-500.png" alt="FlySky NB4+"><a href="flysky/flysky-nb4-plus/">NB4+</a></div></td><td>FlySky</td><td>2.11</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/flysky-nv14-500.png" alt="FlySky NV14"><a href="flysky/flysky-nv14/">NV14</a></div></td><td>FlySky</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/flysky-pa01-500.png" alt="FlySky PA01"><a href="flysky/flysky-pa01/">PA01</a></div></td><td>FlySky</td><td>2.11</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/flysky-pl18-500.png" alt="FlySky PL18"><a href="flysky/flysky-pl18-pl18ev/">PL18 / PL18EV</a></div></td><td>FlySky</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/flysky-pl18u-500.png" alt="FlySky PL18U"><a href="flysky/flysky-pl18u/">PL18U</a></div></td><td>FlySky</td><td>2.11</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/flysky-st16-500.png" alt="FlySky ST16"><a href="flysky/flysky-st16/">ST16</a></div></td><td>FlySky</td><td>2.11</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/frsky-x10-500.png" alt="FrSky X10"><a href="frsky/frsky-x10express/">X10 / X10S / X10 Express / X10S Express</a></div></td><td>FrSky</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/frsky-x12s-500.png" alt="FrSky X12S"><a href="frsky/frsky-x12s-x12s-irsm/">X12S / X12S IRSM</a></div></td><td>FrSky</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/hrs-v12-500.png" alt="HelloRadioSky V12"><a href="helloradiosky/helloradiosky-v12/">V12</a></div></td><td>HelloRadioSky</td><td>2.11</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/hrs-v16-500.png" alt="HelloRadioSky V16"><a href="helloradiosky/helloradiosky-v16/">V16</a></div></td><td>HelloRadioSky</td><td>2.11</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/iflight-commando-14-500.png" alt="iFlight Commando14"><a href="iflight/iflight-commando14/">Commando14</a></div></td><td>iFlight</td><td>-</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/jumper-t15-500.png" alt="Jumper T15"><a href="jumper/jumper-t15/">T15</a></div></td><td>Jumper</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/jumper-t15-pro-500.png" alt="Jumper T15 Pro"><a href="jumper/jumper-t15-pro/">T15 Pro</a></div></td><td>Jumper</td><td>2.12</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/jumper-t16-500.png" alt="Jumper T16"><a href="jumper/jumper-t16-t16-plus-t16-pro-hall/">T16 / T16 Plus / T16 Pro Hall</a></div></td><td>Jumper</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/jumper-t18-500.png" alt="Jumper T18"><a href="jumper/jumper-t18-t18-lite-t18-pro/">T18 / T18 Lite / T18 Pro</a></div></td><td>Jumper</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/radiomaster-tx15-500.png" alt="RadioMaster TX15"><a href="radiomaster/radiomaster-tx15/">TX15</a></div></td><td>RadioMaster</td><td>2.12</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/radiomaster-tx16s-max-500.png" alt="RadioMaster TX16S"><a href="radiomaster/radiomaster-tx16s/">TX16S / TX16S MAX / TX16S Mark II</a></div></td><td>RadioMaster</td><td>2.10</td></tr> +<tr><td><div class="radio-list-model"><img src="../assets/radios/radiomaster-tx16s-mk3-max-500.png" alt="RadioMaster TX16S MK3"><a href="radiomaster/radiomaster-tx16smk3/">TX16S MK3 / TX16S MK3 MAX</a></div></td><td>RadioMaster</td><td>2.12</td></tr> +</tbody> +</table> diff --git a/website/md-docs/radios/betafpv/README.md b/website/md-docs/radios/betafpv/README.md new file mode 100644 index 000000000..6c65f6492 --- /dev/null +++ b/website/md-docs/radios/betafpv/README.md @@ -0,0 +1,8 @@ +# BetaFPV + +<table class="radio-list-table"> +<thead><tr><th>Model</th><th>from EdgeTX</th><th>LCD type</th></tr></thead> +<tbody> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/betafpv-literadio-3-pro-500.png" alt="BetaFPV LiteRadio3 Pro"><a href="betafpv-literadio3-pro/">LiteRadio3 Pro</a></div></td><td>-</td><td>B&W LCD</td></tr> +</tbody> +</table> diff --git a/website/md-docs/radios/betafpv/betafpv-literadio3-pro.md b/website/md-docs/radios/betafpv/betafpv-literadio3-pro.md new file mode 100644 index 000000000..4c30b940e --- /dev/null +++ b/website/md-docs/radios/betafpv/betafpv-literadio3-pro.md @@ -0,0 +1,25 @@ +# BetaFPV LiteRadio3 Pro + +[Back to BetaFPV](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/betafpv-literadio-3-pro-500.png" alt="BetaFPV LiteRadio3 Pro"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>BetaFPV</td></tr> +<tr><td>Model</td><td>LiteRadio3 Pro</td></tr> +<tr><td>from EdgeTX</td><td>-</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>lr3pro</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/fatfish/README.md b/website/md-docs/radios/fatfish/README.md new file mode 100644 index 000000000..9bc360e80 --- /dev/null +++ b/website/md-docs/radios/fatfish/README.md @@ -0,0 +1,8 @@ +# FatFish + +<table class="radio-list-table"> +<thead><tr><th>Model</th><th>from EdgeTX</th><th>LCD type</th></tr></thead> +<tbody> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/fatfish-f16-500.png" alt="FatFish F16"><a href="fatfish-f16/">F16</a></div></td><td>2.10</td><td>Color LCD</td></tr> +</tbody> +</table> diff --git a/website/md-docs/radios/fatfish/fatfish-f16.md b/website/md-docs/radios/fatfish/fatfish-f16.md new file mode 100644 index 000000000..e20447784 --- /dev/null +++ b/website/md-docs/radios/fatfish/fatfish-f16.md @@ -0,0 +1,25 @@ +# FatFish F16 + +[Back to FatFish](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/fatfish-f16-500.png" alt="FatFish F16"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>FatFish</td></tr> +<tr><td>Model</td><td>F16</td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>Color LCD 480x272 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>f16</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/flysky/README.md b/website/md-docs/radios/flysky/README.md new file mode 100644 index 000000000..81635738c --- /dev/null +++ b/website/md-docs/radios/flysky/README.md @@ -0,0 +1,14 @@ +# FlySky + +<table class="radio-list-table"> +<thead><tr><th>Model</th><th>from EdgeTX</th><th>LCD type</th></tr></thead> +<tbody> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/flysky-el18-500.png" alt="FlySky EL18"><a href="flysky-el18/">EL18</a></div></td><td>2.10</td><td>Color LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/flysky-nb4-500.png" alt="FlySky NB4+"><a href="flysky-nb4-plus/">NB4+</a></div></td><td>2.11</td><td>Color LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/flysky-nv14-500.png" alt="FlySky NV14"><a href="flysky-nv14/">NV14</a></div></td><td>2.10</td><td>Color LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/flysky-pa01-500.png" alt="FlySky PA01"><a href="flysky-pa01/">PA01</a></div></td><td>2.11</td><td>Color LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/flysky-pl18-500.png" alt="FlySky PL18"><a href="flysky-pl18-pl18ev/">PL18 / PL18EV</a></div></td><td>2.10</td><td>Color LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/flysky-pl18u-500.png" alt="FlySky PL18U"><a href="flysky-pl18u/">PL18U</a></div></td><td>2.11</td><td>Color LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/flysky-st16-500.png" alt="FlySky ST16"><a href="flysky-st16/">ST16</a></div></td><td>2.11</td><td>Color LCD</td></tr> +</tbody> +</table> diff --git a/website/md-docs/radios/flysky/flysky-el18.md b/website/md-docs/radios/flysky/flysky-el18.md new file mode 100644 index 000000000..6ce69b75e --- /dev/null +++ b/website/md-docs/radios/flysky/flysky-el18.md @@ -0,0 +1,25 @@ +# FlySky EL18 + +[Back to FlySky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/flysky-el18-500.png" alt="FlySky EL18"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>FlySky</td></tr> +<tr><td>Model</td><td>EL18</td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>Color LCD 320x480 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>el18</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/flysky/flysky-nb4-plus.md b/website/md-docs/radios/flysky/flysky-nb4-plus.md new file mode 100644 index 000000000..1bdc971c7 --- /dev/null +++ b/website/md-docs/radios/flysky/flysky-nb4-plus.md @@ -0,0 +1,25 @@ +# FlySky NB4+ + +[Back to FlySky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/flysky-nb4-500.png" alt="FlySky NB4+"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>FlySky</td></tr> +<tr><td>Model</td><td>NB4+</td></tr> +<tr><td>from EdgeTX</td><td>2.11</td></tr> +<tr><td>LCD type</td><td>Color LCD 320x240 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>nb4p</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/flysky/flysky-nv14.md b/website/md-docs/radios/flysky/flysky-nv14.md new file mode 100644 index 000000000..a7ac1fdca --- /dev/null +++ b/website/md-docs/radios/flysky/flysky-nv14.md @@ -0,0 +1,25 @@ +# FlySky NV14 + +[Back to FlySky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/flysky-nv14-500.png" alt="FlySky NV14"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>FlySky</td></tr> +<tr><td>Model</td><td>NV14</td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>Color LCD 320x480 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>nv14</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/flysky/flysky-pa01.md b/website/md-docs/radios/flysky/flysky-pa01.md new file mode 100644 index 000000000..e16e3dffe --- /dev/null +++ b/website/md-docs/radios/flysky/flysky-pa01.md @@ -0,0 +1,25 @@ +# FlySky PA01 + +[Back to FlySky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/flysky-pa01-500.png" alt="FlySky PA01"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>FlySky</td></tr> +<tr><td>Model</td><td>PA01</td></tr> +<tr><td>from EdgeTX</td><td>2.11</td></tr> +<tr><td>LCD type</td><td>Color LCD 320x240 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>pa01</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/flysky/flysky-pl18-pl18ev.md b/website/md-docs/radios/flysky/flysky-pl18-pl18ev.md new file mode 100644 index 000000000..f63b420cb --- /dev/null +++ b/website/md-docs/radios/flysky/flysky-pl18-pl18ev.md @@ -0,0 +1,26 @@ +# FlySky PL18 + +[Back to FlySky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/flysky-pl18-500.png" alt="FlySky PL18"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>FlySky</td></tr> +<tr><td>Model</td><td>PL18</td></tr> +<tr><td>Versions</td><td><code>PL18EV</code></td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>Color LCD 480x320 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>pl18</code>, <code>pl18ev</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/flysky/flysky-pl18u.md b/website/md-docs/radios/flysky/flysky-pl18u.md new file mode 100644 index 000000000..261e1a0fc --- /dev/null +++ b/website/md-docs/radios/flysky/flysky-pl18u.md @@ -0,0 +1,25 @@ +# FlySky PL18U + +[Back to FlySky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/flysky-pl18u-500.png" alt="FlySky PL18U"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>FlySky</td></tr> +<tr><td>Model</td><td>PL18U</td></tr> +<tr><td>from EdgeTX</td><td>2.11</td></tr> +<tr><td>LCD type</td><td>Color LCD 480x320 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>flysky-pl18u</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/flysky/flysky-st16.md b/website/md-docs/radios/flysky/flysky-st16.md new file mode 100644 index 000000000..728af703b --- /dev/null +++ b/website/md-docs/radios/flysky/flysky-st16.md @@ -0,0 +1,25 @@ +# FlySky ST16 + +[Back to FlySky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/flysky-st16-500.png" alt="FlySky ST16"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>FlySky</td></tr> +<tr><td>Model</td><td>ST16</td></tr> +<tr><td>from EdgeTX</td><td>2.11</td></tr> +<tr><td>LCD type</td><td>Color LCD 480x320 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>st16</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/frsky/README.md b/website/md-docs/radios/frsky/README.md new file mode 100644 index 000000000..ad63ab61d --- /dev/null +++ b/website/md-docs/radios/frsky/README.md @@ -0,0 +1,15 @@ +# FrSky + +<table class="radio-list-table"> +<thead><tr><th>Model</th><th>from EdgeTX</th><th>LCD type</th></tr></thead> +<tbody> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/frsky-qx7-500.png" alt="FrSky QX7"><a href="frsky-qx7-qx7s/">QX7 / QX7S / QX7 ACCESS / QX7S ACCESS</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/frsky-xlite-pro-500.png" alt="FrSky X-Lite"><a href="frsky-x-lite-x-lite-s-x-lite-pro/">X-Lite / X-Lite S / X-Lite Pro</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/frsky-x9-lite-500.png" alt="FrSky X9 Lite"><a href="frsky-x9-lite-x9-lite-s/">X9 Lite / X9 Lite S</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/frsky-x9d-500.png" alt="FrSky X9D"><a href="frsky-x9d-x9d-plus-x9d-plus-se/">X9D / X9D+ / X9D SE</a></div></td><td>2.10</td><td>Grayscale LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/frsky-x9d-2019-500.png" alt="FrSky X9D+ 2019"><a href="frsky-x9dp2019/">X9D+ 2019 / X9D+ 2019 SE</a></div></td><td>2.10</td><td>Grayscale LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/frsky-x9e-500.png" alt="FrSky X9E"><a href="frsky-x9e-x9e-hall/">X9E / X9E Hall</a></div></td><td>2.10</td><td>Grayscale LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/frsky-x10-500.png" alt="FrSky X10"><a href="frsky-x10express/">X10 / X10S / X10 Express / X10S Express</a></div></td><td>2.10</td><td>Color LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/frsky-x12s-500.png" alt="FrSky X12S"><a href="frsky-x12s-x12s-irsm/">X12S / X12S IRSM</a></div></td><td>2.10</td><td>Color LCD</td></tr> +</tbody> +</table> diff --git a/website/md-docs/radios/frsky/frsky-qx7-qx7s.md b/website/md-docs/radios/frsky/frsky-qx7-qx7s.md new file mode 100644 index 000000000..bf1907e08 --- /dev/null +++ b/website/md-docs/radios/frsky/frsky-qx7-qx7s.md @@ -0,0 +1,26 @@ +# FrSky QX7 + +[Back to FrSky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/frsky-qx7-500.png" alt="FrSky QX7"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>FrSky</td></tr> +<tr><td>Model</td><td>QX7</td></tr> +<tr><td>Versions</td><td><code>QX7S</code>, <code>QX7 ACCESS</code>, <code>QX7S ACCESS</code></td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>x7</code>, <code>x7access</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/frsky/frsky-x-lite-x-lite-s-x-lite-pro.md b/website/md-docs/radios/frsky/frsky-x-lite-x-lite-s-x-lite-pro.md new file mode 100644 index 000000000..55cf09b9a --- /dev/null +++ b/website/md-docs/radios/frsky/frsky-x-lite-x-lite-s-x-lite-pro.md @@ -0,0 +1,26 @@ +# FrSky X-Lite + +[Back to FrSky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/frsky-xlite-pro-500.png" alt="FrSky X-Lite"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>FrSky</td></tr> +<tr><td>Model</td><td>X-Lite</td></tr> +<tr><td>Versions</td><td><code>X-Lite S</code>, <code>X-Lite Pro</code></td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>xlite</code>, <code>xlites</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/frsky/frsky-x10express.md b/website/md-docs/radios/frsky/frsky-x10express.md new file mode 100644 index 000000000..c41032c6a --- /dev/null +++ b/website/md-docs/radios/frsky/frsky-x10express.md @@ -0,0 +1,26 @@ +# FrSky X10 + +[Back to FrSky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/frsky-x10-500.png" alt="FrSky X10"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>FrSky</td></tr> +<tr><td>Model</td><td>X10</td></tr> +<tr><td>Versions</td><td><code>X10S</code>, <code>X10 Express</code>, <code>X10S Express</code></td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>Color LCD 480x272 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>x10</code>, <code>x10express</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/frsky/frsky-x12s-x12s-irsm.md b/website/md-docs/radios/frsky/frsky-x12s-x12s-irsm.md new file mode 100644 index 000000000..4df9844d8 --- /dev/null +++ b/website/md-docs/radios/frsky/frsky-x12s-x12s-irsm.md @@ -0,0 +1,26 @@ +# FrSky X12S + +[Back to FrSky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/frsky-x12s-500.png" alt="FrSky X12S"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>FrSky</td></tr> +<tr><td>Model</td><td>X12S</td></tr> +<tr><td>Versions</td><td><code>X12S IRSM</code></td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>Color LCD 480x272 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>x12s</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/frsky/frsky-x9-lite-x9-lite-s.md b/website/md-docs/radios/frsky/frsky-x9-lite-x9-lite-s.md new file mode 100644 index 000000000..05e2a56da --- /dev/null +++ b/website/md-docs/radios/frsky/frsky-x9-lite-x9-lite-s.md @@ -0,0 +1,26 @@ +# FrSky X9 Lite + +[Back to FrSky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/frsky-x9-lite-500.png" alt="FrSky X9 Lite"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>FrSky</td></tr> +<tr><td>Model</td><td>X9 Lite</td></tr> +<tr><td>Versions</td><td><code>X9 Lite S</code></td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>x9lite</code>, <code>x9lites</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/frsky/frsky-x9d-x9d-plus-x9d-plus-se.md b/website/md-docs/radios/frsky/frsky-x9d-x9d-plus-x9d-plus-se.md new file mode 100644 index 000000000..b38fa2666 --- /dev/null +++ b/website/md-docs/radios/frsky/frsky-x9d-x9d-plus-x9d-plus-se.md @@ -0,0 +1,26 @@ +# FrSky X9D + +[Back to FrSky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/frsky-x9d-500.png" alt="FrSky X9D"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>FrSky</td></tr> +<tr><td>Model</td><td>X9D</td></tr> +<tr><td>Versions</td><td><code>X9D+</code>, <code>X9D SE</code></td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>Grayscale LCD 212x64 4bit</td></tr> +<tr><td>Radio ID</td><td><code>x9d</code>, <code>x9d+</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/frsky/frsky-x9dp2019.md b/website/md-docs/radios/frsky/frsky-x9dp2019.md new file mode 100644 index 000000000..710565f93 --- /dev/null +++ b/website/md-docs/radios/frsky/frsky-x9dp2019.md @@ -0,0 +1,26 @@ +# FrSky X9D+ 2019 + +[Back to FrSky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/frsky-x9d-2019-500.png" alt="FrSky X9D+ 2019"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>FrSky</td></tr> +<tr><td>Model</td><td>X9D+ 2019</td></tr> +<tr><td>Versions</td><td><code>X9D+ 2019 SE</code></td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>Grayscale LCD 212x64 4bit</td></tr> +<tr><td>Radio ID</td><td><code>x9dp2019</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/frsky/frsky-x9e-x9e-hall.md b/website/md-docs/radios/frsky/frsky-x9e-x9e-hall.md new file mode 100644 index 000000000..9494d7733 --- /dev/null +++ b/website/md-docs/radios/frsky/frsky-x9e-x9e-hall.md @@ -0,0 +1,26 @@ +# FrSky X9E + +[Back to FrSky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/frsky-x9e-500.png" alt="FrSky X9E"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>FrSky</td></tr> +<tr><td>Model</td><td>X9E</td></tr> +<tr><td>Versions</td><td><code>X9E Hall</code></td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>Grayscale LCD 212x64 4bit</td></tr> +<tr><td>Radio ID</td><td><code>x9e</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/helloradiosky/README.md b/website/md-docs/radios/helloradiosky/README.md new file mode 100644 index 000000000..4dbee3284 --- /dev/null +++ b/website/md-docs/radios/helloradiosky/README.md @@ -0,0 +1,10 @@ +# HelloRadioSky + +<table class="radio-list-table"> +<thead><tr><th>Model</th><th>from EdgeTX</th><th>LCD type</th></tr></thead> +<tbody> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/hrs-v12-500.png" alt="HelloRadioSky V12"><a href="helloradiosky-v12/">V12</a></div></td><td>2.11</td><td>Color LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/hrs-v14-500.png" alt="HelloRadioSky V14"><a href="helloradiosky-v14/">V14</a></div></td><td>2.11</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/hrs-v16-500.png" alt="HelloRadioSky V16"><a href="helloradiosky-v16/">V16</a></div></td><td>2.11</td><td>Color LCD</td></tr> +</tbody> +</table> diff --git a/website/md-docs/radios/helloradiosky/helloradiosky-v12.md b/website/md-docs/radios/helloradiosky/helloradiosky-v12.md new file mode 100644 index 000000000..8e5fd706c --- /dev/null +++ b/website/md-docs/radios/helloradiosky/helloradiosky-v12.md @@ -0,0 +1,25 @@ +# HelloRadioSky V12 + +[Back to HelloRadioSky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/hrs-v12-500.png" alt="HelloRadioSky V12"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>HelloRadioSky</td></tr> +<tr><td>Model</td><td>V12</td></tr> +<tr><td>from EdgeTX</td><td>2.11</td></tr> +<tr><td>LCD type</td><td>Color LCD 480x272 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>v12</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/helloradiosky/helloradiosky-v14.md b/website/md-docs/radios/helloradiosky/helloradiosky-v14.md new file mode 100644 index 000000000..ec1487979 --- /dev/null +++ b/website/md-docs/radios/helloradiosky/helloradiosky-v14.md @@ -0,0 +1,25 @@ +# HelloRadioSky V14 + +[Back to HelloRadioSky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/hrs-v14-500.png" alt="HelloRadioSky V14"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>HelloRadioSky</td></tr> +<tr><td>Model</td><td>V14</td></tr> +<tr><td>from EdgeTX</td><td>2.11</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>v14</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/helloradiosky/helloradiosky-v16.md b/website/md-docs/radios/helloradiosky/helloradiosky-v16.md new file mode 100644 index 000000000..683d8d1b1 --- /dev/null +++ b/website/md-docs/radios/helloradiosky/helloradiosky-v16.md @@ -0,0 +1,25 @@ +# HelloRadioSky V16 + +[Back to HelloRadioSky](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/hrs-v16-500.png" alt="HelloRadioSky V16"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>HelloRadioSky</td></tr> +<tr><td>Model</td><td>V16</td></tr> +<tr><td>from EdgeTX</td><td>2.11</td></tr> +<tr><td>LCD type</td><td>Color LCD 480x272 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>v16</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/iflight/README.md b/website/md-docs/radios/iflight/README.md new file mode 100644 index 000000000..570e3b967 --- /dev/null +++ b/website/md-docs/radios/iflight/README.md @@ -0,0 +1,9 @@ +# iFlight + +<table class="radio-list-table"> +<thead><tr><th>Model</th><th>from EdgeTX</th><th>LCD type</th></tr></thead> +<tbody> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/iflight-commando-8-500.png" alt="iFlight Commando8"><a href="iflight-commando8/">Commando8</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/iflight-commando-14-500.png" alt="iFlight Commando14"><a href="iflight-commando14/">Commando14</a></div></td><td>-</td><td>Color LCD</td></tr> +</tbody> +</table> diff --git a/website/md-docs/radios/iflight/iflight-commando14.md b/website/md-docs/radios/iflight/iflight-commando14.md new file mode 100644 index 000000000..cb30b0c68 --- /dev/null +++ b/website/md-docs/radios/iflight/iflight-commando14.md @@ -0,0 +1,25 @@ +# iFlight Commando14 + +[Back to iFlight](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/iflight-commando-14-500.png" alt="iFlight Commando14"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>iFlight</td></tr> +<tr><td>Model</td><td>Commando14</td></tr> +<tr><td>from EdgeTX</td><td>-</td></tr> +<tr><td>LCD type</td><td>Color LCD 480x272 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>iflight-commando14</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/iflight/iflight-commando8.md b/website/md-docs/radios/iflight/iflight-commando8.md new file mode 100644 index 000000000..7145786d1 --- /dev/null +++ b/website/md-docs/radios/iflight/iflight-commando8.md @@ -0,0 +1,25 @@ +# iFlight Commando8 + +[Back to iFlight](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/iflight-commando-8-500.png" alt="iFlight Commando8"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>iFlight</td></tr> +<tr><td>Model</td><td>Commando8</td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 480x272 1bit</td></tr> +<tr><td>Radio ID</td><td><code>commando8</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/jumper/README.md b/website/md-docs/radios/jumper/README.md new file mode 100644 index 000000000..91fb8d885 --- /dev/null +++ b/website/md-docs/radios/jumper/README.md @@ -0,0 +1,18 @@ +# Jumper + +<table class="radio-list-table"> +<thead><tr><th>Model</th><th>from EdgeTX</th><th>LCD type</th></tr></thead> +<tbody> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/jumper-bumblebee-500.png" alt="Jumper Bumblebee"><a href="jumper-bumblebee/">Bumblebee</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/jumper-t-lite-500.png" alt="Jumper T-Lite"><a href="jumper-t-lite-t-lite-v2/">T-Lite / T-Lite v2</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/jumper-tpro-500.png" alt="Jumper T-Pro"><a href="jumper-t-pro/">T-Pro</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/jumper-t12-500.png" alt="Jumper T-12"><a href="jumper-t12-t12-plus-t12-pro-hall/">T-12 / T12 Plus / T12 Pro Hall</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/jumper-t14-500.png" alt="Jumper T-14"><a href="jumper-t14/">T-14</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/jumper-t20-500.png" alt="Jumper T-20"><a href="jumper-t20/">T-20</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/jumper-t15-500.png" alt="Jumper T15"><a href="jumper-t15/">T15</a></div></td><td>2.10</td><td>Color LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/jumper-t15-pro-500.png" alt="Jumper T15 Pro"><a href="jumper-t15-pro/">T15 Pro</a></div></td><td>2.12</td><td>Color LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/jumper-t16-500.png" alt="Jumper T16"><a href="jumper-t16-t16-plus-t16-pro-hall/">T16 / T16 Plus / T16 Pro Hall</a></div></td><td>2.10</td><td>Color LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/jumper-t18-500.png" alt="Jumper T18"><a href="jumper-t18-t18-lite-t18-pro/">T18 / T18 Lite / T18 Pro</a></div></td><td>2.10</td><td>Color LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/jumper-t20-500.png" alt="Jumper T20 V2"><a href="jumper-t20-v2/">T20 V2</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +</tbody> +</table> diff --git a/website/md-docs/radios/jumper/jumper-bumblebee.md b/website/md-docs/radios/jumper/jumper-bumblebee.md new file mode 100644 index 000000000..e60b767ef --- /dev/null +++ b/website/md-docs/radios/jumper/jumper-bumblebee.md @@ -0,0 +1,25 @@ +# Jumper Bumblebee + +[Back to Jumper](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/jumper-bumblebee-500.png" alt="Jumper Bumblebee"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>Jumper</td></tr> +<tr><td>Model</td><td>Bumblebee</td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>bumblebee</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/jumper/jumper-t-lite-t-lite-v2.md b/website/md-docs/radios/jumper/jumper-t-lite-t-lite-v2.md new file mode 100644 index 000000000..196d26620 --- /dev/null +++ b/website/md-docs/radios/jumper/jumper-t-lite-t-lite-v2.md @@ -0,0 +1,26 @@ +# Jumper T-Lite + +[Back to Jumper](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/jumper-t-lite-500.png" alt="Jumper T-Lite"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>Jumper</td></tr> +<tr><td>Model</td><td>T-Lite</td></tr> +<tr><td>Versions</td><td><code>T-Lite v2</code></td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>tlite</code>, <code>tlitef4</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/jumper/jumper-t-pro.md b/website/md-docs/radios/jumper/jumper-t-pro.md new file mode 100644 index 000000000..770c13e72 --- /dev/null +++ b/website/md-docs/radios/jumper/jumper-t-pro.md @@ -0,0 +1,25 @@ +# Jumper T-Pro + +[Back to Jumper](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/jumper-tpro-500.png" alt="Jumper T-Pro"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>Jumper</td></tr> +<tr><td>Model</td><td>T-Pro</td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>tpro</code>, <code>tprov2</code>, <code>tpros</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/jumper/jumper-t12-t12-plus-t12-pro-hall.md b/website/md-docs/radios/jumper/jumper-t12-t12-plus-t12-pro-hall.md new file mode 100644 index 000000000..3f38ecffa --- /dev/null +++ b/website/md-docs/radios/jumper/jumper-t12-t12-plus-t12-pro-hall.md @@ -0,0 +1,26 @@ +# Jumper T-12 + +[Back to Jumper](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/jumper-t12-500.png" alt="Jumper T-12"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>Jumper</td></tr> +<tr><td>Model</td><td>T-12</td></tr> +<tr><td>Versions</td><td><code>T12 Plus</code>, <code>T12 Pro Hall</code></td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>t12</code>, <code>t12max</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/jumper/jumper-t14.md b/website/md-docs/radios/jumper/jumper-t14.md new file mode 100644 index 000000000..1bc29f1bd --- /dev/null +++ b/website/md-docs/radios/jumper/jumper-t14.md @@ -0,0 +1,25 @@ +# Jumper T-14 + +[Back to Jumper](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/jumper-t14-500.png" alt="Jumper T-14"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>Jumper</td></tr> +<tr><td>Model</td><td>T-14</td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>t14</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/jumper/jumper-t15-pro.md b/website/md-docs/radios/jumper/jumper-t15-pro.md new file mode 100644 index 000000000..fd7fa8342 --- /dev/null +++ b/website/md-docs/radios/jumper/jumper-t15-pro.md @@ -0,0 +1,25 @@ +# Jumper T15 Pro + +[Back to Jumper](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/jumper-t15-pro-500.png" alt="Jumper T15 Pro"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>Jumper</td></tr> +<tr><td>Model</td><td>T15 Pro</td></tr> +<tr><td>from EdgeTX</td><td>2.12</td></tr> +<tr><td>LCD type</td><td>Color LCD 480x320 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>t15pro</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/jumper/jumper-t15.md b/website/md-docs/radios/jumper/jumper-t15.md new file mode 100644 index 000000000..f6bb6e8d3 --- /dev/null +++ b/website/md-docs/radios/jumper/jumper-t15.md @@ -0,0 +1,25 @@ +# Jumper T15 + +[Back to Jumper](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/jumper-t15-500.png" alt="Jumper T15"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>Jumper</td></tr> +<tr><td>Model</td><td>T15</td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>Color LCD 480x320 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>t15</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/jumper/jumper-t16-t16-plus-t16-pro-hall.md b/website/md-docs/radios/jumper/jumper-t16-t16-plus-t16-pro-hall.md new file mode 100644 index 000000000..b5b14e721 --- /dev/null +++ b/website/md-docs/radios/jumper/jumper-t16-t16-plus-t16-pro-hall.md @@ -0,0 +1,26 @@ +# Jumper T16 + +[Back to Jumper](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/jumper-t16-500.png" alt="Jumper T16"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>Jumper</td></tr> +<tr><td>Model</td><td>T16</td></tr> +<tr><td>Versions</td><td><code>T16 Plus</code>, <code>T16 Pro Hall</code></td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>Color LCD 480x272 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>t16</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/jumper/jumper-t18-t18-lite-t18-pro.md b/website/md-docs/radios/jumper/jumper-t18-t18-lite-t18-pro.md new file mode 100644 index 000000000..61424ab6c --- /dev/null +++ b/website/md-docs/radios/jumper/jumper-t18-t18-lite-t18-pro.md @@ -0,0 +1,26 @@ +# Jumper T18 + +[Back to Jumper](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/jumper-t18-500.png" alt="Jumper T18"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>Jumper</td></tr> +<tr><td>Model</td><td>T18</td></tr> +<tr><td>Versions</td><td><code>T18 Lite</code>, <code>T18 Pro</code></td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>Color LCD 480x272 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>t18</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/jumper/jumper-t20-v2.md b/website/md-docs/radios/jumper/jumper-t20-v2.md new file mode 100644 index 000000000..725dd2958 --- /dev/null +++ b/website/md-docs/radios/jumper/jumper-t20-v2.md @@ -0,0 +1,25 @@ +# Jumper T20 V2 + +[Back to Jumper](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/jumper-t20-500.png" alt="Jumper T20 V2"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>Jumper</td></tr> +<tr><td>Model</td><td>T20 V2</td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>t20v2</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/jumper/jumper-t20.md b/website/md-docs/radios/jumper/jumper-t20.md new file mode 100644 index 000000000..110b6be96 --- /dev/null +++ b/website/md-docs/radios/jumper/jumper-t20.md @@ -0,0 +1,25 @@ +# Jumper T-20 + +[Back to Jumper](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/jumper-t20-500.png" alt="Jumper T-20"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>Jumper</td></tr> +<tr><td>Model</td><td>T-20</td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>t20</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/radiomaster/README.md b/website/md-docs/radios/radiomaster/README.md new file mode 100644 index 000000000..bfb6d768f --- /dev/null +++ b/website/md-docs/radios/radiomaster/README.md @@ -0,0 +1,18 @@ +# RadioMaster + +<table class="radio-list-table"> +<thead><tr><th>Model</th><th>from EdgeTX</th><th>LCD type</th></tr></thead> +<tbody> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/radiomaster-boxer-500.png" alt="RadioMaster Boxer"><a href="radiomaster-boxer/">Boxer</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/radiomaster-gx12-500.png" alt="RadioMaster GX12"><a href="radiomaster-gx12/">GX12</a></div></td><td>2.11</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/radiomaster-mt12-500.png" alt="RadioMaster MT12"><a href="radiomaster-mt12/">MT12</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/radiomaster-pocket-500.png" alt="RadioMaster Pocket"><a href="radiomaster-pocket/">Pocket</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/radiomaster-t8pro-500.png" alt="RadioMaster T8 Pro"><a href="radiomaster-t8-pro/">T8 Pro</a></div></td><td>-</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/radiomaster-tx12-500.png" alt="RadioMaster TX12"><a href="radiomaster-tx12/">TX12</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/radiomaster-tx12-500.png" alt="RadioMaster TX12 Mark II"><a href="radiomaster-tx12-mark-ii/">TX12 Mark II</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/radiomaster-zorro-500.png" alt="RadioMaster Zorro"><a href="radiomaster-zorro/">Zorro</a></div></td><td>2.10</td><td>B&W LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/radiomaster-tx15-500.png" alt="RadioMaster TX15"><a href="radiomaster-tx15/">TX15</a></div></td><td>2.12</td><td>Color LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/radiomaster-tx16s-max-500.png" alt="RadioMaster TX16S"><a href="radiomaster-tx16s/">TX16S / TX16S MAX / TX16S Mark II</a></div></td><td>2.10</td><td>Color LCD</td></tr> +<tr><td><div class="radio-list-model"><img src="../../assets/radios/radiomaster-tx16s-mk3-max-500.png" alt="RadioMaster TX16S MK3"><a href="radiomaster-tx16smk3/">TX16S MK3 / TX16S MK3 MAX</a></div></td><td>2.12</td><td>Color LCD</td></tr> +</tbody> +</table> diff --git a/website/md-docs/radios/radiomaster/radiomaster-boxer.md b/website/md-docs/radios/radiomaster/radiomaster-boxer.md new file mode 100644 index 000000000..764ee0bdf --- /dev/null +++ b/website/md-docs/radios/radiomaster/radiomaster-boxer.md @@ -0,0 +1,25 @@ +# RadioMaster Boxer + +[Back to RadioMaster](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/radiomaster-boxer-500.png" alt="RadioMaster Boxer"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>RadioMaster</td></tr> +<tr><td>Model</td><td>Boxer</td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>boxer</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/radiomaster/radiomaster-gx12.md b/website/md-docs/radios/radiomaster/radiomaster-gx12.md new file mode 100644 index 000000000..6b265970e --- /dev/null +++ b/website/md-docs/radios/radiomaster/radiomaster-gx12.md @@ -0,0 +1,25 @@ +# RadioMaster GX12 + +[Back to RadioMaster](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/radiomaster-gx12-500.png" alt="RadioMaster GX12"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>RadioMaster</td></tr> +<tr><td>Model</td><td>GX12</td></tr> +<tr><td>from EdgeTX</td><td>2.11</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>gx12</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/radiomaster/radiomaster-mt12.md b/website/md-docs/radios/radiomaster/radiomaster-mt12.md new file mode 100644 index 000000000..be53d0a28 --- /dev/null +++ b/website/md-docs/radios/radiomaster/radiomaster-mt12.md @@ -0,0 +1,25 @@ +# RadioMaster MT12 + +[Back to RadioMaster](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/radiomaster-mt12-500.png" alt="RadioMaster MT12"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>RadioMaster</td></tr> +<tr><td>Model</td><td>MT12</td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>mt12</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/radiomaster/radiomaster-pocket.md b/website/md-docs/radios/radiomaster/radiomaster-pocket.md new file mode 100644 index 000000000..36f074a03 --- /dev/null +++ b/website/md-docs/radios/radiomaster/radiomaster-pocket.md @@ -0,0 +1,25 @@ +# RadioMaster Pocket + +[Back to RadioMaster](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/radiomaster-pocket-500.png" alt="RadioMaster Pocket"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>RadioMaster</td></tr> +<tr><td>Model</td><td>Pocket</td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>radiomaster-pocket</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/radiomaster/radiomaster-t8-pro.md b/website/md-docs/radios/radiomaster/radiomaster-t8-pro.md new file mode 100644 index 000000000..102131d13 --- /dev/null +++ b/website/md-docs/radios/radiomaster/radiomaster-t8-pro.md @@ -0,0 +1,25 @@ +# RadioMaster T8 Pro + +[Back to RadioMaster](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/radiomaster-t8pro-500.png" alt="RadioMaster T8 Pro"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>RadioMaster</td></tr> +<tr><td>Model</td><td>T8 Pro</td></tr> +<tr><td>from EdgeTX</td><td>-</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>t8</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/radiomaster/radiomaster-tx12-mark-ii.md b/website/md-docs/radios/radiomaster/radiomaster-tx12-mark-ii.md new file mode 100644 index 000000000..5ea962a52 --- /dev/null +++ b/website/md-docs/radios/radiomaster/radiomaster-tx12-mark-ii.md @@ -0,0 +1,25 @@ +# RadioMaster TX12 Mark II + +[Back to RadioMaster](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/radiomaster-tx12-500.png" alt="RadioMaster TX12 Mark II"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>RadioMaster</td></tr> +<tr><td>Model</td><td>TX12 Mark II</td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>tx12mk2</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/radiomaster/radiomaster-tx12.md b/website/md-docs/radios/radiomaster/radiomaster-tx12.md new file mode 100644 index 000000000..c35e7033d --- /dev/null +++ b/website/md-docs/radios/radiomaster/radiomaster-tx12.md @@ -0,0 +1,25 @@ +# RadioMaster TX12 + +[Back to RadioMaster](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/radiomaster-tx12-500.png" alt="RadioMaster TX12"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>RadioMaster</td></tr> +<tr><td>Model</td><td>TX12</td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>tx12</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/radiomaster/radiomaster-tx15.md b/website/md-docs/radios/radiomaster/radiomaster-tx15.md new file mode 100644 index 000000000..018785d15 --- /dev/null +++ b/website/md-docs/radios/radiomaster/radiomaster-tx15.md @@ -0,0 +1,25 @@ +# RadioMaster TX15 + +[Back to RadioMaster](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/radiomaster-tx15-500.png" alt="RadioMaster TX15"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>RadioMaster</td></tr> +<tr><td>Model</td><td>TX15</td></tr> +<tr><td>from EdgeTX</td><td>2.12</td></tr> +<tr><td>LCD type</td><td>Color LCD 480x320 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>tx15</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/radiomaster/radiomaster-tx16s.md b/website/md-docs/radios/radiomaster/radiomaster-tx16s.md new file mode 100644 index 000000000..732a0b3d9 --- /dev/null +++ b/website/md-docs/radios/radiomaster/radiomaster-tx16s.md @@ -0,0 +1,26 @@ +# RadioMaster TX16S + +[Back to RadioMaster](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/radiomaster-tx16s-max-500.png" alt="RadioMaster TX16S"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>RadioMaster</td></tr> +<tr><td>Model</td><td>TX16S</td></tr> +<tr><td>Versions</td><td><code>TX16S MAX</code>, <code>TX16S Mark II</code></td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>Color LCD 480x272 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>tx16s</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/radiomaster/radiomaster-tx16smk3.md b/website/md-docs/radios/radiomaster/radiomaster-tx16smk3.md new file mode 100644 index 000000000..ad516a1e6 --- /dev/null +++ b/website/md-docs/radios/radiomaster/radiomaster-tx16smk3.md @@ -0,0 +1,26 @@ +# RadioMaster TX16S MK3 + +[Back to RadioMaster](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/radiomaster-tx16s-mk3-max-500.png" alt="RadioMaster TX16S MK3"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>RadioMaster</td></tr> +<tr><td>Model</td><td>TX16S MK3</td></tr> +<tr><td>Versions</td><td><code>TX16S MK3 MAX</code></td></tr> +<tr><td>from EdgeTX</td><td>2.12</td></tr> +<tr><td>LCD type</td><td>Color LCD 800x480 RGB565</td></tr> +<tr><td>Radio ID</td><td><code>tx16smk3</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/radiomaster/radiomaster-zorro.md b/website/md-docs/radios/radiomaster/radiomaster-zorro.md new file mode 100644 index 000000000..f1ce37a12 --- /dev/null +++ b/website/md-docs/radios/radiomaster/radiomaster-zorro.md @@ -0,0 +1,25 @@ +# RadioMaster Zorro + +[Back to RadioMaster](README.md) | [All radios](../README.md) + +## Overview + +<div class="radio-overview"> +<div class="radio-overview-image"> +<img src="../../../assets/radios/radiomaster-zorro-500.png" alt="RadioMaster Zorro"> +</div> +<div class="radio-overview-table"> + +<table> +<thead><tr><th>Property</th><th>Value</th></tr></thead> +<tbody> +<tr><td>Manufacturer</td><td>RadioMaster</td></tr> +<tr><td>Model</td><td>Zorro</td></tr> +<tr><td>from EdgeTX</td><td>2.10</td></tr> +<tr><td>LCD type</td><td>B&W LCD 128x64 1bit</td></tr> +<tr><td>Radio ID</td><td><code>zorro</code></td></tr> +</tbody> +</table> + +</div> +</div> diff --git a/website/md-docs/radios/tbs/README.md b/website/md-docs/radios/tbs/README.md new file mode 100644 index 000000000..6c32c3137 --- /dev/null +++ b/website/md-docs/radios/tbs/README.md @@ -0,0 +1,6 @@ +# TBS + +| Model | introduced in EdgeTX | LCD type | +| --- | --- | --- | +<!-- | Mambo | - | B&W LCD | --> +<!-- | Tango 2 | - | B&W LCD | --> diff --git a/website/md-docs/stylesheets/extra-live-v2.css b/website/md-docs/stylesheets/extra-live-v2.css new file mode 100644 index 000000000..4bc94ca58 --- /dev/null +++ b/website/md-docs/stylesheets/extra-live-v2.css @@ -0,0 +1,1031 @@ +@font-face { + font-family: "Roboto"; + font-style: normal; + font-weight: 400; + font-display: swap; + src: url("../assets/fonts/Roboto-Regular.ttf") format("truetype"); +} + +@font-face { + font-family: "Roboto"; + font-style: normal; + font-weight: 700; + font-display: swap; + src: url("../assets/fonts/Roboto-Bold.ttf") format("truetype"); +} + +:root { + --md-text-font: "Roboto"; + --md-primary-fg-color: #0c7bcd; + --md-primary-fg-color--light: #38c0f7; + --md-primary-fg-color--dark: #095f9e; + --md-accent-fg-color: #38c0f7; +} + +/* Brand-specific colors used throughout this stylesheet that Material has no + equivalent semantic variable for (sidebar branding, migration/legacy amber + callouts, the api-card quality badge). Defined once per color scheme here + instead of duplicating every selector under [data-md-color-scheme="slate"] + -- anywhere a hardcoded color below was just "readable default text/ + background" it uses Material's own theme-aware variables + (--md-default-fg-color, --md-default-bg-color, --md-default-fg-color--lightest) + instead of one of these, since those already adapt correctly on their own. */ +[data-md-color-scheme="default"] { + --md-primary-fg-color: #0c7bcd; + --md-primary-fg-color--light: #38c0f7; + --md-primary-fg-color--dark: #095f9e; + --md-accent-fg-color: #38c0f7; + + --lua-sidebar-text: #35556f; + --lua-sidebar-hover-text: #095f9e; + --lua-sidebar-active-text: #084c7f; + --lua-sidebar-icon: rgba(12, 123, 205, 0.72); + + --lua-migration-bg: rgba(255, 247, 237, 0.92); + --lua-migration-border: rgba(245, 158, 11, 0.28); + --lua-migration-border-strong: rgba(217, 119, 6, 0.78); + --lua-migration-hover-bg: rgba(245, 158, 11, 0.12); + --lua-migration-active-bg: rgba(245, 158, 11, 0.18); + --lua-migration-text: #9a3412; + --lua-migration-text-alt: #7c3e12; + --lua-migration-text-active: #7c2d12; + --lua-migration-icon: rgba(180, 83, 9, 0.78); + + --lua-legacy-banner-bg: linear-gradient(135deg, rgba(255, 248, 225, 0.98), rgba(255, 243, 205, 0.94)); + --lua-legacy-banner-border: rgba(217, 119, 6, 0.3); + --lua-legacy-banner-shadow: rgba(120, 53, 15, 0.08); + --lua-legacy-banner-label: #9a3412; + --lua-legacy-banner-message: #7c2d12; + + --lua-badge-bg: rgba(255, 152, 0, 0.12); + --lua-badge-border: rgba(255, 152, 0, 0.28); + --lua-badge-text: rgb(191, 107, 0); + + --lua-decision-btn-text: rgb(33, 110, 190); +} + +[data-md-color-scheme="slate"] { + --md-primary-fg-color: #0c7bcd; + --md-primary-fg-color--light: #38c0f7; + --md-primary-fg-color--dark: #38c0f7; + --md-accent-fg-color: #38c0f7; + + --lua-sidebar-text: #a9c9e6; + --lua-sidebar-hover-text: #7fd0ff; + --lua-sidebar-active-text: #bfe4ff; + --lua-sidebar-icon: rgba(127, 208, 255, 0.85); + + --lua-migration-bg: rgba(72, 44, 16, 0.6); + --lua-migration-border: rgba(245, 158, 11, 0.4); + --lua-migration-border-strong: rgba(251, 191, 36, 0.8); + --lua-migration-hover-bg: rgba(245, 158, 11, 0.22); + --lua-migration-active-bg: rgba(245, 158, 11, 0.3); + --lua-migration-text: #fdba74; + --lua-migration-text-alt: #fed7aa; + --lua-migration-text-active: #ffedd5; + --lua-migration-icon: rgba(251, 191, 36, 0.85); + + --lua-legacy-banner-bg: linear-gradient(135deg, rgba(69, 45, 10, 0.65), rgba(56, 35, 8, 0.6)); + --lua-legacy-banner-border: rgba(245, 158, 11, 0.4); + --lua-legacy-banner-shadow: rgba(0, 0, 0, 0.35); + --lua-legacy-banner-label: #fdba74; + --lua-legacy-banner-message: #fed7aa; + + --lua-badge-bg: rgba(255, 152, 0, 0.2); + --lua-badge-border: rgba(255, 152, 0, 0.4); + --lua-badge-text: rgb(255, 179, 92); + + --lua-decision-btn-text: #7fd0ff; +} + +.md-header { + background-color: #0c7bcd; +} + +.md-header__button.md-logo img, +.md-header__button.md-logo svg { + height: 1.6rem; + width: auto; +} + +.md-header__title { + font-weight: 700; +} + +/* Material swaps the header title from the site name to the current + heading's text once you scroll past it: .md-header__title--active fades + BOTH .md-header__topic elements to opacity 0 first, then a more specific + sibling-combinator rule fades the second (page-title) one back to 1 -- + the first (site-title) one only stays visible because that second rule + doesn't touch it. Hiding just the second one (display: none) still left + the first one caught by the blanket opacity: 0, so the header went blank + on scroll instead of keeping the site title. Fix: re-pin the first one's + opacity back to 1 under --active too (:first-child gives this higher + specificity than Material's plain .md-header__topic rule, so it wins + without !important), and keep permanently hiding the second one so its + JS-updated page-title text never shows either. */ +.md-header__title--active .md-header__topic:first-child { + opacity: 1; + pointer-events: auto; + transform: translateX(0); + z-index: 0; +} + +.md-header__topic + .md-header__topic { + display: none; +} + +.api-function-breadcrumb { + align-items: center; + color: var(--md-default-fg-color--light); + display: flex; + flex-wrap: wrap; + font-size: 0.8rem; + gap: 0.35rem; + letter-spacing: 0.01em; + margin: 0 0 0.85rem; + text-transform: none; +} + +.api-function-breadcrumb a { + color: inherit; + text-decoration: none; +} + +.api-function-breadcrumb a:hover, +.api-function-breadcrumb a:focus { + color: var(--md-accent-fg-color); +} + +.md-typeset a { + text-decoration: underline; + text-underline-offset: 0.14em; +} + +.md-typeset a:hover, +.md-typeset a:focus { + text-decoration-thickness: 2px; +} + +.api-function-breadcrumb__separator { + color: var(--md-default-fg-color--lighter); +} + +.api-function-breadcrumb__current { + color: var(--md-default-fg-color); + font-weight: 600; +} + +/* toc.integrate is off (folding the per-page TOC into the left nav wasn't + wanted either), and Material's default behaviour without it is to show + a separate right-hand "on this page" TOC sidebar -- not wanted here at + all, so hide it outright rather than styling it. The `toc` markdown + extension itself stays on (mkdocs.yml's markdown_extensions) purely for + its permalink anchors on headings, which is unrelated to this sidebar. + Plain .md-sidebar--secondary alone doesn't win: Material's own + `.md-sidebar--secondary:not([hidden]){display:block}` has higher + specificity (a class plus a :not() pseudo-class beats a lone class) and + is exactly the rule that applies on any page with enough headings for + Material to want to show a TOC -- precisely the pages this needs to + actually hide it on. Matching that selector shape ties the specificity; + this stylesheet loading after Material's own settles the tie in our + favor via source order, no !important needed. */ +.md-sidebar--secondary, +.md-sidebar--secondary:not([hidden]) { + display: none; +} + +.legacy-version-banner { + background: var(--lua-legacy-banner-bg); + border: 1px solid var(--lua-legacy-banner-border); + border-radius: 14px; + box-shadow: 0 8px 22px var(--lua-legacy-banner-shadow); + margin: 0 0 1.15rem; + padding: 0.9rem 1rem; +} + +.legacy-version-banner__label, +.legacy-version-banner__message { + margin: 0; +} + +.legacy-version-banner__label { + color: var(--lua-legacy-banner-label); + font-size: 0.8rem; + font-weight: 800; + letter-spacing: 0.05em; + text-transform: uppercase; +} + +.legacy-version-banner__message { + color: var(--lua-legacy-banner-message); + font-size: 0.8rem; + line-height: 1.45; + margin-top: 0.32rem; +} + +.md-typeset mark { + background: transparent; + color: inherit; + padding: 0; +} + +.md-typeset h1 { + color: var(--md-default-fg-color); + font-size: 1.55rem; + font-weight: 850; + letter-spacing: -0.025em; + line-height: 1.1; + margin: 0 0 1rem; +} + +.md-typeset h2 { + color: var(--md-default-fg-color); + font-size: 1.05rem; + font-weight: 800; + letter-spacing: -0.01em; + line-height: 1.2; + margin: 1.8rem 0 0.7rem; +} + +.md-typeset h3 { + color: var(--md-default-fg-color); + font-size: 0.92rem; + font-weight: 750; + letter-spacing: -0.01em; + line-height: 1.25; + margin: 1.35rem 0 0.55rem; +} + +.md-typeset table:not([class]) { + border: 1px solid rgba(12, 123, 205, 0.18); + border-radius: 12px; + border-collapse: separate; + border-spacing: 0; + overflow: hidden; + width: 100% !important; +} + +.md-typeset .radio-list-table { + border: 1px solid rgba(12, 123, 205, 0.18); + border-radius: 12px; + border-collapse: separate; + border-spacing: 0; + overflow: hidden; + width: 100% !important; +} + +.md-typeset__table { + display: block; + margin: 1em 0; + width: 100%; +} + +.md-typeset__table table:not([class]) { + display: table; + min-width: 100%; + table-layout: fixed; + width: 100% !important; +} + +.md-typeset table:not([class]) thead, +.md-typeset table:not([class]) tbody { + width: 100%; +} + +.md-typeset table:not([class]) tr { + display: table; + table-layout: fixed; + width: 100%; +} + +.md-typeset table:not([class]) thead { + background: rgba(12, 123, 205, 0.12); +} + +.md-typeset .radio-list-table thead { + background: rgba(12, 123, 205, 0.12); +} + +.md-typeset table:not([class]) thead tr { + background: transparent; +} + +.md-typeset .radio-list-table thead tr { + background: transparent; +} + +.md-typeset table:not([class]) th { + background: transparent; + color: var(--md-default-fg-color); + font-size: 0.8rem; + font-weight: 700; +} + +.md-typeset .radio-list-table th { + background: transparent; + color: var(--md-default-fg-color); + font-size: 0.8rem; + font-weight: 700; + text-align: left; +} + +.md-typeset table:not([class]) td, +.md-typeset .radio-list-table td { + font-size: 0.8rem; +} + +.md-typeset table:not([class]) tbody td:first-child a { + color: inherit; + text-decoration: none; +} + +.md-typeset table:not([class]) tbody td:first-child a:hover { + color: inherit; + text-decoration: underline; +} + +/* A `table`-typed parameter's own sub-fields (e.g. lvgl.arc's `params`) + render as a full-width row spanning every column, directly under that + parameter's own row -- see render_field_html_table in + tools/docs_pipeline.py. A slightly tinted background sets the spanning + row apart from the plain rows above it, and tighter padding keeps the + nested table from picking up the same roomy padding as a normal cell. */ +.md-typeset .lua-nested-field-row > td { + background: rgba(12, 123, 205, 0.03); + padding: 0.5rem 0.7rem 0.65rem; +} + +/* Deliberately lighter than the outer table (tighter padding, no rounded + corners/overflow clip) so it reads as a sub-table contained within the + spanning row, not a second independent table competing with the page's + other tables. */ +.md-typeset .lua-nested-field-table { + border: 1px solid rgba(12, 123, 205, 0.18); + border-collapse: collapse; + font-size: 0.78rem; + margin: 0.35rem 0 0.15rem; + width: 100%; +} + +.md-typeset .lua-nested-field-table th, +.md-typeset .lua-nested-field-table td { + border-bottom: 1px solid var(--md-default-fg-color--lightest); + padding: 0.3rem 0.55rem; + text-align: left; + vertical-align: top; +} + +.md-typeset .lua-nested-field-table thead { + background: rgba(12, 123, 205, 0.08); +} + +.md-typeset .lua-nested-field-table tbody tr:last-child td { + border-bottom: 0; +} + +/* A caveat bullet that doesn't name a specific field (e.g. lvgl.build's + "any other key accepted by the constructor...") -- see + render_nested_field_table. Sits right under the field table it + qualifies, so it reads as a footnote on the table rather than a floating + list. */ +.md-typeset .lua-nested-field-notes { + font-size: 0.78rem; + margin: 0.3rem 0 0.15rem; +} + +.md-typeset .admonition, +.md-typeset details { + font-size: 0.8rem; +} + +.md-typeset .admonition-title, +.md-typeset summary { + font-size: 0.8rem; +} + +.api-grid { + display: grid; + gap: 0.7rem; + grid-template-columns: 1fr; + margin-top: 1rem; +} + +.api-card { + border: 1px solid rgba(33, 150, 243, 0.25); + border-radius: 12px; + color: inherit; + display: flex; + flex-direction: column; + gap: 0.3rem; + min-height: 0; + padding: 0.8rem 0.95rem; + text-decoration: none; + transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease; +} + +.md-typeset .api-card, +.md-typeset .api-card:hover, +.md-typeset .api-card:focus, +.md-typeset .api-card:visited, +.md-typeset .api-card * { + text-decoration: none !important; +} + +.api-card:hover { + border-color: rgba(33, 150, 243, 0.55); + box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08); + transform: translateY(-2px); +} + +.api-card-title { + font-size: 0.8rem; + font-weight: 700; + line-height: 1.25; +} + +.api-card-summary { + color: var(--md-default-fg-color--light); + font-size: 0.8rem; + line-height: 1.35; + text-decoration: none !important; +} + +.api-card-summary + .api-card-summary { + margin-top: 0.1rem; +} + +.api-card-badge { + align-self: flex-start; + background: var(--lua-badge-bg); + border: 1px solid var(--lua-badge-border); + border-radius: 999px; + color: var(--lua-badge-text); + font-size: 0.8rem; + font-weight: 700; + margin-top: auto; + padding: 0.22rem 0.55rem; +} + +.review-workbench { + display: grid; + gap: 1rem; + grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); + margin: 1.25rem 0 1.5rem; +} + +.review-panel { + border: 1px solid rgba(33, 150, 243, 0.18); + border-radius: 14px; + padding: 1rem 1.1rem; + background: rgba(33, 150, 243, 0.03); +} + +.review-panel > :first-child { + margin-top: 0; +} + +.decision-panel { + border: 1px solid rgba(33, 150, 243, 0.18); + border-radius: 14px; + padding: 1rem 1.1rem; + background: rgba(33, 150, 243, 0.03); + margin: 1rem 0 1.25rem; +} + +.decision-status { + font-size: 0.8rem; + margin-bottom: 0.85rem; + color: var(--md-default-fg-color--light); +} + +.md-nav { + font-size: 0.8rem; +} + +.md-path { + font-size: 0.8rem; +} + +.md-search__input { + font-size: 0.8rem; +} + +.decision-table { + width: 100%; +} + +.decision-table select { + min-width: 11rem; +} + +.decision-table td > select, +.decision-table td > input[data-custom-type="true"] { + display: block; + margin-bottom: 0.45rem; +} + +.decision-table td > input[data-custom-type="true"] { + min-width: 11rem; +} + +.decision-actions { + margin-top: 0.9rem; +} + +.decision-actions button { + border: 1px solid rgba(33, 150, 243, 0.35); + border-radius: 999px; + background: var(--md-default-bg-color); + color: var(--lua-decision-btn-text); + cursor: pointer; + font: inherit; + padding: 0.4rem 0.8rem; +} + +.decision-actions button:hover { + border-color: rgba(33, 150, 243, 0.6); +} + +.radio-overview { + align-items: flex-start; + display: grid; + gap: 1.25rem; + grid-template-columns: minmax(180px, 28%) minmax(0, 1fr); + margin: 1rem 0 1.5rem; +} + +.radio-overview-image { + text-align: left; +} + +.radio-overview-image img { + display: block; + height: auto; + max-width: 100%; +} + +.radio-overview-table { + min-width: 0; + width: 100%; +} + +.radio-overview-table .md-typeset__table, +.radio-overview-table table:not([class]) { + margin-top: 0; + width: 100% !important; +} + +.radio-overview-table table { + display: table; + table-layout: fixed; + width: 100% !important; +} + +.radio-overview-table thead, +.radio-overview-table tbody { + width: 100%; +} + +.radio-overview-table tr { + display: table; + table-layout: fixed; + width: 100%; +} + +.radio-overview-table th:first-child, +.radio-overview-table td:first-child { + width: 32%; +} + +.radio-overview-table th:last-child, +.radio-overview-table td:last-child { + width: 68%; +} + +.radio-overview-table th, +.radio-overview-table td { + padding-bottom: 0.8rem; + padding-top: 0.8rem; +} + +@media screen and (max-width: 76.234375em) { + [dir="ltr"] .md-sidebar--primary { + left: -16.5rem !important; + } + + [dir="rtl"] .md-sidebar--primary { + right: -16.5rem !important; + } + + .md-sidebar--primary { + background: var(--md-default-bg-color) !important; + border: 0 !important; + border-radius: 0 !important; + box-shadow: none !important; + height: 100vh !important; + min-height: 100vh !important; + width: 16.5rem !important; + max-width: 88vw !important; + } + + .md-sidebar--primary .md-sidebar__scrollwrap, + .md-sidebar--primary .md-sidebar__inner { + background: var(--md-default-bg-color) !important; + border: 0 !important; + border-radius: 0 !important; + box-shadow: none !important; + height: 100% !important; + min-height: 100vh !important; + margin: 0 !important; + width: 100%; + } + + .md-sidebar--primary .md-sidebar__scrollwrap { + overflow-x: hidden !important; + overflow-y: auto !important; + -webkit-overflow-scrolling: touch; + overscroll-behavior: contain; + } + + [data-md-toggle="drawer"]:checked ~ .md-container .md-sidebar--primary { + box-shadow: var(--md-shadow-z3) !important; + transform: translateX(16.5rem) !important; + } + + [dir="rtl"] [data-md-toggle="drawer"]:checked ~ .md-container .md-sidebar--primary { + transform: translateX(-16.5rem) !important; + } + + .radio-overview { + grid-template-columns: 1fr; + } + + .radio-overview-image img { + max-width: 68%; + } + + .mobile-desktop-nav-active .md-sidebar--primary .md-nav--primary { + display: none !important; + } + + .mobile-desktop-nav-shell { + background: var(--md-default-bg-color); + box-sizing: border-box; + display: block; + height: 100%; + max-height: 100vh; + min-height: 100vh; + overflow: visible; + width: 100%; + } + + .mobile-desktop-nav { + border-left: 4px solid rgba(12, 123, 205, 0.72); + box-sizing: border-box; + display: block; + font-size: 0.8rem; + min-height: 100%; + padding: 0.55rem 0 1rem 0; + width: 100%; + } + + .mobile-desktop-nav__list { + box-sizing: border-box; + list-style: none; + margin: 0; + padding: 0; + width: 100%; + } + + .mobile-desktop-nav__list--nested { + padding-left: 0; + } + + .mobile-desktop-nav__item { + box-sizing: border-box; + display: block; + margin: 0; + padding: 0; + width: 100%; + } + + .mobile-desktop-nav__link, + .mobile-desktop-nav__toggle { + align-items: center; + background: transparent; + border: 0; + border-radius: 0; + box-sizing: border-box; + color: var(--lua-sidebar-text); + cursor: pointer; + display: flex; + font-family: inherit; + font-size: 0.8rem; + font-weight: 400; + gap: 0.5rem; + line-height: 1.35; + margin: 0; + padding: 0.45rem 1rem; + text-align: left; + text-decoration: none; + transition: background-color 140ms ease, color 140ms ease; + width: 100%; + } + + /* A section with its own index page gets both a real link (navigates to + the hub page) and a toggle (expands/collapses the list) side by side, + instead of one full-width toggle button covering the whole row -- see + buildNestedItem's hubLink branch. The generic width:100% above assumes + a lone full-row child (true for a plain toggle-only section, or any + leaf item's <a>); override it here so the two share the row instead of + each trying to claim it. */ + .mobile-desktop-nav__header { + display: flex; + width: 100%; + } + + .mobile-desktop-nav__header > .mobile-desktop-nav__link { + flex: 1 1 auto; + min-width: 0; + width: auto; + } + + .mobile-desktop-nav__header > .mobile-desktop-nav__toggle { + flex: 0 0 auto; + padding-left: 0.7rem; + padding-right: 0.7rem; + width: auto; + } + + .mobile-desktop-nav__link:hover, + .mobile-desktop-nav__link:focus, + .mobile-desktop-nav__toggle:hover, + .mobile-desktop-nav__toggle:focus { + background: rgba(56, 192, 247, 0.12); + box-shadow: none; + color: var(--lua-sidebar-hover-text); + outline: none; + } + + .mobile-desktop-nav__item--active > .mobile-desktop-nav__link, + .mobile-desktop-nav__item--active > .mobile-desktop-nav__header > .mobile-desktop-nav__link, + .mobile-desktop-nav__item--expanded > .mobile-desktop-nav__toggle, + .mobile-desktop-nav__item--expanded > .mobile-desktop-nav__header > .mobile-desktop-nav__toggle { + background: rgba(12, 123, 205, 0.14); + color: var(--lua-sidebar-active-text); + font-weight: 700; + } + + .mobile-desktop-nav__list--nested .mobile-desktop-nav__link, + .mobile-desktop-nav__list--nested .mobile-desktop-nav__toggle { + font-size: 0.8rem; + padding-left: 1.8rem; + } + + .mobile-desktop-nav__list--nested .mobile-desktop-nav__header > .mobile-desktop-nav__toggle { + padding-left: 0.7rem; + } + + .mobile-desktop-nav__item--migration > .mobile-desktop-nav__toggle, + .mobile-desktop-nav__item--migration > .mobile-desktop-nav__link, + .mobile-desktop-nav__item--migration > .mobile-desktop-nav__header > .mobile-desktop-nav__toggle, + .mobile-desktop-nav__item--migration > .mobile-desktop-nav__header > .mobile-desktop-nav__link { + color: var(--lua-migration-text); + } + + .mobile-desktop-nav__icon { + flex: 0 0 auto; + height: 1rem; + margin-left: auto; + position: relative; + width: 1rem; + } + + .mobile-desktop-nav__icon::before { + border-right: 2px solid currentColor; + border-top: 2px solid currentColor; + content: ""; + display: block; + height: 0.42rem; + left: 0.18rem; + position: absolute; + top: 0.22rem; + transform: rotate(45deg); + width: 0.42rem; + } + + .mobile-desktop-nav__item--expanded > .mobile-desktop-nav__toggle .mobile-desktop-nav__icon::before { + top: 0.13rem; + transform: rotate(135deg); + } +} + +.radio-list-table { + width: 100% !important; +} + +.radio-list-table th, +.radio-list-table td { + vertical-align: middle; + padding-bottom: 0.8rem; + padding-top: 0.8rem; +} + +.radio-list-table tbody tr { + border: 0; +} + +.radio-list-table tbody td { + border: 0; + border-top: 1px solid var(--md-default-fg-color--lightest); +} + +.radio-list-table tbody tr:first-child td { + border-top: 0; +} + +.radio-list-table td:first-child, +.radio-list-table th:first-child { + padding-left: 1.4rem; +} + +.radio-list-model { + align-items: center; + display: flex; + gap: 0.75rem; +} + +.radio-list-model img { + display: block; + flex: 0 0 auto; + height: 2.4rem; + object-fit: contain; + width: auto; +} + +.md-nav--primary .md-nav__title { + display: none; +} + +.md-sidebar--primary .md-nav--primary { + background: transparent; + border: 0; + border-left: 0; + border-radius: 0; + padding: 0; + width: 100%; +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item:first-child > .md-nav__link { + color: var(--lua-sidebar-hover-text); + font-weight: 700; +} + +.md-sidebar--primary .md-nav--primary .md-nav__link, +.md-sidebar--primary .md-nav--primary label.md-nav__link { + border-radius: 0; + color: var(--lua-sidebar-text); + margin: 0.08rem 0; + padding-left: 0.7rem; + padding-right: 0.7rem; + padding-bottom: 0.45rem; + padding-top: 0.45rem; + transition: background-color 140ms ease, color 140ms ease; +} + +/* navigation.indexes wraps a section's own link and its expand/collapse + label together in a shared <div class="md-nav__link md-nav__container"> + instead of the label being a direct child of the <li>. The rule above + already styles that wrapping div (it also carries .md-nav__link), so + without this its two children would each additionally get their own + nested copy of the same padding/margin/background/color -- on top of + showing through the container's own copy of the same styling, two + overlapping semi-transparent backgrounds of the same color render + darker than either alone, so a state (hover, active, section-active) + applied to both container and child shows as a visibly different + shade right where the child sits, not one flat row color. Unconditionally + neutralize the children instead of chasing this per state -- the + container alone should ever paint a background or set its own color; + letting a state's rule also match a container child (as opposed to + just the container itself) is exactly what caused this. Specificity + is bumped one class above the plain-link hover rule below (via the + redundant-but-real .md-nav__list ancestor qualifier) so this wins + outright rather than relying on source order against a tie. */ +.md-sidebar--primary .md-nav--primary .md-nav__list .md-nav__container > .md-nav__link { + background: transparent; + color: inherit; + margin: 0; + padding: 0; +} + +.md-sidebar--primary .md-nav--primary .md-nav__link:hover, +.md-sidebar--primary .md-nav--primary .md-nav__link:focus, +.md-sidebar--primary .md-nav--primary label.md-nav__link:hover, +.md-sidebar--primary .md-nav--primary label.md-nav__link:focus { + background: rgba(56, 192, 247, 0.12); + color: var(--lua-sidebar-hover-text); +} + +.md-sidebar--primary .md-nav--primary .md-nav__link--active, +.md-sidebar--primary .md-nav--primary .md-nav__item--active > .md-nav__link, +.md-sidebar--primary .md-nav--primary .md-nav__item--active > label.md-nav__link, +.md-sidebar--primary .md-nav--primary .md-nav__item--section-active > label.md-nav__link, +.md-sidebar--primary .md-nav--primary .md-nav__item--section-active > .md-nav__container { + background: rgba(12, 123, 205, 0.14); + color: var(--lua-sidebar-active-text); + font-weight: 700; +} + +.md-sidebar--primary .md-nav--primary .md-nav__item--nested > label.md-nav__link .md-nav__icon, +.md-sidebar--primary .md-nav--primary .md-nav__item--nested > .md-nav__container > label.md-nav__link .md-nav__icon { + color: var(--lua-sidebar-icon); +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > .md-nav__link, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > label.md-nav__link { + background: var(--lua-migration-hover-bg); + color: var(--lua-migration-text); +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration { + background: var(--lua-migration-bg); + border: 1px solid var(--lua-migration-border); + border-left: 4px solid var(--lua-migration-border-strong); + border-radius: 0; + margin: 0.85rem 0.1rem 0 0.1rem; + padding: 0.35rem 0.2rem 0.45rem; +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav { + background: transparent; + border: 0; + border-radius: 0; + margin: 0.2rem 0 0; + padding: 0 0 0.05rem; +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav .md-nav__link, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav label.md-nav__link { + color: var(--lua-migration-text-alt); +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav .md-nav__link:hover, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav .md-nav__link:focus, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav label.md-nav__link:hover, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav label.md-nav__link:focus { + background: var(--lua-migration-hover-bg); + color: var(--lua-migration-text-active); +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav .md-nav__link--active, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav .md-nav__item--active > .md-nav__link, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav .md-nav__item--active > label.md-nav__link, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav .md-nav__item--section-active > label.md-nav__link { + background: var(--lua-migration-active-bg); + color: var(--lua-migration-text-active); +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > .md-nav__link:hover, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > .md-nav__link:focus, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > label.md-nav__link:hover, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > label.md-nav__link:focus { + background: var(--lua-migration-active-bg); + color: var(--lua-migration-text-active); +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > label.md-nav__link .md-nav__icon { + color: var(--lua-migration-icon); +} + +.md-sidebar--primary .md-nav--primary .md-nav__list, +.md-sidebar--primary .md-nav--primary .md-nav__list .md-nav__list { + overflow: visible; +} + +@media screen and (min-width: 76.25em) { + .md-sidebar--primary { + width: 13.6rem; + } + + .md-sidebar--primary .md-sidebar__scrollwrap { + width: 13.6rem; + } + + .md-sidebar--primary .md-sidebar__inner { + margin: 0; + padding: 0; + width: 100%; + } + + .md-sidebar--primary .md-sidebar__scrollwrap { + margin: 0; + overflow-x: hidden; + overflow-y: auto; + padding: 0; + } + + .md-main__inner { + grid-template-columns: 13.6rem minmax(0, 1fr); + } +} diff --git a/website/md-docs/stylesheets/extra.css b/website/md-docs/stylesheets/extra.css new file mode 100644 index 000000000..b44c3ff52 --- /dev/null +++ b/website/md-docs/stylesheets/extra.css @@ -0,0 +1,768 @@ +:root { + --md-primary-fg-color: #0c7bcd; + --md-primary-fg-color--light: #38c0f7; + --md-primary-fg-color--dark: #095f9e; + --md-accent-fg-color: #38c0f7; +} + +[data-md-color-scheme="default"] { + --md-primary-fg-color: #0c7bcd; + --md-primary-fg-color--light: #38c0f7; + --md-primary-fg-color--dark: #095f9e; + --md-accent-fg-color: #38c0f7; +} + +.md-header { + background-color: #0c7bcd; +} + +.md-header__option { + display: none !important; +} + +.md-header__button.md-logo img, +.md-header__button.md-logo svg { + height: 1.6rem; + width: auto; +} + +.md-header__title { + font-weight: 700; +} + +.api-function-breadcrumb { + align-items: center; + color: var(--md-default-fg-color--light); + display: flex; + flex-wrap: wrap; + font-size: 0.7rem; + gap: 0.35rem; + letter-spacing: 0.01em; + margin: 0 0 0.85rem; + text-transform: none; +} + +.api-function-breadcrumb a { + color: inherit; + text-decoration: none; +} + +.api-function-breadcrumb a:hover, +.api-function-breadcrumb a:focus { + color: var(--md-accent-fg-color); +} + +.md-typeset a { + text-decoration: underline; + text-underline-offset: 0.14em; +} + +.md-typeset a:hover, +.md-typeset a:focus { + text-decoration-thickness: 2px; +} + +.api-function-breadcrumb__separator { + color: var(--md-default-fg-color--lighter); +} + +.api-function-breadcrumb__current { + color: var(--md-default-fg-color); + font-weight: 600; +} + +.md-sidebar--secondary .md-nav--secondary { + background: transparent; + border: 1px solid rgba(12, 123, 205, 0.16); + border-left: 4px solid #0c7bcd; + border-radius: 14px; + padding: 0.5rem 0.55rem 0.7rem; + transition: background-color 160ms ease, border-color 160ms ease; +} + +.md-sidebar--secondary .md-nav--secondary > .md-nav__title { + color: #095f9e; + font-size: 0.68rem; + font-weight: 800; + letter-spacing: 0.08em; + padding-bottom: 0.35rem; + text-transform: uppercase; +} + +.md-sidebar--secondary .md-nav--secondary .md-nav__link { + border-radius: 10px; + color: #33516d; + margin: 0.08rem 0; + padding: 0.45rem 0.7rem; +} + +.md-sidebar--secondary .md-nav--secondary .md-nav__link:hover, +.md-sidebar--secondary .md-nav--secondary .md-nav__link:focus { + background: rgba(56, 192, 247, 0.12); + color: #095f9e; +} + +.md-sidebar--secondary .md-nav--secondary .md-nav__link--active { + background: rgba(12, 123, 205, 0.14); + color: #084c7f; + font-weight: 700; +} + +.legacy-version-banner { + background: + linear-gradient(135deg, rgba(255, 248, 225, 0.98), rgba(255, 243, 205, 0.94)); + border: 1px solid rgba(217, 119, 6, 0.3); + border-radius: 14px; + box-shadow: 0 8px 22px rgba(120, 53, 15, 0.08); + margin: 0 0 1.15rem; + padding: 0.9rem 1rem; +} + +.legacy-version-banner__label, +.legacy-version-banner__message { + margin: 0; +} + +.legacy-version-banner__label { + color: #9a3412; + font-size: 0.78rem; + font-weight: 800; + letter-spacing: 0.05em; + text-transform: uppercase; +} + +.legacy-version-banner__message { + color: #7c2d12; + font-size: 0.88rem; + line-height: 1.45; + margin-top: 0.32rem; +} + +.md-typeset mark { + background: transparent; + color: inherit; + padding: 0; +} + +.md-typeset h1 { + color: #1f2937; + font-size: 1.55rem; + font-weight: 850; + letter-spacing: -0.025em; + line-height: 1.1; + margin: 0 0 1rem; +} + +.md-typeset h2 { + color: #1f2937; + font-size: 1.05rem; + font-weight: 800; + letter-spacing: -0.01em; + line-height: 1.2; + margin: 1.8rem 0 0.7rem; +} + +.md-typeset h3 { + color: #1f2937; + font-size: 0.92rem; + font-weight: 750; + letter-spacing: -0.01em; + line-height: 1.25; + margin: 1.35rem 0 0.55rem; +} + +.md-typeset table:not([class]) { + border: 1px solid rgba(12, 123, 205, 0.18); + border-radius: 12px; + border-collapse: separate; + border-spacing: 0; + overflow: hidden; + width: 100% !important; +} + +.md-typeset .radio-list-table { + border: 1px solid rgba(12, 123, 205, 0.18); + border-radius: 12px; + border-collapse: separate; + border-spacing: 0; + overflow: hidden; + width: 100% !important; +} + +.md-typeset__table { + display: block; + margin: 1em 0; + width: 100%; +} + +.md-typeset__table table:not([class]) { + display: table; + min-width: 100%; + table-layout: fixed; + width: 100% !important; +} + +.md-typeset table:not([class]) thead, +.md-typeset table:not([class]) tbody { + width: 100%; +} + +.md-typeset table:not([class]) tr { + display: table; + table-layout: fixed; + width: 100%; +} + +.md-typeset table:not([class]) thead { + background: rgba(12, 123, 205, 0.12); +} + +.md-typeset .radio-list-table thead { + background: rgba(12, 123, 205, 0.12); +} + +.md-typeset table:not([class]) thead tr { + background: transparent; +} + +.md-typeset .radio-list-table thead tr { + background: transparent; +} + +.md-typeset table:not([class]) th { + background: transparent; + color: #1f2937; + font-weight: 700; +} + +.md-typeset .radio-list-table th { + background: transparent; + color: #1f2937; + font-weight: 700; + text-align: left; +} + +.api-grid { + display: grid; + gap: 0.7rem; + grid-template-columns: 1fr; + margin-top: 1rem; +} + +.api-card { + border: 1px solid rgba(33, 150, 243, 0.25); + border-radius: 12px; + color: inherit; + display: flex; + flex-direction: column; + gap: 0.3rem; + min-height: 0; + padding: 0.8rem 0.95rem; + text-decoration: none; + transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease; +} + +.md-typeset .api-card, +.md-typeset .api-card:hover, +.md-typeset .api-card:focus, +.md-typeset .api-card:visited, +.md-typeset .api-card * { + text-decoration: none !important; +} + +.api-card:hover { + border-color: rgba(33, 150, 243, 0.55); + box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08); + transform: translateY(-2px); +} + +.api-card-title { + font-size: 0.98rem; + font-weight: 700; + line-height: 1.25; +} + +.api-card-summary { + color: var(--md-default-fg-color--light); + font-size: 0.84rem; + line-height: 1.35; + text-decoration: none !important; +} + +.api-card-summary + .api-card-summary { + margin-top: 0.1rem; +} + +.api-card-badge { + align-self: flex-start; + background: rgba(255, 152, 0, 0.12); + border: 1px solid rgba(255, 152, 0, 0.28); + border-radius: 999px; + color: rgb(191, 107, 0); + font-size: 0.72rem; + font-weight: 700; + margin-top: auto; + padding: 0.22rem 0.55rem; +} + +.review-workbench { + display: grid; + gap: 1rem; + grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); + margin: 1.25rem 0 1.5rem; +} + +.review-panel { + border: 1px solid rgba(33, 150, 243, 0.18); + border-radius: 14px; + padding: 1rem 1.1rem; + background: rgba(33, 150, 243, 0.03); +} + +.review-panel > :first-child { + margin-top: 0; +} + +.decision-panel { + border: 1px solid rgba(33, 150, 243, 0.18); + border-radius: 14px; + padding: 1rem 1.1rem; + background: rgba(33, 150, 243, 0.03); + margin: 1rem 0 1.25rem; +} + +.decision-status { + font-size: 0.92rem; + margin-bottom: 0.85rem; + color: var(--md-default-fg-color--light); +} + +.decision-table { + width: 100%; +} + +.decision-table select { + min-width: 11rem; +} + +.decision-table td > select, +.decision-table td > input[data-custom-type="true"] { + display: block; + margin-bottom: 0.45rem; +} + +.decision-table td > input[data-custom-type="true"] { + min-width: 11rem; +} + +.decision-actions { + margin-top: 0.9rem; +} + +.decision-actions button { + border: 1px solid rgba(33, 150, 243, 0.35); + border-radius: 999px; + background: white; + color: rgb(33, 110, 190); + cursor: pointer; + font: inherit; + padding: 0.4rem 0.8rem; +} + +.decision-actions button:hover { + border-color: rgba(33, 150, 243, 0.6); +} + +.radio-overview { + align-items: flex-start; + display: grid; + gap: 1.25rem; + grid-template-columns: minmax(180px, 28%) minmax(0, 1fr); + margin: 1rem 0 1.5rem; +} + +.radio-overview-image { + text-align: left; +} + +.radio-overview-image img { + display: block; + height: auto; + max-width: 100%; +} + +.radio-overview-table { + min-width: 0; + width: 100%; +} + +.radio-overview-table .md-typeset__table, +.radio-overview-table table:not([class]) { + margin-top: 0; + width: 100% !important; +} + +.radio-overview-table table { + display: table; + table-layout: fixed; + width: 100% !important; +} + +.radio-overview-table thead, +.radio-overview-table tbody { + width: 100%; +} + +.radio-overview-table tr { + display: table; + table-layout: fixed; + width: 100%; +} + +.radio-overview-table th:first-child, +.radio-overview-table td:first-child { + width: 32%; +} + +.radio-overview-table th:last-child, +.radio-overview-table td:last-child { + width: 68%; +} + +.radio-overview-table th, +.radio-overview-table td { + padding-bottom: 0.8rem; + padding-top: 0.8rem; +} + +@media screen and (max-width: 76.234375em) { + [dir="ltr"] .md-sidebar--primary { + left: -28.8rem !important; + } + + [dir="rtl"] .md-sidebar--primary { + right: -28.8rem !important; + } + + .md-sidebar--primary { + background: transparent !important; + border: 0 !important; + border-radius: 0 !important; + box-shadow: none !important; + height: 100vh !important; + min-height: 100vh !important; + width: 28.8rem !important; + max-width: 92vw !important; + } + + .md-sidebar--primary .md-sidebar__scrollwrap, + .md-sidebar--primary .md-sidebar__inner { + background: transparent !important; + border: 0 !important; + border-radius: 0 !important; + box-shadow: none !important; + height: 100% !important; + min-height: 100vh !important; + width: 100%; + } + + [data-md-toggle="drawer"]:checked ~ .md-container .md-sidebar--primary { + transform: translateX(28.8rem) !important; + } + + [dir="rtl"] [data-md-toggle="drawer"]:checked ~ .md-container .md-sidebar--primary { + transform: translateX(-28.8rem) !important; + } + + .radio-overview { + grid-template-columns: 1fr; + } + + .radio-overview-image img { + max-width: 68%; + } + + .md-sidebar--primary .md-nav--primary, + .md-sidebar--primary .md-nav--primary .md-nav { + background: transparent; + display: block !important; + border: 0; + border-left: 0; + border-radius: 0; + height: auto !important; + left: auto !important; + padding: 0; + position: static !important; + right: auto !important; + top: auto !important; + transform: none !important; + z-index: auto !important; + } + + .md-sidebar--primary .md-nav--primary .md-nav__link, + .md-sidebar--primary .md-nav--primary label.md-nav__link, + .md-sidebar--primary .md-nav--primary .md-nav__link--active, + .md-sidebar--primary .md-nav--primary .md-nav__item--active > .md-nav__link, + .md-sidebar--primary .md-nav--primary .md-nav__item--active > label.md-nav__link, + .md-sidebar--primary .md-nav--primary .md-nav__item--section-active > label.md-nav__link { + background: transparent; + border-radius: 0; + color: inherit; + font-weight: inherit; + margin: 0; + padding-left: 0; + padding-right: 0; + } + + .md-sidebar--primary .md-nav--primary .md-nav__item--nested > label.md-nav__link { + align-items: center; + display: flex; + } + + .md-sidebar--primary .md-nav--primary .md-nav__item--nested > label.md-nav__link .md-nav__icon { + color: inherit; + display: inline-flex !important; + margin-left: auto; + } + + .md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration, + .md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > .md-nav__link, + .md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > label.md-nav__link, + .md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav { + background: transparent; + border: 0; + border-left: 0; + border-radius: 0; + color: inherit; + margin: 0; + padding: 0; + } + + .md-sidebar--primary .md-nav--primary .md-nav__list .md-nav { + margin-left: 0; + padding-left: 0; + } + + .md-sidebar--primary .md-nav__title { + display: none !important; + } + + .md-sidebar--primary .md-nav--primary .md-nav__title ~ .md-nav__list, + .md-sidebar--primary .md-nav--primary .md-nav__list, + .md-sidebar--primary .md-nav--primary .md-nav__list .md-nav__list { + box-shadow: none; + overflow: visible !important; + scroll-snap-type: none; + touch-action: auto; + } + + .md-sidebar--primary .md-nav__toggle ~ .md-nav { + display: none !important; + max-height: none !important; + opacity: 1 !important; + overflow: visible !important; + transition: none !important; + visibility: visible !important; + } + + .md-sidebar--primary .md-nav__toggle:checked ~ .md-nav { + display: block !important; + } +} + +.radio-list-table { + width: 100% !important; +} + +.radio-list-table th, +.radio-list-table td { + vertical-align: middle; + padding-bottom: 0.8rem; + padding-top: 0.8rem; +} + +.radio-list-table tbody tr { + border: 0; +} + +.radio-list-table tbody td { + border: 0; + border-top: 1px solid rgba(15, 23, 42, 0.12); +} + +.radio-list-table tbody tr:first-child td { + border-top: 0; +} + +.radio-list-table td:first-child, +.radio-list-table th:first-child { + padding-left: 1.4rem; +} + +.radio-list-model { + align-items: center; + display: flex; + gap: 0.75rem; +} + +.radio-list-model img { + display: block; + flex: 0 0 auto; + height: 2.4rem; + object-fit: contain; + width: auto; +} + +.md-nav--primary .md-nav__title { + display: none; +} + +.md-sidebar--primary .md-nav--primary { + background: transparent; + border: 0; + border-left: 0; + border-radius: 0; + padding: 0; + width: 100%; +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item:first-child > .md-nav__link { + color: #095f9e; + font-weight: 700; +} + +.md-sidebar--primary .md-nav--primary .md-nav__link, +.md-sidebar--primary .md-nav--primary label.md-nav__link { + border-radius: 0; + color: #35556f; + margin: 0.08rem 0; + padding-left: 0.7rem; + padding-right: 0.7rem; + padding-bottom: 0.45rem; + padding-top: 0.45rem; + transition: background-color 140ms ease, color 140ms ease; +} + +.md-sidebar--primary .md-nav--primary .md-nav__link:hover, +.md-sidebar--primary .md-nav--primary .md-nav__link:focus, +.md-sidebar--primary .md-nav--primary label.md-nav__link:hover, +.md-sidebar--primary .md-nav--primary label.md-nav__link:focus { + background: rgba(56, 192, 247, 0.12); + color: #095f9e; +} + +.md-sidebar--primary .md-nav--primary .md-nav__link--active, +.md-sidebar--primary .md-nav--primary .md-nav__item--active > .md-nav__link, +.md-sidebar--primary .md-nav--primary .md-nav__item--active > label.md-nav__link, +.md-sidebar--primary .md-nav--primary .md-nav__item--section-active > label.md-nav__link { + background: rgba(12, 123, 205, 0.14); + color: #084c7f; + font-weight: 700; +} + +.md-sidebar--primary .md-nav--primary .md-nav__item--nested > label.md-nav__link .md-nav__icon { + color: rgba(12, 123, 205, 0.72); +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > .md-nav__link, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > label.md-nav__link { + background: rgba(245, 158, 11, 0.12); + color: #9a3412; +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration { + background: rgba(255, 247, 237, 0.92); + border: 1px solid rgba(245, 158, 11, 0.28); + border-left: 4px solid rgba(217, 119, 6, 0.78); + border-radius: 0; + margin: 0.85rem 0.1rem 0 0.1rem; + padding: 0.35rem 0.2rem 0.45rem; +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav { + background: transparent; + border: 0; + border-radius: 0; + margin: 0.2rem 0 0; + padding: 0 0 0.05rem; +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav .md-nav__link, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav label.md-nav__link { + color: #7c3e12; +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav .md-nav__link:hover, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav .md-nav__link:focus, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav label.md-nav__link:hover, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav label.md-nav__link:focus { + background: rgba(245, 158, 11, 0.12); + color: #7c2d12; +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav .md-nav__link--active, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav .md-nav__item--active > .md-nav__link, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav .md-nav__item--active > label.md-nav__link, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > nav.md-nav .md-nav__item--section-active > label.md-nav__link { + background: rgba(245, 158, 11, 0.18); + color: #7c2d12; +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > .md-nav__link:hover, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > .md-nav__link:focus, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > label.md-nav__link:hover, +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > label.md-nav__link:focus { + background: rgba(245, 158, 11, 0.18); + color: #7c2d12; +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item--migration > label.md-nav__link .md-nav__icon { + color: rgba(180, 83, 9, 0.78); +} + +.md-sidebar--primary .md-nav--primary .md-nav__list .md-nav { + margin-left: 0.05rem; + max-height: none; + overflow: visible; + padding-left: 0.2rem; +} + +.md-sidebar--primary .md-nav--primary .md-nav__list, +.md-sidebar--primary .md-nav--primary .md-nav__list .md-nav__list { + overflow: visible; +} + +.md-sidebar--primary .md-nav--primary .md-nav__list .md-nav__item { + position: relative; +} + +.md-sidebar--primary .md-nav--primary > .md-nav__list > .md-nav__item::before { + display: none; +} + +@media screen and (min-width: 76.25em) { + .md-sidebar--primary { + width: 13.6rem; + } + + .md-sidebar--primary .md-sidebar__scrollwrap { + width: 13.6rem; + } + + .md-sidebar--primary .md-sidebar__inner { + margin: 0; + padding: 0; + width: 100%; + } + + .md-sidebar--primary .md-sidebar__scrollwrap { + margin: 0; + overflow-x: hidden; + overflow-y: auto; + padding: 0; + } + + .md-main__inner { + grid-template-columns: 13.6rem minmax(0, 1fr) 12.1rem; + } +} diff --git a/wrangler.jsonc b/wrangler.jsonc new file mode 100644 index 000000000..7aa6026a6 --- /dev/null +++ b/wrangler.jsonc @@ -0,0 +1,14 @@ +// Cloudflare Workers static-assets config for publishing the docs. +// There is no Worker script: every request is served straight from the +// assets directory. The publish workflow exports the mike-managed gh-pages +// branch into .site-publish/ and runs `wrangler deploy` against it. +{ + "$schema": "https://unpkg.com/wrangler@4/config-schema.json", + "name": "edgetx-lua-reference-guide", + "compatibility_date": "2026-10-01", + "assets": { + "directory": "./.site-publish", + "not_found_handling": "404-page", + "html_handling": "auto-trailing-slash" + } +}