richClubb / python-uds

A uds library for python
MIT License
95 stars 54 forks source link

Response handling problems #48

Closed DerekHoyle closed 4 years ago

DerekHoyle commented 4 years ago

In Uds.py:

If a request is sent with suppressRespose=True, the response is still tested for "response pending" (0x78), even though response is None. See code starting at line 140.

The response pending would only work for a single response pending too. There could be several.

Perhaps replace with this:

     if responseRequired:
           while True:
               response = self.tp.recv(self.__P2_CAN_Client)
               if not ((response[0] == 0x7F) and (response[2] == 0x78)):
                   break