Merge pull request #7 from advancedtelematic/bugfix/multirecv

Fix receiving multiframe packages
This commit is contained in:
OYTIS 2017-12-22 16:57:21 +01:00 committed by GitHub
commit 4c5904bff3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}