Skip to content

Conversation

finger563
Copy link
Contributor

@finger563 finger563 commented Jun 25, 2025

Description

  • Update dependencies to latest espp
  • Enable c++ exceptions
  • Refactor code so that server can be torn down and recreated
  • Update code to create server via task spawned from the got ip event handler
  • Update code to have more gui functions which are exposed via cli
  • Add cli which is run in the main code as the main loop
  • Add timeout to udp socket so that it can be cleanly destroyed
  • Update readme

Motivation and Context

Previously, the CI builds which were attached to releases had no valid WiFi information, and there was no way to (re-)configure the WiFi network at runtime. There was also no side channel to configure / command the display, except via WiFi. This PR fixes both those issues by adding a CLI which enables NVS-backed WiFi reconfiguration as well as direct GUI control.

How has this been tested?

Build and run main on esp-box and use the GUI to test the various commands

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

CleanShot 2025-06-25 at 09 42 28

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

Copy link

github-actions bot commented Jun 25, 2025

✅Static analysis result - no issues found! ✅

@finger563 finger563 requested a review from Copilot June 25, 2025 14:56
@finger563 finger563 self-assigned this Jun 25, 2025
@finger563 finger563 added enhancement New feature or request wifi cli command line interface labels Jun 25, 2025
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a runtime CLI for WiFi and GUI control, refactors server startup/teardown via task on IP event, and updates configurations and docs to support C++ exceptions and new commands.

  • Enable C++ exceptions and update dependencies/config
  • Refactor app_main and move server setup into event-driven task
  • Expose new CLI commands for GUI actions and extend Gui API

Reviewed Changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
sdkconfig.defaults Turn on C++ exceptions
main/main.cpp Alias hardware, centralize server logic, add CLI menu and commands
main/idf_component.yml Adjust dependency rules and add espp/cli
main/Kconfig.projbuild Clear default SSID/password values
components/gui/src/gui.cpp Implement new clear_plots and clear_logs with display refresh
components/gui/include/gui.hpp Declare new clear_plots and clear_logs methods
README.md Reorganize and expand usage, development, and CLI instructions
.github/workflows/package_main.yml Update artifact path logic for release packaging
Comments suppressed due to low confidence (3)

main/main.cpp:235

  • The start_server function signature expects a std::mutex& but you use a std::recursive_mutex for server_mutex. Either change the parameter to std::recursive_mutex& or switch to a non-recursive std::mutex to avoid type mismatch.
bool start_server(std::mutex &m, std::condition_variable &cv, bool &task_notified) {

.github/workflows/package_main.yml:66

  • The workflow removed cd ${{ matrix.build.path }} so this zip command may run in the repo root instead of the build directory. Consider reintroducing cd ${{ matrix.build.path }} or specifying the path in the zip arguments.
        zip -r -j $zip_name build/*.bin build/*.elf build/bootloader/bootloader.bin build/partition_table/partition-table.bin build/flasher_args.json build/flash_args

main/idf_component.yml:17

  • Unquoted expressions in rules may not be recognized by the IDF parser. It's safer to quote the condition as if: "target in [esp32s3]" to match the component spec.
    - if: target in [esp32s3]

@finger563 finger563 merged commit 0d83d7f into main Jun 25, 2025
2 checks passed
@finger563 finger563 deleted the feat/wifi-cli-config branch June 25, 2025 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli command line interface enhancement New feature or request wifi
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant