From bc25d4a2fe7afb9ad96e718071be7e7153572956 Mon Sep 17 00:00:00 2001 From: Christopher Peplin Date: Fri, 14 Mar 2014 15:37:15 -0400 Subject: Force 0x3e "pid" (actually service ID) to be 1 byte. --- src/uds/uds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/uds/uds.c b/src/uds/uds.c index 1157949c..e0de344d 100644 --- a/src/uds/uds.c +++ b/src/uds/uds.c @@ -53,7 +53,7 @@ static void setup_receive_handle(DiagnosticRequestHandle* handle) { static uint16_t autoset_pid_length(uint8_t mode, uint16_t pid, uint8_t pid_length) { if(pid_length == 0) { - if(pid > 0xffff || mode > 10) { + if(pid > 0xffff || (mode != 0x3e && mode > 0xa)) { pid_length = 2; } else { pid_length = 1; -- cgit 1.2.3-korg