Skip to content

Commit 8eb04c7

Browse files
authored
Merge pull request #175 from mikeller/David-VG-master
Added support for configuring GPS rescue (from @David-VG, thanks)
2 parents a60ffed + 3f3a881 commit 8eb04c7

File tree

9 files changed

+203
-3
lines changed

9 files changed

+203
-3
lines changed

Diff for: src/SCRIPTS/BF/HORUS/gpspids.lua

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
return {
2+
read = 136, -- MSP_GPS_RESCUE_PIDS
3+
write = 226, -- MSP_SET_GPS_RESCUE_PIDS
4+
title = "GPS Rescue / PIDs",
5+
reboot = false,
6+
eepromWrite = true,
7+
minBytes = 14,
8+
text = {
9+
{ t = "P", x = 142, y = 48, to = MIDSIZE },
10+
{ t = "I", x = 244, y = 48, to = MIDSIZE },
11+
{ t = "D", x = 342, y = 48, to = MIDSIZE },
12+
{ t = "Throttle", x = 28, y = 100 },
13+
{ t = "Velocity", x = 28, y = 150 },
14+
{ t = "Yaw" , x = 28, y = 200 },
15+
},
16+
fields = {
17+
-- P
18+
{ x = 140, y = 100, min = 0, max = 200, vals = { 1, 3 }, to = MIDSIZE },
19+
{ x = 140, y = 150, min = 0, max = 200, vals = { 7, 8 }, to = MIDSIZE },
20+
{ x = 140, y = 200, min = 0, max = 500, vals = {13,14 }, to = MIDSIZE },
21+
-- I
22+
{ x = 240, y = 100, min = 0, max = 200, vals = { 3, 4 }, to = MIDSIZE },
23+
{ x = 240, y = 150, min = 0, max = 200, vals = { 9,10 }, to = MIDSIZE },
24+
-- D
25+
{ x = 340, y = 100, min = 0, max = 200, vals = { 5, 6 }, to = MIDSIZE },
26+
{ x = 340, y = 150, min = 0, max = 200, vals = { 11,12 }, to = MIDSIZE },
27+
},
28+
}

Diff for: src/SCRIPTS/BF/HORUS/horuspre.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ PageFiles =
77
"filters.lua",
88
"pwm.lua",
99
"rx.lua",
10-
"vtx.lua"
10+
"vtx.lua",
11+
"rescue.lua",
12+
"gpspids.lua",
1113
}
1214

1315
backgroundFill = TEXT_BGCOLOR

Diff for: src/SCRIPTS/BF/HORUS/rescue.lua

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
return {
2+
read = 135, -- MSP_GPS_RESCUE
3+
write = 225, -- MSP_SET_GPS_RESCUE
4+
title = "GPS Rescue",
5+
reboot = false,
6+
eepromWrite = true,
7+
minBytes = 18,
8+
text = {
9+
{ t = "Min Sats.", x =130, y = 40, to = MIDSIZE },
10+
{ t = "Angle", x =150, y = 80, to = MIDSIZE },
11+
{ t = "Initial Altitude", x = 60, y = 120, to = MIDSIZE },
12+
{ t = "Descent Distance", x = 10, y = 160, to = MIDSIZE },
13+
{ t = "Ground Speed", x = 50, y = 200, to = MIDSIZE },
14+
15+
{ t = "Snty.", x = 310, y = 40, to = MIDSIZE },
16+
{ t = "Throttle", x = 350, y = 80, to = MIDSIZE },
17+
{ t = "Min", x = 330, y = 120, to = MIDSIZE },
18+
{ t = "Hover", x = 310, y = 160, to = MIDSIZE },
19+
{ t = "Max", x = 330, y = 200, to = MIDSIZE },
20+
},
21+
fields = {
22+
{ x = 260, y = 40, min = 0, max = 50, vals = { 18 }, to = MIDSIZE },
23+
{ x = 260, y = 80, min = 0, max = 200, vals = { 1,2 }, to = MIDSIZE },
24+
{ x = 260, y = 120, min = 20, max = 100, vals = { 3,4 }, to = MIDSIZE },
25+
{ x = 260, y = 160, min = 30, max = 500, vals = { 5,6 }, to = MIDSIZE },
26+
{ x = 260, y = 200, min = 30, max =3000, vals = { 7,8 }, to = MIDSIZE },
27+
28+
29+
{ x = 400, y = 40, min = 0, max = 2 , vals = { 17 }, to = MIDSIZE,table = { [0]="OFF","ON","FS_ONLY"}},
30+
{ x = 400, y = 120, min = 1000, max = 2000, vals = { 9,10 }, to = MIDSIZE },
31+
{ x = 400, y = 160, min = 1000, max = 2000, vals = { 13,14 }, to = MIDSIZE },
32+
{ x = 400, y = 200, min = 1000, max = 2000, vals = { 11,12 }, to = MIDSIZE },
33+
34+
},
35+
}

Diff for: src/SCRIPTS/BF/X7/gpspids.lua

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
return {
3+
read = 136, -- MSP_GPS_RESCUE_PIDS
4+
write = 226, -- MSP_SET_GPS_RESCUE_PIDS
5+
title = "GPS / PIDs",
6+
reboot = false,
7+
eepromWrite = true,
8+
minBytes = 14,
9+
text = {
10+
{ t = "P", x = 55, y = 14, to=SMLSIZE },
11+
{ t = "I", x = 83, y = 14, to=SMLSIZE },
12+
{ t = "D", x = 111, y = 14, to=SMLSIZE },
13+
{ t = "Throttle", x = 5, y = 26, to=SMLSIZE },
14+
{ t = "Velocity", x = 5, y = 36, to=SMLSIZE },
15+
{ t = "Yaw" , x = 5, y = 46, to=SMLSIZE },
16+
},
17+
fields = {
18+
-- P
19+
{ x = 51, y = 26, min = 0, max = 200, vals = { 1,2 }, to=SMLSIZE },
20+
{ x = 51, y = 36, min = 0, max = 200, vals = { 7,8 }, to=SMLSIZE },
21+
{ x = 51, y = 46, min = 0, max = 500, vals = {13,14}, to = SMLSIZE },
22+
-- I
23+
{ x = 79, y = 26, min = 0, max = 200, vals = { 3,4 }, to=SMLSIZE },
24+
{ x = 79, y = 36, min = 0, max = 200, vals = { 9,10 }, to=SMLSIZE },
25+
-- D
26+
{ x = 107, y = 26, min = 0, max = 200, vals = { 5,6 }, to=SMLSIZE },
27+
{ x = 107, y = 36, min = 0, max = 200, vals = { 11,12 }, to=SMLSIZE },
28+
},
29+
}

Diff for: src/SCRIPTS/BF/X7/rescue.lua

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
2+
return {
3+
read = 135, -- MSP_GPS_RESCUE
4+
write = 225, -- MSP_SET_GPS_RESCUE
5+
title = "GPS Rescue / PIDs",
6+
reboot = false,
7+
eepromWrite = true,
8+
minBytes = 18,
9+
text = {
10+
11+
{ t = "Min Sats.", x = 3, y = 10, to=SMLSIZE },
12+
{ t = "Angle", x = 3, y = 20, to=SMLSIZE },
13+
{ t = "Initial Alt", x = 3, y = 30, to=SMLSIZE },
14+
{ t = "Descent Dst", x = 3, y = 40, to=SMLSIZE },
15+
{ t = "Ground Spd", x = 3, y = 50, to=SMLSIZE },
16+
17+
{ t = "Snty.", x = 80, y = 10, to = SMLSIZE },
18+
{ t = "Throttle", x = 80, y = 20, to = SMLSIZE },
19+
{ t = "Min", x = 85, y = 30, to = SMLSIZE },
20+
{ t = "Hover", x = 80, y = 40, to = SMLSIZE },
21+
{ t = "Max", x = 85, y = 50, to = SMLSIZE },
22+
},
23+
fields = {
24+
{ x = 58, y = 10, min = 0, max = 50, vals = { 18 }, to = SMLSIZE },
25+
{ x = 58, y = 20, min = 0, max = 200, vals = { 1,2 }, to = SMLSIZE },
26+
{ x = 58, y = 30, min = 20, max = 100, vals = { 3,4 }, to = SMLSIZE },
27+
{ x = 58, y = 40, min = 30, max = 500, vals = { 5,6 }, to = SMLSIZE },
28+
{ x = 58, y = 50, min = 30, max =3000, vals = { 7,8 }, to = SMLSIZE },
29+
30+
{ x = 105, y = 10, min = 0, max = 2 , vals = { 17 }, to = SMLSIZE,table = { [0]="OFF","ON","FS_ONLY"}},
31+
{ x = 105, y = 30, min = 1000, max = 2000, vals = { 9,10 }, to = SMLSIZE },
32+
{ x = 105, y = 40, min = 1000, max = 2000, vals = { 13,14 }, to = SMLSIZE },
33+
{ x = 105, y = 50, min = 1000, max = 2000, vals = { 11,12 }, to = SMLSIZE },
34+
},
35+
}

Diff for: src/SCRIPTS/BF/X7/x7pre.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ PageFiles =
88
"filters1.lua",
99
"filters2.lua",
1010
"pwm.lua",
11-
"vtx.lua"
11+
"vtx.lua",
12+
"rescue.lua",
13+
"gpspids.lua",
1214
}
1315

1416
MenuBox = { x=15, y=12, w=100, x_offset=36, h_line=8, h_offset=3 }

Diff for: src/SCRIPTS/BF/X9/gpspids.lua

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
return {
2+
read = 136, -- MSP_GPS_RESCUE_PIDS
3+
write = 226, -- MSP_SET_GPS_RESCUE_PIDS
4+
title = "GPS Rescue / PIDs",
5+
reboot = false,
6+
eepromWrite = true,
7+
minBytes = 14,
8+
text = {
9+
{ t = "P", x = 70, y = 14, to = SMLSIZE },
10+
{ t = "I", x = 98, y = 14, to = SMLSIZE },
11+
{ t = "D", x = 126, y = 14, to = SMLSIZE },
12+
{ t = "Throttle", x = 25, y = 26, to = SMLSIZE },
13+
{ t = "Velocity", x = 25, y = 36, to = SMLSIZE },
14+
{ t = "Yaw", x = 25, y = 46, to = SMLSIZE },
15+
},
16+
fields = {
17+
-- P
18+
{ x = 66, y = 26, min = 0, max = 500, vals = { 1,2 }, to = SMLSIZE },
19+
{ x = 66, y = 36, min = 0, max = 500, vals = { 7,8 }, to = SMLSIZE },
20+
{ x = 66, y = 46, min = 0, max = 500, vals = {13,14}, to = SMLSIZE },
21+
-- I
22+
{ x = 94, y = 26, min = 0, max = 500, vals = { 3,4 }, to = SMLSIZE },
23+
{ x = 94, y = 36, min = 0, max = 500, vals = { 9,10 }, to = SMLSIZE },
24+
-- D
25+
{ x = 122, y = 26, min = 0, max = 500, vals = { 5,6 }, to = SMLSIZE },
26+
{ x = 122, y = 36, min = 0, max = 500, vals = { 11,12 }, to = SMLSIZE },
27+
28+
},
29+
}

Diff for: src/SCRIPTS/BF/X9/rescue.lua

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
return {
2+
read = 135, -- MSP_GPS_RESCUE
3+
write = 225, -- MSP_SET_GPS_RESCUE
4+
title = "GPS Rescue",
5+
reboot = false,
6+
eepromWrite = true,
7+
minBytes = 18,
8+
9+
10+
text = {
11+
{ t = "Min Sats.", x = 30, y = 16, to = SMLSIZE },
12+
{ t = "Angle", x = 45, y = 26, to = SMLSIZE },
13+
{ t = "Initial Alt.", x = 18, y = 36, to = SMLSIZE },
14+
{ t = "Descent Dist.", x = 10, y = 46, to = SMLSIZE },
15+
{ t = "Ground Speed", x = 10, y = 56, to = SMLSIZE },
16+
17+
18+
{ t = "Sanity Ch.", x = 125, y = 16, to = SMLSIZE },
19+
{ t = "Throttle", x = 125, y = 26, to = SMLSIZE },
20+
{ t = "Min", x = 128, y = 36, to = SMLSIZE },
21+
{ t = "Hover", x = 120, y = 46, to = SMLSIZE },
22+
{ t = "Max", x = 128, y = 56, to = SMLSIZE },
23+
},
24+
fields = {
25+
26+
{ x = 75, y = 16, min = 0, max = 50, vals = { 18 }, to = SMLSIZE },
27+
{ x = 75, y = 26, min = 0, max = 200, vals = { 1 , 2 }, to = SMLSIZE },
28+
{ x = 75, y = 36, min = 20, max = 100, vals = { 3 , 4 }, to = SMLSIZE },
29+
{ x = 75, y = 46, min = 30, max = 500, vals = { 5 , 6 }, to = SMLSIZE },
30+
{ x = 75, y = 56, min = 30, max = 3000, vals = { 13,14 }, to = SMLSIZE },
31+
32+
{ x = 180, y = 16, min = 0, max = 2 , vals = { 17 }, to = SMLSIZE,table = { [0]="OFF","ON","FS_ONLY"}},
33+
{ x = 150, y = 36, min = 1000, max = 2000, vals = { 7, 8 }, to = SMLSIZE },
34+
{ x = 150, y = 46, min = 1000, max = 2000, vals = { 9,10 }, to = SMLSIZE },
35+
{ x = 150, y = 56, min = 1000, max = 2000, vals = { 11,12 }, to = SMLSIZE },
36+
37+
},
38+
}

Diff for: src/SCRIPTS/BF/X9/x9pre.lua

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@ PageFiles =
77
"filters.lua",
88
"pwm.lua",
99
"rx.lua",
10-
"vtx.lua"
10+
"vtx.lua",
11+
"rescue.lua",
12+
"gpspids.lua",
1113
}
1214

1315
MenuBox = { x=40, y=12, w=120, x_offset=36, h_line=8, h_offset=3 }

0 commit comments

Comments
 (0)