diff --git a/.gitignore b/.gitignore index 7b82297..9cb5620 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ themes/ public/ +book/ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7e86ce5..75e4620 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,12 +1,26 @@ -pages: +stages: + - build + - pages + +build: + stage: build image: python script: - - wget https://github.com/getzola/zola/releases/download/v0.12.2/zola-v0.12.2-x86_64-unknown-linux-gnu.tar.gz -O zola.tgz - - tar zxvf zola.tgz - - mv zola /usr/local/bin/ - - ./build.sh + - pip install pre-commit + - pre-commit run -a --hook-stage=manual + - wget https://github.com/rust-lang/mdBook/releases/download/v0.4.13/mdbook-v0.4.13-x86_64-unknown-linux-gnu.tar.gz -O mdbook.tgz + - tar zxvf mdbook.tgz + - mv mdbook /usr/local/bin/ + - ./build artifacts: paths: - public + +pages: + stage: pages + script: ls -lah public/ only: - master + artifacts: + paths: + - public diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c842a4c..f569838 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -21,8 +21,8 @@ repos: - --ignore=D100,D107,D203,D212 - repo: local hooks: - - id: migrations-check - language: system - name: Export the notes. - entry: bash -c "./joplinexport.py" - pass_filenames: false + - id: no-todos + name: Forbid TODOs + entry: "TODO" + language: pygrep + types: [python] diff --git a/book.toml b/book.toml new file mode 100644 index 0000000..68c0e1e --- /dev/null +++ b/book.toml @@ -0,0 +1,13 @@ +[book] +authors = ["Stavros Korokithakis"] +language = "en" +multilingual = false +src = "content" +title = "Stavros' Notes" + +[output.html] +curly-quotes = true +no-section-label = false +git-repository-url = "https://gitlab.com/stavros/notes/" +git-repository-icon = "fa-gitlab" +additional-css = ["static/custom.css"] diff --git a/build b/build new file mode 100755 index 0000000..830a89f --- /dev/null +++ b/build @@ -0,0 +1,11 @@ +#!/bin/bash + +set -euxo pipefail + +rm -rf public/ +mdbook build -d public + +# Make checkboxes editable, just in case the user wants to keep their own checklist. +find public/ -name "*.html" -type f -exec sed -i 's/input disabled=""/input/g' {} + + +cp -R static/* public/ diff --git a/build.sh b/build.sh deleted file mode 100755 index ef9ee83..0000000 --- a/build.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -set -euxo pipefail - -rm -rf themes/book/ -git clone https://github.com/getzola/book.git themes/book/ - -sed -i '5i if (window.innerWidth < 900) { $menu.classList.toggle("menu-hidden"); $page.classList.toggle("page-without-menu"); }\n' themes/book/static/book.js - -rm -rf public/ -zola build - -# Make checkboxes editable, just in case the user wants to keep their own checklist. -find public/ -name "*.html" -type f -exec sed -i 's/input disabled=""/input/g' {} + diff --git a/content/SUMMARY.md b/content/SUMMARY.md new file mode 100644 index 0000000..0f7641b --- /dev/null +++ b/content/SUMMARY.md @@ -0,0 +1,38 @@ +# Summary + +[Stavros' notes](welcome/stavros-notes.md) +- [Drone stuff](drone-stuff/index.md) + - [ArduPilot](ardupilot/index.md) + - [ArduPilot recommended settings](ardupilot/ardupilot-recommended-settings.md) + - [ArduPilot setup checklist](ardupilot/ardupilot-setup-checklist.md) + - [Building ArduPilot](ardupilot/building-ardupilot.md) + - [Configuring a switch as a relay](ardupilot/configuring-a-switch-as-a-relay.md) + - [Miscellaneous notes](ardupilot/miscellaneous-notes.md) + - [Reverse thrust](ardupilot/reverse-thrust.md) + - [TECS tuning calculator](ardupilot/tecs-tuning-calculator.md) + - [Transfer config between craft](ardupilot/transfer-config-between-craft.md) + - [Tuning the TECS](ardupilot/tuning-the-tecs.md) + - [Model build notes](model-build-notes/index.md) + - [Build notes for the FT Mighty Mini Arrow](model-build-notes/build-notes-for-the-ft-mighty-mini-arrow.md) + - [Mini Drak build condensed instructions](model-build-notes/mini-drak-build-condensed-instructions.md) + - [A simple guide to PID control](drone-stuff/a-simple-guide-to-pid-control.md) + - [E6000 hinges](drone-stuff/e6000-hinges.md) + - [FPV frequency chart](drone-stuff/fpv-frequency-chart.md) + - [General RC tips](drone-stuff/general-rc-tips.md) + - [Getting uninverted SBUS on a no-name FrSky-compatible receiver](drone-stuff/getting-uninverted-sbus-on-a-no-name-frsky-compatible-receiver.md) + - [Getting uninverted SBUS/SmartPort on the FrSky XSR receiver](drone-stuff/getting-uninverted-sbus-smartport-on-the-frsky-xsr-receiver.md) + - [INAV tuning tips](drone-stuff/inav-tuning-tips.md) + - [Miscellaneous](drone-stuff/miscellaneous.md) + - [Omnibus F4 pro servo diode](drone-stuff/omnibus-f4-pro-servo-diode.md) + - [Omnibus F4 V3 pinout](drone-stuff/omnibus-f4-v3-pinout.md) + - [QGroundControl to Mission Planner conversion script](drone-stuff/qgroundcontrol-to-mission-planner-conversion-script.md) + - [Transmitter external module pinout](drone-stuff/transmitter-external-module-pinout.md) + - [Transportable C1 Chaser](drone-stuff/transportable-c1-chaser.md) +- [Maker things](maker-things/index.md) + - [Battery discharge curves](maker-things/battery-discharge-curves.md) + - [Electronics tips](maker-things/electronics-tips.md) + - [GRBL_ESP32 tips](maker-things/grbl-esp32-tips.md) + - [How to properly level your 3D printer](maker-things/how-to-properly-level-your-3d-printer.md) +- [Software](software/index.md) + - [Monero GUI syncing stuck with Ledger](software/monero-gui-syncing-stuck-with-ledger.md) + - [Test and format SD cards](software/test-and-format-sd-cards.md) \ No newline at end of file diff --git a/content/ardupilot/_index.md b/content/ardupilot/_index.md deleted file mode 100644 index 167d786..0000000 --- a/content/ardupilot/_index.md +++ /dev/null @@ -1,19 +0,0 @@ -+++ -title = "ArduPilot" -weight = 2 -sort_by = "weight" -insert_anchor_links = "right" -+++ -## Contents - -Click on a link in the list below to go to that page: - -1. [ArduPilot recommended settings](../../ardupilot/ardupilot-recommended-settings) -1. [ArduPilot setup checklist](../../ardupilot/ardupilot-setup-checklist) -1. [Building ArduPilot](../../ardupilot/building-ardupilot) -1. [Configuring a switch as a relay](../../ardupilot/configuring-a-switch-as-a-relay) -1. [Miscellaneous notes](../../ardupilot/miscellaneous-notes) -1. [Reverse thrust](../../ardupilot/reverse-thrust) -1. [TECS tuning calculator](../../ardupilot/tecs-tuning-calculator) -1. [Transfer config between craft](../../ardupilot/transfer-config-between-craft) -1. [Tuning the TECS](../../ardupilot/tuning-the-tecs) diff --git a/content/ardupilot/ardupilot-recommended-settings.md b/content/ardupilot/ardupilot-recommended-settings.md index 961c0c7..ad7792c 100644 --- a/content/ardupilot/ardupilot-recommended-settings.md +++ b/content/ardupilot/ardupilot-recommended-settings.md @@ -1,21 +1,17 @@ -+++ -title = "ArduPilot recommended settings" -weight = 1 -sort_by = "weight" -insert_anchor_links = "right" -+++ +# ArduPilot recommended settings + This section contains some recommended settings for ArduPilot. Nothing is set in stone, these are just some defaults I've found to work well. ## GPS -```bash +```js GPS_GNSS_MODE=71 # Enable GPS/SBAS/Galileo/GLONASS. GPS_RATE_MS=100 # 10 Hz update rate. ``` ## Crossfire/ELRS -```bash +```js SERIALn_PROTOCOL=23 # Crossfire/ELRS. RC_OPTION=800 # 5 - Arming check throttle. # 8 - CRSF telemetry passthrough. @@ -26,7 +22,7 @@ RC_OPTION=800 # 5 - Arming check throttle. 30% expo is a good starting point: -```bash +```js MAN_EXPO_ROLL=30 MAN_EXPO_PITCH=30 MAN_EXPO_RUDDER=30 @@ -34,7 +30,7 @@ MAN_EXPO_RUDDER=30 ## Miscellaneous -```bash +```js INS_GYRO_FILTER=60 # Faster gyro updates. SCHED_LOOP_RATE=100 # Faster scheduler updates. ``` @@ -42,6 +38,6 @@ SCHED_LOOP_RATE=100 # Faster scheduler updates. * * *

-Last updated on October 31, 2021. For any questions/feedback, +Last updated on November 19, 2021. For any questions/feedback, email me at hi@stavros.io.

diff --git a/content/ardupilot/ardupilot-setup-checklist.md b/content/ardupilot/ardupilot-setup-checklist.md index 8a3af9a..832b42e 100644 --- a/content/ardupilot/ardupilot-setup-checklist.md +++ b/content/ardupilot/ardupilot-setup-checklist.md @@ -1,9 +1,5 @@ -+++ -title = "ArduPilot setup checklist" -weight = 2 -sort_by = "weight" -insert_anchor_links = "right" -+++ +# ArduPilot setup checklist + This is a short guide for setting up [ArduPilot](https://ardupilot.org/) on a flying wing. I use an Omnibus F4 that was previously set up for INAV (so motor on 1, elevons on 3/4), so most of this guide will be geared to that. If you use a different controller, your mileage may vary. You should keep the [full list of ArduPilot parameters](https://ardupilot.org/plane/docs/parameters.html) open, for your reference while tuning. @@ -17,7 +13,7 @@ It's called Parachute, and you can download it here: ## Building ArduPilot -See [Building ArduPilot](../../ardupilot/building-ardupilot) for instructions on how to build the latest version. +See [Building ArduPilot](/ardupilot/building-ardupilot) for instructions on how to build the latest version. ## Hardware setup @@ -30,7 +26,7 @@ The values in this section are specific to the Omnibus F4, but the settings aren - [ ] Connect Fport to a UART. I chose UART 3 (SERIAL2). If you want to use UART 1, you should set the RC input jumper to PPM on the F4 to disconnect the SBUS inverter from the pin. - [ ] To get Fport working with UART 3, you need to set `BRD_ALT_CONFIG=1`, to get UART 3 to act like a UART instead of I2C on the Omnibus F4. - [ ] Set the following for Fport on UART 3: - ```bash + ```js SERIAL2_PROTOCOL=23 # RCIN SERIAL2_BAUD=115 SERIAL2_OPTIONS=4 @@ -38,7 +34,7 @@ The values in this section are specific to the Omnibus F4, but the settings aren ``` - [ ] Once Fport works, reverse the elevator with `RC2_REVERSED=1`. - [ ] Set up your servo functions and trims: - ```bash + ```js SERVO1_FUNCTION=70 # Throttle SERVO1_MIN=1000 SERVO1_MAX=2000 @@ -102,7 +98,7 @@ The values in this section are specific to the Omnibus F4, but the settings aren ## Recommended settings. -See the [recommended settings](../../ardupilot/ardupilot-recommended-settings) page for other recommended defaults. +See the [recommended settings](/ardupilot/ardupilot-recommended-settings) page for other recommended defaults. ## In the field - [ ] Run an autotune. @@ -113,6 +109,6 @@ _(Many thanks to Michel Pastor for his help with everything in this note.)_ * * *

-Last updated on October 31, 2021. For any questions/feedback, +Last updated on November 19, 2021. For any questions/feedback, email me at hi@stavros.io.

diff --git a/content/ardupilot/building-ardupilot.md b/content/ardupilot/building-ardupilot.md index 0849a17..725f7f2 100644 --- a/content/ardupilot/building-ardupilot.md +++ b/content/ardupilot/building-ardupilot.md @@ -1,9 +1,5 @@ -+++ -title = "Building ArduPilot" -weight = 3 -sort_by = "weight" -insert_anchor_links = "right" -+++ +# Building ArduPilot + 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 `. Output files will be stored in `build//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. diff --git a/content/ardupilot/configuring-a-switch-as-a-relay.md b/content/ardupilot/configuring-a-switch-as-a-relay.md index 482db30..3cacdaa 100644 --- a/content/ardupilot/configuring-a-switch-as-a-relay.md +++ b/content/ardupilot/configuring-a-switch-as-a-relay.md @@ -1,9 +1,5 @@ -+++ -title = "Configuring a switch as a relay" -weight = 4 -sort_by = "weight" -insert_anchor_links = "right" -+++ +# Configuring a switch as a relay + If you want to connect a relay of some sort (something that accepts a low/high signal, like a camera control) to a PWM output (the servo outputs), you need to do a few quick things. The actual numbers will vary depending on your FC, but here's what worked for me with a Matek F405-Wing: 1. Set the channel you want the relay to trigger on as a controller for the first relay (here I'll assume you want to control the first relay on channel 11): diff --git a/content/ardupilot/index.md b/content/ardupilot/index.md new file mode 100644 index 0000000..39fe863 --- /dev/null +++ b/content/ardupilot/index.md @@ -0,0 +1,13 @@ +# Contents + +Click on a link in the list below to go to that page: + +1. [ArduPilot recommended settings](../../ardupilot/ardupilot-recommended-settings.html) +1. [ArduPilot setup checklist](../../ardupilot/ardupilot-setup-checklist.html) +1. [Building ArduPilot](../../ardupilot/building-ardupilot.html) +1. [Configuring a switch as a relay](../../ardupilot/configuring-a-switch-as-a-relay.html) +1. [Miscellaneous notes](../../ardupilot/miscellaneous-notes.html) +1. [Reverse thrust](../../ardupilot/reverse-thrust.html) +1. [TECS tuning calculator](../../ardupilot/tecs-tuning-calculator.html) +1. [Transfer config between craft](../../ardupilot/transfer-config-between-craft.html) +1. [Tuning the TECS](../../ardupilot/tuning-the-tecs.html) diff --git a/content/ardupilot/miscellaneous-notes.md b/content/ardupilot/miscellaneous-notes.md index d2a7647..fc18a13 100644 --- a/content/ardupilot/miscellaneous-notes.md +++ b/content/ardupilot/miscellaneous-notes.md @@ -1,9 +1,5 @@ -+++ -title = "Miscellaneous notes" -weight = 5 -sort_by = "weight" -insert_anchor_links = "right" -+++ +# Miscellaneous notes + These are random AP-related notes that wouldn't fit anywhere else: ## DJI FPV configuration diff --git a/content/ardupilot/reverse-thrust.md b/content/ardupilot/reverse-thrust.md index 488d655..022e525 100644 --- a/content/ardupilot/reverse-thrust.md +++ b/content/ardupilot/reverse-thrust.md @@ -1,9 +1,5 @@ -+++ -title = "Reverse thrust" -weight = 6 -sort_by = "weight" -insert_anchor_links = "right" -+++ +# Reverse thrust + To set up reverse thrust (for higher braking when landing, for example), follow the steps below: - [ ] Set your BLHeli-compatible ESC to "Reversible soft" and make sure you're using DShot. diff --git a/content/ardupilot/tecs-tuning-calculator.md b/content/ardupilot/tecs-tuning-calculator.md index 859a6c4..2b6a4de 100644 --- a/content/ardupilot/tecs-tuning-calculator.md +++ b/content/ardupilot/tecs-tuning-calculator.md @@ -1,10 +1,6 @@ -+++ -title = "TECS tuning calculator" -weight = 7 -sort_by = "weight" -insert_anchor_links = "right" -+++ -To use this calculator, first follow the steps in [Tuning the TECS](../../ardupilot/tuning-the-tecs). +# TECS tuning calculator + +To use this calculator, first follow the steps in [Tuning the TECS](/ardupilot/tuning-the-tecs).