Skip to content

Commit

Permalink
corrected issue with mixed size messages
Browse files Browse the repository at this point in the history
At times, smaller messages would Tx all 8 databytes.
  • Loading branch information
thomasonw committed Jul 4, 2017
1 parent ee5d513 commit d50bdc0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions avr_can.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -971,6 +971,7 @@ void CANRaw::mailbox_int_handler(uint8_t mb) {

} else if (CANSTMOB & (1<<TXOK)) { // Something just transmitted.
CANSTMOB &= ~(1<<TXOK); // Clear the Tx interupt flag
CANCDMOB = 0; // ... and the controller reg.
if (tx_buffer_head != tx_buffer_tail)
{ //if there is a frame in the queue to send - refill this now empty MOb and start sending.
mailbox_set_id(mb, tx_frame_buff[tx_buffer_head].id, tx_frame_buff[tx_buffer_head].extended);
Expand Down

0 comments on commit d50bdc0

Please sign in to comment.