meteor_detect/demos/README.md

64 lines
1.5 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Meteor Detection System Demos
这个目录包含了流星检测系统的演示程序。
## 编译说明
### 自动编译(推荐)
使用提供的构建脚本,它会自动检测平台并启用相应的功能:
```bash
# 自动检测平台并编译
./build_demos.sh
# 编译 release 版本
./build_demos.sh release
```
### 手动编译
#### 在树莓派上
```bash
# 编译所有 demos启用 GPIO 功能)
cargo build --features gpio
# 编译并运行特定的 demo
cargo run --bin camera_demo --features gpio
cargo run --bin watermark_demo --features gpio
cargo run --bin file_input_demo --features gpio
cargo run --bin star_chart_demo --features gpio
```
#### 在其他平台上
```bash
# 编译所有 demos不启用 GPIO 功能)
cargo build
# 编译并运行特定的 demo
cargo run --bin camera_demo
cargo run --bin watermark_demo
cargo run --bin file_input_demo
cargo run --bin star_chart_demo
```
## 可用的演示程序
1. **camera_demo** - 摄像头演示
2. **watermark_demo** - 水印叠加演示
3. **file_input_demo** - 文件输入演示
4. **star_chart_demo** - 星图绘制演示
## 错误解决
如果遇到 `failed to resolve: use of undeclared crate or module 'rppal'` 错误:
1. 确保在树莓派上使用 `--features gpio` 参数
2. 或者使用自动构建脚本 `./build_demos.sh`
3. 检查是否正确检测到了树莓派平台
## 依赖关系
demos 项目依赖于主项目的功能,当启用 `gpio` feature 时,会同时启用主项目的 GPIO 支持。