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

Newer models have more bits and samples, requiring slight format change #2

Open
untaut opened this issue Jun 28, 2016 · 0 comments
Open

Comments

@untaut
Copy link

untaut commented Jun 28, 2016

The manual on disc sent with the model I just acquired says 12 bits and 2048 samples/wave, and the existing code uploads, but makes corrupt waveforms.

I played around with the update format and figured out that, simply enough, there are still 16 slices but each gets twice as many points. Also, the range is now larger than 0..255. Here is the rudimentary hack to setwave5200.awk to achieve this:

        #printf("%d",$i);  # Used to be this
        printf("%d,%d",$i*15,$i*15);  # print twice because
        # my unit is 12 bits per sample and 2048 samples per wave
        # The constant is 15 because mul by 16 doesn't work...

There is no version number that I could find on the manual or unit. The correct fix would probably be somehow query the unit to figure out the version, but I don't know how to do that and can't test it.

I guess that this it only works for early versions could anyway be mentioned in README.md.

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

No branches or pull requests

1 participant