Repository navigation
Show the info text a command finishes with - #36
Conversation
A device that runs a command immediately may answer START with READY and an info text such as "OK" or "Failed" (see the TBS CRSF spec command sequence). The session dropped the command on READY and both UIs closed their popup, so the text was never seen. The session keeps a finished command's closing text in commandResult. Colour radios show it in a new Dialogs.showInfo dialog with a Close button, opened after the page rebuild so lvgl.clear() does not drop it. B&W radios show it in a popup closed by ENTER or EXIT. ELRS finishes commands with an empty info, so its commands are unchanged. The CRSF simulator RX gets a Reset Stats command that finishes at once with "OK". Fixes #17
|
Thank you very much. Looks good now!!! |
CapnBry
left a comment
There was a problem hiding this comment.
This does make sense to show for things that return info in their command conclusion.
showInfo is identical to buildExitDialog though except for the height (which is not a big deal if it is different), it says "Exit" vs "Close" (again, nobody would know the difference) and the screen is cleared before the exit dialog. The last one is the only thing that needs to be separate so both should use the same function to generate their dialogs I think?
I'm also not super-keen on functions that just take a table and you just need to figure out what to put in the table and what it is named and not misspell the names. I've worked on projects where things were just stored in dictionaries and passed dictionaries and it was a nightmare to work with. Super-flexible sure but the cost is a function signature being understandable vs a black box.
…sult-info # Conflicts: # src/SCRIPTS/CRSFSimulator/csrfsimulator.lua
showInfo and buildExitDialog built the same dialog, differing only in height and button label. Both now go through one buildDialog with a Close button and the default height; buildExitDialog keeps the lvgl.clear() before it. The Dialogs functions take positional arguments instead of an options table, so their signatures say what they need. showConfirm drops onCancel, which no caller passed. The CRSF simulator TX advertises 25 fields again; Reset Stats is an RX field only.
Fixes #17
A device that runs a command immediately may answer START with
READYand an info text such as "OK" or "Failed" (the last step of the TBS CRSF command sequence). The session dropped the command onREADYand both UIs closed their popup, so the text was never shown.commandResult.Dialogs.showInfodialog with a Close button, opened after the page rebuild solvgl.clear()doesn't drop it.Info sent with
PROGRESSandCONFIRMATION_NEEDEDwas already shown (executing page / confirm prompt); this covers the remainingREADYcase.Checked in the simulator:
Screenshots
TX16S
GX12
@wimalopaan, can you check this on your device?