Skip to content

Commit

Permalink
Merge pull request #365 from kal667/encoder
Browse files Browse the repository at this point in the history
Fixes encoder bug with overloaded call to buildMessage
  • Loading branch information
peplin authored Sep 10, 2016
2 parents 2144058 + 2a7c6a3 commit 45eeb2a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/can/canwrite.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ using openxc::util::log::debug;

QUEUE_DEFINE(CanMessage);

void openxc::can::write::buildMessage(const CanSignal* signal, int value,
void openxc::can::write::buildMessage(const CanSignal* signal, uint64_t value,
uint8_t data[], size_t length) {
bitfield_encode_float(value, signal->bitPosition, signal->bitSize,
signal->factor, signal->offset, data, length);
Expand Down
2 changes: 1 addition & 1 deletion src/can/canwrite.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ uint64_t encodeNumber(const CanSignal* signal, float value, bool* send);
* destination - The destination buffer.
* length - The length of the destination buffer.
*/
void buildMessage(const CanSignal* signal, int encodedValue,
void buildMessage(const CanSignal* signal, uint64_t encodedValue,
uint8_t destination[], size_t length);

/* Public: Write a CAN signal with the given value to the bus.
Expand Down

0 comments on commit 45eeb2a

Please sign in to comment.