Skip to content

Conversation

codecae
Copy link
Member

@codecae codecae commented Nov 15, 2017

Using a comment to "soft" revert the background function. I, as well as a few other users, have found that it seems to be preventing access to the telemetry buffer.

@codecae codecae merged commit 21ffcd2 into betaflight:master Nov 15, 2017
@codecae
Copy link
Member Author

codecae commented Nov 15, 2017

@mikeller @raphaelcoeffic

Exhibited behavior:
The background function appears to be hogging the telemetry buffer. It begins running when the model is loaded and immediately prevents script access to the telemetry buffer. Both one-time and telemetry scripts such as crossfire.lua and bf.lua are affected. Consequently, no msp or crsf requests for device configuration are being sent through the transport layer.

Steps to reproduce on a x9d+:

  1. disable the 'bf' telemetry screen
  2. build and then copy the scripts from commit 2443fbf to the SD. Don't enable the 'bf' telemetry screen right away when restarting.
    2a) if you have CRSF, you can confirm that the telemetry buffer is available by running the crossfire.lua script before configuring the 'bf' telemetry screen.
  3. enable the 'bf' telemetry screen in opentx
  4. Hold page to open the telemetry screen and no values will appear on any of the pages.
    4b) if you have CRSF, attempting to run the crossfire.lua at this point results it "Waiting for Crossfire devices..."
  5. disable the 'bf' telemetry screen and boot into bootloader mode.
  6. build and copy the scripts from commit 21ffcd2 to the SD. Don't enable the 'bf' telemetry screen right away after restarting.
    6b) if you have CRSF, run the crossfire.lua script and you will see that the buffer is available
  7. enable the 'bf' telemetry screen in opentx
  8. invoke the telemetry screen and you will now see that values are available.
    8b) if you have CRSF, run the crossfire.lua script and you will see that it no longer says "Waiting for Crossfire devices..."
@mikeller
Copy link
Member

Unable to reproduce this here with OpenTx 2.2, unless the crossfire.lua script is run, so it looks like it is the crossfire.lua script that is causing this.

@codecae
Copy link
Member Author

codecae commented Nov 15, 2017

I can recreate the issue without ever running crossfire.lua, as well.

@raphaelcoeffic
Copy link
Member

raphaelcoeffic commented Nov 15, 2017

@mikeller @codecae I just looked up something in the opentx code, and it seems that a single call to crossfireTelemetryPush (with parameters, not the empty call) can block the telemetry output buffer (there is only one shared by crossfire & smartport) for ever, IF the Tx is not using a crossfire module.

@basdelfos
Copy link
Contributor

Can not reproduce this also (don't have the crossfire.lua running). Have been using the bf lua scripts with background process running without any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants