mirror of https://github.com/rusefi/isotp-c.git
Fix receiving multiframe packages
This commit is contained in:
parent
7492b7d195
commit
b5ac81eeb6
|
@ -47,7 +47,7 @@ extern "C" {
|
||||||
* size - The size of the payload. The size will be 0 if there is no payload.
|
* size - The size of the payload. The size will be 0 if there is no payload.
|
||||||
*/
|
*/
|
||||||
typedef struct {
|
typedef struct {
|
||||||
const uint32_t arbitration_id;
|
uint32_t arbitration_id;
|
||||||
uint8_t payload[OUR_MAX_ISO_TP_MESSAGE_SIZE];
|
uint8_t payload[OUR_MAX_ISO_TP_MESSAGE_SIZE];
|
||||||
uint16_t size;
|
uint16_t size;
|
||||||
bool completed;
|
bool completed;
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
#include <isotp/receive.h>
|
#include <isotp/receive.h>
|
||||||
#include <isotp/allocate.h>
|
#include <isotp/allocate.h>
|
||||||
|
#include <isotp/protocol.h>
|
||||||
#include <isotp/send.h>
|
#include <isotp/send.h>
|
||||||
#include <bitfield/bitfield.h>
|
#include <bitfield/bitfield.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -30,7 +31,7 @@ bool isotp_send_flow_control_frame(IsoTpShims* shims, IsoTpMessage* message) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
shims->send_can_message(message->arbitration_id, can_data,
|
shims->send_can_message(protocol_swap_sa_ta(message->arbitration_id), can_data,
|
||||||
shims->frame_padding ? 8 : 1 + message->size, shims->private_data);
|
shims->frame_padding ? 8 : 1 + message->size, shims->private_data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue