Skip to content

Enhancement/395 webpage bring up#483

Merged
nk25719 merged 2 commits intoPubInv:enhancement/395-webpage-bringUpfrom
nk25719:enhancement/395-webpage-bringUp
Apr 17, 2026
Merged

Enhancement/395 webpage bring up#483
nk25719 merged 2 commits intoPubInv:enhancement/395-webpage-bringUpfrom
nk25719:enhancement/395-webpage-bringUp

Conversation

@nk25719
Copy link
Copy Markdown
Collaborator

@nk25719 nk25719 commented Apr 17, 2026

closes issue #395/krake/pubinv

What and why

  • Provide a backend for the existing webpage in data/ so device status and the live LCD output can be shown remotely.

  • Make the on-device LCD output available to the web UI by mirroring writes from the HAL layer into an in-memory buffer.

  • Added JSON endpoints /status and /lcd and wired them into the web server so the page can fetch runtime info and the four LCD lines; the new handlers and template processor live in Firmware/GPAD_API/GPAD_API/GPAD_API.ino.

  • Replaced the index templating callback with templateProcessor() to populate %SERIAL%, %URL%, %IP%, %MAC%, %RSSI%, %UPTIME%, %MQTT%, and %QR% when serving index.html.

  • Implemented jsonEscape(), uptimeString(), and currentUrl() helpers used by the new endpoints to construct safe JSON and human-readable status values.

  • Extended LCDWrapper in Firmware/GPAD_API/GPAD_API/GPAD_HAL.h to maintain a 20x4 mirror buffer with cursor tracking and added line(row) accessors so the web endpoint can return exactly what is printed to the physical LCD.

  • Adjusted startup ordering so routes are registered before server.begin() to ensure endpoints are available as soon as the web server starts.

Verify

  • Attempted a PlatformIO build with pio run -d Firmware/GPAD_API, which failed because the pio CLI is not installed in the environment (pio: command not found).
  • Attempted a Python-invoked PlatformIO build with python3 -m platformio run -d Firmware/GPAD_API, which failed because the platformio Python package is not installed (No module named platformio).
  • No other automated tests were available or executed in this environment; changes were compiled and static diffs reviewed locally but not successfully built due to missing toolchain.

files changes only

GPAD_API
GPAD_HAL

nk25719 added 2 commits April 17, 2026 22:06
…nd-update-webpage

Add web /status and /lcd endpoints and LCD mirror buffer for GPAD_API
@nk25719 nk25719 merged commit ff16d27 into PubInv:enhancement/395-webpage-bringUp Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant