Code Review
/
apps
/
agl-service-can-low-level.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
low-can-cb: Mark the end of the CtlSections array
[apps/agl-service-can-low-level.git]
/
low-can-binding
/
can
/
message
/
can-message.cpp
diff --git
a/low-can-binding/can/message/can-message.cpp
b/low-can-binding/can/message/can-message.cpp
index
b274206
..
5c3e0f0
100644
(file)
--- a/
low-can-binding/can/message/can-message.cpp
+++ b/
low-can-binding/can/message/can-message.cpp
@@
-114,12
+114,10
@@
std::shared_ptr<can_message_t> can_message_t::convert_from_frame(const struct ca
}
else if (frame.can_id & CAN_EFF_FLAG)
{
}
else if (frame.can_id & CAN_EFF_FLAG)
{
- flags = flags|EXTENDED_ID;
id = frame.can_id & CAN_EFF_MASK;
}
else
{
id = frame.can_id & CAN_EFF_MASK;
}
else
{
- flags = flags|STANDARD_ID;
id = frame.can_id & CAN_SFF_MASK;
}
id = frame.can_id & CAN_SFF_MASK;
}
@@
-206,12
+204,12
@@
struct std::vector<canfd_frame> can_message_t::convert_to_canfd_frame_vector()
std::vector<uint8_t> data = get_data_vector((i*64),(i*64)+63);
if(data.size()<64)
{
std::vector<uint8_t> data = get_data_vector((i*64),(i*64)+63);
if(data.size()<64)
{
- ::memset(frame.data,
0,
sizeof(frame.data));
- ::memcpy(frame.data,
data.data(),
data.size());
+ ::memset(frame.data,
0,
sizeof(frame.data));
+ ::memcpy(frame.data,
data.data(),
data.size());
}
else
{
}
else
{
- ::memcpy(frame.data,
data.data(),
64);
+ ::memcpy(frame.data,
data.data(),
64);
}
ret.push_back(frame);
i++;
}
ret.push_back(frame);
i++;
@@
-228,13
+226,13
@@
struct std::vector<canfd_frame> can_message_t::convert_to_canfd_frame_vector()
std::vector<uint8_t> data = get_data_vector(i*8,(i*8)+7);
if(data.size()<8)
{
std::vector<uint8_t> data = get_data_vector(i*8,(i*8)+7);
if(data.size()<8)
{
- ::memset(frame.data,
0,
sizeof(frame.data));
- ::memcpy(frame.data,
data.data(),
data.size());
+ ::memset(frame.data,
0,
sizeof(frame.data));
+ ::memcpy(frame.data,
data.data(),
data.size());
}
else
{
}
else
{
- ::memset(frame.data,
0,
sizeof(frame.data));
- ::memcpy(frame.data,
data.data(),
8);
+ ::memset(frame.data,
0,
sizeof(frame.data));
+ ::memcpy(frame.data,
data.data(),
8);
}
ret.push_back(frame);
i++;
}
ret.push_back(frame);
i++;