3 Commits

Author SHA1 Message Date
  Thomas Buck 40ff4481a6 put updates to existing pages in rss feed 1 year ago
  Thomas Buck 4172628ee6 add ammo charger to rc equipment. 1 year ago
  Thomas Buck b09b38e65c add pics to lx5 page 1 year ago

+ 5
- 5
input/projects/quadcopters/flying_wing.md View File

12
 
12
 
13
 <!--%
13
 <!--%
14
 lightgallery([
14
 lightgallery([
15
-    [ "img/flying_wing_1.jpg", "" ],
16
-    [ "img/flying_wing_2.jpg", "" ],
17
-    [ "img/flying_wing_3.jpg", "" ],
18
-    [ "img/flying_wing_4.jpg", "" ],
19
-    [ "img/flying_wing_5.jpg", "" ]
15
+    [ "img/flying_wing_1.jpg", "Complete top view" ],
16
+    [ "img/flying_wing_2.jpg", "Closer view of electronics" ],
17
+    [ "img/flying_wing_3.jpg", "Closer view of Rx" ],
18
+    [ "img/flying_wing_4.jpg", "Brace for flaps" ],
19
+    [ "img/flying_wing_5.jpg", "Bottom view" ]
20
 ])
20
 ])
21
 %-->
21
 %-->
22
 
22
 

+ 10
- 1
input/projects/quadcopters/lx5.md View File

3
 parent: quadcopters
3
 parent: quadcopters
4
 position: 10
4
 position: 10
5
 date: 2017-11-01
5
 date: 2017-11-01
6
+update: 2022-05-23
6
 ---
7
 ---
7
 
8
 
8
 <!--% backToParent() %-->
9
 <!--% backToParent() %-->
12
 But I had built up some skills and was ready for the next step.
13
 But I had built up some skills and was ready for the next step.
13
 So I built a 220mm frame copter with 2205 motors.
14
 So I built a 220mm frame copter with 2205 motors.
14
 
15
 
16
+It has all the bells-and-whistles available at the time, like DShot, Betaflight OSD, Smartaudio, as well as S-Bus and Smartport for two-way communication.
17
+
15
 <!--%
18
 <!--%
16
-# TODO photos
19
+lightgallery([
20
+    [ "img/lx5_3.jpg", "Front view" ],
21
+    [ "img/lx5_1.jpg", "Left side view" ],
22
+    [ "img/lx5_2.jpg", "Right side view" ],
23
+    [ "img/lx5_4.jpg", "Left stack closeup view" ],
24
+    [ "img/lx5_5.jpg", "Right stack closeup view" ]
25
+])
17
 %-->
26
 %-->
18
 
27
 
19
 Here are some recordings of the FPV footage.
28
 Here are some recordings of the FPV footage.

+ 28
- 4
input/projects/quadcopters/rc_equipment.md View File

3
 parent: quadcopters
3
 parent: quadcopters
4
 position: 80
4
 position: 80
5
 date: 2015-10-09
5
 date: 2015-10-09
6
-update: 2021-05-28
6
+update: 2022-05-23
7
 ---
7
 ---
8
 
8
 
9
 <!--% backToParent() %-->
9
 <!--% backToParent() %-->
50
 
50
 
51
 ## Customized Transmitter
51
 ## Customized Transmitter
52
 
52
 
53
+Many years ago, a long time before I even started getting into Quadcopters, my grandpa bought me a cheap 2.4GHz Transmitter from Conrad Elektronik.
54
+Because this was already available when I started building my own copters, I used it for that as well.
55
+Turns out, it is a Flysky-clone, with it's own shoddy PC software.
56
+So I wrote [my own Mac driver for it](2015_12_20_serialgamepad.html).
57
+After using it with its original receiver for a while, I decided to move into the FrSky ecosystem.
58
+So I swapped out the built-in transmitter for a [FrSky DHT](https://www.frsky-rc.com/product/dht-toggle-switch-2/) with the [TTL mod](http://majek.mamy.to/en/frsky-dht-ttl-mod/) to connect [my own telemetry display](2016_11_05_frsky_telemetry.html).
53
 
59
 
54
-
55
-Also see [the article about my Arduino FrSky Telemetry display](2016_11_05_frsky_telemetry.html) and [the article about my Saitek X52 USB joystick experiments](2016_07_24_usb_host_cppm.html).
60
+Also see [the article about my Saitek X52 USB joystick experiments](2016_07_24_usb_host_cppm.html).
56
 
61
 
57
 <!--%
62
 <!--%
58
 lightgallery([
63
 lightgallery([
67
 ])
72
 ])
68
 %-->
73
 %-->
69
 
74
 
70
-## FPV Monitor
75
+## Ammo Can Battery Charging
76
+
77
+Having so many high-capacity LiPo batteries around because of this hobby is kinda scary of course, after looking at a bunch of battery fires on YouTube.
78
+So I at least wanted to have some kind of fire-proof enclosure for charging my batteries in.
79
+I decided to go the common ammo-can route for this.
71
 
80
 
81
+When doing this, it is **very important** to modify the can so it no longer is pressure-tight.
82
+Otherwise you're building something more like a bomb.
83
+Many people remove the seal in the lid for this, but I decided to drill a couple of large holes into the can, as well as a rectangular cutout for the charging cables.
72
 
84
 
85
+The holes have a piece of mesh glued in front of them, to keep debris out.
86
+And the inner walls of the can have been padded with cardboard, to prevent any chance of short-circuiting on the metal sheet of the can.
87
+
88
+<!--%
89
+lightgallery([
90
+    [ "img/ammo_charger_1.jpg", "Front of can, with IMAX B5 charger clone" ],
91
+    [ "img/ammo_charger_2.jpg", "Inside of can" ],
92
+    [ "img/ammo_charger_3.jpg", "Side of can" ],
93
+])
94
+%-->
73
 
95
 
74
 <!--%
96
 <!--%
97
+## FPV Monitor
98
+
75
 # TODO photos
99
 # TODO photos
76
 %-->
100
 %-->
77
 
101
 

+ 41
- 5
macros.py View File

306
 # preconvert hooks
306
 # preconvert hooks
307
 # -----------------------------------------------------------------------------
307
 # -----------------------------------------------------------------------------
308
 
308
 
309
+# -----------------------------------------------------------------------------
310
+# multi language support
311
+# -----------------------------------------------------------------------------
312
+
309
 def hook_preconvert_anotherlang():
313
 def hook_preconvert_anotherlang():
310
     MKD_PATT = r'\.(?:md|mkd|mdown|markdown)$'
314
     MKD_PATT = r'\.(?:md|mkd|mdown|markdown)$'
311
     _re_lang = re.compile(r'^[\s+]?lang[\s+]?[:=]((?:.|\n )*)', re.MULTILINE)
315
     _re_lang = re.compile(r'^[\s+]?lang[\s+]?[:=]((?:.|\n )*)', re.MULTILINE)
356
 
360
 
357
     pages[:] = vpages
361
     pages[:] = vpages
358
 
362
 
359
-
363
+# -----------------------------------------------------------------------------
364
+# compatibility redirect for old website URLs
365
+# -----------------------------------------------------------------------------
360
 
366
 
361
 _COMPAT = """        case "%s":
367
 _COMPAT = """        case "%s":
362
             $loc = "%s/%s";
368
             $loc = "%s/%s";
399
     fp.write("?>")
405
     fp.write("?>")
400
     fp.close()
406
     fp.close()
401
 
407
 
402
-
408
+# -----------------------------------------------------------------------------
409
+# sitemap generation
410
+# -----------------------------------------------------------------------------
403
 
411
 
404
 _SITEMAP = """<?xml version="1.0" encoding="UTF-8"?>
412
 _SITEMAP = """<?xml version="1.0" encoding="UTF-8"?>
405
 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
413
 <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
431
 # postconvert hooks
439
 # postconvert hooks
432
 # -----------------------------------------------------------------------------
440
 # -----------------------------------------------------------------------------
433
 
441
 
442
+# -----------------------------------------------------------------------------
443
+# rss feed generation
444
+# -----------------------------------------------------------------------------
445
+
434
 _RSS = """<?xml version="1.0"?>
446
 _RSS = """<?xml version="1.0"?>
435
 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
447
 <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
436
 <channel>
448
 <channel>
443
 <lastBuildDate>%s</lastBuildDate>
455
 <lastBuildDate>%s</lastBuildDate>
444
 <docs>http://blogs.law.harvard.edu/tech/rss</docs>
456
 <docs>http://blogs.law.harvard.edu/tech/rss</docs>
445
 <generator>Poole</generator>
457
 <generator>Poole</generator>
458
+<ttl>720</ttl>
446
 %s
459
 %s
447
 </channel>
460
 </channel>
448
 </rss>
461
 </rss>
454
     <link>%s</link>
467
     <link>%s</link>
455
     <description>%s</description>
468
     <description>%s</description>
456
     <pubDate>%s</pubDate>
469
     <pubDate>%s</pubDate>
470
+    <atom:updated>%s</atom:updated>
457
     <guid>%s</guid>
471
     <guid>%s</guid>
458
 </item>
472
 </item>
459
 """
473
 """
460
 
474
 
461
 def hook_postconvert_rss():
475
 def hook_postconvert_rss():
462
     items = []
476
     items = []
477
+
478
+    # all pages with "date" get put into feed
463
     posts = [p for p in pages if "date" in p]
479
     posts = [p for p in pages if "date" in p]
464
-    posts.sort(key=lambda p: p.date, reverse=True)
465
-    posts = posts[:10]
480
+
481
+    # sort by update if available, date else
482
+    posts.sort(key=lambda p: p.get("update", p.date), reverse=True)
483
+
484
+    # only put 20 most recent items in feed
485
+    posts = posts[:20]
486
+
466
     for p in posts:
487
     for p in posts:
467
         title = p.title
488
         title = p.title
468
         if "post" in p:
489
         if "post" in p:
469
             title = p.post
490
             title = p.post
491
+
470
         link = "%s/%s" % (BASE_URL, p.url)
492
         link = "%s/%s" % (BASE_URL, p.url)
493
+
471
         desc = p.html.replace("href=\"img", "%s%s%s" % ("href=\"", BASE_URL, "/img"))
494
         desc = p.html.replace("href=\"img", "%s%s%s" % ("href=\"", BASE_URL, "/img"))
472
         desc = desc.replace("src=\"img", "%s%s%s" % ("src=\"", BASE_URL, "/img"))
495
         desc = desc.replace("src=\"img", "%s%s%s" % ("src=\"", BASE_URL, "/img"))
473
         desc = desc.replace("href=\"/img", "%s%s%s" % ("href=\"", BASE_URL, "/img"))
496
         desc = desc.replace("href=\"/img", "%s%s%s" % ("href=\"", BASE_URL, "/img"))
474
         desc = desc.replace("src=\"/img", "%s%s%s" % ("src=\"", BASE_URL, "/img"))
497
         desc = desc.replace("src=\"/img", "%s%s%s" % ("src=\"", BASE_URL, "/img"))
475
         desc = htmlspecialchars(desc)
498
         desc = htmlspecialchars(desc)
499
+
476
         date = time.mktime(time.strptime("%s 12" % p.date, "%Y-%m-%d %H"))
500
         date = time.mktime(time.strptime("%s 12" % p.date, "%Y-%m-%d %H"))
477
         date = email.utils.formatdate(date)
501
         date = email.utils.formatdate(date)
478
-        items.append(_RSS_ITEM % (title, link, desc, date, link))
502
+
503
+        update = time.mktime(time.strptime("%s 12" % p.get("update", p.date), "%Y-%m-%d %H"))
504
+        update = email.utils.formatdate(update)
505
+
506
+        items.append(_RSS_ITEM % (title, link, desc, date, update, link))
479
 
507
 
480
     items = "".join(items)
508
     items = "".join(items)
481
 
509
 
491
     fp.write(rss)
519
     fp.write(rss)
492
     fp.close()
520
     fp.close()
493
 
521
 
522
+# -----------------------------------------------------------------------------
523
+# compatibility redirect for old mobile pages
524
+# -----------------------------------------------------------------------------
525
+
494
 _COMPAT_MOB = """        case "%s":
526
 _COMPAT_MOB = """        case "%s":
495
             $loc = "%s/%s";
527
             $loc = "%s/%s";
496
             break;
528
             break;
535
     fp.write("?>")
567
     fp.write("?>")
536
     fp.close()
568
     fp.close()
537
 
569
 
570
+# -----------------------------------------------------------------------------
571
+# displaying filesize for download links
572
+# -----------------------------------------------------------------------------
573
+
538
 def hook_postconvert_size():
574
 def hook_postconvert_size():
539
     file_ext = '|'.join(['pdf', 'zip', 'rar', 'ods', 'odt', 'odp', 'doc', 'xls', 'ppt', 'docx', 'xlsx', 'pptx', 'exe', 'brd', 'plist'])
575
     file_ext = '|'.join(['pdf', 'zip', 'rar', 'ods', 'odt', 'odp', 'doc', 'xls', 'ppt', 'docx', 'xlsx', 'pptx', 'exe', 'brd', 'plist'])
540
     def matched_link(matchobj):
576
     def matched_link(matchobj):

BIN
static/img/ammo_charger_1.jpg View File


BIN
static/img/ammo_charger_1_small.jpg View File


BIN
static/img/ammo_charger_2.jpg View File


BIN
static/img/ammo_charger_2_small.jpg View File


BIN
static/img/ammo_charger_3.jpg View File


BIN
static/img/ammo_charger_3_small.jpg View File


BIN
static/img/lx5_1.jpg View File


BIN
static/img/lx5_1_small.jpg View File


BIN
static/img/lx5_2.jpg View File


BIN
static/img/lx5_2_small.jpg View File


BIN
static/img/lx5_3.jpg View File


BIN
static/img/lx5_3_small.jpg View File


BIN
static/img/lx5_4.jpg View File


BIN
static/img/lx5_4_small.jpg View File


BIN
static/img/lx5_5.jpg View File


BIN
static/img/lx5_5_small.jpg View File


Loading…
Cancel
Save