Update NanoVNA_F.py

Remove 41 to 64 lines of code from the Nanovna-F file (this will cause the screen to be split into four blocks, each evenly distributed across the full screen??)
pull/330/head
sysjoint-tek 2020-09-27 16:35:55 +08:00 zatwierdzone przez GitHub
rodzic ebe517a0a9
commit de7d047ba2
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 26 usunięć

Wyświetl plik

@ -38,33 +38,8 @@ class NanoVNA_F(NanoVNA):
return QtGui.QPixmap()
try:
rgba_array = self._capture_data()
unwrapped_array = np.empty(
self.screenwidth*self.screenheight,
dtype=np.uint32)
for y in range(self.screenheight // 2):
for x in range(self.screenwidth // 2):
unwrapped_array[
2 * x + 2 * y * self.screenwidth
] = rgba_array[x + y * self.screenwidth]
unwrapped_array[
(2 * x) + 1 + 2 * y * self.screenwidth
] = rgba_array[
x + (self.screenheight//2 + y) * self.screenwidth
]
unwrapped_array[
2 * x + (2 * y + 1) * self.screenwidth
] = rgba_array[
x + self.screenwidth // 2 + y * self.screenwidth
]
unwrapped_array[
(2 * x) + 1 + (2 * y + 1) * self.screenwidth
] = rgba_array[
x + self.screenwidth // 2 +
(self.screenheight//2 + y) * self.screenwidth
]
image = QtGui.QImage(
unwrapped_array,
rgba_array,
self.screenwidth, self.screenheight,
QtGui.QImage.Format_ARGB32)
logger.debug("Captured screenshot")