Fixed CAN frame bug
This commit is contained in:
@ -38,7 +38,7 @@ class CanSignal : public BaseSignal, public VoltType {
|
|||||||
class CanSignal {
|
class CanSignal {
|
||||||
#endif
|
#endif
|
||||||
// public data
|
// public data
|
||||||
public:
|
public:
|
||||||
std::string Name; // Signal Name
|
std::string Name; // Signal Name
|
||||||
std::string Units; // Signal Units
|
std::string Units; // Signal Units
|
||||||
u_int32_t Address; // 29 bits (standard or extended)
|
u_int32_t Address; // 29 bits (standard or extended)
|
||||||
@ -75,12 +75,12 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
// private data
|
// private data
|
||||||
private:
|
private:
|
||||||
|
|
||||||
// static data
|
// static data
|
||||||
|
|
||||||
// public methods
|
// public methods
|
||||||
public:
|
public:
|
||||||
// constructors
|
// constructors
|
||||||
CanSignal();
|
CanSignal();
|
||||||
|
|
||||||
@ -110,7 +110,7 @@ public:
|
|||||||
// static methods
|
// static methods
|
||||||
|
|
||||||
// private methods
|
// private methods
|
||||||
private:
|
private:
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@ -33,7 +33,7 @@ typedef struct can_frame CanFrame;
|
|||||||
|
|
||||||
typedef struct _BcmFrame {
|
typedef struct _BcmFrame {
|
||||||
struct bcm_msg_head head;
|
struct bcm_msg_head head;
|
||||||
struct can_frame frame;
|
// struct can_frame frame;
|
||||||
} BcmFrame;
|
} BcmFrame;
|
||||||
|
|
||||||
/* c class definitions ******************************************************/
|
/* c class definitions ******************************************************/
|
||||||
|
|||||||
@ -28,6 +28,8 @@ set(LIBSRC
|
|||||||
# includes
|
# includes
|
||||||
include_directories(../include)
|
include_directories(../include)
|
||||||
|
|
||||||
|
add_compile_options(-Warray-bounds)
|
||||||
|
|
||||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../lib)
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../lib)
|
||||||
set(CMAKE_LIBRARY_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
|
// mask
|
||||||
msg.head.nframes = 1;
|
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
|
// send it down
|
||||||
if (write(m_sock, &msg, sizeof(msg)) < 0)
|
if (write(m_sock, &msg, sizeof(msg)) < 0)
|
||||||
|
|||||||
@ -33,7 +33,7 @@ typedef struct can_frame CanFrame;
|
|||||||
|
|
||||||
typedef struct _BcmFrame {
|
typedef struct _BcmFrame {
|
||||||
struct bcm_msg_head head;
|
struct bcm_msg_head head;
|
||||||
struct can_frame frame;
|
// struct can_frame frame;
|
||||||
} BcmFrame;
|
} BcmFrame;
|
||||||
|
|
||||||
/* c class definitions ******************************************************/
|
/* c class definitions ******************************************************/
|
||||||
|
|||||||
Reference in New Issue
Block a user