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

Testing #336

Merged
merged 4 commits into from
Oct 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

v0.3.8
------

- Restore column layout on start
- Support for Nanovna-F V2
- Fixes a crash with S21 hack

v0.3.7
------

Expand Down
2 changes: 1 addition & 1 deletion NanoVNASaver/About.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.

VERSION = "0.3.8-dev"
VERSION = "0.3.8-pre03"
VERSION_URL = (
"https://raw.githubusercontent.com/"
"NanoVNA-Saver/nanovna-saver/master/NanoVNASaver/About.py")
Expand Down
11 changes: 6 additions & 5 deletions NanoVNASaver/Hardware/NanoVNA_V2.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ def readValues(self, value) -> List[str]:

# serial .read() will try to read nBytes bytes in timeout secs
arr = self.serial.read(nBytes)
if nBytes != len(arr) :
if nBytes != len(arr):
logger.warning("expected %d bytes, got %d",
nBytes, len(arr))
nBytes, len(arr))
# the way to retry on timeout is keep the data already read
# then try to read the rest of the data into the array
if nBytes > len(arr) :
if nBytes > len(arr):
arr = arr + self.serial.read(nBytes - len(arr))
if nBytes != len(arr) :
if nBytes != len(arr):
return []

freq_index = -1
Expand Down Expand Up @@ -227,7 +227,8 @@ def setSweep(self, start, stop):
def _updateSweep(self):
s21hack = "S21 hack" in self.features
cmd = pack("<BBQ", _CMD_WRITE8, _ADDR_SWEEP_START,
int(self.sweepStartHz - (self.sweepStepHz * s21hack)))
max(50000,
int(self.sweepStartHz - (self.sweepStepHz * s21hack))))
cmd += pack("<BBQ", _CMD_WRITE8,
_ADDR_SWEEP_STEP, int(self.sweepStepHz))
cmd += pack("<BBH", _CMD_WRITE2,
Expand Down
2 changes: 1 addition & 1 deletion NanoVNASaver/SweepWorker.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def readSegment(self, start, stop):
logger.debug("Read %s frequencies", len(frequencies))
values11 = self.readData("data 0")
values21 = self.readData("data 1")
if not (len(frequencies) == len(values11) == len(values21)):
if not len(frequencies) == len(values11) == len(values21):
logger.info("No valid data during this run")
return [], [], []
return frequencies, values11, values21
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
scipy==1.4.1
scipy
cython
pyqt5
pyserial
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
'pyserial',
'PyQt5',
'numpy',
'scipy<1.5',
'scipy',
'cython',
],
)