diff --git a/DSView/DSView.qrc b/DSView/DSView.qrc
index a1408110..d11c660c 100644
--- a/DSView/DSView.qrc
+++ b/DSView/DSView.qrc
@@ -140,5 +140,7 @@
icons/logo.svgicons/light/update.svgicons/dark/update.svg
+ icons/light/log.svg
+ icons/dark/log.svg
diff --git a/DSView/icons/dark/log.svg b/DSView/icons/dark/log.svg
new file mode 100644
index 00000000..60b74831
--- /dev/null
+++ b/DSView/icons/dark/log.svg
@@ -0,0 +1,171 @@
+
+
diff --git a/DSView/icons/light/log.svg b/DSView/icons/light/log.svg
new file mode 100644
index 00000000..452e040a
--- /dev/null
+++ b/DSView/icons/light/log.svg
@@ -0,0 +1,171 @@
+
+
diff --git a/DSView/pv/toolbars/logobar.cpp b/DSView/pv/toolbars/logobar.cpp
index da564cb2..fd2411e0 100644
--- a/DSView/pv/toolbars/logobar.cpp
+++ b/DSView/pv/toolbars/logobar.cpp
@@ -152,7 +152,7 @@ void LogoBar::reStyle()
_manual->setIcon(QIcon(iconPath+"/manual.svg"));
_issue->setIcon(QIcon(iconPath+"/bug.svg"));
_update->setIcon(QIcon(iconPath+"/update.svg"));
- _log->setIcon(QIcon(iconPath+"/file.svg"));
+ _log->setIcon(QIcon(iconPath+"/log.svg"));
if (_connected)
_logo_button.setIcon(QIcon(iconPath+"/logo_color.svg"));
diff --git a/NEWS25 b/NEWS25
index 2500e0b3..20d80cf9 100644
--- a/NEWS25
+++ b/NEWS25
@@ -1,3 +1,20 @@
+1.2.1 -- (2022-08-27)
+----------
+ (通用)
+ *修复安装路径的多语言支持
+ *修复某些云桌面系统无法识别设备的问题
+ *增加日志记录,以及日志级别设置功能
+
+ (逻辑分析仪)
+ *修复保存文件时,I2C解码器无法自动保存的问题
+ *修复保存文件时,中文通道名称的乱码问题
+ *修复某些解码器对无效数据的解码报错问题
+ *添加parallel解码器的数据格式选择
+ *修复DSLogic U3Pro32在USB2.0连接下的通道模式选择问题
+
+ (示波器)
+ *修复特定情况下缩放波形,中心位置偏移的问题
+
1.2.0 -- (2022-07-05)
-----------------
(通用)
diff --git a/NEWS31 b/NEWS31
index cb1114ce..deb0d0b9 100644
--- a/NEWS31
+++ b/NEWS31
@@ -1,3 +1,20 @@
+1.2.1 -- (2022-08-27)
+-----------------
+ --common
+ *add multilingual support for installation paths
+ *fix the problem that some cloud desktop systems cannot recognize devices
+ *Add logging and log level setting function
+
+ --for logic analyzer
+ *fix I2C decoder save issue when saving dsl files
+ *add multingual supoort for channel name when saving dsl files
+ *fix decoder errors when decoding invalid data
+ *add data format selection of parallel decoder
+ *fix channel mode issue of DSLogic U3Pro32 under USB2.0 connection
+
+ --for oscilloscope
+ *fix center position offset issue when scaling waveform
+
1.2.0 -- (2022-07-05)
-----------------
--common
diff --git a/libsigrokdecode4DSL/decoders/0-uart/pd.py b/libsigrokdecode4DSL/decoders/0-uart/pd.py
index eaf4b8f9..dccf3a73 100644
--- a/libsigrokdecode4DSL/decoders/0-uart/pd.py
+++ b/libsigrokdecode4DSL/decoders/0-uart/pd.py
@@ -22,30 +22,6 @@ import sigrokdecode as srd
from common.srdhelper import bitpack
from math import floor, ceil
-'''
-OUTPUT_PYTHON format:
-
-Packet:
-[, , ]
-
-This is the list of s and their respective values:
- - 'STARTBIT': The data is the (integer) value of the start bit (0/1).
- - 'DATA': This is always a tuple containing two items:
- - 1st item: the (integer) value of the UART data. Valid values
- range from 0 to 511 (as the data can be up to 9 bits in size).
- - 2nd item: the list of individual data bits and their ss/es numbers.
- - 'PARITYBIT': The data is the (integer) value of the parity bit (0/1).
- - 'STOPBIT': The data is the (integer) value of the stop bit (0 or 1).
- - 'INVALID STARTBIT': The data is the (integer) value of the start bit (0/1).
- - 'INVALID STOPBIT': The data is the (integer) value of the stop bit (0/1).
- - 'PARITY ERROR': The data is a tuple with two entries. The first one is
- the expected parity value, the second is the actual parity value.
- - 'FRAME': The data is always a tuple containing two items: The (integer)
- value of the UART data, and a boolean which reflects the validity of the
- UART frame.
-
-'''
-
# Given a parity type to check (odd, even, zero, one), the value of the
# parity bit, the value of the data, and the length of the data (5-9 bits,
# usually 8 bits) return True if the parity is correct, False otherwise.
@@ -81,7 +57,7 @@ class Decoder(srd.Decoder):
desc = 'Asynchronous, serial bus.'
license = 'gplv2+'
inputs = ['logic']
- outputs = ['uart']
+ outputs = []
tags = ['Embedded/industrial']
channels = (
{'id': 'rxtx', 'type': 209, 'name': 'RX/TX', 'desc': 'UART transceive line'},
diff --git a/libsigrokdecode4DSL/decoders/numbers_and_state/pd.py b/libsigrokdecode4DSL/decoders/numbers_and_state/pd.py
index b8ac87e7..8680e563 100644
--- a/libsigrokdecode4DSL/decoders/numbers_and_state/pd.py
+++ b/libsigrokdecode4DSL/decoders/numbers_and_state/pd.py
@@ -35,6 +35,8 @@
# severely limited in its number of input channels, and dramatically
# widening the parallel decoder may be undesirable.
+# update: 2022.9.8, the wait() function returns variables is error.
+
from common.srdhelper import bitpack
import json
import sigrokdecode as srd
@@ -363,11 +365,20 @@ class Decoder(srd.Decoder):
}.get(self.options['format'])
self.format_string = None
- pins = self.wait()
- ss = self.samplenum
- prev_pattern = self.grab_pattern(pins[Pin.BIT_0:])
+ bFirst = True
+ cur_cond = None
+
while True:
- pins = self.wait(wait_cond)
+ (clk, d0, d1, d2, d3, d4, d5, d6, d7,d8, d9,d10 ,d11 ,d12 ,d13 ,d14 ,d15) = self.wait(cur_cond)
+ pins = (clk, d0, d1, d2, d3, d4, d5, d6, d7,d8, d9, d10, d11, d12,d13 ,d14 ,d15)
+
+ if bFirst:
+ bFirst = False
+ ss = self.samplenum
+ prev_pattern = self.grab_pattern(pins[Pin.BIT_0:])
+ cur_cond = wait_cond
+ continue
+
es = self.samplenum
pattern = self.grab_pattern(pins[Pin.BIT_0:])
if pattern == prev_pattern:
diff --git a/libsigrokdecode4DSL/decoders/usb_power_delivery/pd.py b/libsigrokdecode4DSL/decoders/usb_power_delivery/pd.py
index 2ccbbe60..ed6aea91 100644
--- a/libsigrokdecode4DSL/decoders/usb_power_delivery/pd.py
+++ b/libsigrokdecode4DSL/decoders/usb_power_delivery/pd.py
@@ -53,6 +53,9 @@ CTRL_TYPES = {
19: 'FR_Swap',
20: 'Get_PPS_Status',
21: 'Get_Country_Codes',
+ 22: 'Get_Sink_Cap_Extended',
+ 23: 'Get_Source_Info',
+ 24: 'Get_Revision',
}
# Data message type
@@ -397,14 +400,14 @@ class Decoder(srd.Decoder):
def get_hex(self, idx, data):
if idx == 0:
- txt = 'Ext H:%04x' % ( data & 0xFFFF )
- txt += ' DATA: %02x' % ((data >> 24)&0xFF)
- txt += ' %02x' % ((data >> 16)&0xFF)
+ txt = 'Ext H:%04x' % ( data & 0xFFFF )
+ txt += ' DATA: %02x' % ((data >> 24)&0xFF)
+ txt += ' %02x' % ((data >> 16)&0xFF)
else:
- txt = '%02x' % ((data >> 8)&0xFF)
- txt += ' %02x' % ((data >> 0)&0xFF)
- txt += ' %02x' % ((data >> 24)&0xFF)
- txt += ' %02x' % ((data >> 16)&0xFF)
+ txt = '%02x' % ((data >> 8)&0xFF)
+ txt += ' %02x' % ((data >> 0)&0xFF)
+ txt += ' %02x' % ((data >> 24)&0xFF)
+ txt += ' %02x' % ((data >> 16)&0xFF)
return txt
@@ -413,7 +416,7 @@ class Decoder(srd.Decoder):
txt = '['+str(idx+1)+'] '
if t == 255:
- txt += self.get_hex(idx, self.data[idx])
+ txt += self.get_hex(idx, self.data[idx])
elif t == 2:
txt += self.get_request(self.data[idx])
elif t == 1 or t == 4:
@@ -435,7 +438,10 @@ class Decoder(srd.Decoder):
if self.head_ext() == 1:
shortm = EXTENDED_TYPES[t] if t in EXTENDED_TYPES else 'EXTENDED???'
elif self.head_count() == 0:
- shortm = CTRL_TYPES[t]
+ if t >= 25 and t <= 31:
+ shortm = "reserved"
+ else:
+ shortm = CTRL_TYPES[t]
else:
shortm = DATA_TYPES[t] if t in DATA_TYPES else 'DAT???'