Open
Conversation
get_phase_lock(synth) had the bit masks for synths A & B backwards -- get_phase_lock(SYNTH_A) would return the lock status of SYNTH_B and vice versa. This commit brings the code in line with the valon register spec.
TCFLSH was removed in Linux v4.6.2. Using th TC*FLUSH ioctl value also allows compilation on BSD and Mac.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This merges a few pending pull requests, does some general cleanup of the Python code, adds a Python script to show a usage example, and adds a Python specific README.
Not all of the pending pull requests are merged; we've done some cherry-picking, and made an attempt of cleaning up the commits before applying. Apologies to the original pull request submitters if they feel we've overstepped boundaries.
The first commit that is our own work modifies
Serial.cc <http://Serial.cc>to allow it being built on recent Linux versions. The last traces of theTCFLSHioctl appears in Linux v4.6.1, after which it appears to be completely removed from the Linux source tree. The use ofTCIFLUSHandTCIOFLUSHtries to match the original intent as expressed in the accompanying comments.The next 3 or so commits does some clean-up of the code, removing trailing whitespace and adds some additional information to the docstrings.
We update the
__credits__invalon_synth.py, and then fix thepyserialAPI usage, as this seems to have changed since the original writing of the code.An example script is added, which does a sweep across the bandwidth range. It contains
raw_inputcalls to allow the user time to verify the result with an oscilloscope or spectrum analyser. As an aside, if your intent is to check the comms and hitting Enter repeatedly is annoying, one can add a line withraw_intput = lambda _: Noneat the top of themain()function to suppress the "Enter" prompts.Some cleanup of the exception handing as added by one of the pending pull requests is done. We also add an option to
valon_synth.pyto allow the user to check the checksum as included in the serial comms. However, the error reporting in_verify_checksum()could possibly do with a rework.Finally, we add a Python specific README, based on some documentation we distributed to local users of the ValonSynth software.