Skip to content

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

FlyingRC AM32 OneWire Touch Tuner

Standalone AM32 OneWire parameter tuner for the Waveshare ESP32-S3-Touch-LCD-1.69. V1.0 provides a Chinese/English touch UI, a lossless 192-byte Layout 3 EEPROM editor, guarded OneWire programming with full readback verification, a sole UART worker, and read-only USB diagnostics. The user-approved extension adds recoverable A/B tuner firmware OTA, including an explicitly opened WPA2 SoftAP upload window.

Interface gallery

These are deterministic SVG renders of the shipped 240 x 280 LVGL interface, not camera photographs, so text and controls remain sharp without LCD moire. Values mirror the real-ESC V1.0 test session. The Wi-Fi image deliberately uses a non-scannable documentation placeholder because the tuner creates fresh credentials on each run.

Home Device information Basic settings
FlyingRC AM32 Tuner home screen Connected AM32 device information AM32 basic settings
Motor settings Startup and PWM Brake and protection
AM32 motor settings AM32 startup and PWM settings AM32 brake and protection settings
Confirm save Wi-Fi update About and language
AM32 save confirmation Wi-Fi firmware update screen About and language selection

Regenerate all gallery images after a UI change:

node tools/render_readme_screenshots.mjs

Required toolchain

  • ESP-IDF v5.3.1
  • C++17
  • LVGL 8.4.0 (managed component)

Build

source /path/to/esp-idf-v5.3.1/export.sh
idf.py set-target esp32s3
idf.py build

Flash and attach the native USB CDC console:

idf.py flash monitor

The home screen and diagnostics CLI transmit nothing automatically. Follow the on-screen power sequence to connect an ESC, or open native USB serial at 115200 baud and type help. USB diagnostics intentionally cannot write EEPROM.

Run host tests

cmake -S test_apps/protocol_tests -B /tmp/am32-tuner-protocol-tests
cmake --build /tmp/am32-tuner-protocol-tests
ctest --test-dir /tmp/am32-tuner-protocol-tests --output-on-failure

The suite covers protocol/settings logic, full EEPROM write-payload serialization, fixed-buffer self-echo parsing, every editable field, readback verification, state classification, and OTA version policy. See docs/PROTOCOL.md, docs/EEPROM_LAYOUT.md, docs/ONEWIRE_UART.md, and docs/TEST_PLAN.md.

Current scope and limits

components/
  board_waveshare/     Waveshare LCD, touch, power key, buzzer
  onewire_uart/        GPIO2 open-drain UART and fixed-buffer echo parser
  am32_bootloader/     Handshake, EEPROM read, write and verify client
  app_controller/      Explicit state machine, worker and queues
  ui/                  Chinese/English read/edit/save/OTA LVGL screens
  am32_readonly_cli/   Queued USB diagnostics and read consistency test
  firmware_update/     A/B rollback, authenticated Wi-Fi OTA upload
  am32_protocol/       CRC, command frames, Device Info parser
  am32_settings/       lossless EEPROM image and SettingDescriptor table
test_apps/
  protocol_tests/      host-side M1 unit tests
docs/                  source, hardware, protocol, layout, and test records

The firmware uses the ESP32-S3 internal pull-up, so short bench wiring needs only GPIO2-to-SIG and a common ground. An external 10 kOhm pull-up and 680 Ohm series resistor remain optional noise-margin and contention-protection parts. Only Layout 3 with Bootloader Protocol 2 or newer can enter the write path. Saving requires a 1.5-second hold, blocks Back and shutdown during the critical transaction, and succeeds only when all 192 readback bytes match except the Bootloader-owned byte 2. See docs/M5_WRITE_UI.md. PWR/Key2 single click performs Back after the double-click window, double click is intentionally unassigned, and a 1.5-second hold requests shutdown.

The tuner uses a factory recovery image plus ota_0/ota_1 with rollback. Wi-Fi 更新本机 creates a random WPA2 hotspot only after a local touch. The display shows a standard Wi-Fi QR code for one-tap phone connection; tapping the code reveals the SSID and password as a manual fallback. Its web uploader accepts a strictly newer application image for this exact project. The About page switches the complete touch UI between Chinese and English and stores the selection in tuner NVS, independently of the ESC EEPROM. The USB romboot command remains the immutable ROM recovery path. There is no ESC firmware/bootloader flashing, BLE, 4-in-1 switching, passthrough, CAN tuning, tune editor, or profile import/export.

Hardware wiring and the operator power sequence are in docs/WIRING.md. Current requirement evidence and the remaining release gates are tracked in docs/REQUIREMENTS_AUDIT.md and docs/RELEASE_CHECKLIST.md; build success is never substituted for real ESC or logic-analyzer proof.

tools/package_release.sh VERSION creates a refuse-overwrite release directory containing a factory image at offset 0x10000, an uploadable OTA image, a merged full-flash image at offset 0x0000, component images, documentation, build metadata, and a self-checked SHA-256 manifest. The version argument must exactly match PROJECT_VER; set BUILD_DIR to package an independently built tree. This tool does not replace the release checklist.

About

No description, website, or topics provided.

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages