mirror of
https://github.com/apache/nuttx-apps.git
synced 2026-08-09 06:25:16 +00:00
Review/hardening findings from the companion nxpkg PRs: - Own framebuffer/input device paths instead of borrowing CONFIG_EXAMPLES_LVGLDEMO_FBDEVPATH/INPUT_DEVPATH from an unrelated example app: new CONFIG_SYSTEM_NXSTORE_FBDEVPATH/INPUT_DEVPATH Kconfig string options (defaulting to /dev/fb0 and /dev/input0). - g_index moves from a static struct to a heap-allocated FAR struct pkg_index_s * (pkg_zalloc()), with a "Not enough memory to load the catalog." UI fallback if the allocation fails. - nxstore_launch() now loads the specific installed version's manifest via pkg_metadata_load_manifest_path() instead of combining a rollback-selected version with whatever the current catalog entry happens to describe for that name - those can disagree after a rollback if the catalog has since moved on. Also passes through the installed manifest's launch_args/launch_argc (previously always argv[1] = NULL). - title_text buffer sized PKG_NAME_MAX + PKG_VERSION_MAX + 5 instead of a fixed 96, fixing a real compiler truncation warning. - README.txt moved to the companion NuttX documentation PR rather than shipping user-facing documentation as an in-tree README. Bugs found bringing this up on real hardware: - LV_EVENT_LONG_PRESSED could fire for a touch that was actually driving a scroll of the app list: if a drag starts slowly enough that the long-press timer (400ms) elapses before the finger crosses the scroll-lock distance, LVGL hasn't committed the gesture to scrolling yet and still delivers the long-press event, silently uninstalling whatever card the touch happened to land on. Ignore the long-press if this input device is currently attributed to scrolling any object (lv_indev_get_scroll_obj()). - Tapping an installed-app card to launch it, while a different install was in progress elsewhere in the list (or another app was already running), was allowed through unconditionally - install_worker() auto-launches its own package once done, and letting a second launch through independently meant whichever one finished last silently overwrote g_running, leaving the other process alive, unsupervised, and drawing into the same shared framebuffer with no way to close it from this UI again. Both the direct-launch and fresh-install paths in install_btn_event_cb() now refuse (with a toast) if g_running.active or g_active.manifest indicate another app is already running or about to be. - nxstore_is_installed() only checked the package *name*, not which version was actually on disk - an older installed version showed as plain "Installed" identically to a current one, and tapping it silently launched the stale payload with no update indication or action. Add nxstore_is_up_to_date() (compares the installed version against the catalog's latest manifest) and a third status_bar color (in addition to not-installed/up-to-date) plus a "Update available - tap to update" subtitle for the mismatch case; tapping such a card now goes through the install path (which fetches and auto-launches the newly installed version) instead of the direct-launch path. - lv_indev_set_scroll_limit() was set to 255 (copied from examples/ lvgldemo/lvgldemo.c, whose own touch-drift mitigation this file reused), requiring a nearly-full-screen drag before a touch was even recognized as a scroll gesture. Unlike that demo, this screen's app list is scrolled constantly, and a threshold that large read as broken/laggy scrolling rather than drift protection. Lowered to 20, enough to reject typical touch-driver jitter while still recognizing a real scroll almost immediately; momentum stays off (scroll_throw 0), which is what the dual-launch/scroll-lock fixes above actually depend on, not the gesture-start threshold. Also adds nxstore_load_icon(): best-effort loads and caches a package's optional icon (manifest->icon) as a raw RGB565 image LVGL can render with no decoder (this board has no PNG/JPEG decode capability), falling back to the existing colored-circle-plus-glyph rendering on any failure (no icon set, download failed, corrupt/ oversized file) so a bad icon never blocks a package from being listed or installed. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: aviralgarg05 <gargaviral99@gmail.com> |
||
|---|---|---|
| .. | ||
| adb | ||
| adcscope | ||
| argtable3 | ||
| batterydump | ||
| cdcacm | ||
| cfgdata | ||
| cle | ||
| composite | ||
| conntrack | ||
| coredump | ||
| cpuload | ||
| critmon | ||
| cu | ||
| curl | ||
| dd | ||
| debugpoint | ||
| dhcp6c | ||
| dhcpc | ||
| dumpstack | ||
| fastboot | ||
| fdt | ||
| flash_eraseall | ||
| flatbuffers | ||
| gcov | ||
| gdbstub | ||
| gprof | ||
| hex2bin | ||
| hexed | ||
| hostname | ||
| i2c | ||
| iptables | ||
| irtest | ||
| libffi | ||
| libuv | ||
| lm75 | ||
| lsan | ||
| lzf | ||
| mdio | ||
| microros | ||
| netdb | ||
| nsh | ||
| ntpc | ||
| nxcamera | ||
| nxcodec | ||
| nxdiag | ||
| nxinit | ||
| nxlooper | ||
| nxmbclient | ||
| nxpkg | ||
| nxplayer | ||
| nxrecorder | ||
| nxstore | ||
| ofloader | ||
| ping | ||
| ping6 | ||
| popen | ||
| psmq | ||
| ptpd | ||
| readline | ||
| resmonitor | ||
| sched_note | ||
| sensorscope | ||
| sensortest | ||
| setlogmask | ||
| settings | ||
| smf | ||
| spi | ||
| stackmonitor | ||
| syslogd | ||
| system | ||
| taskset | ||
| tcpdump | ||
| tee | ||
| telnet | ||
| telnetd | ||
| termcurses | ||
| trace | ||
| ubloxmodem | ||
| uniqueid | ||
| uorb | ||
| usbmsc | ||
| vi | ||
| vncviewer | ||
| ymodem | ||
| zlib | ||
| zmodem | ||
| .gitignore | ||
| CMakeLists.txt | ||
| Make.defs | ||
| Makefile | ||