Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes encoder bug with overloaded call to buildMessage #365

Merged
merged 1 commit into from
Sep 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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