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
Fix: encoding value method has wrong signature.
[apps/agl-service-can-low-level.git]
/
low-can-binding
/
can
/
can-encoder.cpp
diff --git
a/low-can-binding/can/can-encoder.cpp
b/low-can-binding/can/can-encoder.cpp
index
b87407f
..
9ba8531
100644
(file)
--- a/
low-can-binding/can/can-encoder.cpp
+++ b/
low-can-binding/can/can-encoder.cpp
@@
-30,18
+30,18
@@
/// @param[in] length - The length of the destination buffer.
///
/// @return Returns a can_frame struct initialized and ready to be send.
/// @param[in] length - The length of the destination buffer.
///
/// @return Returns a can_frame struct initialized and ready to be send.
-const can_frame
build_frame(const can_signal_t
& signal, uint64_t value)
+const can_frame
encoder_t::build_frame(const std::shared_ptr<can_signal_t>
& signal, uint64_t value)
{
struct can_frame cf;
::memset(&cf, 0, sizeof(cf));
{
struct can_frame cf;
::memset(&cf, 0, sizeof(cf));
- cf.can_id = signal
.
get_message()->get_id();
+ cf.can_id = signal
->
get_message()->get_id();
cf.can_dlc = CAN_MAX_DLEN;
bitfield_encode_float((float)value,
cf.can_dlc = CAN_MAX_DLEN;
bitfield_encode_float((float)value,
- signal
.
get_bit_position(),
- signal
.
get_bit_size(),
- signal
.
get_factor(),
- signal
.
get_offset(),
+ signal
->
get_bit_position(),
+ signal
->
get_bit_size(),
+ signal
->
get_factor(),
+ signal
->
get_offset(),
cf.data,
CAN_MAX_DLEN);
cf.data,
CAN_MAX_DLEN);