@@ -169,7 +169,7 @@ local function drawScreenTitle(screenTitle)
169
169
lcd .drawFilledRectangle (0 , 0 , LCD_W , 30 , TITLE_BGCOLOR )
170
170
lcd .drawText (5 ,5 ,screenTitle , MENU_TITLE_COLOR )
171
171
else
172
- lcd .drawFilledRectangle (0 , 0 , LCD_W , 10 )
172
+ lcd .drawFilledRectangle (0 , 0 , LCD_W , 10 , FORCE )
173
173
lcd .drawText (1 ,1 ,screenTitle ,INVERS )
174
174
end
175
175
end
@@ -179,7 +179,6 @@ local function drawScreen()
179
179
local yMaxLim = radio .yMaxLimit
180
180
local currentFieldY = Page .fields [currentField ].y
181
181
local textOptions = radio .textSize + globalTextOptions
182
- drawScreenTitle (" Betaflight / " .. Page .title )
183
182
if currentFieldY <= Page .fields [1 ].y then
184
183
pageScrollY = 0
185
184
elseif currentFieldY - pageScrollY <= yMinLim then
@@ -190,7 +189,7 @@ local function drawScreen()
190
189
for i = 1 ,# Page .labels do
191
190
local f = Page .labels [i ]
192
191
local y = f .y - pageScrollY
193
- if y >= yMinLim and y <= yMaxLim then
192
+ if y >= 0 and y <= LCD_H then
194
193
lcd .drawText (f .x , y , f .t , textOptions )
195
194
end
196
195
end
@@ -214,13 +213,14 @@ local function drawScreen()
214
213
end
215
214
end
216
215
local y = f .y - pageScrollY
217
- if y >= yMinLim and y <= yMaxLim then
216
+ if y >= 0 and y <= LCD_H then
218
217
if f .t then
219
218
lcd .drawText (f .x , y , f .t , textOptions )
220
219
end
221
220
lcd .drawText (f .sp or f .x , y , val , valueOptions )
222
221
end
223
222
end
223
+ drawScreenTitle (" Betaflight / " .. Page .title )
224
224
end
225
225
226
226
local function incValue (inc )
@@ -282,7 +282,6 @@ local function run_ui(event)
282
282
uiState = uiStatus .pages
283
283
end
284
284
lcd .clear ()
285
- drawScreenTitle (" Betaflight Config" )
286
285
local yMinLim = radio .yMinLimit
287
286
local yMaxLim = radio .yMaxLimit
288
287
local lineSpacing = 10
@@ -300,10 +299,11 @@ local function run_ui(event)
300
299
for i = 1 , # PageFiles do
301
300
local attr = currentPage == i and INVERS or 0
302
301
local y = (i - 1 )* lineSpacing + yMinLim - mainMenuScrollY
303
- if y >= yMinLim and y <= yMaxLim then
302
+ if y >= 0 and y <= LCD_H then
304
303
lcd .drawText (6 , y , PageFiles [i ].title , attr )
305
304
end
306
305
end
306
+ drawScreenTitle (" Betaflight Config" )
307
307
elseif uiState == uiStatus .pages then
308
308
if pageState == pageStatus .saving then
309
309
if saveTS + saveTimeout < getTime () then
0 commit comments