Skip to content

Commit 3d261d1

Browse files
author
Joerg-D. Rothfuchs
committed
changed design of PIDs and Rates to make it look more like as in betaflight
1 parent 46b9c7d commit 3d261d1

File tree

2 files changed

+41
-30
lines changed

2 files changed

+41
-30
lines changed

X7.lua

Lines changed: 36 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,52 @@ SetupPages = {
22
{
33
title = "PIDs",
44
text = {
5-
{ t = "Roll", x = 1, y = 12 },
6-
{ t = "Pitch", x = 43, y = 12 },
7-
{ t = "Yaw", x = 85, y = 12 },
5+
{ t = "P", x = 48, y = 14 },
6+
{ t = "I", x = 76, y = 14 },
7+
{ t = "D", x = 104, y = 14 },
8+
{ t = "ROLL", x = 1, y = 26 },
9+
{ t = "PITCH", x = 1, y = 36 },
10+
{ t = "YAW", x = 1, y = 46 },
811
},
912
fields = {
10-
-- ROLL
11-
{ t = "P", x = 1, y = 24, i=1 },
12-
{ t = "I", x = 1, y = 34, i=2 },
13-
{ t = "D", x = 1, y = 44, i=3 },
14-
-- PITCH
15-
{ t = "P", x = 43, y = 24, i=4 },
16-
{ t = "I", x = 43, y = 34, i=5 },
17-
{ t = "D", x = 43, y = 44, i=6 },
18-
-- YAW
19-
{ t = "P", x = 85, y = 24, i=7 },
20-
{ t = "I", x = 85, y = 34, i=8 },
21-
--{ t = "D", x = 85, y = 44, i=9 },
13+
-- P
14+
{ x = 42, y = 26, i = 1 },
15+
{ x = 42, y = 36, i = 4 },
16+
{ x = 42, y = 46, i = 7 },
17+
-- I
18+
{ x = 70, y = 26, i = 2 },
19+
{ x = 70, y = 36, i = 5 },
20+
{ x = 70, y = 46, i = 8 },
21+
-- D
22+
{ x = 98, y = 26, i = 3 },
23+
{ x = 98, y = 36, i = 6 },
24+
--{ x = 98, y = 46, i = 9 },
2225
},
2326
},
2427
{
2528
title = "Rates",
2629
text = {
27-
{ t = "S-Rates", x = 8, y = 12 },
28-
{ t = "RC", x = 62, y = 12 },
29-
{ t = "Expo", x = 86, y = 12 },
30+
{ t = "RC", x = 41, y = 11, to = SMLSIZE },
31+
{ t = "Rate", x = 41, y = 18, to = SMLSIZE },
32+
{ t = "Super", x = 67, y = 11, to = SMLSIZE },
33+
{ t = "Rate", x = 67, y = 18, to = SMLSIZE },
34+
{ t = "RC", x = 97, y = 11, to = SMLSIZE },
35+
{ t = "Expo", x = 97, y = 18, to = SMLSIZE },
36+
{ t = "ROLL", x = 1, y = 26 },
37+
{ t = "PITCH", x = 1, y = 36 },
38+
{ t = "YAW", x = 1, y = 46 },
3039
},
3140
fields = {
41+
-- RC Rate
42+
{ x = 42, y = 31, i = 1 },
43+
{ x = 42, y = 46, i = 12 },
3244
-- Super Rate
33-
{ t = "R", x = 1, y = 24, i=3 },
34-
{ t = "P", x = 1, y = 34, i=4 },
35-
36-
-- Roll + Pitch
37-
{ x = 60, y = 29, i=1 },
38-
{ x = 90, y = 29, i=2 },
39-
40-
-- Yaw
41-
{ t = "Y", x = 1, y = 44, i=5 },
42-
{ x = 60, y = 44, i=12 },
43-
{ x = 90, y = 44, i=11 },
45+
{ x = 70, y = 26, i = 3 },
46+
{ x = 70, y = 36, i = 4 },
47+
{ x = 70, y = 46, i = 5 },
48+
-- RC Expo
49+
{ x = 98, y = 31, i = 2 },
50+
{ x = 98, y = 46, i = 11 },
4451
},
4552
},
4653
{

common/ui.lua

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,11 @@ local function drawScreen(page,page_locked)
170170

171171
for i=1,#(page.text) do
172172
local f = page.text[i]
173-
lcd.drawText(f.x, f.y, f.t, globalTextOptions)
173+
if f.to == nil then
174+
lcd.drawText(f.x, f.y, f.t, globalTextOptions)
175+
else
176+
lcd.drawText(f.x, f.y, f.t, f.to)
177+
end
174178
end
175179

176180
for i=1,#(page.fields) do

0 commit comments

Comments
 (0)