pull/400/head
Holger Müller 2021-06-20 13:16:18 +02:00
rodzic 28c62b707a
commit 0c352eed64
4 zmienionych plików z 55 dodań i 40 usunięć

7
.gitattributes vendored 100644
Wyświetl plik

@ -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

Wyświetl plik

@ -1,6 +1,14 @@
Changelog Changelog
========= =========
v0.3.9
------
- TX Power on V2
- New analysis
- Magnitude Z Chart
- VSWR Chart improvements
v0.3.8 v0.3.8
------ ------

Wyświetl plik

@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
VERSION = "0.3.9-rc01" VERSION = "0.3.9"
VERSION_URL = ( VERSION_URL = (
"https://raw.githubusercontent.com/" "https://raw.githubusercontent.com/"
"NanoVNA-Saver/nanovna-saver/master/NanoVNASaver/About.py") "NanoVNA-Saver/nanovna-saver/master/NanoVNASaver/About.py")

Wyświetl plik

@ -1,39 +1,39 @@
import logging import logging
from NanoVNASaver.Hardware.Serial import drain_serial, Interface from NanoVNASaver.Hardware.Serial import drain_serial, Interface
import serial import serial
import struct import struct
import numpy as np import numpy as np
from PyQt5 import QtGui from PyQt5 import QtGui
from NanoVNASaver.Hardware.NanoVNA import NanoVNA from NanoVNASaver.Hardware.NanoVNA import NanoVNA
from NanoVNASaver.Hardware.Serial import Interface from NanoVNASaver.Hardware.Serial import Interface
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
class NanoVNA_F_V2(NanoVNA): class NanoVNA_F_V2(NanoVNA):
name = "NanoVNA-F_V2" name = "NanoVNA-F_V2"
screenwidth = 800 screenwidth = 800
screenheight = 480 screenheight = 480
def __init__(self, iface: Interface): def __init__(self, iface: Interface):
super().__init__(iface) super().__init__(iface)
self.sweep_max_freq_Hz = 3e9 self.sweep_max_freq_Hz = 3e9
def getScreenshot(self) -> QtGui.QPixmap: def getScreenshot(self) -> QtGui.QPixmap:
logger.debug("Capturing screenshot...") logger.debug("Capturing screenshot...")
if not self.connected(): if not self.connected():
return QtGui.QPixmap() return QtGui.QPixmap()
try: try:
rgba_array = self._capture_data() rgba_array = self._capture_data()
image = QtGui.QImage( image = QtGui.QImage(
rgba_array, rgba_array,
self.screenwidth, self.screenwidth,
self.screenheight, self.screenheight,
QtGui.QImage.Format_RGB16) QtGui.QImage.Format_RGB16)
logger.debug("Captured screenshot") logger.debug("Captured screenshot")
return QtGui.QPixmap(image) return QtGui.QPixmap(image)
except serial.SerialException as exc: except serial.SerialException as exc:
logger.exception( logger.exception(
"Exception while capturing screenshot: %s", exc) "Exception while capturing screenshot: %s", exc)
return QtGui.QPixmap() return QtGui.QPixmap()