-
-
Notifications
You must be signed in to change notification settings - Fork 623
Fix range check with negative scalings #637
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
Conversation
Pull Request Test Coverage Report for Build 7358272096
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good, but one of the if conditions looks to be inverted...
src/cantools/database/can/message.py
Outdated
| if scaling: | ||
| scaled_value = signal_value | ||
| else: | ||
| if signal.conversion.choices and signal_value in signal.conversion.choices: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that condition probably must go one level up (scaled values can also be enums)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's true, fixed.
|
all cool now, let's get that merged! |
Closes #636