Skip to content

examples/calculator: Add an LVGL touchscreen calculator. - #3660

Open
aviralgarg05 wants to merge 1 commit into
apache:masterfrom
aviralgarg05:gsoc/calculator-example-pr10
Open

examples/calculator: Add an LVGL touchscreen calculator.#3660
aviralgarg05 wants to merge 1 commit into
apache:masterfrom
aviralgarg05:gsoc/calculator-example-pr10

Conversation

@aviralgarg05

@aviralgarg05 aviralgarg05 commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Note: Please adhere to Contributing Guidelines.

Depends-On: /pull/3643

Summary

A touchscreen board had no small graphical application to exercise the
display and input path with, and nothing that demonstrated an application
cooperating with a supervisor.

This adds an LVGL calculator: the usual four operations, a display that
handles division by zero and overflow rather than showing a wrong result,
and a layout that scales to the framebuffer it finds. It exits cleanly when
asked to, so it can be started and closed repeatedly without leaking the
framebuffer.

The diff previously carried the commits it was branched from; it now
contains only the calculator.

Impact

  • New feature: YES, a new example, selected in Kconfig.
  • User adaptation: NO.
  • Build: New example, built only when selected.
  • Hardware: Needs a framebuffer and a touchscreen; no driver change.
  • Documentation: NO.
  • Security: NO.
  • Compatibility: Independent of existing applications.

Testing

Build host: macOS 26.5, arm64, xtensa-esp-elf-gcc 14.2.0
(esp-14.2.0_20251107).

Target: Xtensa / ESP32-S3, Waveshare ESP32-S3-Touch-LCD-7, 800x480 RGB565
with a GT911 touchscreen.

  • nxstyle, tools/checkpatch.sh, codespell and git diff --check
  • built for the target as a builtin and as a loadable module
  • run on the board: arithmetic checked by hand including division by zero,
    and the application started and closed several times with no leftover
    task afterwards

It uses include/system/nxstore_chrome.h, so it does not build on master
alone; the Depends-On line above lets CI apply that first.

PR verification Self-Check

  • This PR introduces one focused change.
  • I have updated all required description fields above.
  • I have reviewed and signed every commit.
  • This PR adheres to the current contribution and coding guidelines.
  • My PR is still work in progress.
  • My PR is ready for review and can be safely merged.

@aviralgarg05
aviralgarg05 force-pushed the gsoc/calculator-example-pr10 branch from 9372de5 to 30c0eb7 Compare August 14, 2026 15:12
@aviralgarg05 aviralgarg05 changed the title [WIP] examples/calculator: Add an LVGL touchscreen calculator. examples/calculator: Add an LVGL touchscreen calculator. Aug 14, 2026
@aviralgarg05
aviralgarg05 marked this pull request as ready for review August 14, 2026 15:14
@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx-apps/actions/runs/31813509921

@aviralgarg05
aviralgarg05 force-pushed the gsoc/calculator-example-pr10 branch from f967ee4 to 158724f Compare August 15, 2026 10:02
Comment thread examples/calculator/Kconfig Outdated
Comment thread examples/calculator/calculator_main.c Outdated
@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx-apps/actions/runs/31878524647

@aviralgarg05
aviralgarg05 force-pushed the gsoc/calculator-example-pr10 branch from 158724f to 6c17d59 Compare August 15, 2026 10:33
@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx-apps/actions/runs/31879830797

@aviralgarg05
aviralgarg05 force-pushed the gsoc/calculator-example-pr10 branch from 6c17d59 to 4183800 Compare August 15, 2026 11:03
Add a standalone calculator with touch input and cooperative shutdown. Initialize the board through BOARDIOC_FINALINIT.

Assisted-by: OpenAI Codex:gpt-5.6-sol

Signed-off-by: aviralgarg05 <gargaviral99@gmail.com>
@aviralgarg05
aviralgarg05 force-pushed the gsoc/calculator-example-pr10 branch from 4183800 to a235637 Compare August 15, 2026 11:44
@github-actions

Copy link
Copy Markdown

🔗 Cross-repo PR dependencies

The read-only Build run reported the following dependent PR(s) and fetched head SHA(s):

CI run: https://github.com/apache/nuttx-apps/actions/runs/31882801968

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants