Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

driver/sigrok: add blocking capture methods, misc improvements to sigrok driver #1345

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

flxzt
Copy link

@flxzt flxzt commented Apr 2, 2024

Description

This adds blocking capture methods where capture time or number of
samples are specified in advance.

Some of the internals are refactored to allow for code re-use
and API documentation is added to clarify the usage of the sigrok driver.

Checklist

  • Documentation for the feature
  • Tests for the feature
  • The arguments and description in doc/configuration.rst have been updated
  • [-] Add a section on how to use the feature to doc/usage.rst
  • [-] Add a section on how to use the feature to doc/development.rst
  • PR has been tested
  • [-] Man pages have been regenerated

Also:
thanks for writing and maintaining labgrid as a open-source project, it's pretty awesome!

depends on #1346

@jluebbe
Copy link
Member

jluebbe commented Apr 2, 2024

Please split out the fixes to separate commits, or even better a separate PR.

apparently some versions of sigrok-cli on some distros (for example Ubuntu 22.04) default to false,
resulting in invalid parsing

Signed-off-by: Felix Zwettler <felix.zwettler@duagon.com>
…urce is remote

Signed-off-by: Felix Zwettler <felix.zwettler@duagon.com>
when specified filename is not absolute and using
a remote sigrok resource.

Usually when an absolute path is supplied as `filename`
the call `abs.path.join()` resolves to `filename`.
But when the file path is relative,
it resolves it to a relative path appended to the tmp dir,
instead of from where the user calls this method.

Signed-off-by: Felix Zwettler <felix.zwettler@duagon.com>
@flxzt
Copy link
Author

flxzt commented Apr 2, 2024

ok, done

@flxzt flxzt changed the title driver/sigrok: add blocking capture method, misc fixes and improvements to sigrok driver driver/sigrok: add blocking capture method, misc improvements to sigrok driver Apr 2, 2024
@flxzt flxzt changed the title driver/sigrok: add blocking capture method, misc improvements to sigrok driver driver/sigrok: add blocking capture methods, misc improvements to sigrok driver Apr 2, 2024
@flxzt flxzt force-pushed the sigrok-driver-improv branch 3 times, most recently from 3718d95 to 76a0b1e Compare April 4, 2024 16:59
@Emantor Emantor self-assigned this Apr 9, 2024
@Emantor
Copy link
Member

Emantor commented Apr 9, 2024

It looks like the documentation requires additional fixes.

@Emantor Emantor added the needs author info Requires more information from the PR/Issue author label Apr 9, 2024
@Emantor Emantor assigned flxzt and unassigned Emantor Apr 9, 2024
@flxzt
Copy link
Author

flxzt commented Apr 9, 2024

I think it should be all fixed now. Sorry about the force pushes, I kept forgetting to sign-off

flxzt added 3 commits May 6, 2024 16:05
The driver expected that the sigrok-cli is successful and starts
capturing in continuous mode. When the call is unsuccessful,
the driver then waited for the creation of the capture file forever.

Fixed by checking if the sigrok-cli process terminated prematurely
while waiting for the existence of the capture file.

Signed-off-by: Felix Zwettler <Felix.Zwettler@duagon.com>
…otely

the signal that is supposed to terminate the process SIGINT was not being propagated through ssh.
The driver waited for termination forever.

fixed by quitting sigrok-cli through an emulated keypress by sending a char over ssh.

Signed-off-by: Felix Zwettler <Felix.Zwettler@duagon.com>
…ver impl

This adds blocking capture methods where capture time or number of
samples are specified in advance.

Some of the internals are refactored to allow for code re-use
and API documentation is added to clarify the usage of the sigrok driver.

Signed-off-by: Felix Zwettler <felix.zwettler@duagon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs author info Requires more information from the PR/Issue author
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants