From: Christopher Peplin Date: Sun, 5 Jan 2014 23:56:31 +0000 (-0500) Subject: Log when sending a new diagnositc request. X-Git-Tag: 5.0.2~273^2~50 X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=commitdiff_plain;h=8ca422e95dce9349afbdc399215c9c4d28c89f1a;p=apps%2Fagl-service-can-low-level.git Log when sending a new diagnositc request. --- diff --git a/src/obd2/obd2.c b/src/obd2/obd2.c index 83aa1fda..f8b4a372 100644 --- a/src/obd2/obd2.c +++ b/src/obd2/obd2.c @@ -49,10 +49,26 @@ DiagnosticRequestHandle diagnostic_request(DiagnosticShims* shims, handle.isotp_shims = isotp_init_shims(shims->log, shims->send_can_message, shims->set_timer); + handle.isotp_send_handle = isotp_send(&handle.isotp_shims, request->arbitration_id, payload, 1 + request->payload_length + request->pid_length, NULL); + if(shims->log != NULL) { + shims->log("Sending diagnostic request: arb_id: 0x%02x, mode: 0x%x, pid: 0x%x, payload: 0x%02x%02x%02x%02x%02x%02x%02x%02x, size: %d\r\n", + request->arbitration_id, + request->mode, + request->pid, + request->payload[0], + request->payload[1], + request->payload[2], + request->payload[3], + request->payload[4], + request->payload[5], + request->payload[6], + request->payload[7], + request->payload_length); + } handle.isotp_receive_handle = isotp_receive(&handle.isotp_shims, request->arbitration_id + ARBITRATION_ID_OFFSET,