Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

consider checksum label in copy operation #803

Merged
merged 4 commits into from
Sep 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 1 addition & 17 deletions data/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -246,27 +246,11 @@ jobs:
displayName: 'Install dependencies'

- script: |
brew install portaudio hackrf librtlsdr airspy
brew install airspy hackrf librtlsdr portaudio uhd
python -m pip install --upgrade wheel twine six appdirs packaging setuptools pyinstaller pyaudio
python -c "import tempfile, os; open(os.path.join(tempfile.gettempdir(), 'urh_releasing'), 'w').close()"
displayName: "Install build dependencies"

- script: |
echo "Reinstall icu4c"
brew reinstall https://raw.githubusercontent.com/Homebrew/homebrew-core/a806a621ed3722fb580a58000fb274a2f2d86a6d/Formula/icu4c.rb
echo "Link icu4c"
brew link icu4c --force
echo "Install boost"
brew install --force --ignore-dependencies https://raw.githubusercontent.com/Homebrew/homebrew-core/8d748e26ccc9afc8ea0d0201ae234fda35de721e/Formula/boost.rb
cd /tmp
wget https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.tar.bz2
tar xf libusb-1.0.22.tar.bz2
cd libusb-1.0.22
./configure
make
sudo make install
displayName: "Install libusb and boost"

- script: python src/urh/cythonext/build.py
displayName: "Build extensions"

Expand Down
9 changes: 8 additions & 1 deletion src/urh/signalprocessing/MessageType.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import copy
import random
import uuid
import xml.etree.ElementTree as ET
Expand Down Expand Up @@ -154,9 +155,15 @@ def add_protocol_label_start_length(self, start: int, length: int, name=None, co

def add_label(self, lbl: ProtocolLabel, allow_overlapping=True):
if allow_overlapping or not any(lbl.overlaps_with(l) for l in self):
added = self.add_protocol_label(lbl.start, lbl.end - 1, name=lbl.name, color_ind=lbl.color_index)
added = self.add_protocol_label(lbl.start, lbl.end - 1,
name=lbl.name, color_ind=lbl.color_index,
type=lbl.field_type)
added.display_format_index = lbl.display_format_index
added.display_bit_order_index = lbl.display_bit_order_index
if isinstance(lbl, ChecksumLabel) and isinstance(added, ChecksumLabel):
added.data_ranges = copy.copy(lbl.data_ranges)
added.category = copy.copy(lbl.category)
added.checksum = copy.copy(lbl.checksum)

def remove(self, lbl: ProtocolLabel):
if lbl in self:
Expand Down