@@ -169,7 +169,7 @@ local function drawScreenTitle(screenTitle)
169169 lcd.drawFilledRectangle(0, 0, LCD_W, 30, TITLE_BGCOLOR)
170170 lcd.drawText(5,5,screenTitle, MENU_TITLE_COLOR)
171171 else
172- lcd.drawFilledRectangle(0, 0, LCD_W, 10)
172+ lcd.drawFilledRectangle(0, 0, LCD_W, 10, FORCE )
173173 lcd.drawText(1,1,screenTitle,INVERS)
174174 end
175175end
@@ -179,7 +179,6 @@ local function drawScreen()
179179 local yMaxLim = radio.yMaxLimit
180180 local currentFieldY = Page.fields[currentField].y
181181 local textOptions = radio.textSize + globalTextOptions
182- drawScreenTitle("Betaflight / "..Page.title)
183182 if currentFieldY <= Page.fields[1].y then
184183 pageScrollY = 0
185184 elseif currentFieldY - pageScrollY <= yMinLim then
@@ -190,7 +189,7 @@ local function drawScreen()
190189 for i=1,#Page.labels do
191190 local f = Page.labels[i]
192191 local y = f.y - pageScrollY
193- if y >= yMinLim and y <= yMaxLim then
192+ if y >= 0 and y <= LCD_H then
194193 lcd.drawText(f.x, y, f.t, textOptions)
195194 end
196195 end
@@ -214,13 +213,14 @@ local function drawScreen()
214213 end
215214 end
216215 local y = f.y - pageScrollY
217- if y >= yMinLim and y <= yMaxLim then
216+ if y >= 0 and y <= LCD_H then
218217 if f.t then
219218 lcd.drawText(f.x, y, f.t, textOptions)
220219 end
221220 lcd.drawText(f.sp or f.x, y, val, valueOptions)
222221 end
223222 end
223+ drawScreenTitle("Betaflight / "..Page.title)
224224end
225225
226226local function incValue(inc)
@@ -282,7 +282,6 @@ local function run_ui(event)
282282 uiState = uiStatus.pages
283283 end
284284 lcd.clear()
285- drawScreenTitle("Betaflight Config")
286285 local yMinLim = radio.yMinLimit
287286 local yMaxLim = radio.yMaxLimit
288287 local lineSpacing = 10
@@ -300,10 +299,11 @@ local function run_ui(event)
300299 for i=1, #PageFiles do
301300 local attr = currentPage == i and INVERS or 0
302301 local y = (i-1)*lineSpacing + yMinLim - mainMenuScrollY
303- if y >= yMinLim and y <= yMaxLim then
302+ if y >= 0 and y <= LCD_H then
304303 lcd.drawText(6, y, PageFiles[i].title, attr)
305304 end
306305 end
306+ drawScreenTitle("Betaflight Config")
307307 elseif uiState == uiStatus.pages then
308308 if pageState == pageStatus.saving then
309309 if saveTS + saveTimeout < getTime() then
0 commit comments