Skip to content

Commit 1fcf4ae

Browse files
authored
consider checksum label in copy operation (#803)
1 parent 162dda8 commit 1fcf4ae

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

data/azure-pipelines.yml

+1-17
Original file line numberDiff line numberDiff line change
@@ -246,27 +246,11 @@ jobs:
246246
displayName: 'Install dependencies'
247247
248248
- script: |
249-
brew install portaudio hackrf librtlsdr airspy
249+
brew install airspy hackrf librtlsdr portaudio uhd
250250
python -m pip install --upgrade wheel twine six appdirs packaging setuptools pyinstaller pyaudio
251251
python -c "import tempfile, os; open(os.path.join(tempfile.gettempdir(), 'urh_releasing'), 'w').close()"
252252
displayName: "Install build dependencies"
253253
254-
- script: |
255-
echo "Reinstall icu4c"
256-
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/a806a621ed3722fb580a58000fb274a2f2d86a6d/Formula/icu4c.rb
257-
echo "Link icu4c"
258-
brew link icu4c --force
259-
echo "Install boost"
260-
brew install --force --ignore-dependencies https://raw.githubusercontent.com/Homebrew/homebrew-core/8d748e26ccc9afc8ea0d0201ae234fda35de721e/Formula/boost.rb
261-
cd /tmp
262-
wget https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.tar.bz2
263-
tar xf libusb-1.0.22.tar.bz2
264-
cd libusb-1.0.22
265-
./configure
266-
make
267-
sudo make install
268-
displayName: "Install libusb and boost"
269-
270254
- script: python src/urh/cythonext/build.py
271255
displayName: "Build extensions"
272256

src/urh/signalprocessing/MessageType.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import copy
12
import random
23
import uuid
34
import xml.etree.ElementTree as ET
@@ -154,9 +155,15 @@ def add_protocol_label_start_length(self, start: int, length: int, name=None, co
154155

155156
def add_label(self, lbl: ProtocolLabel, allow_overlapping=True):
156157
if allow_overlapping or not any(lbl.overlaps_with(l) for l in self):
157-
added = self.add_protocol_label(lbl.start, lbl.end - 1, name=lbl.name, color_ind=lbl.color_index)
158+
added = self.add_protocol_label(lbl.start, lbl.end - 1,
159+
name=lbl.name, color_ind=lbl.color_index,
160+
type=lbl.field_type)
158161
added.display_format_index = lbl.display_format_index
159162
added.display_bit_order_index = lbl.display_bit_order_index
163+
if isinstance(lbl, ChecksumLabel) and isinstance(added, ChecksumLabel):
164+
added.data_ranges = copy.copy(lbl.data_ranges)
165+
added.category = copy.copy(lbl.category)
166+
added.checksum = copy.copy(lbl.checksum)
160167

161168
def remove(self, lbl: ProtocolLabel):
162169
if lbl in self:

0 commit comments

Comments
 (0)