Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>AiFlyNew to Visual Studio Code? Get it now.
AiFly

AiFly

aifly

| (1) | Free
飞控工程辅助插件:一键运行脚本 + CODE_BLOCK 代码块导航
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

AiFly

AiFly 是一个面向飞控工程开发场景的 VS Code 插件,当前聚焦两类能力:

  • 一键运行工程脚本:将常用脚本平铺到侧边栏,减少手工切终端和找脚本的动作。
  • CODE_BLOCK 代码块导航与折叠:针对 C/C++ 文件中的 CODE_BLOCK 结构,提供树形展示、定位与分层折叠能力。

主要功能

1. 一键运行脚本

插件在侧边栏提供独立视图,用于展示工作区里配置好的脚本条目。当前设计支持:

  • LLT 测试
  • DigitSim 数字仿真
  • Plot 画图
  • LLT 覆盖率报告
  • PCLint 全量扫描
  • 其他可通过配置扩展的脚本

示例配置:

{
  "runners": [
    { "label": "LLT 测试",       "script": "96_AutoBuild/run-llt.ps1",                                "type": "powershell" },
    { "label": "数字仿真",       "script": "96_AutoBuild/run-digitsim.ps1",                           "type": "powershell" },
    { "label": "Plot 画图",      "script": "97_Project/Digitsim/TiltRotorSim/Result/PlotCompare_lt.py", "type": "python" },
    { "label": "LLT 覆盖率报告", "script": "96_AutoBuild/run-llt-coverage.ps1",                       "type": "powershell" },
    { "label": "PCLint 全量扫描", "script": "96_AutoBuild/run-pclint-complete.ps1",                    "type": "powershell" }
  ]
}

运行行为说明:

  • powershell 类型脚本通过 PowerShell 启动。
  • python 类型脚本通过 Python 启动。
  • 脚本执行过程会在 VS Code 终端中可见。
  • 插件会根据执行状态显示运行中、成功、失败等状态。

2. CODE_BLOCK 树形展示

插件支持解析 C/C++ 文件中的 CODE_BLOCK 结构,并在侧边栏中展示层级树,便于快速理解大文件结构。

支持的典型格式:

#if CODE_BLOCK("块名称", TRUE)
    // 内容
    #if CODE_BLOCK("子块名称", TRUE)
    #endif
#endif

树中可展示的信息包括:

  • CODE_BLOCK 块节点
  • 普通函数
  • static 函数

其中变量不会被纳入树中显示,避免噪声过多。

3. CODE_BLOCK 折叠与导航

插件提供针对 CODE_BLOCK 的折叠/展开能力:

  • Ctrl + Alt + [:折叠当前层
  • Ctrl + Alt + ]:展开当前层
  • Ctrl + Alt + 1:展开到第 1 层
  • Ctrl + Alt + 2:展开到第 2 层
  • Ctrl + Alt + 3:展开到第 3 层
  • Ctrl + Alt + 0:全部折叠
  • Ctrl + Alt + 9:全部展开

适用范围

当前插件主要面向以下文件类型:

  • .c
  • .h
  • .cpp
  • .hpp

插件激活条件与实现也围绕 C/C++ 工程场景设计。

当前版本

  • 插件名:AiFly
  • 包名:aifly
  • 当前版本:0.1.6
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft