Skip to content

feat: ESP32-C3 Super Mini target, GoPro link fix, DJI Action 2 support - #2

Open
miszczuq wants to merge 1 commit into
YLabs-FPV:mainfrom
Modulo-MM:feature/esp32c3-supermini-action2
Open

miszczuq wants to merge 1 commit into
YLabs-FPV:mainfrom
Modulo-MM:feature/esp32c3-supermini-action2

Conversation

@miszczuq

Copy link
Copy Markdown

Add a second board target and a new camera backend, and fix the GoPro link being dropped right after it connects.

ESP32-C3 Super Mini (new esp32c3-supermini env)

  • platformio.ini: shared settings moved to [env]; new env on the nologo_esp32c3_super_mini board (ESP32-C3FH4: 4 MB flash, no PSRAM, USB-Serial/JTAG). The esp32s3-zero env builds as before.
  • config.h: per-board pin maps selected by a BOARD_* define. C3: FC UART on GPIO20 (RX) / GPIO21 (TX), status LED on GPIO8.
  • StatusLed: support a plain single-colour LED (the C3 board has a blue active-low LED instead of a WS2812); states are told apart by blink pattern: slow blink = searching, double flash = config Wi-Fi client, solid = camera connected, fast blink = recording.
  • main.cpp: on single-core chips loop() blocks for a tick so the camera task and the idle task are not starved.
  • README: build, flash and wiring notes for the C3 board.

GoPro

  • Fix the link being dropped as "stale" right after connecting: the check used a timestamp taken before the blocking status/setting writes, so a reply landing during them made now - lastUpdateMs underflow.
  • Log the NimBLE error code when a connect attempt fails.

DJI Action 2 (new "DJI Action 2" camera type)

  • New DjiAction2Camera backend: DUML over BLE with the app-level pairing the Mimo app uses (01 00 arm write to FFF4, 0x07/0x45 pairing request, ACK of the on-screen approval), record start/stop via 0x02/0x02. Pairing flow ported from shutterlink (MIT).
  • The camera sends no telemetry once paired, so the BLE link itself is the liveness signal and record state/time come from our own commands. Photo capture, mode switch, SD free, time left and resolution are unavailable.
  • Web UI: new camera type in the bind wizard; every DJI camera is listed for each DJI type (the scan can't tell an Action 2 apart); OSD fields and channel functions the Action 2 can't provide are hidden.

Tested on an ESP32-C3 Super Mini:

  • flashes and boots, Wi-Fi AP and Web UI work
  • GoPro HERO12 pairs and stays connected with live status
  • DJI Action 2 pairs; link stability after the liveness change and record start/stop not verified yet
  • not yet tested with a flight controller (MSP, OSD, record on arm)

Add a second board target and a new camera backend, and fix the GoPro
link being dropped right after it connects.

ESP32-C3 Super Mini (new `esp32c3-supermini` env)
- platformio.ini: shared settings moved to [env]; new env on the
  nologo_esp32c3_super_mini board (ESP32-C3FH4: 4 MB flash, no PSRAM,
  USB-Serial/JTAG). The esp32s3-zero env builds as before.
- config.h: per-board pin maps selected by a BOARD_* define. C3: FC UART
  on GPIO20 (RX) / GPIO21 (TX), status LED on GPIO8.
- StatusLed: support a plain single-colour LED (the C3 board has a blue
  active-low LED instead of a WS2812); states are told apart by blink
  pattern: slow blink = searching, double flash = config Wi-Fi client,
  solid = camera connected, fast blink = recording.
- main.cpp: on single-core chips loop() blocks for a tick so the camera
  task and the idle task are not starved.
- README: build, flash and wiring notes for the C3 board.

GoPro
- Fix the link being dropped as "stale" right after connecting: the check
  used a timestamp taken before the blocking status/setting writes, so a
  reply landing during them made `now - lastUpdateMs` underflow.
- Log the NimBLE error code when a connect attempt fails.

DJI Action 2 (new "DJI Action 2" camera type)
- New DjiAction2Camera backend: DUML over BLE with the app-level pairing
  the Mimo app uses (01 00 arm write to FFF4, 0x07/0x45 pairing request,
  ACK of the on-screen approval), record start/stop via 0x02/0x02.
  Pairing flow ported from shutterlink (MIT).
- The camera sends no telemetry once paired, so the BLE link itself is the
  liveness signal and record state/time come from our own commands. Photo
  capture, mode switch, SD free, time left and resolution are unavailable.
- Web UI: new camera type in the bind wizard; every DJI camera is listed
  for each DJI type (the scan can't tell an Action 2 apart); OSD fields and
  channel functions the Action 2 can't provide are hidden.

Tested on an ESP32-C3 Super Mini:
- flashes and boots, Wi-Fi AP and Web UI work
- GoPro HERO12 pairs and stays connected with live status
- DJI Action 2 pairs; link stability after the liveness change and record
  start/stop not verified yet
- not yet tested with a flight controller (MSP, OSD, record on arm)

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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