Merge pull request #3906 from opentx/3djc/S6R-improvement

Use a less controversial wording + performance fixes.
This commit is contained in:
3djc
2016-10-15 10:22:39 +02:00
committed by GitHub
2 changed files with 8 additions and 8 deletions
+5 -4
View File
@@ -240,6 +240,7 @@ end
local wingBitmaps = { Bitmap.open("img/plane_b.png"), Bitmap.open("img/delta_b.png"), Bitmap.open("img/planev_b.png") }
local mountBitmaps = { Bitmap.open("img/up.png"), Bitmap.open("img/down.png"), Bitmap.open("img/vert.png"), Bitmap.open("img/vert-r.png") }
local calibBitmaps = { Bitmap.open("img/up.png"), Bitmap.open("img/down.png"), Bitmap.open("img/left.png"), Bitmap.open("img/right.png"), Bitmap.open("img/forward.png"), Bitmap.open("img/back.png") }
local function runConfigPage(event)
fields = configFields
@@ -271,12 +272,12 @@ local function runCalibrationPage(event)
drawScreenTitle("S6R", page, #pages)
if(calibrationStep < 6) then
local position = calibrationPositions[1 + calibrationStep]
lcd.drawText(200, 50, "Turn the S6R " .. position, TEXT_COLOR)
lcd.drawBitmap(Bitmap.open("img/"..position .. ".png"), 200, 70)
lcd.drawText(100, 50, "Place the S6R in the following position", TEXT_COLOR)
lcd.drawBitmap(calibBitmaps[calibrationStep + 1], 200, 70)
for index = 1, 3, 1 do
local field = fields[index]
lcd.drawText(80, 50+20*index, field[1]..":", TEXT_COLOR)
lcd.drawNumber(100, 50+20*index, field[4]/10, LEFT+PREC2)
lcd.drawText(70, 80+20*index, field[1]..":", TEXT_COLOR)
lcd.drawNumber(90, 80+20*index, field[4]/10, LEFT+PREC2)
end
local attr = calibrationState == 0 and INVERS or 0
@@ -193,7 +193,7 @@ local function runFieldsPage(event)
return 0
end
local calibrationPositions = { "up", "down", "left", "right", "forward", "back" }
local calibrationPositionsBitmaps = { "bmp/up.bmp", "bmp/down.bmp", "bmp/left.bmp", "bmp/right.bmp", "bmp/forward.bmp", "bmp/back.bmp" }
local function runCalibrationPage(event)
fields = calibrationFields
@@ -203,9 +203,8 @@ local function runCalibrationPage(event)
lcd.clear()
lcd.drawScreenTitle("S6R", page, #pages)
if(calibrationStep < 6) then
local position = calibrationPositions[1 + calibrationStep]
lcd.drawText(0, 9, "Turn the S6R " .. position, 0)
lcd.drawPixmap(10, 19, "bmp/"..position .. ".bmp")
lcd.drawText(0, 9, "Turn the S6R as shown", 0)
lcd.drawPixmap(10, 19, calibrationPositionsBitmaps[1 + calibrationStep])
for index = 1, 3, 1 do
local field = fields[index]
lcd.drawText(80, 12+10*index, field[1], 0)