Skip to content

Commit

Permalink
README.
Browse files Browse the repository at this point in the history
  • Loading branch information
robhaswell committed Nov 15, 2023
1 parent 9b80977 commit fd411c8
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 3 deletions.
43 changes: 43 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,45 @@
# btflcli
A command-line interface to dump and restore Betaflight configurations.

## Installation

Copy the binary from the [latest release](releases) to a suitable place in your PATH.

## Usage

```
$ btfl --help
This application will connect to a connected Betaflight flight controller and dump the configuration to a file.
It can also restore a configuration from a file to a connected flight controller.
The 'dump' command will create files in a directory matching the craft_name, with filenames matching the version of Betaflight. E.g.:
My Quad/BTFL_4.4.2_DUMP.txt
My Quad/BTFL_4.4.2_DIFF.txt
Use the 'load' command and pass a filename to load the contents of a file to the connected flight controller.
Usage:
btfl [command]
Available Commands:
completion Generate the autocompletion script for the specified shell
dump Dump the configuration from a connected flight controller
help Help about any command
load Load the configuration in the specified file to the connected flight controller
Flags:
-h, --help help for btfl
Use "btfl [command] --help" for more information about a command.
```

## Example output

```
$ btfl dump
MSP API version 1.46 (protocol 0)
Connected to BTFL 4.5.0 (M6 HDZero)
Written files: M6 HDZero/BTFL_4.5.0_DIFF.txt, M6 HDZero/BTFL_4.5.0_DUMP.txt
```
6 changes: 4 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#!/bin/bash
oss=(linux darwin windows)
oss=(linux darwin)
archs=(amd64 arm64 386)

for os in ${oss[@]}
do
for arch in ${archs[@]}
do
env GOOS=${os} GOARCH=${arch} go build -o bin/btflcli-${os}-${arch} .
env GOOS=${os} GOARCH=${arch} go build -o bin/btfl-${os}-${arch} .
done
done

env GOOS=windows GOARCH=amd64 go build -o bin/btfl.exe
2 changes: 1 addition & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ func init() {

// Cobra also supports local flags, which will only run
// when this action is called directly.
rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
// rootCmd.Flags().BoolP("toggle", "t", false, "Help message for toggle")
}

0 comments on commit fd411c8

Please sign in to comment.