Fixed CAN frame bug
This commit is contained in:
@ -33,7 +33,7 @@ typedef struct can_frame CanFrame;
|
||||
|
||||
typedef struct _BcmFrame {
|
||||
struct bcm_msg_head head;
|
||||
struct can_frame frame;
|
||||
// struct can_frame frame;
|
||||
} BcmFrame;
|
||||
|
||||
/* c class definitions ******************************************************/
|
||||
|
||||
@ -28,6 +28,8 @@ set(LIBSRC
|
||||
# includes
|
||||
include_directories(../include)
|
||||
|
||||
add_compile_options(-Warray-bounds)
|
||||
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../lib)
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../lib)
|
||||
|
||||
|
||||
@ -255,7 +255,7 @@ int CanSocket::CanAddRx( u_int32_t addr )
|
||||
|
||||
// mask
|
||||
msg.head.nframes = 1;
|
||||
U64_DATA(&msg.frame) = (__u64) 0xFFFFFFFFFFFFFFFFULL; // all 64 bits
|
||||
U64_DATA(&msg.head.frames[0]) = (__u64) 0xFFFFFFFFFFFFFFFFULL; // all 64 bits
|
||||
|
||||
// send it down
|
||||
if (write(m_sock, &msg, sizeof(msg)) < 0)
|
||||
|
||||
@ -33,7 +33,7 @@ typedef struct can_frame CanFrame;
|
||||
|
||||
typedef struct _BcmFrame {
|
||||
struct bcm_msg_head head;
|
||||
struct can_frame frame;
|
||||
// struct can_frame frame;
|
||||
} BcmFrame;
|
||||
|
||||
/* c class definitions ******************************************************/
|
||||
|
||||
Reference in New Issue
Block a user