Skip to content
Open
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
1 change: 1 addition & 0 deletions dmrpy/pdu/data_burst.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def __repr__(self):
def raw(self):
pass

@staticmethod
def create_from_burst_binary(data):
# Structure of a data burst:
# | Info (98) | Slot type (10) | Embedded signalling / Sync (48) | Slot type (10) | Info (98) |
Expand Down
3 changes: 2 additions & 1 deletion dmrpy/pdu/data_slot_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def __repr__(self):
return f"DataSlotTypePdu(cc={self.cc}, data_type={self.data_type}, parity={hex(self.parity)})"

def raw(self):
return (self.cc << 16) + (self.data_type << 12) + (self.parity)
return (self.cc << 16) + (self.data_type << 12) + self.parity

def has_valid_fec(self):
word = to_numpy_bit_array(self.raw(), 20)
Expand All @@ -48,6 +48,7 @@ def has_valid_fec(self):
np.array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]),
)

@staticmethod
def create_from_binary(data: int):
cc = (data >> 16) & 0xF
data_type = (data >> 12) & 0xF
Expand Down
5 changes: 5 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
scipy
numpy
pytest
pytest-watch
black