Skip to content

Commit

Permalink
fix error in get_can_signal
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhrisca committed Mar 6, 2020
1 parent c10679b commit c9d4a88
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions asammdf/blocks/mdf_v4.py
Original file line number Diff line number Diff line change
Expand Up @@ -2132,7 +2132,6 @@ def _validate_channel_selection(
try:
grp.channels[ch_nr]
except IndexError:
print(len(self.groups), len(grp.channels))
raise MdfException(f"Channel index out of range: {(name, group, index)}")
else:
if name not in self.channels_db:
Expand Down Expand Up @@ -8470,7 +8469,7 @@ def get_can_signal(
index = idx
break
else:
index = self.can_logging_db[can_id][message.arbitration_id.id]
index = self.can_logging_db[_can_id][message.arbitration_id.id]

if index is not None:
break
Expand Down Expand Up @@ -8535,6 +8534,7 @@ def get_can_signal(

vals = payload[idx]
t = can_ids.timestamps[idx].copy()

if can_ids.invalidation_bits is not None:
invalidation_bits = can_ids.invalidation_bits[idx]
else:
Expand All @@ -8546,14 +8546,15 @@ def get_can_signal(

if ignore_invalidation_bits:

return Signal(
sig = Signal(
samples=vals,
timestamps=t,
name=name,
unit=signal.unit or "",
comment=comment,
invalidation_bits=invalidation_bits,
)
return sig

else:

Expand Down
2 changes: 1 addition & 1 deletion asammdf/version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# -*- coding: utf-8 -*-
""" asammdf version module """

__version__ = "5.19.0"
__version__ = "5.19.1"

0 comments on commit c9d4a88

Please sign in to comment.