Add rotary encoder support (#3792)
This commit is contained in:
@@ -214,15 +214,15 @@ local function runFieldsPage(event)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
elseif edit then
|
elseif edit then
|
||||||
if event == EVT_PLUS_FIRST or event == EVT_PLUS_REPT then
|
if event == EVT_PLUS_FIRST or event == EVT_ROT_RIGHT or event == EVT_PLUS_REPT then
|
||||||
addField(1)
|
addField(1)
|
||||||
elseif event == EVT_MINUS_FIRST or event == EVT_MINUS_REPT then
|
elseif event == EVT_MINUS_FIRST or event == EVT_ROT_LEFT or event == EVT_MINUS_REPT then
|
||||||
addField(-1)
|
addField(-1)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if event == EVT_MINUS_FIRST then
|
if event == EVT_MINUS_FIRST or event == EVT_ROT_LEFT then
|
||||||
selectField(1)
|
selectField(1)
|
||||||
elseif event == EVT_PLUS_FIRST then
|
elseif event == EVT_PLUS_FIRST or event == EVT_ROT_RIGHT then
|
||||||
selectField(-1)
|
selectField(-1)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -241,7 +241,7 @@ local function runConfigPage(event)
|
|||||||
end
|
end
|
||||||
if fields[2][4] ~= nil then
|
if fields[2][4] ~= nil then
|
||||||
lcd.drawPixmap(128, 28, mountBitmaps[1 + fields[2][4]])
|
lcd.drawPixmap(128, 28, mountBitmaps[1 + fields[2][4]])
|
||||||
end
|
end
|
||||||
return result
|
return result
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -278,7 +278,7 @@ local function runCalibrationPage(event)
|
|||||||
else
|
else
|
||||||
return 2
|
return 2
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return 0
|
return 0
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user