Skip to content

Commit

Permalink
v0.3.9
Browse files Browse the repository at this point in the history
  • Loading branch information
zarath committed Jun 20, 2021
1 parent 28c62b7 commit 0c352ee
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 40 deletions.
7 changes: 7 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
Changelog
=========

v0.3.9
------

- TX Power on V2
- New analysis
- Magnitude Z Chart
- VSWR Chart improvements

v0.3.8
------

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.9-rc01"
VERSION = "0.3.9"
VERSION_URL = (
"https://raw.githubusercontent.com/"
"NanoVNA-Saver/nanovna-saver/master/NanoVNASaver/About.py")
Expand Down
78 changes: 39 additions & 39 deletions NanoVNASaver/Hardware/NanoVNA_F_V2.py
Original file line number Diff line number Diff line change
@@ -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()

0 comments on commit 0c352ee

Please sign in to comment.