Skip to content

DBC scalings applied wrongly #10

@RobPearce

Description

@RobPearce

In the getattribute method of CANMessage, around line 270 of canmessage.py:
if (factor, offset) == (1, 0): return value else: return (value - offset) * factor
This is wrong. The offset in a DBC file is defined in engineering units and should be added after the multiplication
return (value * factor ) + offset
The equivalent error also exists in the setattr method

See the Kvaser help page

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions