From 0c352eed6413c4f5dff96c9decd875de5d50d0ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Holger=20M=C3=BCller?= Date: Sun, 20 Jun 2021 13:16:18 +0200 Subject: [PATCH] v0.3.9 --- .gitattributes | 7 +++ CHANGELOG.md | 8 +++ NanoVNASaver/About.py | 2 +- NanoVNASaver/Hardware/NanoVNA_F_V2.py | 78 +++++++++++++-------------- 4 files changed, 55 insertions(+), 40 deletions(-) create mode 100644 .gitattributes diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..487e667 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,7 @@ +# Default for all text files +* text=auto whitespace=trailing-space,tab-in-indent,tabwidth=2 +*.py text=auto whitespace=trailing-space,tab-in-indent,tabwidth=4 + +# Denote all files that are truly binary and should not be modified. +*.png binary +*.jpg binary diff --git a/CHANGELOG.md b/CHANGELOG.md index 841431a..1ccc176 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,14 @@ Changelog ========= +v0.3.9 +------ + +- TX Power on V2 +- New analysis +- Magnitude Z Chart +- VSWR Chart improvements + v0.3.8 ------ diff --git a/NanoVNASaver/About.py b/NanoVNASaver/About.py index 3a8023b..ec59430 100644 --- a/NanoVNASaver/About.py +++ b/NanoVNASaver/About.py @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -VERSION = "0.3.9-rc01" +VERSION = "0.3.9" VERSION_URL = ( "https://raw.githubusercontent.com/" "NanoVNA-Saver/nanovna-saver/master/NanoVNASaver/About.py") diff --git a/NanoVNASaver/Hardware/NanoVNA_F_V2.py b/NanoVNASaver/Hardware/NanoVNA_F_V2.py index 15a0bd6..c3fcd92 100644 --- a/NanoVNASaver/Hardware/NanoVNA_F_V2.py +++ b/NanoVNASaver/Hardware/NanoVNA_F_V2.py @@ -1,39 +1,39 @@ -import logging -from NanoVNASaver.Hardware.Serial import drain_serial, Interface -import serial -import struct -import numpy as np -from PyQt5 import QtGui - -from NanoVNASaver.Hardware.NanoVNA import NanoVNA -from NanoVNASaver.Hardware.Serial import Interface - -logger = logging.getLogger(__name__) - - -class NanoVNA_F_V2(NanoVNA): - name = "NanoVNA-F_V2" - screenwidth = 800 - screenheight = 480 - - def __init__(self, iface: Interface): - super().__init__(iface) - self.sweep_max_freq_Hz = 3e9 - - def getScreenshot(self) -> QtGui.QPixmap: - logger.debug("Capturing screenshot...") - if not self.connected(): - return QtGui.QPixmap() - try: - rgba_array = self._capture_data() - image = QtGui.QImage( - rgba_array, - self.screenwidth, - self.screenheight, - QtGui.QImage.Format_RGB16) - logger.debug("Captured screenshot") - return QtGui.QPixmap(image) - except serial.SerialException as exc: - logger.exception( - "Exception while capturing screenshot: %s", exc) - return QtGui.QPixmap() +import logging +from NanoVNASaver.Hardware.Serial import drain_serial, Interface +import serial +import struct +import numpy as np +from PyQt5 import QtGui + +from NanoVNASaver.Hardware.NanoVNA import NanoVNA +from NanoVNASaver.Hardware.Serial import Interface + +logger = logging.getLogger(__name__) + + +class NanoVNA_F_V2(NanoVNA): + name = "NanoVNA-F_V2" + screenwidth = 800 + screenheight = 480 + + def __init__(self, iface: Interface): + super().__init__(iface) + self.sweep_max_freq_Hz = 3e9 + + def getScreenshot(self) -> QtGui.QPixmap: + logger.debug("Capturing screenshot...") + if not self.connected(): + return QtGui.QPixmap() + try: + rgba_array = self._capture_data() + image = QtGui.QImage( + rgba_array, + self.screenwidth, + self.screenheight, + QtGui.QImage.Format_RGB16) + logger.debug("Captured screenshot") + return QtGui.QPixmap(image) + except serial.SerialException as exc: + logger.exception( + "Exception while capturing screenshot: %s", exc) + return QtGui.QPixmap()