Fix receiving multiframe packages

This commit is contained in:
Anton Gerasimov 2017-12-22 16:53:36 +01:00
parent 7492b7d195
commit b5ac81eeb6
2 changed files with 3 additions and 2 deletions

View File

@ -47,7 +47,7 @@ extern "C" {
* size - The size of the payload. The size will be 0 if there is no payload.
*/
typedef struct {
const uint32_t arbitration_id;
uint32_t arbitration_id;
uint8_t payload[OUR_MAX_ISO_TP_MESSAGE_SIZE];
uint16_t size;
bool completed;

View File

@ -1,5 +1,6 @@
#include <isotp/receive.h>
#include <isotp/allocate.h>
#include <isotp/protocol.h>
#include <isotp/send.h>
#include <bitfield/bitfield.h>
#include <string.h>
@ -30,7 +31,7 @@ bool isotp_send_flow_control_frame(IsoTpShims* shims, IsoTpMessage* message) {
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);
return true;
}