Skip to content
Merged
Changes from 1 commit
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
6 changes: 6 additions & 0 deletions can/interfaces/ics_neovi/neovi_bus.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def __init__(self, channel, can_filters=None, **config):
:type channel: int or str or list(int) or list(str)
:param list can_filters:
See :meth:`can.BusABC.set_filters` for details.
:param bool receive_own_messages:
If transmitted messages should also be received by this bus.
:param bool use_system_timestamp:
Use system timestamp for can messages instead of the hardware time
stamp
Expand Down Expand Up @@ -125,6 +127,7 @@ def __init__(self, channel, can_filters=None, **config):
self._use_system_timestamp = bool(
config.get('use_system_timestamp', False)
)
self._receive_own_messages = config.get('receive_own_messages', True)

self.channel_info = '%s %s CH:%s' % (
self.dev.Name,
Expand Down Expand Up @@ -220,6 +223,9 @@ def _process_msg_queue(self, timeout=0.1):
for ics_msg in messages:
if ics_msg.NetworkID not in self.channels:
continue
is_tx = bool(ics_msg.StatusBitField & ics.SPY_STATUS_TX_MSG)
if not self._receive_own_messages and is_tx:
continue
self.rx_buffer.append(ics_msg)
if errors:
logger.warning("%d error(s) found" % errors)
Expand Down