Skip to content

Commit a894323

Browse files
Merge pull request #14 from JR63/changed_design
changed layout of PIDs and Rates to make it look more like as in beta…
2 parents 46b9c7d + f74050c commit a894323

File tree

4 files changed

+111
-85
lines changed

4 files changed

+111
-85
lines changed

Horus.lua

Lines changed: 33 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -2,42 +2,49 @@ SetupPages = {
22
{
33
title = "PIDs",
44
text = {
5-
{ t = "Roll", x = 60, y = 40 },
6-
{ t = "Pitch", x = 160, y = 40 },
7-
{ t = "Yaw", x = 260, y = 40 },
5+
{ t = "P", x = 129, y = 68 },
6+
{ t = "I", x = 209, y = 68 },
7+
{ t = "D", x = 289, y = 68 },
8+
{ t = "ROLL", x = 35, y = 96 },
9+
{ t = "PITCH", x = 35, y = 124 },
10+
{ t = "YAW", x = 35, y = 152 },
811
},
912
fields = {
10-
-- ROLL
11-
{ t = "P", x = 36, y = 68, sp=30, i=1 },
12-
{ t = "I", x = 36, y = 96, sp=30, i=2 },
13-
{ t = "D", x = 36, y = 124, sp=30, i=3 },
14-
-- PITCH
15-
{ t = "P", x = 136, y = 68, sp=34, i=4 },
16-
{ t = "I", x = 136, y = 96, sp=34, i=5 },
17-
{ t = "D", x = 136, y = 124, sp=34, i=6 },
18-
-- YAW
19-
{ t = "P", x = 236, y = 68, sp=30, i=7 },
20-
{ t = "I", x = 236, y = 96, sp=30, i=8 },
13+
-- P
14+
{ x = 129, y = 96, i = 1 },
15+
{ x = 129, y = 124, i = 4 },
16+
{ x = 129, y = 152, i = 7 },
17+
-- I
18+
{ x = 209, y = 96, i = 2 },
19+
{ x = 209, y = 124, i = 5 },
20+
{ x = 209, y = 152, i = 8 },
21+
-- D
22+
{ x = 289, y = 96, i = 3 },
23+
{ x = 289, y = 124, i = 6 },
24+
--{ x = 289, y = 152, i = 9 },
2125
},
2226
},
2327
{
2428
title = "Rates",
2529
text = {
26-
{ t = "Super rates", x = 14, y = 40 },
30+
{ t = "RC Rate", x = 100, y = 68 },
31+
{ t = "Super Rate", x = 175, y = 68 },
32+
{ t = "RC Expo", x = 280, y = 68 },
33+
{ t = "ROLL", x = 35, y = 96 },
34+
{ t = "PITCH", x = 35, y = 124 },
35+
{ t = "YAW", x = 35, y = 152 },
2736
},
2837
fields = {
38+
-- RC Rate
39+
{ x = 129, y = 110, i = 1 },
40+
{ x = 129, y = 152, i = 12 },
2941
-- Super Rate
30-
{ t = "Roll", x = 20, y = 68, sp = 76, i=3 },
31-
{ t = "Pitch", x = 20, y = 96, sp = 76, i=4 },
32-
33-
-- Roll + Pitch
34-
{ t = "RC Rate", x = 152, y = 80, sp = 94, i=1 },
35-
{ t = "Expo", x = 294, y = 80, sp = 68, i=2 },
36-
37-
-- Yaw
38-
{ t = "Yaw", x = 20, y = 128, sp = 76, i=5 },
39-
{ t = "RC Rate", x = 152, y = 128, sp = 94, i=12 },
40-
{ t = "Expo", x = 294, y = 128, sp = 68, i=11 },
42+
{ x = 209, y = 96, i = 3 },
43+
{ x = 209, y = 124, i = 4 },
44+
{ x = 209, y = 152, i = 5 },
45+
-- RC Expo
46+
{ x = 289, y = 110, i = 2 },
47+
{ x = 289, y = 152, i = 11 },
4148
},
4249
},
4350
{

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
{

X9.lua

Lines changed: 36 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,52 @@ SetupPages = {
22
{
33
title = "PIDs",
44
text = {
5-
{ t = "Roll", x = 21, y = 14 },
6-
{ t = "Pitch", x = 75, y = 14 },
7-
{ t = "Yaw", x = 129, y = 14 },
5+
{ t = "P", x = 72, y = 14 },
6+
{ t = "I", x = 100, y = 14 },
7+
{ t = "D", x = 128, y = 14 },
8+
{ t = "ROLL", x = 25, y = 26 },
9+
{ t = "PITCH", x = 25, y = 36 },
10+
{ t = "YAW", x = 25, y = 46 },
811
},
912
fields = {
10-
-- ROLL
11-
{ t = "P", x = 25, y = 24 },
12-
{ t = "I", x = 25, y = 34 },
13-
{ t = "D", x = 25, y = 44 },
14-
-- PITCH
15-
{ t = "P", x = 80, y = 24 },
16-
{ t = "I", x = 80, y = 34 },
17-
{ t = "D", x = 80, y = 44 },
18-
-- YAW
19-
{ t = "P", x = 135, y = 24 },
20-
{ t = "I", x = 135, y = 34 },
21-
--{ t = "D", x = 135, y = 44, i=9 },
13+
-- P
14+
{ x = 66, y = 26, i = 1 },
15+
{ x = 66, y = 36, i = 4 },
16+
{ x = 66, y = 46, i = 7 },
17+
-- I
18+
{ x = 94, y = 26, i = 2 },
19+
{ x = 94, y = 36, i = 5 },
20+
{ x = 94, y = 46, i = 8 },
21+
-- D
22+
{ x = 122, y = 26, i = 3 },
23+
{ x = 122, y = 36, i = 6 },
24+
--{ x = 122, y = 46, i = 9 },
2225
},
2326
},
2427
{
2528
title = "Rates",
2629
text = {
27-
{ t = "Super rates", x = 5, y = 14 },
28-
{ t = "RC", x = 80, y = 14 }
30+
{ t = "RC", x = 65, y = 11, to = SMLSIZE },
31+
{ t = "Rate", x = 65, y = 18, to = SMLSIZE },
32+
{ t = "Super", x = 91, y = 11, to = SMLSIZE },
33+
{ t = "Rate", x = 91, y = 18, to = SMLSIZE },
34+
{ t = "RC", x = 121, y = 11, to = SMLSIZE },
35+
{ t = "Expo", x = 121, y = 18, to = SMLSIZE },
36+
{ t = "ROLL", x = 25, y = 26 },
37+
{ t = "PITCH", x = 25, y = 36 },
38+
{ t = "YAW", x = 25, y = 46 },
2939
},
3040
fields = {
41+
-- RC Rate
42+
{ x = 66, y = 31, i = 1 },
43+
{ x = 66, y = 46, i = 12 },
3144
-- Super Rate
32-
{ t = "Roll", x = 10, y = 24, sp = 40, i=3 },
33-
{ t = "Pitch", x = 10, y = 34, sp = 40, i=4 },
34-
35-
-- Roll + Pitch
36-
{ t = "Rate", x = 75, y = 29, sp = 30, i=1 },
37-
{ t = "Expo", x = 135, y = 29, sp = 30, i=2 },
38-
39-
-- Yaw
40-
{ t = "Yaw", x = 10, y = 48, sp = 40, i=5 },
41-
{ t = "Rate", x = 75, y = 48, sp = 30, i=12 },
42-
{ t = "Expo", x = 135, y = 48, sp = 30, i=11 },
45+
{ x = 94, y = 26, i = 3 },
46+
{ x = 94, y = 36, i = 4 },
47+
{ x = 94, y = 46, i = 5 },
48+
-- RC Expo
49+
{ x = 122, y = 31, i = 2 },
50+
{ x = 122, y = 46, i = 11 },
4351
},
4452
},
4553
{

common/ui.lua

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ local function requestPage(page)
158158
end
159159

160160
function drawScreenTitle(screen_title)
161-
lcd.drawFilledRectangle(0, 0, LCD_W, 10, SOLID)
161+
lcd.drawFilledRectangle(0, 0, LCD_W, 10)
162162
lcd.drawText(1,1,screen_title,INVERS)
163163
end
164164

@@ -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)