From f4dcc2e9ea89ef74bb935b97e89016507143d701 Mon Sep 17 00:00:00 2001 From: David-VG Date: Wed, 23 May 2018 19:44:06 +0200 Subject: [PATCH] Add GPS_Rescue --- src/SCRIPTS/BF/HORUS/gpspids.lua | 28 +++++++++++++++++++++++ src/SCRIPTS/BF/HORUS/horuspre.lua | 2 ++ src/SCRIPTS/BF/HORUS/rescue.lua | 35 ++++++++++++++++++++++++++++ src/SCRIPTS/BF/X7/gpspids.lua | 29 +++++++++++++++++++++++ src/SCRIPTS/BF/X7/rescue.lua | 35 ++++++++++++++++++++++++++++ src/SCRIPTS/BF/X7/x7pre.lua | 2 ++ src/SCRIPTS/BF/X9/gpspids.lua | 29 +++++++++++++++++++++++ src/SCRIPTS/BF/X9/rescue.lua | 38 +++++++++++++++++++++++++++++++ src/SCRIPTS/BF/X9/x9pre.lua | 2 ++ 9 files changed, 200 insertions(+) create mode 100644 src/SCRIPTS/BF/HORUS/gpspids.lua create mode 100644 src/SCRIPTS/BF/HORUS/rescue.lua create mode 100644 src/SCRIPTS/BF/X7/gpspids.lua create mode 100644 src/SCRIPTS/BF/X7/rescue.lua create mode 100644 src/SCRIPTS/BF/X9/gpspids.lua create mode 100644 src/SCRIPTS/BF/X9/rescue.lua diff --git a/src/SCRIPTS/BF/HORUS/gpspids.lua b/src/SCRIPTS/BF/HORUS/gpspids.lua new file mode 100644 index 00000000..9af4780e --- /dev/null +++ b/src/SCRIPTS/BF/HORUS/gpspids.lua @@ -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 }, + }, +} \ No newline at end of file diff --git a/src/SCRIPTS/BF/HORUS/horuspre.lua b/src/SCRIPTS/BF/HORUS/horuspre.lua index 409b4943..697a8acd 100644 --- a/src/SCRIPTS/BF/HORUS/horuspre.lua +++ b/src/SCRIPTS/BF/HORUS/horuspre.lua @@ -1,5 +1,7 @@ PageFiles = { + "rescue.lua", + "gpspids.lua", "pids.lua", "rates1.lua", "rates2.lua", diff --git a/src/SCRIPTS/BF/HORUS/rescue.lua b/src/SCRIPTS/BF/HORUS/rescue.lua new file mode 100644 index 00000000..7f838996 --- /dev/null +++ b/src/SCRIPTS/BF/HORUS/rescue.lua @@ -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 }, + + }, +} \ No newline at end of file diff --git a/src/SCRIPTS/BF/X7/gpspids.lua b/src/SCRIPTS/BF/X7/gpspids.lua new file mode 100644 index 00000000..097c8f14 --- /dev/null +++ b/src/SCRIPTS/BF/X7/gpspids.lua @@ -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 }, + }, +} \ No newline at end of file diff --git a/src/SCRIPTS/BF/X7/rescue.lua b/src/SCRIPTS/BF/X7/rescue.lua new file mode 100644 index 00000000..dc72c2fb --- /dev/null +++ b/src/SCRIPTS/BF/X7/rescue.lua @@ -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 }, + }, +} \ No newline at end of file diff --git a/src/SCRIPTS/BF/X7/x7pre.lua b/src/SCRIPTS/BF/X7/x7pre.lua index aa955f62..4a2b9ca7 100644 --- a/src/SCRIPTS/BF/X7/x7pre.lua +++ b/src/SCRIPTS/BF/X7/x7pre.lua @@ -1,5 +1,7 @@ PageFiles = { + "rescue.lua", + "gpspids.lua", "pids.lua", "rates1.lua", "rates2.lua", diff --git a/src/SCRIPTS/BF/X9/gpspids.lua b/src/SCRIPTS/BF/X9/gpspids.lua new file mode 100644 index 00000000..a5b7efe8 --- /dev/null +++ b/src/SCRIPTS/BF/X9/gpspids.lua @@ -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 }, + + }, +} \ No newline at end of file diff --git a/src/SCRIPTS/BF/X9/rescue.lua b/src/SCRIPTS/BF/X9/rescue.lua new file mode 100644 index 00000000..bd789c24 --- /dev/null +++ b/src/SCRIPTS/BF/X9/rescue.lua @@ -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 }, + + }, +} \ No newline at end of file diff --git a/src/SCRIPTS/BF/X9/x9pre.lua b/src/SCRIPTS/BF/X9/x9pre.lua index 0c11078d..2841169b 100644 --- a/src/SCRIPTS/BF/X9/x9pre.lua +++ b/src/SCRIPTS/BF/X9/x9pre.lua @@ -1,5 +1,7 @@ PageFiles = { + "rescue.lua", + "gpspids.lua", "pids.lua", "rates1.lua", "rates2.lua",