Development Guide
Welcome to the ELRS Mobile development guide! This project is a native Flutter implementation of the ExpressLRS compilation and flashing pipeline, designed to work entirely offline.
Prerequisites
Section titled “Prerequisites”To contribute to this project, you will need the following tools installed:
Getting Started
Section titled “Getting Started”-
Clone the repository:
Terminal window git clone https://github.com/wbhinton/ELRS-Mobile.gitcd ELRS-Mobile -
Install dependencies:
Terminal window flutter pub get -
Run the application:
Terminal window # For Androidflutter run# For iOS (requires a Mac and physical device/simulator)flutter run
Project Architecture
Section titled “Project Architecture”The codebase follows a feature-first structure located in lib/src/.
Features
- flashing/ The core logic and UI for the flashing pipeline.
- firmware_manager/ Handles downloading and caching firmware from the artifactory.
- configurator/ UI for setting user options like Binding Phrases and WiFi.
Core
- networking/ Platform-specific logic for process-binding to hardware hotspots.
- storage/ Local cache management and SQLite persistence.
- analytics/ Privacy-first observability (Sentry and Aptabase).
State Management
Section titled “State Management”We utilize Riverpod for global state management and Flutter Hooks for local widget-level state. This combination ensures a highly reactive UI without the boilerplate of standard StatefulWidgets.
Deep Dives
Section titled “Deep Dives”For more detailed technical information, please refer to the following guides:
- Technical Architecture: A deep dive into the
FirmwareAssemblerand the native networking stack. - Firmware Validation: How to use the Dart and Python tools to verify binary integrity.
Note on JSON Minification
Section titled “Note on JSON Minification”When auditing binaries, you may notice slight byte-offsets compared to the standard Python Configurator. This is due to JSON minification.
The Python Configurator often injects spaces after colons (e.g., {"uid": [1,2,3]}), while ELRS Mobile generates dense JSON (e.g., {"uid":[1,2,3]}). Both are functionally identical on hardware, as the ESP32’s internal parser ignores this whitespace.