Skip to content

Commit

Permalink
Merge pull request #229 from andlaus/fix_typo
Browse files Browse the repository at this point in the history
fix typo
  • Loading branch information
andlaus authored Oct 26, 2023
2 parents 128c323 + 0078155 commit 1b77e23
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion odxtools/cli/snoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def handle_telegram(telegram_id: int, payload: bytes) -> None:
global last_request

if telegram_id == ecu_tx_id:
if uds.is_reponse_pending(payload):
if uds.is_response_pending(payload):
print(f" -> response pending")
return

Expand Down
10 changes: 9 additions & 1 deletion odxtools/uds.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
from itertools import chain
from typing import Optional

from deprecation import deprecated

import odxtools.obd as obd


Expand Down Expand Up @@ -142,7 +144,7 @@ def negative_response_id(service_id: int) -> int:
return NegativeResponseId


def is_reponse_pending(telegram_payload: bytes, request_sid: Optional[int] = None) -> bool:
def is_response_pending(telegram_payload: bytes, request_sid: Optional[int] = None) -> bool:
# "response pending" responses exhibit at least three bytes
if len(telegram_payload) < 3:
return False
Expand All @@ -168,3 +170,9 @@ def is_reponse_pending(telegram_payload: bytes, request_sid: Optional[int] = Non

# if all of the above applies, we received a "stay tuned" response
return True


# previous versions of odxtools had a typo here. hit happens!
@deprecated(details="use is_response_pending()")
def is_reponse_pending(telegram_payload: bytes, request_sid: Optional[int] = None) -> bool:
return is_reponse_pending(telegram_payload, request_sid)

0 comments on commit 1b77e23

Please sign in to comment.