Skip to content

Handling of COMMAND-parameters: what to do if CONFIRMATION_NEEDED of the device does not come through? #16

Description

@wimalopaan

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.

Image Image

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions