Skip to content

Commit

Permalink
Merge pull request #175 from mikeller/David-VG-master
Browse files Browse the repository at this point in the history
Added support for configuring GPS rescue (from @David-VG, thanks)
  • Loading branch information
mikeller authored Oct 18, 2018
2 parents a60ffed + 3f3a881 commit 8eb04c7
Show file tree
Hide file tree
Showing 9 changed files with 203 additions and 3 deletions.
28 changes: 28 additions & 0 deletions src/SCRIPTS/BF/HORUS/gpspids.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
return {
read = 136, -- MSP_GPS_RESCUE_PIDS
write = 226, -- MSP_SET_GPS_RESCUE_PIDS
title = "GPS Rescue / PIDs",
reboot = false,
eepromWrite = true,
minBytes = 14,
text = {
{ t = "P", x = 142, y = 48, to = MIDSIZE },
{ t = "I", x = 244, y = 48, to = MIDSIZE },
{ t = "D", x = 342, y = 48, to = MIDSIZE },
{ t = "Throttle", x = 28, y = 100 },
{ t = "Velocity", x = 28, y = 150 },
{ t = "Yaw" , x = 28, y = 200 },
},
fields = {
-- P
{ x = 140, y = 100, min = 0, max = 200, vals = { 1, 3 }, to = MIDSIZE },
{ x = 140, y = 150, min = 0, max = 200, vals = { 7, 8 }, to = MIDSIZE },
{ x = 140, y = 200, min = 0, max = 500, vals = {13,14 }, to = MIDSIZE },
-- I
{ x = 240, y = 100, min = 0, max = 200, vals = { 3, 4 }, to = MIDSIZE },
{ x = 240, y = 150, min = 0, max = 200, vals = { 9,10 }, to = MIDSIZE },
-- D
{ x = 340, y = 100, min = 0, max = 200, vals = { 5, 6 }, to = MIDSIZE },
{ x = 340, y = 150, min = 0, max = 200, vals = { 11,12 }, to = MIDSIZE },
},
}
4 changes: 3 additions & 1 deletion src/SCRIPTS/BF/HORUS/horuspre.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ PageFiles =
"filters.lua",
"pwm.lua",
"rx.lua",
"vtx.lua"
"vtx.lua",
"rescue.lua",
"gpspids.lua",
}

backgroundFill = TEXT_BGCOLOR
Expand Down
35 changes: 35 additions & 0 deletions src/SCRIPTS/BF/HORUS/rescue.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
return {
read = 135, -- MSP_GPS_RESCUE
write = 225, -- MSP_SET_GPS_RESCUE
title = "GPS Rescue",
reboot = false,
eepromWrite = true,
minBytes = 18,
text = {
{ t = "Min Sats.", x =130, y = 40, to = MIDSIZE },
{ t = "Angle", x =150, y = 80, to = MIDSIZE },
{ t = "Initial Altitude", x = 60, y = 120, to = MIDSIZE },
{ t = "Descent Distance", x = 10, y = 160, to = MIDSIZE },
{ t = "Ground Speed", x = 50, y = 200, to = MIDSIZE },

{ t = "Snty.", x = 310, y = 40, to = MIDSIZE },
{ t = "Throttle", x = 350, y = 80, to = MIDSIZE },
{ t = "Min", x = 330, y = 120, to = MIDSIZE },
{ t = "Hover", x = 310, y = 160, to = MIDSIZE },
{ t = "Max", x = 330, y = 200, to = MIDSIZE },
},
fields = {
{ x = 260, y = 40, min = 0, max = 50, vals = { 18 }, to = MIDSIZE },
{ x = 260, y = 80, min = 0, max = 200, vals = { 1,2 }, to = MIDSIZE },
{ x = 260, y = 120, min = 20, max = 100, vals = { 3,4 }, to = MIDSIZE },
{ x = 260, y = 160, min = 30, max = 500, vals = { 5,6 }, to = MIDSIZE },
{ x = 260, y = 200, min = 30, max =3000, vals = { 7,8 }, to = MIDSIZE },


{ x = 400, y = 40, min = 0, max = 2 , vals = { 17 }, to = MIDSIZE,table = { [0]="OFF","ON","FS_ONLY"}},
{ x = 400, y = 120, min = 1000, max = 2000, vals = { 9,10 }, to = MIDSIZE },
{ x = 400, y = 160, min = 1000, max = 2000, vals = { 13,14 }, to = MIDSIZE },
{ x = 400, y = 200, min = 1000, max = 2000, vals = { 11,12 }, to = MIDSIZE },

},
}
29 changes: 29 additions & 0 deletions src/SCRIPTS/BF/X7/gpspids.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@

return {
read = 136, -- MSP_GPS_RESCUE_PIDS
write = 226, -- MSP_SET_GPS_RESCUE_PIDS
title = "GPS / PIDs",
reboot = false,
eepromWrite = true,
minBytes = 14,
text = {
{ t = "P", x = 55, y = 14, to=SMLSIZE },
{ t = "I", x = 83, y = 14, to=SMLSIZE },
{ t = "D", x = 111, y = 14, to=SMLSIZE },
{ t = "Throttle", x = 5, y = 26, to=SMLSIZE },
{ t = "Velocity", x = 5, y = 36, to=SMLSIZE },
{ t = "Yaw" , x = 5, y = 46, to=SMLSIZE },
},
fields = {
-- P
{ x = 51, y = 26, min = 0, max = 200, vals = { 1,2 }, to=SMLSIZE },
{ x = 51, y = 36, min = 0, max = 200, vals = { 7,8 }, to=SMLSIZE },
{ x = 51, y = 46, min = 0, max = 500, vals = {13,14}, to = SMLSIZE },
-- I
{ x = 79, y = 26, min = 0, max = 200, vals = { 3,4 }, to=SMLSIZE },
{ x = 79, y = 36, min = 0, max = 200, vals = { 9,10 }, to=SMLSIZE },
-- D
{ x = 107, y = 26, min = 0, max = 200, vals = { 5,6 }, to=SMLSIZE },
{ x = 107, y = 36, min = 0, max = 200, vals = { 11,12 }, to=SMLSIZE },
},
}
35 changes: 35 additions & 0 deletions src/SCRIPTS/BF/X7/rescue.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@

return {
read = 135, -- MSP_GPS_RESCUE
write = 225, -- MSP_SET_GPS_RESCUE
title = "GPS Rescue / PIDs",
reboot = false,
eepromWrite = true,
minBytes = 18,
text = {

{ t = "Min Sats.", x = 3, y = 10, to=SMLSIZE },
{ t = "Angle", x = 3, y = 20, to=SMLSIZE },
{ t = "Initial Alt", x = 3, y = 30, to=SMLSIZE },
{ t = "Descent Dst", x = 3, y = 40, to=SMLSIZE },
{ t = "Ground Spd", x = 3, y = 50, to=SMLSIZE },

{ t = "Snty.", x = 80, y = 10, to = SMLSIZE },
{ t = "Throttle", x = 80, y = 20, to = SMLSIZE },
{ t = "Min", x = 85, y = 30, to = SMLSIZE },
{ t = "Hover", x = 80, y = 40, to = SMLSIZE },
{ t = "Max", x = 85, y = 50, to = SMLSIZE },
},
fields = {
{ x = 58, y = 10, min = 0, max = 50, vals = { 18 }, to = SMLSIZE },
{ x = 58, y = 20, min = 0, max = 200, vals = { 1,2 }, to = SMLSIZE },
{ x = 58, y = 30, min = 20, max = 100, vals = { 3,4 }, to = SMLSIZE },
{ x = 58, y = 40, min = 30, max = 500, vals = { 5,6 }, to = SMLSIZE },
{ x = 58, y = 50, min = 30, max =3000, vals = { 7,8 }, to = SMLSIZE },

{ x = 105, y = 10, min = 0, max = 2 , vals = { 17 }, to = SMLSIZE,table = { [0]="OFF","ON","FS_ONLY"}},
{ x = 105, y = 30, min = 1000, max = 2000, vals = { 9,10 }, to = SMLSIZE },
{ x = 105, y = 40, min = 1000, max = 2000, vals = { 13,14 }, to = SMLSIZE },
{ x = 105, y = 50, min = 1000, max = 2000, vals = { 11,12 }, to = SMLSIZE },
},
}
4 changes: 3 additions & 1 deletion src/SCRIPTS/BF/X7/x7pre.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ PageFiles =
"filters1.lua",
"filters2.lua",
"pwm.lua",
"vtx.lua"
"vtx.lua",
"rescue.lua",
"gpspids.lua",
}

MenuBox = { x=15, y=12, w=100, x_offset=36, h_line=8, h_offset=3 }
Expand Down
29 changes: 29 additions & 0 deletions src/SCRIPTS/BF/X9/gpspids.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
return {
read = 136, -- MSP_GPS_RESCUE_PIDS
write = 226, -- MSP_SET_GPS_RESCUE_PIDS
title = "GPS Rescue / PIDs",
reboot = false,
eepromWrite = true,
minBytes = 14,
text = {
{ t = "P", x = 70, y = 14, to = SMLSIZE },
{ t = "I", x = 98, y = 14, to = SMLSIZE },
{ t = "D", x = 126, y = 14, to = SMLSIZE },
{ t = "Throttle", x = 25, y = 26, to = SMLSIZE },
{ t = "Velocity", x = 25, y = 36, to = SMLSIZE },
{ t = "Yaw", x = 25, y = 46, to = SMLSIZE },
},
fields = {
-- P
{ x = 66, y = 26, min = 0, max = 500, vals = { 1,2 }, to = SMLSIZE },
{ x = 66, y = 36, min = 0, max = 500, vals = { 7,8 }, to = SMLSIZE },
{ x = 66, y = 46, min = 0, max = 500, vals = {13,14}, to = SMLSIZE },
-- I
{ x = 94, y = 26, min = 0, max = 500, vals = { 3,4 }, to = SMLSIZE },
{ x = 94, y = 36, min = 0, max = 500, vals = { 9,10 }, to = SMLSIZE },
-- D
{ x = 122, y = 26, min = 0, max = 500, vals = { 5,6 }, to = SMLSIZE },
{ x = 122, y = 36, min = 0, max = 500, vals = { 11,12 }, to = SMLSIZE },

},
}
38 changes: 38 additions & 0 deletions src/SCRIPTS/BF/X9/rescue.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
return {
read = 135, -- MSP_GPS_RESCUE
write = 225, -- MSP_SET_GPS_RESCUE
title = "GPS Rescue",
reboot = false,
eepromWrite = true,
minBytes = 18,


text = {
{ t = "Min Sats.", x = 30, y = 16, to = SMLSIZE },
{ t = "Angle", x = 45, y = 26, to = SMLSIZE },
{ t = "Initial Alt.", x = 18, y = 36, to = SMLSIZE },
{ t = "Descent Dist.", x = 10, y = 46, to = SMLSIZE },
{ t = "Ground Speed", x = 10, y = 56, to = SMLSIZE },


{ t = "Sanity Ch.", x = 125, y = 16, to = SMLSIZE },
{ t = "Throttle", x = 125, y = 26, to = SMLSIZE },
{ t = "Min", x = 128, y = 36, to = SMLSIZE },
{ t = "Hover", x = 120, y = 46, to = SMLSIZE },
{ t = "Max", x = 128, y = 56, to = SMLSIZE },
},
fields = {

{ x = 75, y = 16, min = 0, max = 50, vals = { 18 }, to = SMLSIZE },
{ x = 75, y = 26, min = 0, max = 200, vals = { 1 , 2 }, to = SMLSIZE },
{ x = 75, y = 36, min = 20, max = 100, vals = { 3 , 4 }, to = SMLSIZE },
{ x = 75, y = 46, min = 30, max = 500, vals = { 5 , 6 }, to = SMLSIZE },
{ x = 75, y = 56, min = 30, max = 3000, vals = { 13,14 }, to = SMLSIZE },

{ x = 180, y = 16, min = 0, max = 2 , vals = { 17 }, to = SMLSIZE,table = { [0]="OFF","ON","FS_ONLY"}},
{ x = 150, y = 36, min = 1000, max = 2000, vals = { 7, 8 }, to = SMLSIZE },
{ x = 150, y = 46, min = 1000, max = 2000, vals = { 9,10 }, to = SMLSIZE },
{ x = 150, y = 56, min = 1000, max = 2000, vals = { 11,12 }, to = SMLSIZE },

},
}
4 changes: 3 additions & 1 deletion src/SCRIPTS/BF/X9/x9pre.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ PageFiles =
"filters.lua",
"pwm.lua",
"rx.lua",
"vtx.lua"
"vtx.lua",
"rescue.lua",
"gpspids.lua",
}

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

0 comments on commit 8eb04c7

Please sign in to comment.