Skip to content

Commit 86c2e56

Browse files
authored
Merge pull request #38 from ethomas997/etsaveSettingsMods
Issues with 'saveSettings'
2 parents 8b01d94 + 4f1eeee commit 86c2e56

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/SCRIPTS/BF/protocols.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ supportedProtocols =
99
maxTxBufferSize = 6,
1010
maxRxBufferSize = 6,
1111
saveMaxRetries = 2,
12-
saveTimeout = 150
12+
saveTimeout = 300
1313
},
1414
crsf =
1515
{

src/SCRIPTS/BF/ui.lua

+9-1
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ local function processMspReply(cmd,rx_buf)
8989
if cmd == Page.write then
9090
if Page.eepromWrite then
9191
eepromWrite()
92+
else
93+
invalidatePages()
94+
currentState = pageStatus.display
95+
saveTS = 0
9296
end
9397
pageRequested = false
9498
return
@@ -356,7 +360,11 @@ function run_ui(event)
356360
elseif currentState == pageStatus.saving then
357361
lcd.drawFilledRectangle(SaveBox.x,SaveBox.y,SaveBox.w,SaveBox.h,backgroundFill)
358362
lcd.drawRectangle(SaveBox.x,SaveBox.y,SaveBox.w,SaveBox.h,SOLID)
359-
lcd.drawText(SaveBox.x+SaveBox.x_offset,SaveBox.y+SaveBox.h_offset,"Saving...",DBLSIZE + BLINK + (globalTextOptions))
363+
if saveRetries <= 0 then
364+
lcd.drawText(SaveBox.x+SaveBox.x_offset,SaveBox.y+SaveBox.h_offset,"Saving...",DBLSIZE + BLINK + (globalTextOptions))
365+
else
366+
lcd.drawText(SaveBox.x+SaveBox.x_offset,SaveBox.y+SaveBox.h_offset,"Retrying",DBLSIZE + (globalTextOptions))
367+
end
360368
end
361369
processMspReply(mspPollReply())
362370
return 0

0 commit comments

Comments
 (0)