Skip to content

Commit

Permalink
Merge pull request #38 from ethomas997/etsaveSettingsMods
Browse files Browse the repository at this point in the history
Issues with 'saveSettings'
  • Loading branch information
codecae authored Oct 30, 2017
2 parents 8b01d94 + 4f1eeee commit 86c2e56
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/SCRIPTS/BF/protocols.lua
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ supportedProtocols =
maxTxBufferSize = 6,
maxRxBufferSize = 6,
saveMaxRetries = 2,
saveTimeout = 150
saveTimeout = 300
},
crsf =
{
Expand Down
10 changes: 9 additions & 1 deletion src/SCRIPTS/BF/ui.lua
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ local function processMspReply(cmd,rx_buf)
if cmd == Page.write then
if Page.eepromWrite then
eepromWrite()
else
invalidatePages()
currentState = pageStatus.display
saveTS = 0
end
pageRequested = false
return
Expand Down Expand Up @@ -356,7 +360,11 @@ function run_ui(event)
elseif currentState == pageStatus.saving then
lcd.drawFilledRectangle(SaveBox.x,SaveBox.y,SaveBox.w,SaveBox.h,backgroundFill)
lcd.drawRectangle(SaveBox.x,SaveBox.y,SaveBox.w,SaveBox.h,SOLID)
lcd.drawText(SaveBox.x+SaveBox.x_offset,SaveBox.y+SaveBox.h_offset,"Saving...",DBLSIZE + BLINK + (globalTextOptions))
if saveRetries <= 0 then
lcd.drawText(SaveBox.x+SaveBox.x_offset,SaveBox.y+SaveBox.h_offset,"Saving...",DBLSIZE + BLINK + (globalTextOptions))
else
lcd.drawText(SaveBox.x+SaveBox.x_offset,SaveBox.y+SaveBox.h_offset,"Retrying",DBLSIZE + (globalTextOptions))
end
end
processMspReply(mspPollReply())
return 0
Expand Down

0 comments on commit 86c2e56

Please sign in to comment.