pyUSBtin icon indicating copy to clipboard operation
pyUSBtin copied to clipboard

DBC scalings applied wrongly

Open RobPearce opened this issue 4 years ago • 0 comments

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

RobPearce avatar Jul 08 '20 21:07 RobPearce