Skip to content

Commit

Permalink
small improvement for CAN signal extraction function
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhrisca committed Oct 24, 2019
1 parent 4448f71 commit 92eae48
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion asammdf/blocks/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1352,7 +1352,8 @@ def extract_can_signal(signal, payload):
vals = as_non_byte_sized_signed_int(vals, bit_count)

if (signal.factor, signal.offset) != (1, 0):
vals = vals * float(signal.factor) + float(signal.offset)
vals = vals * float(signal.factor)
vals += float(signal.offset)

return vals

Expand Down

0 comments on commit 92eae48

Please sign in to comment.