Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 23 additions & 19 deletions src/SCRIPTS/BF/LAYOUT/128x64/rescue.lua
Original file line number Diff line number Diff line change
@@ -1,25 +1,29 @@
return {
labels = {
{ t = "Min Sats.", x = 3, y = 10, },
{ t = "Angle", x = 3, y = 20, },
{ t = "Initial Alt", x = 3, y = 30, },
{ t = "Descent Dst", x = 3, y = 40, },
{ t = "Ground Spd", x = 3, y = 50, },
{ t = "Snty.", x = 80, y = 10, },
{ t = "Throttle", x = 80, y = 20, },
{ t = "Min", x = 85, y = 30, },
{ t = "Hover", x = 80, y = 40, },
{ t = "Max", x = 85, y = 50, },
{ t = "Min Sats.", x = 3, y = 14, },
{ t = "Angle", x = 3, y = 24, },
{ t = "Initial Alt", x = 3, y = 34, },
{ t = "Descent Dst", x = 3, y = 44, },
{ t = "Ground Spd", x = 3, y = 54, },
{ t = "Arm w/o fix", x = 3, y = 64, },
{ t = "Snty.", x = 80, y = 14, },
{ t = "Throttle", x = 80, y = 24, },
{ t = "Min", x = 85, y = 34, },
{ t = "Hover", x = 80, y = 44, },
{ t = "Max", x = 85, y = 54, },
},
fieldLayout = {
{ x = 58, y = 10, },
{ x = 58, y = 20, },
{ x = 58, y = 30, },
{ x = 58, y = 40, },
{ x = 58, y = 50, },
{ x = 105, y = 10, },
{ x = 105, y = 30, },
{ x = 105, y = 40, },
{ x = 105, y = 50, },
{ x = 58, y = 14, },
{ x = 58, y = 24, },
{ x = 58, y = 34, },
{ x = 58, y = 44, },
{ x = 58, y = 54, },
{ x = 58, y = 64, },
{ x = 105, y = 14, },
{ x = 105, y = 34, },
{ x = 105, y = 44, },
{ x = 105, y = 54, },
{ x = 105, y = 54, },

},
}
2 changes: 2 additions & 0 deletions src/SCRIPTS/BF/LAYOUT/212x64/rescue.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ return {
{ t = "Initial Alt.", x = 18, y = 36, },
{ t = "Descent Dist.", x = 10, y = 46, },
{ t = "Ground Speed", x = 10, y = 56, },
{ t = "Arm w/o fix", x = 15, y = 66, },
{ t = "Sanity Ch.", x = 125, y = 16, },
{ t = "Throttle", x = 125, y = 26, },
{ t = "Min", x = 128, y = 36, },
Expand All @@ -17,6 +18,7 @@ return {
{ x = 75, y = 36, },
{ x = 75, y = 46, },
{ x = 75, y = 56, },
{ x = 75, y = 66, },
{ x = 180, y = 16, },
{ x = 150, y = 36, },
{ x = 150, y = 46, },
Expand Down
12 changes: 7 additions & 5 deletions src/SCRIPTS/BF/LAYOUT/320x480/rescue.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@ return {
{ t = "Initial Altitude", x = 10, y = 120 },
{ t = "Descent Distance", x = 10, y = 160 },
{ t = "Ground Speed", x = 10, y = 200 },
{ t = "Snty.", x = 10, y = 240 },
{ t = "Throttle", x = 10, y = 280 },
{ t = "Min", x = 10, y = 320 },
{ t = "Hover", x = 10, y = 360 },
{ t = "Max", x = 10, y = 400 },
{ t = "Arm w/o fix", x = 10, y = 240, },
{ t = "Snty.", x = 10, y = 260 },
{ t = "Throttle", x = 10, y = 320 },
{ t = "Min", x = 10, y = 360 },
{ t = "Hover", x = 10, y = 400 },
{ t = "Max", x = 10, y = 440 },
},
fieldLayout = {
{ x = 260, y = 40, },
Expand All @@ -21,5 +22,6 @@ return {
{ x = 260, y = 320, },
{ x = 260, y = 360, },
{ x = 260, y = 400, },
{ x = 260, y = 440, },
},
}
2 changes: 2 additions & 0 deletions src/SCRIPTS/BF/LAYOUT/480x272/rescue.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ return {
{ t = "Initial Altitude", x = 60, y = 120, },
{ t = "Descent Distance", x = 10, y = 160, },
{ t = "Ground Speed", x = 50, y = 200, },
{ t = "Arm w/o fix", x = 10, y = 240, },
{ t = "Snty.", x = 310, y = 40, },
{ t = "Throttle", x = 350, y = 80, },
{ t = "Min", x = 330, y = 120, },
Expand All @@ -17,6 +18,7 @@ return {
{ x = 260, y = 120, },
{ x = 260, y = 160, },
{ x = 260, y = 200, },
{ x = 260, y = 240, },
{ x = 400, y = 40, },
{ x = 400, y = 120, },
{ x = 400, y = 160, },
Expand Down
5 changes: 3 additions & 2 deletions src/SCRIPTS/BF/PAGES/rescue.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ return {
title = "GPS Rescue",
reboot = false,
eepromWrite = true,
minBytes = 16,
requiredVersion = 1.041,
minBytes = 21,
requiredVersion = 1.043,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seeing that we had a lot of improvements in the lua scripts since the last release, and will probably want to do another release before Betaflight 4.2 (which will bring API version 1.43) is released, I'd rather leave this at 1.041 for now - obviously the 'arming without fix' setting won't work for users before Betaflight 4.2, but at least they will still be able to use the rest of the GPS rescue page.

Copy link
Contributor Author

@kaweksl kaweksl Oct 22, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but increased minBytes won't cause problems if script will not receive 21 bytes ?

UPDATE:
I have checked this with X9D+ , BF 4.1 and with requiredVersion 1.041, rescue page doesn't work.
UPDATE:
looks like minBytes at 16 and requiredVersion at 1.041 is working with BF 4.1 and 4.2.
had impression that increasing minBytes is mandatory

labels = display.labels,
fieldLayout = display.fieldLayout,
fields = {
Expand All @@ -15,6 +15,7 @@ return {
{ min = 20, max = 100, vals = { 3,4 }, },
{ min = 30, max = 500, vals = { 5,6 }, },
{ min = 30, max = 3000, vals = { 7,8 }, },
{ min = 0, max = 1, vals = { 21 }, table = { [0]="OFF","ON"}, },
{ min = 0, max = 2, vals = { 15 }, table = { [0]="OFF","ON","FS_ONLY"}, },
{ min = 1000, max = 2000, vals = { 9,10 }, },
{ min = 1000, max = 2000, vals = { 13,14 }, },
Expand Down