This commit is contained in:
Stavros Korokithakis 2021-02-27 22:37:16 +02:00
parent 7a57e41049
commit 666a0e38ee
No known key found for this signature in database
GPG Key ID: 26EA345ECD4C2A63
5 changed files with 57 additions and 6 deletions

View File

@ -18,5 +18,6 @@ Click on a link in the list below to go to that page:
1. [Miscellaneous](../../drone-stuff/miscellaneous)
1. [Omnibus F4 V3 pinout](../../drone-stuff/omnibus-f4-v3-pinout)
1. [Omnibus F4 pro servo diode](../../drone-stuff/omnibus-f4-pro-servo-diode)
1. [QGroundControl to Mission Planner conversion script](../../drone-stuff/qgroundcontrol-to-mission-planner-conversion-script)
1. [Transmitter external module pinout](../../drone-stuff/transmitter-external-module-pinout)
1. [Transportable C1 Chaser](../../drone-stuff/transportable-c1-chaser)

View File

@ -13,7 +13,7 @@ You should keep the [full list of ArduPilot parameters](https://ardupilot.org/pl
Because building ArduPilot is a bit complicated, I've written a short script that uses Docker to build AP in a controlled environment.
Copy it from here, save it to a file called `docker_build.sh` in the root of the ArduPilot repo, and run it with `docker_build.sh <your board>`. Output files will be stored in `build/<yourboard>/bin/`, and you can flash them with the [INAV configurator](https://github.com/iNavFlight/inav-configurator/releases) by putting your board in DFU mode and uploading the `.hex` file:
Copy it from here, save it to a file called `docker_build.sh` in the root of the ArduPilot repo, and run it with `docker_build.sh <your board>`. Output files will be stored in `build/<yourboard>/bin/`, and you can flash them with the [INAV configurator](https://github.com/iNavFlight/inav-configurator/releases) by putting your board in DFU mode and uploading the `arduplane_with_bl.hex` file:
```bash
#!/usr/bin/env bash
@ -28,18 +28,20 @@ fi
BOARD=$1
cd "$(git rev-parse --show-toplevel)"
git submodule update --init --recursive
git checkout Dockerfile
echo "RUN pip install intelhex" >> Dockerfile
echo "RUN sudo apt-get update && sudo apt-get install -y gcc-arm-none-eabi" >> Dockerfile
echo "RUN sudo apt-get clean && sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*" >> Dockerfile
echo 'ENV PATH="/home/ardupilot/.local/bin:/usr/lib/ccache:/ardupilot/Tools/autotest:/opt/gcc-arm-none-eabi-6-2017-q2-update/bin:${PATH}"' >> Dockerfile
docker build . -t ardupilot
git checkout Dockerfile
docker run --rm -it -v "$(pwd)":/ardupilot ardupilot:latest ./waf configure --board="$BOARD"
docker run --rm -it -v "$(pwd)":/ardupilot ardupilot:latest ./waf build
```
@ -140,6 +142,6 @@ _(Many thanks to Michel Pastor for his help with everything in this note.)_
* * *
<p style="font-size:80%; font-style: italic">
Last updated on February 24, 2021. For any questions/feedback,
Last updated on February 27, 2021. For any questions/feedback,
email me at <a href="mailto:hi@stavros.io">hi@stavros.io</a>.
</p>

View File

@ -0,0 +1,48 @@
+++
title = "QGroundControl to Mission Planner conversion script"
weight = 11
sort_by = "weight"
insert_anchor_links = "right"
+++
If you have a parameter dump from QGroundControl, I wrote a small script that will convert it to a Mission Planner compatible file.
Just save this script somewhere as `convert_qgc_params` and run it as `./convert_qgc_params <qgc params> <output file>`:
```py
#!/usr/bin/env python3
import sys
from decimal import Decimal
def format_float(f):
return "{0:f}".format(Decimal(f).quantize(Decimal("1.0000000")).normalize())
def main(infile, outfile):
with open(infile) as ins:
inputs = ins.read()
lines = []
for line in inputs.split("\n"):
if not line or line.startswith("#"):
continue
vehicle_id, component_id, name, value, type = line.split("\t")
v = value
if type == "9":
v = format_float(float(value))
lines.append(f"{name},{v}\n")
with open(outfile, "wt") as outs:
outs.writelines(lines)
if __name__ == "__main__":
main(sys.argv[1], sys.argv[2])
```
* * *
<p style="font-size:80%; font-style: italic">
Last updated on February 27, 2021. For any questions/feedback,
email me at <a href="mailto:hi@stavros.io">hi@stavros.io</a>.
</p>

View File

@ -1,6 +1,6 @@
+++
title = "Transmitter external module pinout"
weight = 11
weight = 12
sort_by = "weight"
insert_anchor_links = "right"
+++

View File

@ -1,6 +1,6 @@
+++
title = "Transportable C1 Chaser"
weight = 12
weight = 13
sort_by = "weight"
insert_anchor_links = "right"
+++