Fixed CAN frame bug
This commit is contained in:
@ -38,7 +38,7 @@ class CanSignal : public BaseSignal, public VoltType {
|
||||
class CanSignal {
|
||||
#endif
|
||||
// public data
|
||||
public:
|
||||
public:
|
||||
std::string Name; // Signal Name
|
||||
std::string Units; // Signal Units
|
||||
u_int32_t Address; // 29 bits (standard or extended)
|
||||
@ -75,12 +75,12 @@ public:
|
||||
|
||||
|
||||
// private data
|
||||
private:
|
||||
private:
|
||||
|
||||
// static data
|
||||
|
||||
// public methods
|
||||
public:
|
||||
public:
|
||||
// constructors
|
||||
CanSignal();
|
||||
|
||||
@ -110,7 +110,7 @@ public:
|
||||
// static methods
|
||||
|
||||
// private methods
|
||||
private:
|
||||
private:
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@ -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