Skip to content

Commit 902ec37

Browse files
authored
Merge pull request #38 from shutingrz/document_fix
Fixed example of Response Code usage
2 parents 6f23c3a + e3183ec commit 902ec37

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

doc/source/udsoncan/examples.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ In the following examples, we will request an ECU reset in 4 different ways. We
2929
my_connection.send(req.get_payload())
3030
payload = my_connection.wait_frame(timeout=1)
3131
response = Response.from_payload(payload)
32-
if response.service == service.ECUReset and response.code == Response.PositiveResponse and response.data == b'\x01':
32+
if response.service == service.ECUReset and response.code == Response.Code.PositiveResponse and response.data == b'\x01':
3333
print('Success!')
3434
else:
3535
print('Reset failed')
@@ -44,7 +44,7 @@ In the following examples, we will request an ECU reset in 4 different ways. We
4444
payload = my_connection.wait_frame(timeout=1)
4545
response = Response.from_payload(payload)
4646
services.ECUReset.interpret_response(response)
47-
if response.service == service.ECUReset and response.code == Response.PositiveResponse and response.service_data.reset_type_echo == 1:
47+
if response.service == service.ECUReset and response.code == Response.Code.PositiveResponse and response.service_data.reset_type_echo == 1:
4848
print('Success!')
4949
else:
5050
print('Reset failed')

0 commit comments

Comments
 (0)