Rework gitbook, add Clever 4 instruction (#163)
Co-authored-by: sfalexrog <sfalexrog@gmail.com> * Rework the structure. * Add Clever 4 assembling instruction. * Rework setup articles. * Many additional changes.
BIN
docs/assets/4/01.png
Normal file
|
After Width: | Height: | Size: 181 KiB |
BIN
docs/assets/4/02.png
Normal file
|
After Width: | Height: | Size: 192 KiB |
BIN
docs/assets/4/03.png
Normal file
|
After Width: | Height: | Size: 171 KiB |
BIN
docs/assets/4/03_1.png
Normal file
|
After Width: | Height: | Size: 254 KiB |
BIN
docs/assets/4/04.png
Normal file
|
After Width: | Height: | Size: 137 KiB |
BIN
docs/assets/4/05.png
Normal file
|
After Width: | Height: | Size: 144 KiB |
BIN
docs/assets/4/07.png
Normal file
|
After Width: | Height: | Size: 258 KiB |
BIN
docs/assets/4/07_1.png
Normal file
|
After Width: | Height: | Size: 374 KiB |
BIN
docs/assets/4/08.png
Normal file
|
After Width: | Height: | Size: 452 KiB |
BIN
docs/assets/4/08_1.png
Normal file
|
After Width: | Height: | Size: 496 KiB |
BIN
docs/assets/4/09.png
Normal file
|
After Width: | Height: | Size: 491 KiB |
BIN
docs/assets/4/10.png
Normal file
|
After Width: | Height: | Size: 433 KiB |
BIN
docs/assets/4/10_1.png
Normal file
|
After Width: | Height: | Size: 496 KiB |
BIN
docs/assets/4/12_1.png
Normal file
|
After Width: | Height: | Size: 790 KiB |
BIN
docs/assets/4/13.png
Normal file
|
After Width: | Height: | Size: 365 KiB |
BIN
docs/assets/4/13_1.png
Normal file
|
After Width: | Height: | Size: 380 KiB |
BIN
docs/assets/4/14.png
Normal file
|
After Width: | Height: | Size: 502 KiB |
BIN
docs/assets/4/15.png
Normal file
|
After Width: | Height: | Size: 513 KiB |
BIN
docs/assets/4/16.png
Normal file
|
After Width: | Height: | Size: 513 KiB |
BIN
docs/assets/4/18.png
Normal file
|
After Width: | Height: | Size: 577 KiB |
BIN
docs/assets/4/18_1.png
Normal file
|
After Width: | Height: | Size: 572 KiB |
BIN
docs/assets/4/19.png
Normal file
|
After Width: | Height: | Size: 463 KiB |
BIN
docs/assets/4/19_1.png
Normal file
|
After Width: | Height: | Size: 537 KiB |
BIN
docs/assets/4/20.png
Normal file
|
After Width: | Height: | Size: 709 KiB |
BIN
docs/assets/4/20_1.png
Normal file
|
After Width: | Height: | Size: 294 KiB |
BIN
docs/assets/4/21.png
Normal file
|
After Width: | Height: | Size: 518 KiB |
BIN
docs/assets/4/21_1.png
Normal file
|
After Width: | Height: | Size: 524 KiB |
BIN
docs/assets/4/22.png
Normal file
|
After Width: | Height: | Size: 77 KiB |
BIN
docs/assets/4/23.png
Normal file
|
After Width: | Height: | Size: 423 KiB |
BIN
docs/assets/4/24.png
Normal file
|
After Width: | Height: | Size: 474 KiB |
BIN
docs/assets/4/26.png
Normal file
|
After Width: | Height: | Size: 463 KiB |
BIN
docs/assets/4/26_1.png
Normal file
|
After Width: | Height: | Size: 812 KiB |
BIN
docs/assets/4/27.png
Normal file
|
After Width: | Height: | Size: 120 KiB |
BIN
docs/assets/4/27_1.png
Normal file
|
After Width: | Height: | Size: 378 KiB |
BIN
docs/assets/4/28.png
Normal file
|
After Width: | Height: | Size: 550 KiB |
BIN
docs/assets/4/31_1.png
Normal file
|
After Width: | Height: | Size: 523 KiB |
BIN
docs/assets/4/32.png
Normal file
|
After Width: | Height: | Size: 763 KiB |
BIN
docs/assets/4/33.png
Normal file
|
After Width: | Height: | Size: 46 KiB |
BIN
docs/assets/4/33_1.png
Normal file
|
After Width: | Height: | Size: 178 KiB |
BIN
docs/assets/4/34.png
Normal file
|
After Width: | Height: | Size: 223 KiB |
BIN
docs/assets/4/35.png
Normal file
|
After Width: | Height: | Size: 500 KiB |
BIN
docs/assets/4/36.png
Normal file
|
After Width: | Height: | Size: 792 KiB |
BIN
docs/assets/4/37.png
Normal file
|
After Width: | Height: | Size: 336 KiB |
BIN
docs/assets/4/38.png
Normal file
|
After Width: | Height: | Size: 352 KiB |
BIN
docs/assets/4/39.png
Normal file
|
After Width: | Height: | Size: 610 KiB |
BIN
docs/assets/4/40.png
Normal file
|
After Width: | Height: | Size: 135 KiB |
BIN
docs/assets/4/41.png
Normal file
|
After Width: | Height: | Size: 188 KiB |
BIN
docs/assets/4/42.png
Normal file
|
After Width: | Height: | Size: 315 KiB |
BIN
docs/assets/4/42_1.png
Normal file
|
After Width: | Height: | Size: 430 KiB |
BIN
docs/assets/4/47_1.png
Normal file
|
After Width: | Height: | Size: 678 KiB |
BIN
docs/assets/4/47_2.png
Normal file
|
After Width: | Height: | Size: 688 KiB |
BIN
docs/assets/4/48.png
Normal file
|
After Width: | Height: | Size: 414 KiB |
BIN
docs/assets/4/49.png
Normal file
|
After Width: | Height: | Size: 448 KiB |
BIN
docs/assets/4/50.png
Normal file
|
After Width: | Height: | Size: 414 KiB |
BIN
docs/assets/4/radio/base.png
Normal file
|
After Width: | Height: | Size: 408 KiB |
BIN
docs/assets/4/radio/binding.png
Normal file
|
After Width: | Height: | Size: 430 KiB |
|
Before Width: | Height: | Size: 174 KiB |
0
docs/assets/appstore.svg
Executable file → Normal file
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 177 KiB |
|
Before Width: | Height: | Size: 136 KiB |
|
Before Width: | Height: | Size: 121 KiB |
|
Before Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 141 KiB |
|
Before Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 114 KiB |
|
Before Width: | Height: | Size: 74 KiB |
|
Before Width: | Height: | Size: 82 KiB |
|
Before Width: | Height: | Size: 240 KiB |
BIN
docs/assets/clever4-front-black-large.png
Normal file
|
After Width: | Height: | Size: 1.7 MiB |
BIN
docs/assets/clever4-front-white-large.png
Normal file
|
After Width: | Height: | Size: 1.8 MiB |
|
Before Width: | Height: | Size: 247 KiB After Width: | Height: | Size: 813 KiB |
|
Before Width: | Height: | Size: 530 KiB |
0
docs/assets/copter_visualization.png
Executable file → Normal file
|
Before Width: | Height: | Size: 448 KiB After Width: | Height: | Size: 448 KiB |
BIN
docs/assets/etcher.png
Normal file
|
After Width: | Height: | Size: 343 KiB |
|
Before Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 122 KiB |
BIN
docs/assets/nano.png
Normal file
|
After Width: | Height: | Size: 607 KiB |
BIN
docs/assets/pix-sd.png
Normal file
|
After Width: | Height: | Size: 491 KiB |
BIN
docs/assets/qgc-battery.png
Normal file
|
After Width: | Height: | Size: 815 KiB |
BIN
docs/assets/qgc-bridge-tcp.png
Normal file
|
After Width: | Height: | Size: 544 KiB |
BIN
docs/assets/qgc-cal-acc.png
Normal file
|
After Width: | Height: | Size: 827 KiB |
BIN
docs/assets/qgc-cal-compass.png
Normal file
|
After Width: | Height: | Size: 870 KiB |
BIN
docs/assets/qgc-cal-gyro.png
Normal file
|
After Width: | Height: | Size: 677 KiB |
BIN
docs/assets/qgc-cal-level.png
Normal file
|
After Width: | Height: | Size: 623 KiB |
BIN
docs/assets/qgc-esc.png
Normal file
|
After Width: | Height: | Size: 867 KiB |
BIN
docs/assets/qgc-firmware.png
Normal file
|
After Width: | Height: | Size: 489 KiB |
BIN
docs/assets/qgc-frame-apply.png
Normal file
|
After Width: | Height: | Size: 597 KiB |
BIN
docs/assets/qgc-modes.png
Normal file
|
After Width: | Height: | Size: 822 KiB |
BIN
docs/assets/qgc-parameters.png
Normal file
|
After Width: | Height: | Size: 821 KiB |
BIN
docs/assets/qgc-radio.png
Normal file
|
After Width: | Height: | Size: 824 KiB |
BIN
docs/assets/qgc-requires-setup.png
Normal file
|
After Width: | Height: | Size: 837 KiB |
BIN
docs/assets/qgc.png
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 158 KiB |
BIN
docs/assets/web.png
Normal file
|
After Width: | Height: | Size: 305 KiB |
|
Before Width: | Height: | Size: 154 KiB |
@@ -7,3 +7,44 @@ section ul li:before {
|
||||
margin-left: -20px;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
/* Centered images */
|
||||
.book img.center {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
/* Images with border */
|
||||
.book img.border {
|
||||
border: 1px #e9e9e9 solid;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.book.color-theme-2 img.border {
|
||||
border: none;
|
||||
background: #fffffa;
|
||||
}
|
||||
|
||||
/* Images groups in instructions */
|
||||
.book .image-group {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.book .image-group img {
|
||||
align-self: center;
|
||||
margin: 0 10px;
|
||||
width: 300px;
|
||||
margin-bottom: 0.85em;
|
||||
}
|
||||
|
||||
/* Main Clever image */
|
||||
.book img.bigclever {
|
||||
margin-bottom: -80px;
|
||||
}
|
||||
.book.color-theme-2 img.bigclever {
|
||||
/* change image for black background */
|
||||
content:url(assets/clever4-front-black-large.png);
|
||||
}
|
||||
|
||||
57
docs/clever.js
Normal file
@@ -0,0 +1,57 @@
|
||||
// show link to the latest clever firmware
|
||||
gitbook.events.bind('page.change', function() {
|
||||
if (!document.querySelector('a.latest-firmware')) return;
|
||||
|
||||
fetch('https://api.github.com/repos/CopterExpress/Firmware/releases').then(function (res) {
|
||||
return res.json();
|
||||
}).then(function (data) {
|
||||
// look for stable release
|
||||
let stable;
|
||||
for (let release of data) {
|
||||
let clever = release.name.indexOf('clever') != -1;
|
||||
if (clever && !release.prerelease && !release.draft) {
|
||||
stable = release;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
let el;
|
||||
// let el = document.querySelector('#download-latest-release');
|
||||
// el.innerHTML = stable.name;
|
||||
// el.href = stable.html_url;
|
||||
// document.querySelector('#release').style.display = 'block';
|
||||
for (let asset of stable.assets) {
|
||||
if (asset.name == 'px4fmu-v4_default.px4') {
|
||||
el = document.querySelector('a.latest-firmware.v4');
|
||||
} else if (asset.name == 'px4fmu-v2_lpe.px4') {
|
||||
el = document.querySelector('a.latest-firmware.v2');
|
||||
}
|
||||
if (el) {
|
||||
el.href = asset.browser_download_url;
|
||||
el.innerHTML = stable.name;
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// show link to latest raspberry image
|
||||
gitbook.events.bind('page.change', function() {
|
||||
var el = document.querySelector('a.latest-image');
|
||||
if (el.length) return;
|
||||
|
||||
// get latest release from GitHub
|
||||
fetch('https://api.github.com/repos/CopterExpress/clever/releases').then(function(res) {
|
||||
return res.json();
|
||||
}).then(function(data) {
|
||||
// look for stable release
|
||||
let stable;
|
||||
for (let release of data) {
|
||||
if (!release.prerelease && !release.draft) {
|
||||
stable = release;
|
||||
break;
|
||||
}
|
||||
}
|
||||
el.innerHTML = stable.name;
|
||||
el.href = stable.assets[0].browser_download_url;
|
||||
});
|
||||
});
|
||||