summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
m---------deps/isotp-c6
-rw-r--r--src/obd2/obd2.c4
-rw-r--r--src/obd2/obd2.h8
3 files changed, 4 insertions, 14 deletions
diff --git a/deps/isotp-c b/deps/isotp-c
-Subproject 3b25a0491ce9ef9b55c903c6c7f0929bc2910d1
+Subproject 101d36e65bc7cb2b1fc8e4dbae4eacf749c98b0
diff --git a/src/obd2/obd2.c b/src/obd2/obd2.c
index 1dcb827e..d3c0fb9e 100644
--- a/src/obd2/obd2.c
+++ b/src/obd2/obd2.c
@@ -139,10 +139,10 @@ DiagnosticResponse diagnostic_receive_can_frame(DiagnosticShims* shims,
if(!handle->isotp_send_handle.completed) {
// TODO when completing a send, this returns...a Message? we have to
// check when the isotp_send_handle is completed, and if it is, start
- isotp_receive_can_frame(&handle->isotp_shims,
+ isotp_continue_send(&handle->isotp_shims,
&handle->isotp_send_handle, arbitration_id, data, size);
} else if(!handle->isotp_receive_handle.completed) {
- IsoTpMessage message = isotp_receive_can_frame(&handle->isotp_shims,
+ IsoTpMessage message = isotp_continue_receive(&handle->isotp_shims,
&handle->isotp_receive_handle, arbitration_id, data, size);
if(message.completed) {
diff --git a/src/obd2/obd2.h b/src/obd2/obd2.h
index 2bb6c77f..a2ea033c 100644
--- a/src/obd2/obd2.h
+++ b/src/obd2/obd2.h
@@ -31,10 +31,6 @@ typedef struct {
uint8_t payload_length;
} DiagnosticRequest;
-// TODO I don't like this, it's hard coding isotp library stuff here
-typedef bool (*SendIsoTpMessageShim)(IsoTpHandle* handle,
- const uint8_t* payload, uint16_t payload_size);
-
// Thanks to
// http://www.canbushack.com/blog/index.php?title=scanning-for-diagnostic-data&more=1&c=1&tb=1&pb=1
// for the list of NRCs
@@ -120,8 +116,8 @@ typedef struct {
bool completed;
IsoTpShims isotp_shims;
- IsoTpHandle isotp_send_handle;
- IsoTpHandle isotp_receive_handle;
+ IsoTpSendHandle isotp_send_handle;
+ IsoTpReceiveHandle isotp_receive_handle;
DiagnosticResponseReceived callback;
DiagnosticMilStatusReceived mil_status_callback;
DiagnosticVinReceived vin_callback;