From fd411c80a95e627381a20a583e9d1072aad93797 Mon Sep 17 00:00:00 2001 From: Rob Haswell Date: Wed, 15 Nov 2023 22:51:48 +0000 Subject: [PATCH] README. --- README.md | 43 +++++++++++++++++++++++++++++++++++++++++++ build.sh | 6 ++++-- cmd/root.go | 2 +- 3 files changed, 48 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 276fdf2..ca33149 100644 --- a/README.md +++ b/README.md @@ -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 +``` \ No newline at end of file diff --git a/build.sh b/build.sh index c867c4d..f397832 100755 --- a/build.sh +++ b/build.sh @@ -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 \ No newline at end of file diff --git a/cmd/root.go b/cmd/root.go index 38caeaa..a1c8b30 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -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") }