Handling of COMMAND-parameters: what to do if CONFIRMATION_NEEDED of the device does not come through?
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 38/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- lua
- Domain
- embedded-iot
Research direction
No files or tests are named; start with the COMMAND-parameter state machine on the unified-lua-lsp branch and trace statuses 0x01, 0x03, 0x04, 0x05, and 0x06. Compare the Lua behavior with the CRSF queue and the provided radio traces. Done means the expected poll behavior is established and the Lua handles a missing confirmation without incorrectly treating the device as ready.
Written by the indexing model from the issue text.
Description
This refers to the new unified-lua-lsp branch!
There are problems with teh state-machine of COMMAND-parameters.
The LUA starts the command sending a parameter write (0x2d) and status 0x01.
The devices answers with confirmation_needed (0x03).
Now sometimes (mostly on b&w radio) the LUA shows the dialog with the info-text and sends (status 0x04) if confirmed or (status 0x05) if canceled.
But sometimes and mostly on colorLCD (TX16SMK3) it sends out a poll (0x06) although no timeout set (timeout = 0x00) for the command-parameter
This looks to me as if the answer (0x03) is lost (maybe ota or overwritten in the EdgeTx crsf-queue) and the LUA uses some small timeout and starts polling.
It polls then two times and the device responds allways with (ready 0x00), since this is unexpected.
So, is this the expected behaviour?
How should the device respond to the poll (0x06) if it expects a confirm (0x04) or a cancel (0x05)?
Should it again send a confirmation_needed (0x03)?
Edit: I don't think the confirmation_needed(0x03) is lost ota since it works with TBS Agent. Therefore the reason might be that the answer gets lost for the LUA due to too fast / too slow script loop?
- Dominant language
- Lua
- Stars
- 13
- Forks
- 6
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 10
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ExpressLRS/Lua
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
ExpressLRS/Lua#32 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
ExpressLRS/Lua#17 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
ExpressLRS/Lua#11 ·
Similar issues
-
documentation feature-request mini.completion
Difficulty 1/5 Under an hour Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
fluent/fluent-bit-docs#2727 ·
-
OS:Windows
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
api7/lua-resty-saml#62 ·