Skip to content

Commit

Permalink
Monitor for 0x3d fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Lukasz-Juranek committed Jun 5, 2019
1 parent 7084e2c commit ece6e47
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions embedded/Src/lin_slcan.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,14 @@ void lin_slcan_rx_timeout_handler()
lin_slcan_rx_handler(&open_lin_data_layer_frame);
} else
{
open_lin_data_layer_frame.lenght = slcan_lin_slave_state_data_count - 1;
/* checksum calculation */
if (slcan_lin_data_array[open_lin_data_layer_frame.lenght] == open_lin_data_layer_checksum(open_lin_data_layer_frame.pid,
open_lin_data_layer_frame.lenght, open_lin_data_layer_frame.data_ptr)) /* TODO remove from interrupt possible function */
{
/* valid checksum */
lin_slcan_rx_handler(&open_lin_data_layer_frame);
}
open_lin_data_layer_frame.lenght = slcan_lin_slave_state_data_count - 1;
/* checksum calculation */
if (slcan_lin_data_array[open_lin_data_layer_frame.lenght] == open_lin_data_layer_checksum(open_lin_data_layer_frame.pid & OPEN_LIN_ID_MASK,
open_lin_data_layer_frame.lenght, open_lin_data_layer_frame.data_ptr)) /* TODO remove from interrupt possible function */
{
/* valid checksum */
lin_slcan_rx_handler(&open_lin_data_layer_frame);
}
}
}
lin_slcan_reset();
Expand Down Expand Up @@ -230,7 +230,7 @@ void lin_slcan_rx(l_u8 rx_byte)
{
open_lin_data_layer_frame.data_ptr[slcan_lin_slave_state_data_count] = rx_byte;
slcan_lin_slave_state_data_count ++;
} else
} else /* 9th byte is LRC */
{
open_lin_data_layer_frame.lenght = slcan_lin_slave_state_data_count;
/* checksum calculation */
Expand Down
2 changes: 1 addition & 1 deletion embedded/Src/slcan.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "open_lin_slave_data_layer.h"

#define VERSION_FIRMWARE_MAJOR 1
#define VERSION_FIRMWARE_MINOR 3
#define VERSION_FIRMWARE_MINOR 4

#define VERSION_HARDWARE_MAJOR 0
#define VERSION_HARDWARE_MINOR 1
Expand Down

0 comments on commit ece6e47

Please sign in to comment.