Skip to content

Commit 8e6351f

Browse files
committed
fix broken links for inav v4 transcription
1 parent 7dc25be commit 8e6351f

8 files changed

Lines changed: 185 additions & 30 deletions

File tree

docs/welcome.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ For absolute first timer users who want to get setup, please visit the **Install
2121

2222
The documentation is organized into three main sections:
2323

24-
### [**Quickstart**](/docs/category/quickstart/)
24+
<!-- ### [**Quickstart**](/docs/category/quickstart/)
2525
This section aims to get you from zero to flying with a barebones configuration for an airplane or quadcopter.
2626
It will not delve into advanced features such as waypoint missions and return to home options.
2727
@@ -32,4 +32,4 @@ This section will explain in greater detail all the options available with INAV
3232
This explains the main features and tabs of INAV Configurator.
3333
Detailed information on how to use each tab is explained in the relevant Modules section.
3434
For example, all information on failsafes in the configurator are found in the Failsafes modules page.
35-
You can use the Configurator page as the shortcuts page to find detailed information on a feature or module you are interested in adjusting to your setup.
35+
You can use the Configurator page as the shortcuts page to find detailed information on a feature or module you are interested in adjusting to your setup. -->
Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
#!/usr/bin/ruby
2+
# coding: utf-8
3+
4+
# Parse release targets for PWM allocations etc.
5+
# (c) Jonathan Hudson
6+
# Public domain or equivalent, e.g. [Zero Clause BSD](https://tldrlegal.com/license/bsd-0-clause-license)
7+
#
8+
9+
require 'find'
10+
11+
def parse_output lines
12+
pwms=[]
13+
n = 0
14+
lines.each do |l|
15+
if l.match(/TIM_USE_.._(MOTOR|SERVO)/)
16+
deftims = l.split(',')
17+
alloc = deftims[3]
18+
allocs = alloc.split('|').collect{|z| z.strip.gsub('TIM_USE_','')}
19+
pwms << allocs.join(', ')
20+
n += 1
21+
end
22+
end
23+
pwms
24+
end
25+
26+
def build_target defs
27+
opts=[]
28+
File.open(File.join(defs[:name], "target.c")) do |f0|
29+
File.open("/tmp/_target.c","w") do |f1|
30+
f0.each do |l|
31+
next if l.match(/#include/)
32+
f1.puts l
33+
end
34+
end
35+
end
36+
dshot=false
37+
File.open(File.join(defs[:name], "target.h")) do |f0|
38+
f0.each do |l|
39+
if l.match(/^\s*#define\s+USE_DSHOT/)
40+
dshot = true
41+
end
42+
end
43+
end
44+
45+
defs[:variants].each do |v|
46+
optd = (v == defs[:name]) ? '' : "-D#{v}=1"
47+
lines = IO.readlines("|gcc #{optd} -E -o- /tmp/_target.c")
48+
res = parse_output lines
49+
opts << {name: v, pwms: res, dshot: dshot}
50+
end
51+
opts
52+
end
53+
54+
def write_out_md targets
55+
now = Time.now.utc.strftime("%F")
56+
puts DATA.read % now
57+
puts
58+
59+
targets.each do |t0|
60+
bname = t0[0][:name]
61+
t0.each_with_index do |t,i|
62+
if i == 0
63+
puts "## Board: #{bname}"
64+
puts
65+
if t[:dshot]
66+
puts "Board is DSHOT enabled."
67+
else
68+
puts "Board is not DSHOT enabled."
69+
end
70+
puts
71+
end
72+
puts "### Target: #{t[:name]}"
73+
puts ""
74+
puts "| PWM | Usage |"
75+
puts "| --- | ----- |"
76+
t[:pwms].each_with_index do |p,n|
77+
puts "| #{n+1} | #{p} |"
78+
end
79+
puts
80+
end
81+
end
82+
end
83+
84+
abort "parse_targets.rb [dir]" if ARGV[0] and ARGV[0].match?(/\-h/)
85+
86+
root = (ARGV[0]||"inav")
87+
Dir.chdir(root)
88+
alltargets=[]
89+
90+
tlist=[]
91+
92+
Dir.chdir("build") || abort("Need build directory")
93+
94+
lname=""
95+
vset={}
96+
IO.popen("ninja -t query release") do |pp|
97+
pp.each do |l|
98+
next unless m=l.match(/src\/main\/target\/(\S+?)\/(\S+)/)
99+
bname=m[1]
100+
vname=m[2]
101+
if bname != lname
102+
lname = bname
103+
unless vset.empty?
104+
tlist << vset
105+
end
106+
vset={:name => bname, :variants => [bname]}
107+
end
108+
if vname != bname
109+
vset[:variants] << vname
110+
end
111+
end
112+
unless vset.empty?
113+
tlist << vset
114+
end
115+
end
116+
117+
Dir.chdir("../src/main/target")
118+
119+
tlist.each do |ti|
120+
res = build_target(ti)
121+
if res
122+
alltargets << res
123+
end
124+
end
125+
126+
#puts alltargets
127+
#alltargets.each do |ta|
128+
# puts "==> #{ta}"
129+
#end
130+
131+
write_out_md alltargets
132+
133+
__END__
134+
# Inav Boards, Targets and PWM allocations
135+
136+
It can be difficult for an aircraft builder to determine if a particular board / target will meet their needs.
137+
138+
In order to offer some guidance, the following list is machine generated from the files under `inav/source/main/target` to provide a list of the options offered by supported boards.
139+
140+
The usage is taken directly from the source code, the following interpretation is offered:
141+
142+
| Symbol | Interpretation |
143+
| ------ | -------------- |
144+
| MC_MOTOR | Multi-rotor motor |
145+
| FW_MOTOR | Fixed wing motor |
146+
| MC_SERVO | Multi-rotor servo |
147+
| FW_SERVO | Fixed wing servo |
148+
| LED | LED strip |
149+
| PWM, ANY | Some other PWM function |
150+
151+
*List generated %s from the [inav master branch](https://github.com/iNavFlight/inav/) by [`parse_targets.rb`](http://seyrsnys.myzen.co.uk/parse_targets.rb). Some targets may not be available in official or prior releases.* **E&OE.**
152+
153+
You are strongly advised to check the board documentation as to the suitability of any particular board.
154+
155+
The configurations listed above are those supported by the inav developers; other configurations may be possible with a custom target. The source tree contains other, unofficial targets that may (or not) work.
156+
157+
Note also that due to the complexity of output options available in inav, dynamic resource allocation is not available. Paweł Spychalski has published a [video](https://www.youtube.com/watch?v=v4R-pnO4srU) explaining why resource allocation is not supported by inav; [see also #1154](https://github.com/iNavFlight/inav/issues/1145)

versioned_docs/version-4.0.0/advanced/Boards,-Targets-and-PWM-allocations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The usage is taken directly from the source code, the following interpretation i
1717
| LED | LED strip |
1818
| PWM, ANY | Some other PWM function |
1919

20-
*List generated 2022-01-22 from the [inav master branch](https://github.com/iNavFlight/inav/) by [`parse_targets.rb`](assets/parse_targets.rb). Some targets may not be available in official or prior releases.* **E&OE.**
20+
*List generated 2022-01-22 from the [inav master branch](https://github.com/iNavFlight/inav/) by [`parse_targets.rb`](/img/content/parse_targets.rb). Some targets may not be available in official or prior releases.* **E&OE.**
2121

2222
You are strongly advised to check the board documentation as to the suitability of any particular board.
2323

versioned_docs/version-4.0.0/features/Failsafe.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
title: Failsafe
33
---
44

5-
# Setting up Failsafe for RTH
6-
75
## Foreword
86

97
The goal is to configure both your flight controller and radio receiver so that failsafe does as you expect in every situation.
@@ -44,7 +42,7 @@ For fixed wing set `failsafe_throttle_low_delay = 0` or else it will disarm the
4442

4543
The behavior of `RTH` can also be configured.
4644

47-
- [iNav Flight modes / Navigation Modes](./Navigation-Mode:-Return-to-Home.md#rth-altitude-control-modes)
45+
- [iNav Flight modes / Navigation Modes](./Navigation-Mode-Return-to-Home.md#rth-altitude-control-modes)
4846

4947
Loss of GPS during Failsafe RTH will result in an emergency landing so make sure the following are set to avoid surprises:
5048
- `nav_emerg_landing_speed` - default is 5 m/s. Reduce for a fixed wing.

versioned_docs/version-4.0.0/features/Modes.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ description: Explaination of all the modes
99

1010
- [AIR MODE](#air-mode)
1111
- [ANGLE](#angle)
12-
- [ARM](#arm)
12+
- ARM
1313
- [AUTOLEVEL](#autolevel-fw)
1414
- [AUTOTUNE](#autotune-fw)
15-
- [BEEPER](#BEEPER)
15+
- [BEEPER](#beeper)
1616
- [BLACKBOX](#blackbox)
1717
- CAMERA CONTROL #
18-
- [CAMSTAB](#CAMSTAB)
18+
- [CAMSTAB](#camstab)
1919
- [FAILSAFE](#failsafe)
2020
- [FLAPERON](#flaperon-fw)
2121
- FPV ANGLE MIX
2222
- [HEADADJ](#headadj-mc)
2323
- [HEADFREE](#headfree-mc)
2424
- [HEADING HOLD](#heading-hold)
25-
- [HOME RESET](#home-reset)
25+
- HOME RESET
2626
- [HORIZON](#horizon)
2727
- KILLSWITCH
2828
- [LEDLOW](#ledlow)
@@ -34,11 +34,11 @@ description: Explaination of all the modes
3434
- [NAV LAUNCH](#nav-launch-fw)
3535
- [OSD ALT](#osd-alt)
3636
- [OSD SW](#osd-sw)
37-
- [PREARM](#prearm)
37+
- PREARM
3838
- [SERVO AUTOTRIM](#servo-autotrim-fw)
3939
- [SOARING](#soaring-fw)
4040
- [SURFACE](#surface)
41-
- [TELEMETRY](#telemetry)
41+
- TELEMETRY
4242
- [TURN ASSIST](#turn-assist)
4343
- [TURTLE](#turtle-mc)
4444
- USER1 & USER2

versioned_docs/version-4.0.0/features/Navigation-Mode:-Return-to-Home.md renamed to versioned_docs/version-4.0.0/features/Navigation-Mode-Return-to-Home.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,89 +10,89 @@ With default settings RTH will land immediately if you are closer than 5 meters
1010

1111
Return to Home is activated by the NAV RTH flight mode.
1212

13-
# RTH Altitudes
13+
## RTH Altitudes
1414

1515
There are two altitudes that can be used with RTH: _nav_rth_altitude_ and _nav_rth_home_altitude_.
1616

1717
_nav_rth_altitude_ is used in conjunction with the RTH Altitude control modes to decide the altitude that the model returns home at. See below to see how the two are combined.
1818

1919
_nav_rth_home_altitude_ sets the altitude that a plane will loiter at when it arrives at home. If above the _nav_rth_home_altitude_, the plane will start loitering, then loiter down to the home altitude. The default, 0, means that the feature is disabled. In which case the plane will loiter at the **Actual RTH Altitude**, or _nav_rth_altitude_ if linear descent is used.
2020

21-
# RTH Altitude control modes
21+
## RTH Altitude control modes
2222

2323
RTH sequence can control altitude in several different ways, controlled by _nav_rth_alt_mode_ and _nav_rth_altitud_ (the altitude in centimetres) parameters.
2424

2525
Default setting is **NAV_RTH_AT_LEAST_ALT** - climb to preconfigured altitude if below, stay at current altitude if above.
2626

27-
## Maintain current altitude (NAV_RTH_NO_ALT)
27+
### Maintain current altitude (NAV_RTH_NO_ALT)
2828
- _nav_rth_alt_mode_ = **CURRENT**
2929
- _nav_rth_altitude_ is ignored
3030

3131
The **Actual RTH Altitude** is the altitude that the model is currently flying at.
3232

3333
![RTH No Alt](/img/content/NAV_RTH_NO_ALT.jpg)
3434

35-
## Maintain current altitude + predefined safety margin (NAV_RTH_EXTRA_ALT)
35+
### Maintain current altitude + predefined safety margin (NAV_RTH_EXTRA_ALT)
3636
- _nav_rth_alt_mode_ = **EXTRA**
3737
- _nav_rth_altitude_ defines extra altitude margin
3838

3939
The **Actual RTH Altitude** is the altitude that the model is currently flying at, plus the _nav_rth_altitude_.
4040

4141
![RTH Extra alt](/img/content/NAX_RTH_EXTRA_ALT.jpg)
4242

43-
## Predefined altitude (NAV_RTH_CONST_ALT)
43+
### Predefined altitude (NAV_RTH_CONST_ALT)
4444
- _nav_rth_alt_mode_ = **FIXED**
4545
- _nav_rth_altitude_ defines exact RTH altitude above launch point.
4646

4747
If the model is below _nav_rth_altitude_ it will climb to desired altitude prior to flying back home. If the model is above the desired altitude, it will turn and fly home and descend on the way. That defines the **Actual RTH Altitude**.
4848

4949
![RTH Const alt](/img/content/NAV_RTH_CONST_ALT.jpg)
5050

51-
## Maximum altitude since launch (NAV_RTH_MAX_ALT)
51+
### Maximum altitude since launch (NAV_RTH_MAX_ALT)
5252
- _nav_rth_alt_mode_ = **MAX**
5353
- _nav_rth_altitude_ is ignored
5454

5555
The **Actual RTH Altitude** is the highest altitude during the flight.
5656

5757
![RTH Max alt](/img/content/NAV_RTH_MAX_ALT.jpg)
5858

59-
## At least predefined altitude above launch point (NAV_RTH_AT_LEAST_ALT)
59+
### At least predefined altitude above launch point (NAV_RTH_AT_LEAST_ALT)
6060
- _nav_rth_alt_mode_ = **AT_LEAST**
6161
- _nav_rth_altitude_ defines the minimum RTH altitude above launch point.
6262

6363
If the aircraft is below _nav_rth_altitude_ it will climb to desired altitude prior to flying back home. If the model is above the desired altitude, it will turn and fly home at the current altitude. This defines the **Actual RTH Altitude**.
6464

6565
![RTH at least alt](/img/content/NAV_RTH_AT_LEAST_ALT.jpg)
6666

67-
## Predefined altitude linear descent (NAV_RTH_AT_LEAST_ALT_LINEAR_DESCENT)
67+
### Predefined altitude linear descent (NAV_RTH_AT_LEAST_ALT_LINEAR_DESCENT)
6868
- _nav_rth_alt_mode_ = **AT_LEAST_LINEAR_DESCENT**
6969
- _nav_rth_altitude_ defines minimum RTH altitude above launch point.
7070

7171
If the aircraft is below _nav_rth_altitude_ it will climb to desired altitude prior to flying back home. If the model is above the desired altitude, it will turn and fly home, and descend on the way (on a linear straight line). This defines the **Actual RTH Altitude**. Aircraft will descend in a way that it'll reach the _nav_rth_altitude_ altitude only when it reaches the home point. So aircraft can save energy by doing an easy descend on it's way back home.
7272

7373
![](https://i.imgur.com/CPgKb4w.png)
7474

75-
# Climb first
75+
## Climb first
7676

7777
The _nav_rth_climb_first_ option sets how the model will initiate the **RTH**.
7878

79-
## Climb first with Multirotors
79+
### Climb first with Multirotors
8080

8181
- If _nav_rth_climb_first_ = **OFF**, the multirotor will turn to home, and immediately fly towards it, climbing on the way to the **Actual RTH Altitude**.
8282
- If _nav_rth_climb_first_ = **ON**, the multirotor hover and increase altitude. When it reaches the **Actual RTH altitude**, it will fly towards home.
8383

84-
## Climb first with Fixed Wing
85-
### _nav_rth_climb_first_ = **OFF**
84+
### Climb first with Fixed Wing
85+
#### _nav_rth_climb_first_ = **OFF**
8686
The plane will turn towards home, and climb to the **Actual RTH altitude** on the homeward journey.
8787

8888
[![https://imgur.com/qXkxPxh](https://i.imgur.com/qXkxPxhl.png)](https://i.imgur.com/qXkxPxh.png)
8989

90-
### _nav_rth_climb_first_ = **ON**
90+
#### _nav_rth_climb_first_ = **ON**
9191
The plane climb to the **Actual RTH altitude** in the direction it is currently flying. Once the **Actual RTH Altitude** is reached, it will turn and fly towards home.
9292

9393
[![https://imgur.com/MYWCu2X](https://i.imgur.com/MYWCu2Xl.png)](https://i.imgur.com/MYWCu2X.png)
9494

95-
### _nav_rth_climb_first_ = **ON_FW_SPIRAL**
95+
#### _nav_rth_climb_first_ = **ON_FW_SPIRAL**
9696
_Feature available since iNav 3.0._
9797

9898
The plane climb in a loiter to the **Actual RTH altitude**. Once the **Actual RTH Altitude** is reached, it will turn and fly towards home.

versioned_docs/version-4.0.0/features/Navigation-modes.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: Navigation Modes
77
This page lists and explains all the different navigational flight modes of iNav:
88

99
- [NAV ALTHOLD - Altitude hold](#althold---altitude-hold)
10-
- [NAV POSHOLD - Horizontal position hold](#nav-poshold---Position-hold)
10+
- [NAV POSHOLD - Horizontal position hold](#nav-poshold---position-hold)
1111
- [NAV COURSE HOLD - Fixed Wing Heading Hold](#nav-course-hold---fixed-wing-heading-hold)
1212
- [NAV CRUISE - Fixed Wing Heading + Altitude Hold](#nav-cruise---fixed-wing-heading--altitude-hold)
1313
- [NAV RTH - Return to home](#rth---return-to-home)
@@ -16,7 +16,7 @@ This page lists and explains all the different navigational flight modes of iNav
1616
- [GCS NAV - Ground control station](#gcs_nav---ground-control-station)
1717

1818
For safety reasons, INAV’s navigation modes can be activated only if:
19-
- ACC and MAG (multirotor only) are [calibrated](https://github.com/iNavFlight/inav/wiki/Sensor-calibration) properly
19+
- ACC and MAG (multirotor only) are [calibrated](../quickstart/Sensor-calibration.md) properly
2020
- a valid 3D GPS fix is available
2121
- a valid altitude source is available
2222
- the FC is armed
@@ -160,7 +160,7 @@ RTH will attempt to bring copter/plane to launch position. Launch position is de
160160

161161
With default settings RTH will land immediately if you are closer than 5 meters from launch position. If further away it will make sure to have at least 10 meters of altitude, then start going home at 3m/s, and land. It will disarm itself if so configured, otherwise you will have to manually disarm once on the ground.
162162

163-
There are many different modes for Altitude, see the [RTH mode page](./Navigation-Mode:-Return-to-Home.md#rth-altitude-control-modes) for details.
163+
There are many different modes for Altitude, see the [RTH mode page](./Navigation-Mode-Return-to-Home.md#rth-altitude-control-modes) for details.
164164

165165
Activated by **RTH** flight mode.
166166

versioned_docs/version-4.0.0/quickstart/Fixed-Wing-Guide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ At this point everything should work as expected.
155155

156156
* Adjust ``set roll_rate`` and ``set pitch_rate`` to the flight characteristics of your plane. For a race wing values like ``set roll_rate = 36`` and ``set pitch_rate = 18`` are a good starting point.
157157

158-
* Set your [RTH mode](../features/Navigation-Mode:-Return-to-Home.md) to your liking
158+
* Set your [RTH mode](../features/Navigation-Mode-Return-to-Home.md) to your liking
159159

160160
* Increase ``set nav_fw_bank_angle`` for tighter turns.
161161

0 commit comments

Comments
 (0)