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

Enhanced through calibration #469

Merged
merged 30 commits into from
Apr 1, 2022
Merged

Enhanced through calibration #469

merged 30 commits into from
Apr 1, 2022

Conversation

zarath
Copy link
Collaborator

@zarath zarath commented Feb 18, 2022

No description provided.

Mauro Gaioni and others added 16 commits January 5, 2022 16:19
vswr of datapoint now returns inf instead of going negative
Add shebang and make nanovna-saver.py  executable
 - setup.cfg should now work flowlessly with fedoro 36 (#456)
 - github actions are updated to use more current software versions
…tage sweep is not always guaranteed to be an int
self.sweep_control.progress_bar.setValue() needs an int value, percen…
PA0JOZ Enhanced Response Correction
zarath and others added 5 commits February 18, 2022 20:16
The comparison operators (<, >, etc.) are not translated 1:1 to
customisation methods (__lt__, __gt__, ...) in Python. Instead the
type of the operands plays a role in determining on which of the two
sides the customisation method is invoked (see Python Language
Reference section 3.3.1 [1]). This means 'a > b' can end up invoking
b.__lt__(a) rather than a.__gt__(b).

This behaviour can causes infinite recursion in Version.__lt__():

2022-03-07 13:47:52,087 - NanoVNASaver.Hardware.NanoVNA_V2 - ERROR - Timeout reading version registers
Traceback (most recent call last):
  File "/home/sascha/nanovna-saver/NanoVNASaver/Controls/SerialControl.py", line 73, in serialButtonClick
    self.connect_device()
  File "/home/sascha/nanovna-saver/NanoVNASaver/Controls/SerialControl.py", line 93, in connect_device
    self.app.vna = get_VNA(self.interface)
  File "/home/sascha/nanovna-saver/NanoVNASaver/Hardware/Hardware.py", line 101, in get_VNA
    return NAME2DEVICE[iface.comment](iface)
  File "/home/sascha/nanovna-saver/NanoVNASaver/Hardware/NanoVNA_V2.py", line 76, in __init__
    super().__init__(iface)
  File "/home/sascha/nanovna-saver/NanoVNASaver/Hardware/VNA.py", line 71, in __init__
    self.read_features()
  File "/home/sascha/nanovna-saver/NanoVNASaver/Hardware/NanoVNA_V2.py", line 107, in read_features
    if self.board_revision >= Version("2.0.4"):
  File "/home/sascha/nanovna-saver/NanoVNASaver/Version.py", line 63, in __le__
    return self < other or self == other
  File "/home/sascha/nanovna-saver/NanoVNASaver/Version.py", line 57, in __lt__
    return other > self
  File "/home/sascha/nanovna-saver/NanoVNASaver/Version.py", line 57, in __lt__
    return other > self
  File "/home/sascha/nanovna-saver/NanoVNASaver/Version.py", line 57, in __lt__
    return other > self
  [Previous line repeated 491 more times]
RecursionError: maximum recursion depth exceeded in comparison

Fix it by explicitly invoking the customisation methods we expect.

[1] https://docs.python.org/3/reference/datamodel.html#object.__lt__
Version: avoid infinite recursion
zarath and others added 6 commits March 17, 2022 17:53
Add additional indentation to force code formatting of command lines. (Could use triple-backticks instead.)
Fix command-line formatting in README.md
@zarath
Copy link
Collaborator Author

zarath commented Apr 1, 2022

0.4.0 release

@zarath zarath closed this Apr 1, 2022
@zarath zarath reopened this Apr 1, 2022
@zarath zarath merged commit 582b442 into master Apr 1, 2022
@zarath zarath deleted the testing branch April 1, 2022 14:51
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

Successfully merging this pull request may close these issues.

None yet

4 participants