diff --git a/README.md b/README.md index 29b511b7048019ba0c522ce0cf577e34cc806c49..1be6e020f0cb7d8c9408ddde89c2714e17509623 100644 --- a/README.md +++ b/README.md @@ -1,79 +1,130 @@ # Payload-SDK -## Getting started +## 项目简介 -To make it easy for you to get started, here's a list of recommended next steps. +Payload-SDK 是一个用于开发无人机有效载荷设备的软件开发工具包,支持多种模块和功能,包括相机控制、飞行控制、数据传输、云台管理等。该 SDK 提供了丰富的 API 接口和示例代码,适用于 Linux 和 RTOS 平台,便于开发者快速集成和开发。 -Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)! +## 功能特性 -## Add your files +- **相机控制**:支持相机参数设置、拍照、录像、缩略图生成等功能。 +- **飞行控制**:提供飞行状态监控、飞行控制接口。 +- **数据传输**:支持通过串口、网络、USB 等方式进行数据传输。 +- **云台管理**:提供云台角度控制、旋转、校准等功能。 +- **固件升级**:支持固件升级和程序更新。 +- **健康管理**:提供设备健康状态监控和错误码解析。 +- **时间同步**:支持高精度时间同步功能。 +- **定位功能**:支持 GPS 定位信息获取。 +- **电源管理**:支持电源控制和高功率申请。 -- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files -- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command: +## 安装与配置 -## Collaborate with your team +### Linux 平台(Manifold2) -- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/) -- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html) -- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically) -- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/) -- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html) +1. **依赖安装**: + 确保系统已安装必要的开发工具和库: + ```bash + sudo apt-get update + sudo apt-get install build-essential cmake git + ``` -## Test and Deploy +2. **编译 SDK**: + ```bash + cd samples/sample_c/platform/linux/manifold2 + mkdir build && cd build + cmake .. + make + ``` -Use the built-in continuous integration in GitLab. +3. **运行示例**: + 编译完成后,可在 `build` 目录下找到可执行文件,运行示例程序: + ```bash + ./gdu_sdk_app + ``` -- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html) -- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/) -- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html) -- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/) -- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html) +### RTOS 平台(STM32F4 Discovery) -*** +1. **开发环境搭建**: + 使用 Keil MDK 或 STM32CubeIDE 打开项目: + ``` + samples/sample_c/platform/rtos_freertos/stm32f4_discovery/project/mdk/mdk_app.uvprojx + ``` -# Editing this README +2. **编译与烧录**: + 在 IDE 中编译项目并烧录到 STM32F4 Discovery 开发板。 -When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template. +3. **运行与调试**: + 使用调试器连接开发板,启动调试会话并运行程序。 -## Suggestions for a good README -Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information. +## 使用示例 -## Name -Choose a self-explaining name for your project. +### 相机控制示例 -## Description -Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors. +```c +T_GduReturnCode GduTest_CameraEmuBaseStartService(void); +T_GduReturnCode GduTest_CameraGetDigitalZoomFactor(gdu_f32_t *factor); +T_GduReturnCode GduTest_CameraGetOpticalZoomFactor(gdu_f32_t *factor); +``` -## Badges -On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge. +### 飞行控制示例 -## Visuals -Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method. +```c +void GduTest_FlightControlTakeOffLandingSample(); +void GduTest_FlightControlPositionControlSample(); +void GduTest_FlightControlVelocityControlSample(); +``` -## Installation -Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection. +### 数据传输示例 -## Usage -Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README. +```c +T_GduReturnCode GduTest_DataTransmissionStartService(void); +T_GduReturnCode GduTest_DataTransmissionStopService(void); +``` -## Support -Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc. +### 云台控制示例 -## Roadmap -If you have ideas for releases in the future, it is a good idea to list them in the README. +```c +T_GduReturnCode GduTest_GimbalStartService(void); +T_GduReturnCode GduTest_GimbalRotate(E_GduGimbalRotationMode rotationMode, + T_GduGimbalRotationProperty rotationProperty, + T_GduAttitude3d rotationValue); +``` -## Contributing -State if you are open to contributions and what your requirements are for accepting them. +### 固件升级示例 -For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self. +```c +T_GduReturnCode GduTest_UpgradeStartService(const T_GduTestUpgradePlatformOpt *upgradePlatformOpt, + T_GduTestUpgradeConfig testUpgradeConfig); +T_GduReturnCode GduTest_StartUpgrade(void); +``` -You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser. +## 支持的硬件平台 -## Authors and acknowledgment -Show your appreciation to those who have contributed to the project. +- **Linux**:适用于 Manifold2 等嵌入式 Linux 平台。 +- **RTOS**:基于 FreeRTOS 的 STM32F4 Discovery 开发板。 -## License -For open source projects, say how it is licensed. +## 开发与调试工具 -## Project status -If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers. +- **日志系统**:支持日志输出,便于调试。 +- **内存监控**:提供内存使用监控功能。 +- **任务调度**:基于 FreeRTOS 的多任务调度机制。 + +## 贡献指南 + +欢迎贡献代码和文档。请遵循以下步骤: + +1. Fork 项目。 +2. 创建新分支。 +3. 提交更改。 +4. 发起 Pull Request。 + +## 作者与致谢 + +本项目由 GDU SDK 团队开发维护,感谢所有贡献者。 + +## 许可证 + +本项目采用 MIT 许可证,请参阅 [LICENSE.txt](LICENSE.txt) 文件获取详细信息。 + +## 项目状态 + +该项目目前处于活跃开发状态,欢迎社区参与和贡献。 \ No newline at end of file