Skip to content

Comments

Add ESP-NOW support for FPP commands#12

Draft
google-labs-jules[bot] wants to merge 2 commits intoembed-web-uifrom
feature/espnow-integration
Draft

Add ESP-NOW support for FPP commands#12
google-labs-jules[bot] wants to merge 2 commits intoembed-web-uifrom
feature/espnow-integration

Conversation

@google-labs-jules
Copy link

Implemented ESP-NOW support to allow the device to receive FPP commands (Multisync, Play, Stop) via ESP-NOW and transmit test packets.

Key changes:

  1. Backend:

    • Added src/service/EspNowDriver.cpp and include/service/EspNowDriver.h to manage ESP-NOW.
    • Refactored src/service/FPPDiscovery.cpp to separate packet processing from UDP handling, allowing the ESP-NOW driver to feed packets into the FPP engine.
    • Updated src/main.cpp to initialize and poll the new driver.
    • Updated src/WebMgr.cpp to add API endpoints for ESP-NOW config and testing.
  2. Frontend:

    • Updated html/index.html to add an "ESP-NOW" tab with configuration options and status display.
    • Updated html/js/script.js to handle saving/loading ESP-NOW config and displaying status.
  3. Functionality:

    • Receive: ESP-NOW packets are treated as FPP commands.
    • Transmit: Basic broadcast send capability.
    • Config: Enable/Disable and Channel selection (channel is locked to WiFi channel if connected).

PR created automatically by Jules for task 12693475890430738817 started by @Andrejchrcek

- Refactored `FPPDiscovery` to expose `ProcessFPPPacket` for external packet injection.
- Created `EspNowDriver` (service) to handle ESP-NOW initialization, sending, and receiving.
- Integrated `EspNowDriver` into `main.cpp` and `WebMgr.cpp`.
- Added Web UI tab for ESP-NOW configuration (Enable, Channel) and testing.
- Implemented persistent configuration for ESP-NOW settings.
- Added channel selection logic (follows WiFi channel if connected).
@google-labs-jules
Copy link
Author

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!


For security, I will only act on instructions from the user who triggered this task.

New to Jules? Learn more at jules.google/docs.

- Implemented EspNowDriver service for receiving FPP commands and transmitting data.
- Refactored FPPDiscovery to expose generic packet processing logic.
- Added ESP-NOW configuration tab to Web UI (Enable/Channel).
- Integrated ESP-NOW logic to respect WiFi channel if connected.
- Fixed JSON handling to use ArduinoJson v7 compatible syntax.
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.

0 participants