-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cantool)!: generated messages' CopyFrom preserves invalid signals
Previously we used the setters and getters in the CopyFrom method. The getters and setters both caps a signal to be within [min, max] range. This meant that if we used CopyFrom from a message which contained an out-of-bounds signal the new value would not keep the same signal value. This commit updates the CopyFrom implementation to instead unmarshal the generated CAN frame from the original message. BREAKING CHANGE: This changes CopyFrom to accept a message instead of a message reader to copy from, however mostly test code should be affected.
- Loading branch information
Showing
3 changed files
with
59 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters