Skip to content
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
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# Changelog
All notable changes to this project will be documented in this file.

## [3.1.1]

### Bugfixes
- ``Uds``: fix index out of range for uds response

## [3.1.0]

### Features
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
tests_require=["pytest", "pytest-mock"],
extras_require={"test": ["pytest", "pytest-mock"]},
# *strongly* suggested for sharing
version="3.1.0",
version="3.1.1",
# The license can be anything you like
license="MIT",
description="Please use python-uds instead, this is a refactored version with breaking changes, only for pykiso",
Expand Down
8 changes: 4 additions & 4 deletions uds/uds_communications/Uds/Uds.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@ def send(self, msg, responseRequired=True, functionalReq=False, tpWaitTime=0.01)
while True:
response = self.tp.recv(self.__P2_CAN_Client)
current_time = time.perf_counter() - before_send_time
if response[2] == 0x78:
if not ((response[0] == 0x7F) and (response[2] == 0x78)):
self.last_resp_time = current_time
break
else:
if previous_time is None:
self.last_pending_resp_times.append(current_time)
previous_time = current_time
else:
self.last_pending_resp_times.append(current_time - previous_time)
if not ((response[0] == 0x7F) and (response[2] == 0x78)):
self.last_resp_time = current_time
break

# If the diagnostic session control service is supported, record the sending time for possible use by the tester present functionality (again, if present) ...
if hasattr(self, "sessionSetLastSend"):
Expand Down