#msp #betaflight #multiwii #inav

app async_msp_cli

为iNav和BetaFlight的异步msp cli

9个版本

0.1.10 2020年8月2日
0.1.8 2020年6月30日
0.1.1 2020年4月30日

#751 in 异步

每月 30次下载

MIT/Apache

73KB
1.5K SLoC

Multiwii串行协议(MSP)CLI

async_msp_cli是一个命令行程序,用于配置重启、获取状态和从Cleanflight、Betaflight和iNav下载黑盒。这是MSP2命令的不完整实现,包含一些Cleanflight、Betaflight和iNav的扩展。

  1. 模拟iNav、betaflight cli
  2. 异步发送MSP命令
  3. 尽可能快和高效

可用命令

aux                             Get all aux setting
                  set           Set aux setting

font              set           Upload mcm font file to MAX7456 osd

feature                         Get all features
                  Set           features(FEATURE_NAME:enable, -FEATURE_NAME:disable)
                  disable       Disable feature
                  enable        Enable feature

osd_item                        Get all osd items (derecated)
                  set           Set osd item

osd_layout                      Get all osd_layout items
                  set           Set osd layout item

blackbox          download      Download blackbox concurrently
                  downloadv2    Pull blackbox serially

map                             Get all rx map setting
                  set           Set rx map setting

mmix                            Get all mmix setting
                  set           Set mmix setting

serial                          Get all serial setting
                  set           Set serial setting

servo                           Get all servo setting
                  set           Set servo setting

setting           list          Get all common setting
                  set           Set common setting
                  get           get common setting
                  set-all       Set all common setting

smix                            Get all smix setting
                  set           Set smix setting

config                          Get all configs
                  set           Upload all configs
                  reset         Reset all configs

reboot                          Reboot the device

dfu                             Reboot into dfu mode

OPTIONS:
        --flavor <flavor>       [possible values: inav, baseflight, betafligth]
    -p, --port   <port>         device serial port

FLAGS:
    -h, --help       Prints help information
    -r, --reboot     reboot fc
    -s, --save       settings file path
        --strict     stop if setting not found in fc
    -V, --version    Prints version information

备份和恢复FC配置

async_msp_cli config > /tmp/configs # dump all configs
async_msp_cli -s -r config set /tmp/configs # restore all configs from file

asciicast

转储的语法与配置器转储命令输出相同

mmix 0  1.000 -1.000  1.000 -1.000
mmix 1  1.000 -1.000 -1.000  1.000
...

feature -TX_PROF_SEL
feature THR_VBAT_COMP
...

aux 0 51 6 1100 1200
aux 1 52 6 1400 1500
...

set gyro_hardware_lpf = 256HZ
set gyro_lpf_hz = 90
...

安装

从此仓库编译也类似

您可以通过安装Cargo(Rust的包管理器)和安装async_msp_cli来从源代码编译安装Cargo (Rust)

cargo install --locked async_msp_cli
git clone git://github.com/BurntSushi/async_msp_cli
cd async_msp_cli
cargo build --release

编译可能需要几分钟,取决于您的机器。二进制文件将位于./target/release/async_msp_cli

双许可下MIT或UNLICENSE

构建

先决条件

install docker
cargo install cross
cargo install --force cargo-make
cargo make --makefile ./Cargo.toml release-darwin
export PATH=$HOME/.cargo/bin:$PATH

调试构建

cargo build

构建所有版本

cargo make --makefile ./Cargo.toml release-all

依赖项

~10–20MB
~299K SLoC