forked from betaflight/betaflight-tx-lua-scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathX9.lua
73 lines (71 loc) · 2.49 KB
/
X9.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
SetupPages = {
{
title = "PIDs",
text = {
{ t = "P", x = 72, y = 14 },
{ t = "I", x = 100, y = 14 },
{ t = "D", x = 128, y = 14 },
{ t = "ROLL", x = 25, y = 26 },
{ t = "PITCH", x = 25, y = 36 },
{ t = "YAW", x = 25, y = 46 },
},
fields = {
-- P
{ x = 66, y = 26, i = 1 },
{ x = 66, y = 36, i = 4 },
{ x = 66, y = 46, i = 7 },
-- I
{ x = 94, y = 26, i = 2 },
{ x = 94, y = 36, i = 5 },
{ x = 94, y = 46, i = 8 },
-- D
{ x = 122, y = 26, i = 3 },
{ x = 122, y = 36, i = 6 },
--{ x = 122, y = 46, i = 9 },
},
},
{
title = "Rates",
text = {
{ t = "RC", x = 65, y = 11, to = SMLSIZE },
{ t = "Rate", x = 65, y = 18, to = SMLSIZE },
{ t = "Super", x = 91, y = 11, to = SMLSIZE },
{ t = "Rate", x = 91, y = 18, to = SMLSIZE },
{ t = "RC", x = 121, y = 11, to = SMLSIZE },
{ t = "Expo", x = 121, y = 18, to = SMLSIZE },
{ t = "ROLL", x = 25, y = 26 },
{ t = "PITCH", x = 25, y = 36 },
{ t = "YAW", x = 25, y = 46 },
},
fields = {
-- RC Rate
{ x = 66, y = 31, i = 1 },
{ x = 66, y = 46, i = 12 },
-- Super Rate
{ x = 94, y = 26, i = 3 },
{ x = 94, y = 36, i = 4 },
{ x = 94, y = 46, i = 5 },
-- RC Expo
{ x = 122, y = 31, i = 2 },
{ x = 122, y = 46, i = 11 },
},
},
{
title = "VTX",
text = {},
fields = {
-- Super Rate
{ t = "Band", x = 25, y = 14, sp = 50, i=2, min=1, max=5, table = { "A", "B", "E", "F", "R" } },
{ t = "Channel", x = 25, y = 24, sp = 50, i=3, min=1, max=8 },
{ t = "Power", x = 25, y = 34, sp = 50, i=4, min=1 },
{ t = "Pit", x = 25, y = 44, sp = 50, i=5, min=0, max=1, table = { [0]="OFF", "ON" } },
{ t = "Dev", x = 100, y = 14, sp = 32, i=1, ro=true, table = {[3]="SmartAudio",[4]="Tramp",[255]="None"} },
{ t = "Freq", x = 100, y = 24, sp = 32, i="f", ro=true },
},
}
}
MenuBox = { x=40, y=12, w=120, x_offset=36, h_line=8, h_offset=3 }
SaveBox = { x=40, y=12, w=120, x_offset=4, h=30, h_offset=5 }
NoTelem = { 70, 55, "No Telemetry", BLINK }
local run_ui = assert(loadScript("/SCRIPTS/BF/ui.lua"))()
return {run=run_ui}