From fc01655a28312d40362f3f2eba005de6a4afa096 Mon Sep 17 00:00:00 2001 From: Stavros Korokithakis Date: Mon, 30 Nov 2020 05:21:36 +0200 Subject: [PATCH] Update --- .pre-commit-config.yaml | 3 ++- content/drone-stuff/_index.md | 1 + ...-on-a-no-name-frsky-compatible-receiver.md | 5 ++++ ...bus-smartport-on-the-frsky-xsr-receiver.md | 6 ++++- content/drone-stuff/inav-tuning-tips.md | 15 +++++++++++ .../drone-stuff/omnibus-f4-pro-servo-diode.md | 8 ++++-- content/drone-stuff/omnibus-f4-v3-pinout.md | 8 ++++-- .../transmitter-external-module-pinout.md | 7 +++++- .../how-to-properly-level-your-3d-printer.md | 6 ++++- ...uild-notes-for-the-ft-mighty-mini-arrow.md | 12 ++++++--- .../mini-drak-build-condensed-instructions.md | 6 ++++- content/welcome/stavros-notes.md | 6 ++++- joplinexport.py | 25 +++++++++++++------ 13 files changed, 86 insertions(+), 22 deletions(-) create mode 100644 content/drone-stuff/inav-tuning-tips.md diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f0287ab..dd6b255 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,6 +3,7 @@ repos: rev: 20.8b1 hooks: - id: black + args: ["-l 90"] - repo: https://github.com/asottile/reorder_python_imports rev: v2.3.5 hooks: @@ -11,7 +12,7 @@ repos: rev: '3.8.4' hooks: - id: flake8 - args: ["--config=setup.cfg"] + args: ["--max-line-length=90"] language_version: python3 - repo: local hooks: diff --git a/content/drone-stuff/_index.md b/content/drone-stuff/_index.md index eb798e7..56cb019 100644 --- a/content/drone-stuff/_index.md +++ b/content/drone-stuff/_index.md @@ -10,6 +10,7 @@ Click on a link in the list below to go to that page: 1. [Getting uninverted SBUS on a no-name FrSky-compatible receiver](../../drone-stuff/getting-uninverted-sbus-on-a-no-name-frsky-compatible-receiver) 1. [Getting uninverted SBUS/SmartPort on the FrSky XSR receiver](../../drone-stuff/getting-uninverted-sbus-smartport-on-the-frsky-xsr-receiver) +1. [INAV tuning tips](../../drone-stuff/inav-tuning-tips) 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. [Transmitter external module pinout](../../drone-stuff/transmitter-external-module-pinout) diff --git a/content/drone-stuff/getting-uninverted-sbus-on-a-no-name-frsky-compatible-receiver.md b/content/drone-stuff/getting-uninverted-sbus-on-a-no-name-frsky-compatible-receiver.md index d7f39a7..d8fcd44 100644 --- a/content/drone-stuff/getting-uninverted-sbus-on-a-no-name-frsky-compatible-receiver.md +++ b/content/drone-stuff/getting-uninverted-sbus-on-a-no-name-frsky-compatible-receiver.md @@ -12,3 +12,8 @@ To break this out to the SBUS pad, I had to remove/bridge the resistor that is c [![rc-sbus-mosfet.jpg](../../resources/1b0f508a533e45b496c6636d49161b0c.jpg)](../../resources/1b0f508a533e45b496c6636d49161b0c.jpg) + + +* * * + +Last updated on 2020-11-24 01:33:46. diff --git a/content/drone-stuff/getting-uninverted-sbus-smartport-on-the-frsky-xsr-receiver.md b/content/drone-stuff/getting-uninverted-sbus-smartport-on-the-frsky-xsr-receiver.md index 0c0bbe0..57e2017 100644 --- a/content/drone-stuff/getting-uninverted-sbus-smartport-on-the-frsky-xsr-receiver.md +++ b/content/drone-stuff/getting-uninverted-sbus-smartport-on-the-frsky-xsr-receiver.md @@ -15,4 +15,8 @@ They should be soldered like this (remember to solder both resistor pads togethe Now the CPPM pad will be uninverted SBUS/SmartPort instead. It seems to be a bit of a gamble whether you get SBUS or SmartPort, it might be firmware-dependent. -On firmware 2.1.0 FPort, I actually got the uninverted FPort signal on the CPPM pin, which is what I wanted. \ No newline at end of file +On firmware 2.1.0 FPort, I actually got the uninverted FPort signal on the CPPM pin, which is what I wanted. + +* * * + +Last updated on 2020-11-24 04:21:44. diff --git a/content/drone-stuff/inav-tuning-tips.md b/content/drone-stuff/inav-tuning-tips.md new file mode 100644 index 0000000..a91b28b --- /dev/null +++ b/content/drone-stuff/inav-tuning-tips.md @@ -0,0 +1,15 @@ ++++ +title = "INAV tuning tips" +weight = 2 +sort_by = "weight" +insert_anchor_links = "right" ++++ +Here are some general INAV tuning tips and things I've learned throughout my builds. Keep in mind that *these only apply to wings* (and maybe planes), not quads: + +* There's a known problem with horizon drift. To ameliorate it, use `set imu_acc_ignore_rate = 10`. +* To make turns in automatic turns smoother, use `set nav_fw_control_smoothness = 8`. +* Pawel says that the idea of the software LPF is to replace the hardware LPF. Leave the hardware LPF set to 256 Hz and set the software LPF to 20-30 Hz, with a looptime of 1k. + +* * * + +Last updated on 2020-11-30 05:17:15. diff --git a/content/drone-stuff/omnibus-f4-pro-servo-diode.md b/content/drone-stuff/omnibus-f4-pro-servo-diode.md index 6e8ba4f..b03b4ff 100644 --- a/content/drone-stuff/omnibus-f4-pro-servo-diode.md +++ b/content/drone-stuff/omnibus-f4-pro-servo-diode.md @@ -1,6 +1,6 @@ +++ title = "Omnibus F4 pro servo diode" -weight = 3 +weight = 4 sort_by = "weight" insert_anchor_links = "right" +++ @@ -8,4 +8,8 @@ To isolate the servo 5V rail from the controller's 5V power supply, remove this [![a435bcae86912205b6fac41731285b8d.png](../../resources/6d668e05d8a54580966b94a752f3b7db.png)](../../resources/6d668e05d8a54580966b94a752f3b7db.png) -Now the servos' 5V rail can be powered from another 5V supply to avoid servo current backflow into the FC. \ No newline at end of file +Now the servos' 5V rail can be powered from another 5V supply to avoid servo current backflow into the FC. + +* * * + +Last updated on 2020-11-24 01:33:24. diff --git a/content/drone-stuff/omnibus-f4-v3-pinout.md b/content/drone-stuff/omnibus-f4-v3-pinout.md index f1e8ba8..7495d07 100644 --- a/content/drone-stuff/omnibus-f4-v3-pinout.md +++ b/content/drone-stuff/omnibus-f4-v3-pinout.md @@ -1,9 +1,13 @@ +++ title = "Omnibus F4 V3 pinout" -weight = 2 +weight = 3 sort_by = "weight" insert_anchor_links = "right" +++ This is the pinout of the Omnibus F4 V3: -[![53b3161d509dcc7bbfb43c89b16b0bae.png](../../resources/99f5c91454204c1d9740a8d9b876833b.png)](../../resources/99f5c91454204c1d9740a8d9b876833b.png) \ No newline at end of file +[![53b3161d509dcc7bbfb43c89b16b0bae.png](../../resources/99f5c91454204c1d9740a8d9b876833b.png)](../../resources/99f5c91454204c1d9740a8d9b876833b.png) + +* * * + +Last updated on 2020-11-24 01:33:14. diff --git a/content/drone-stuff/transmitter-external-module-pinout.md b/content/drone-stuff/transmitter-external-module-pinout.md index 2ae75ea..38fd116 100644 --- a/content/drone-stuff/transmitter-external-module-pinout.md +++ b/content/drone-stuff/transmitter-external-module-pinout.md @@ -1,6 +1,6 @@ +++ title = "Transmitter external module pinout" -weight = 4 +weight = 5 sort_by = "weight" insert_anchor_links = "right" +++ @@ -16,3 +16,8 @@ It's illustrated in this photo: [![pinout.jpeg](../../resources/72d23239af1541d4b170271c1e9e21eb.jpeg)](../../resources/72d23239af1541d4b170271c1e9e21eb.jpeg) + + +* * * + +Last updated on 2020-11-24 00:13:36. diff --git a/content/maker-things/how-to-properly-level-your-3d-printer.md b/content/maker-things/how-to-properly-level-your-3d-printer.md index fccdbc7..072f1d0 100644 --- a/content/maker-things/how-to-properly-level-your-3d-printer.md +++ b/content/maker-things/how-to-properly-level-your-3d-printer.md @@ -26,4 +26,8 @@ For the last photo, I’ve leveled it pretty much perfectly. You can see that th There you have it! If your filament looks cylindrical, follow your printer’s manual to reduce the distance between bed and nozzle. If it looks transparent and missing in places completely, you need to increase the distance. If it looks mushed and has the proper color, and the rows are touching each other just so, you’re perfect and ready to print! -I hope this guide has helped you, feel free to share it with your friends. \ No newline at end of file +I hope this guide has helped you, feel free to share it with your friends. + +* * * + +Last updated on 2020-11-20 23:53:17. diff --git a/content/model-build-notes/build-notes-for-the-ft-mighty-mini-arrow.md b/content/model-build-notes/build-notes-for-the-ft-mighty-mini-arrow.md index 4c06bb8..94c0dfd 100644 --- a/content/model-build-notes/build-notes-for-the-ft-mighty-mini-arrow.md +++ b/content/model-build-notes/build-notes-for-the-ft-mighty-mini-arrow.md @@ -14,14 +14,14 @@ These notes are a condensed version of the [FT Arrow build video](https://www.yo * Do an "A" fold on the spars and glue, stop 15mm from each edge. Use a triangle to make sure the spar folds are perpendicular. * Open the servo hole. * Cut the bevels, double on wing and single on elevon (on the elevon side). -* Add a thin ribbon on glue on the bottom of the hinge for strength, and scrape almost all of it off. +* Add a thin ribbon on glue on the bottom of the elevon hinge for strength, and scrape almost all of it off. * Remove servo pocket from the wing. * Fold the wing with the bottom on top, to curve the leading edge without crinkling the airfoil score cuts. * Cut the side pods if you aren't going to use a center pod. * Glue the side pod hinges. * Cut the main pod space on the top of the wing. * Skewer the wing score cuts. -* Line up the spar's servo hole onto the wing and glue. +* Line up the spar's servo hole onto the wing and glue onto the top side. * Glue the airfoil's score cuts and fold the wing so the score cuts are glued up. * Cut the excess spar. * Probably put the servos in now, to avoid having to make a hook later. @@ -40,7 +40,7 @@ These notes are a condensed version of the [FT Arrow build video](https://www.yo * Pop out the tabs on the center pod. * Do an "A" fold on the bottom plate. * Fold the little edge of the top of the center pod over (and/or add tape). -* Glue the center pod on. +* Glue the center pod on. The backs of the wing should both be at the same height. Note that still be open/exposed, not glued down. FT leave them like that, but I like to close them up with some tape at the end so junk doesn't get into the wing. * Install the control horns and servos (I use epoxy for the control horns as they tend to get ripped out with just hot glue). * Use the reflex checker foam to calibrate the wing's reflex. * Add a ziptie to the control rod so it doesn't bend. @@ -64,4 +64,8 @@ These notes are a condensed version of the [FT Arrow build video](https://www.yo ## Electronics -* The rest is left as an exercise to the reader. \ No newline at end of file +* The rest is left as an exercise to the reader. + +* * * + +Last updated on 2020-11-27 17:22:29. diff --git a/content/model-build-notes/mini-drak-build-condensed-instructions.md b/content/model-build-notes/mini-drak-build-condensed-instructions.md index 5b05026..b8c5b8f 100644 --- a/content/model-build-notes/mini-drak-build-condensed-instructions.md +++ b/content/model-build-notes/mini-drak-build-condensed-instructions.md @@ -52,4 +52,8 @@ To start building: Notes: -> Make sure you use the tallest control horns possible and have loads of expo in for the roll axis (pitch is fine). Matt (because the MD is very roll sensitive as I found out to my surprise). \ No newline at end of file +> Make sure you use the tallest control horns possible and have loads of expo in for the roll axis (pitch is fine). Matt (because the MD is very roll sensitive as I found out to my surprise). + +* * * + +Last updated on 2020-11-27 00:10:22. diff --git a/content/welcome/stavros-notes.md b/content/welcome/stavros-notes.md index fcb2d48..eb03777 100644 --- a/content/welcome/stavros-notes.md +++ b/content/welcome/stavros-notes.md @@ -14,4 +14,8 @@ If you want to use the script and generate such a site for yourself, feel free t Just run `./joplinexport.py` on your computer, it will read the database and create a site like this one and upload it to GitLab pages. -Otherwise, enjoy my notes! \ No newline at end of file +Otherwise, enjoy my notes! + +* * * + +Last updated on 2020-11-20 21:50:12. diff --git a/joplinexport.py b/joplinexport.py index 7c671d7..97bde61 100755 --- a/joplinexport.py +++ b/joplinexport.py @@ -1,6 +1,7 @@ #!/usr/bin/env python3 import re import sqlite3 +import time from collections import defaultdict from pathlib import Path from shutil import copy @@ -13,12 +14,15 @@ def slugify(text): class Note: - def __init__(self, id, parent_id, parent_title, title, body): + def __init__(self, id, parent_id, parent_title, title, body, updated_time): self.id = id self.parent_id = parent_id self.parent_title = parent_title self.title = title self.body = body + self.updated_time = time.strftime( + "%Y-%m-%d %H:%M:%S", time.localtime(updated_time) + ) def get_url(self): return slugify(self.parent_title) + "/" + slugify(self.title) @@ -85,11 +89,13 @@ class JoplinExporter: c.execute("""SELECT id, title, file_extension FROM resources;""") self.resources = {id: (title, ext) for id, title, ext in c.fetchall()} - c.execute("""SELECT id, parent_id, title, body FROM notes;""") + c.execute("""SELECT id, parent_id, title, body, updated_time FROM notes;""") self.notes = defaultdict(list) self.note_lookup_dict = {} - for id, parent_id, title, body in c.fetchall(): - note = Note(id, parent_id, self.folders[parent_id], title, body) + for id, parent_id, title, body, updated_time in c.fetchall(): + note = Note( + id, parent_id, self.folders[parent_id], title, body, updated_time / 1000 + ) self.notes[note.parent_id].append(note) self.note_lookup_dict[note.id] = note @@ -104,9 +110,7 @@ class JoplinExporter: ) # Sort "Welcome" last. - folder_list.sort( - key=lambda x: x[1].lower().strip() if x[1] != "Welcome" else "0" - ) + folder_list.sort(key=lambda x: x[1].lower().strip() if x[1] != "Welcome" else "0") self.clean_content_dir() self.copy_resources() @@ -131,7 +135,12 @@ weight = {note_counter} sort_by = "weight" insert_anchor_links = "right" +++ -{self.resolve_note_links(note)}""" +{self.resolve_note_links(note)} + +* * * + +Last updated on {note.updated_time}. +""" ) with (dir / "_index.md").open(mode="w") as outfile: