Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
59 changes: 33 additions & 26 deletions Horus.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,49 @@ SetupPages = {
{
title = "PIDs",
text = {
{ t = "Roll", x = 60, y = 40 },
{ t = "Pitch", x = 160, y = 40 },
{ t = "Yaw", x = 260, y = 40 },
{ t = "P", x = 129, y = 68 },
{ t = "I", x = 209, y = 68 },
{ t = "D", x = 289, y = 68 },
{ t = "ROLL", x = 35, y = 96 },
{ t = "PITCH", x = 35, y = 124 },
{ t = "YAW", x = 35, y = 152 },
},
fields = {
-- ROLL
{ t = "P", x = 36, y = 68, sp=30, i=1 },
{ t = "I", x = 36, y = 96, sp=30, i=2 },
{ t = "D", x = 36, y = 124, sp=30, i=3 },
-- PITCH
{ t = "P", x = 136, y = 68, sp=34, i=4 },
{ t = "I", x = 136, y = 96, sp=34, i=5 },
{ t = "D", x = 136, y = 124, sp=34, i=6 },
-- YAW
{ t = "P", x = 236, y = 68, sp=30, i=7 },
{ t = "I", x = 236, y = 96, sp=30, i=8 },
-- P
{ x = 129, y = 96, i = 1 },
{ x = 129, y = 124, i = 4 },
{ x = 129, y = 152, i = 7 },
-- I
{ x = 209, y = 96, i = 2 },
{ x = 209, y = 124, i = 5 },
{ x = 209, y = 152, i = 8 },
-- D
{ x = 289, y = 96, i = 3 },
{ x = 289, y = 124, i = 6 },
--{ x = 289, y = 152, i = 9 },
},
},
{
title = "Rates",
text = {
{ t = "Super rates", x = 14, y = 40 },
{ t = "RC Rate", x = 100, y = 68 },
{ t = "Super Rate", x = 175, y = 68 },
{ t = "RC Expo", x = 280, y = 68 },
{ t = "ROLL", x = 35, y = 96 },
{ t = "PITCH", x = 35, y = 124 },
{ t = "YAW", x = 35, y = 152 },
},
fields = {
-- RC Rate
{ x = 129, y = 110, i = 1 },
{ x = 129, y = 152, i = 12 },
-- Super Rate
{ t = "Roll", x = 20, y = 68, sp = 76, i=3 },
{ t = "Pitch", x = 20, y = 96, sp = 76, i=4 },

-- Roll + Pitch
{ t = "RC Rate", x = 152, y = 80, sp = 94, i=1 },
{ t = "Expo", x = 294, y = 80, sp = 68, i=2 },

-- Yaw
{ t = "Yaw", x = 20, y = 128, sp = 76, i=5 },
{ t = "RC Rate", x = 152, y = 128, sp = 94, i=12 },
{ t = "Expo", x = 294, y = 128, sp = 68, i=11 },
{ x = 209, y = 96, i = 3 },
{ x = 209, y = 124, i = 4 },
{ x = 209, y = 152, i = 5 },
-- RC Expo
{ x = 289, y = 110, i = 2 },
{ x = 289, y = 152, i = 11 },
},
},
{
Expand Down
65 changes: 36 additions & 29 deletions X7.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,52 @@ SetupPages = {
{
title = "PIDs",
text = {
{ t = "Roll", x = 1, y = 12 },
{ t = "Pitch", x = 43, y = 12 },
{ t = "Yaw", x = 85, y = 12 },
{ t = "P", x = 48, y = 14 },
{ t = "I", x = 76, y = 14 },
{ t = "D", x = 104, y = 14 },
{ t = "ROLL", x = 1, y = 26 },
{ t = "PITCH", x = 1, y = 36 },
{ t = "YAW", x = 1, y = 46 },
},
fields = {
-- ROLL
{ t = "P", x = 1, y = 24, i=1 },
{ t = "I", x = 1, y = 34, i=2 },
{ t = "D", x = 1, y = 44, i=3 },
-- PITCH
{ t = "P", x = 43, y = 24, i=4 },
{ t = "I", x = 43, y = 34, i=5 },
{ t = "D", x = 43, y = 44, i=6 },
-- YAW
{ t = "P", x = 85, y = 24, i=7 },
{ t = "I", x = 85, y = 34, i=8 },
--{ t = "D", x = 85, y = 44, i=9 },
-- P
{ x = 42, y = 26, i = 1 },
{ x = 42, y = 36, i = 4 },
{ x = 42, y = 46, i = 7 },
-- I
{ x = 70, y = 26, i = 2 },
{ x = 70, y = 36, i = 5 },
{ x = 70, y = 46, i = 8 },
-- D
{ x = 98, y = 26, i = 3 },
{ x = 98, y = 36, i = 6 },
--{ x = 98, y = 46, i = 9 },
},
},
{
title = "Rates",
text = {
{ t = "S-Rates", x = 8, y = 12 },
{ t = "RC", x = 62, y = 12 },
{ t = "Expo", x = 86, y = 12 },
{ t = "RC", x = 41, y = 11, to = SMLSIZE },
{ t = "Rate", x = 41, y = 18, to = SMLSIZE },
{ t = "Super", x = 67, y = 11, to = SMLSIZE },
{ t = "Rate", x = 67, y = 18, to = SMLSIZE },
{ t = "RC", x = 97, y = 11, to = SMLSIZE },
{ t = "Expo", x = 97, y = 18, to = SMLSIZE },
{ t = "ROLL", x = 1, y = 26 },
{ t = "PITCH", x = 1, y = 36 },
{ t = "YAW", x = 1, y = 46 },
},
fields = {
-- RC Rate
{ x = 42, y = 31, i = 1 },
{ x = 42, y = 46, i = 12 },
-- Super Rate
{ t = "R", x = 1, y = 24, i=3 },
{ t = "P", x = 1, y = 34, i=4 },

-- Roll + Pitch
{ x = 60, y = 29, i=1 },
{ x = 90, y = 29, i=2 },

-- Yaw
{ t = "Y", x = 1, y = 44, i=5 },
{ x = 60, y = 44, i=12 },
{ x = 90, y = 44, i=11 },
{ x = 70, y = 26, i = 3 },
{ x = 70, y = 36, i = 4 },
{ x = 70, y = 46, i = 5 },
-- RC Expo
{ x = 98, y = 31, i = 2 },
{ x = 98, y = 46, i = 11 },
},
},
{
Expand Down
64 changes: 36 additions & 28 deletions X9.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,44 +2,52 @@ SetupPages = {
{
title = "PIDs",
text = {
{ t = "Roll", x = 21, y = 14 },
{ t = "Pitch", x = 75, y = 14 },
{ t = "Yaw", x = 129, y = 14 },
{ 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 = {
-- ROLL
{ t = "P", x = 25, y = 24 },
{ t = "I", x = 25, y = 34 },
{ t = "D", x = 25, y = 44 },
-- PITCH
{ t = "P", x = 80, y = 24 },
{ t = "I", x = 80, y = 34 },
{ t = "D", x = 80, y = 44 },
-- YAW
{ t = "P", x = 135, y = 24 },
{ t = "I", x = 135, y = 34 },
--{ t = "D", x = 135, y = 44, i=9 },
-- 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 = "Super rates", x = 5, y = 14 },
{ t = "RC", x = 80, y = 14 }
{ 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
{ t = "Roll", x = 10, y = 24, sp = 40, i=3 },
{ t = "Pitch", x = 10, y = 34, sp = 40, i=4 },

-- Roll + Pitch
{ t = "Rate", x = 75, y = 29, sp = 30, i=1 },
{ t = "Expo", x = 135, y = 29, sp = 30, i=2 },

-- Yaw
{ t = "Yaw", x = 10, y = 48, sp = 40, i=5 },
{ t = "Rate", x = 75, y = 48, sp = 30, i=12 },
{ t = "Expo", x = 135, y = 48, sp = 30, i=11 },
{ 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 },
},
},
{
Expand Down
8 changes: 6 additions & 2 deletions common/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ local function requestPage(page)
end

function drawScreenTitle(screen_title)
lcd.drawFilledRectangle(0, 0, LCD_W, 10, SOLID)
lcd.drawFilledRectangle(0, 0, LCD_W, 10)
lcd.drawText(1,1,screen_title,INVERS)
end

Expand All @@ -170,7 +170,11 @@ local function drawScreen(page,page_locked)

for i=1,#(page.text) do
local f = page.text[i]
lcd.drawText(f.x, f.y, f.t, globalTextOptions)
if f.to == nil then
lcd.drawText(f.x, f.y, f.t, globalTextOptions)
else
lcd.drawText(f.x, f.y, f.t, f.to)
end
end

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