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

Incorrect waveform length when using multiple invocations of "pigs wvag ..." #223

Closed
phlipped opened this issue Jul 11, 2018 · 0 comments
Closed
Assignees
Labels
bug W/A Work-around available

Comments

@phlipped
Copy link
Contributor

phlipped commented Jul 11, 2018

When building a waveform using successive calls to "pigs wvag ...", the length of the waveform will sometimes be shorter than expected.

It appears that the total length of the wave form is (incorrectly) determined by using the delay of the final pulse in the waveform. If an earlier pulse has a very long delay, that delay will be ignored.

(underscore indicates delay)
Pulses A:  A1________A2_____________  # pigs wvag 1 0 10 0 1 15
Pulses B:  _____B1________B2__        # pigs wvag 0 0 5 2 0 10 0 2 4
----------------------------------------------
Expected:  A1___B1___A2___B2________
Actual:    A1___B1___A2___B2__

Example:

$ pigs wvclr
$ pigs wvsm 0
0
$ pigs wvag 1 0 10 0 1 15
2
$ pigs wvsm 0
25
$ pigs wvag 0 0 5 2 0 10 0 2 4
4
$ pigs wvsm 0
19

The issue is fairly easy worked around by making sure all pulse sets have the same total length, but nonetheless looks like a bug to me.

This also occurs when using pigpiod socket interface. I haven't tested with the C library directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug W/A Work-around available
Projects
None yet
Development

No branches or pull requests

2 participants