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
=========
v0.3.9
------
- TX Power on V2
- New analysis
- Magnitude Z Chart
- VSWR Chart improvements
v0.3.8
------

Wyświetl plik

@ -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.9-rc01"
VERSION = "0.3.9"
VERSION_URL = (
"https://raw.githubusercontent.com/"
"NanoVNA-Saver/nanovna-saver/master/NanoVNASaver/About.py")

Wyświetl plik

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