一款用于通过CRSF协议控制RC设备的安卓应用程序。该应用提供了直观的操纵杆控制、陀螺仪飞行控制以及可配置的通道开关,带来全面的遥控体验。
- 双操纵杆控制: 左右操纵杆实现传统RC风格的控制
- 陀螺仪飞行模式: 使用手机陀螺仪进行沉浸式飞行控制
- 多通道开关: CH6、CH7和CH8三位开关,带颜色编码的位置指示
- 解锁开关优化: 改进的视觉反馈,绿色表示解锁,红色表示锁定
- 横屏与竖屏模式: 支持两种方向的自适应用户界面
- USB串口通信: 通过USB直接连接RC硬件,支持CH34x驱动
- 实时遥测: 显示通道值和传感器数据以供调试
- 国际化支持: 多语言支持框架,现已包含中文翻译
- 操纵杆定制: 自定义颜色和尺寸以提升用户体验
- 支持USB OTG的安卓设备
- 兼容支持CRSF协议的RC接收机
- 连接RC硬件的USB线缆
- 克隆或下载项目源代码
- 在Android Studio中打开项目
- 构建并将应用安装到安卓设备上
- 在设备上启用开发者选项和USB调试
- 通过USB连接RC硬件
- 连接按钮: 通过USB串口建立与RC硬件的连接
- 使用陀螺仪按钮: 在操纵杆和陀螺仪控制模式之间切换
- 竖屏/横屏切换: 在屏幕方向之间切换
- 解锁开关: 解锁/锁定RC系统(优化后的视觉反馈)
- CH6/CH7/CH8开关: 三位开关辅助功能(颜色指示位置:红色=低,橙色=中,绿色=高)
- 操纵杆模式: 使用屏幕操纵杆进行传统遥控控制
- 陀螺仪模式: 倾斜手机来控制飞机(点击"使用陀螺仪"按钮激活)
- CH1: 横滚(左操纵杆X轴)
- CH2: 俯仰(左操纵杆Y轴)
- CH3: 油门(右操纵杆Y轴)
- CH4: 偏航(右操纵杆X轴)
- CH5: 解锁/锁定
- CH6: 三位开关
- CH7: 三位开关
- CH8: 三位开关
app/
├── src/main/java/com/humpbacklab/letsfly/ # 主应用程序代码
│ ├── MainActivity.kt # 主应用程序逻辑
│ ├── SettingsActivity.kt # 设置页面
│ └── ... # 其他组件
├── src/main/java/ # 自定义组件
│ ├── Joystick.kt # 自定义操纵杆视图
│ └── CRSFData.kt # CRSF协议实现
├── src/main/res/ # 资源(布局、图像、字符串等)
│ ├── layout/ # 布局文件
│ ├── values/ # 字符串和颜色资源
│ ├── values-zh-rCN/ # 中文本地化资源
│ └── ... # 其他资源
└── src/main/AndroidManifest.xml # 应用清单
ch34x/ # USB驱动模块
应用现在支持多语言:
- 英语(默认)
- 简体中文
- 要添加新语言,在
app/src/main/res/目录下创建相应语言的资源文件夹(如values-es/)并添加strings.xml
应用使用通用的ThreePositionSwitch类,可以轻松添加额外的开关:
- 在布局文件中添加新按钮
- 在MainActivity中创建新的ThreePositionSwitch实例
- 将其映射到相应的CRSF数据数组索引
使用布局文件中的XML属性来自定义操纵杆灵敏度和外观。您可以使用以下自定义属性:
joystickBackgroundColor: 操纵杆背景颜色joystickInnerCircleColor: 内圈颜色joystickButtonColor: 按钮颜色
解锁开关现在具有优化的视觉反馈,使用更直观的颜色方案。
- 连接问题: 确保已授予USB权限且CH34x驱动正确配置
- 陀螺仪无响应: 检查是否已授予陀螺仪权限
- 控制无效: 验证CRSF协议设置是否匹配您的RC硬件
- 界面问题: 如果遇到UI显示异常,请尝试重启应用
欢迎贡献!请随时提交拉取请求。对于重大更改,请先开issue讨论您想要更改的内容。
本项目根据GNU通用公共许可证第3版(GPL-3.0)获得许可 - 详见LICENSE文件。
An Android application designed for controlling RC aircraft and other devices using the CRSF (Crossfire) protocol. The app provides intuitive joystick controls, gyroscope-based flight control, and configurable channel switches for a comprehensive RC experience.
- Dual Joystick Control: Left and right joysticks for traditional RC-style control
- Gyroscope Flight Mode: Use phone's gyroscope for immersive flight control
- Multiple Channel Switches: Three-position switches for CH6, CH7, and CH8 with color-coded positions
- Improved Arm Switch: Enhanced visual feedback with green for armed, red for disarmed
- Portrait & Landscape Modes: Adaptable UI supporting both orientations
- USB Serial Communication: Direct connection to RC hardware via USB with CH34x driver support
- Real-time Telemetry: Display of channel values and sensor data for debugging
- Internationalization: Multi-language support framework with Chinese translation
- Customizable Joysticks: Custom colors and sizes for enhanced user experience
- Android device with USB OTG support
- Compatible RC receiver that supports CRSF protocol
- USB cable for connecting to RC hardware
- Clone or download the project source code
- Open the project in Android Studio
- Build and install the app on your Android device
- Enable developer options and USB debugging on your device
- Connect your RC hardware via USB
- Connect Button: Establishes connection to RC hardware via USB serial
- Use Gyro Button: Toggles between joystick and gyroscope control modes
- Portrait/Landscape Toggle: Switch between screen orientations
- Arm Switch: Arms/disarms the RC system (with improved visual feedback)
- CH6/CH7/CH8 Switches: Three-position switches for auxiliary functions (colors indicate position: red=LOW, orange=MIDDLE, green=HIGH)
- Joystick Mode: Traditional RC control using on-screen joysticks
- Gyroscope Mode: Tilt your phone to control the aircraft (activate with "Use Gyro" button)
- CH1: Roll (left joystick X-axis)
- CH2: Pitch (left joystick Y-axis)
- CH3: Throttle (right joystick Y-axis)
- CH4: Yaw (right joystick X-axis)
- CH5: Arm/Disarm
- CH6: Three-position switch
- CH7: Three-position switch
- CH8: Three-position switch
app/
├── src/main/java/com/humpbacklab/letsfly/ # Main application code
│ ├── MainActivity.kt # Main application logic
│ ├── SettingsActivity.kt # Settings page
│ └── ... # Other components
├── src/main/java/ # Custom components
│ ├── Joystick.kt # Custom joystick view
│ └── CRSFData.kt # CRSF protocol implementation
├── src/main/res/ # Resources (layouts, drawables, strings, etc.)
│ ├── layout/ # Layout files
│ ├── values/ # String and color resources
│ ├── values-zh-rCN/ # Chinese localization resources
│ └── ... # Other resources
└── src/main/AndroidManifest.xml # App manifest
ch34x/ # USB driver module
The app now supports multiple languages:
- English (default)
- Chinese Simplified
- To add a new language, create a corresponding resource folder (e.g.,
values-es/) inapp/src/main/res/and addstrings.xml
The app uses a generic ThreePositionSwitch class that makes it easy to add additional switches:
- Add a new button in the layout files
- Create a new ThreePositionSwitch instance in MainActivity
- Map it to the appropriate CRSF data array index
Customize joystick sensitivity and appearance using XML attributes in the layout files. You can use these custom attributes:
joystickBackgroundColor: Background color of the joystickjoystickInnerCircleColor: Color of the inner circlejoystickButtonColor: Color of the button
The arm switch now features enhanced visual feedback with a more intuitive color scheme.
- Connection Issues: Ensure USB permissions are granted and CH34x driver is properly configured
- Gyroscope Not Responding: Check that gyroscope permissions are granted
- Controls Not Working: Verify CRSF protocol settings match your RC hardware
- UI Issues: If experiencing UI display anomalies, try restarting the app
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the GNU General Public License v3.0 (GPL-3.0) - see the LICENSE file for details.