Insert a calibration complete step and move bmp to folder (#3819)

This commit is contained in:
3djc
2016-09-17 21:50:25 +02:00
committed by Bertrand Songis
parent 91cea45a43
commit 3107bbb88b
14 changed files with 18 additions and 13 deletions
+18 -13
View File
@@ -158,7 +158,7 @@ local function refreshNext()
if fieldId == 0x9D then if fieldId == 0x9D then
refreshState = 0 refreshState = 0
calibrationState = 0 calibrationState = 0
calibrationStep = (calibrationStep + 1) % 6 calibrationStep = (calibrationStep + 1) % 7
end end
else else
local field = fields[refreshIndex + 1] local field = fields[refreshIndex + 1]
@@ -230,8 +230,8 @@ local function runFieldsPage(event)
return 0 return 0
end end
local wingBitmaps = { "plane.bmp", "delta.bmp", "vtail.bmp" } local wingBitmaps = { "bmp/plane.bmp", "bmp/delta.bmp", "bmp/vtail.bmp" }
local mountBitmaps = { "horz.bmp", "horz-r.bmp", "vert.bmp", "vert-r.bmp" } local mountBitmaps = { "bmp/horz.bmp", "bmp/horz-r.bmp", "bmp/vert.bmp", "bmp/vert-r.bmp" }
local function runConfigPage(event) local function runConfigPage(event)
fields = configFields fields = configFields
@@ -259,17 +259,22 @@ local function runCalibrationPage(event)
end end
lcd.clear() lcd.clear()
lcd.drawScreenTitle("S6R", page, #pages) lcd.drawScreenTitle("S6R", page, #pages)
local position = calibrationPositions[1 + calibrationStep] if(calibrationStep < 6) then
lcd.drawText(0, 9, "Turn the S6R " .. position, 0) local position = calibrationPositions[1 + calibrationStep]
lcd.drawPixmap(10, 19, position .. ".bmp") lcd.drawText(0, 9, "Turn the S6R " .. position, 0)
for index = 1, 3, 1 do lcd.drawPixmap(10, 19, "bmp/"..position .. ".bmp")
local field = fields[index] for index = 1, 3, 1 do
lcd.drawText(80, 12+10*index, field[1], 0) local field = fields[index]
lcd.drawNumber(90, 12+10*index, field[4]/10, LEFT+PREC2) lcd.drawText(80, 12+10*index, field[1], 0)
end lcd.drawNumber(90, 12+10*index, field[4]/10, LEFT+PREC2)
end
local attr = calibrationState == 0 and INVERS or 0 local attr = calibrationState == 0 and INVERS or 0
lcd.drawText(0, 56, "Press [Enter] when ready", attr) lcd.drawText(0, 56, "Press [Enter] when ready", attr)
else
lcd.drawText(0, 9, "Calibration completed", 0)
lcd.drawText(0, 56, "Press [Enter] when ready", attr)
end
if event == EVT_ENTER_BREAK then if event == EVT_ENTER_BREAK then
calibrationState = 1 calibrationState = 1
elseif event == EVT_EXIT_BREAK then elseif event == EVT_EXIT_BREAK then

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB