pylessard / python-udsoncan

Python implementation of UDS (ISO-14229) standard.
MIT License
586 stars 201 forks source link

Fixed issues found trying out a few examples #106

Closed sillygoose closed 2 years ago

sillygoose commented 2 years ago

Found some minor issues as I tried to get a few of the UDS examples working on my hardware.

  1. Extra spaces in isotp_params keys caused run-time errors
  2. Missing import struct in what appears to be a complete example
  3. Inconsistent use since the docs say these are lists so I changed it (but I see that validate_didlist_input takes care of this).

      response = client.read_data_by_identifier([0xF190])
      print(response.service_data.values[0xF190]) # This is a dict of DID:Value
    
      # Or, if a single DID is expected, a shortcut to read the value of the first DID
      vin = client.read_data_by_identifier_first([0xF190])     

    Hope you find these useful.

Rick

sillygoose commented 2 years ago

Also noticed that the 'logger_name' option is missing an entry in the client configuration section of the documentation.

pylessard commented 2 years ago

Thanks for the PR and sorry for the delay in processing