This is the python implementation of the USBtin API based on https://github.com/EmbedME/USBtinLib
STATUS: mostly untested, examples/message_handling.py working on python 3.5 and 2.7
python API for USBtin can interface
License: GNU General Public License v3.0
This is the python implementation of the USBtin API based on https://github.com/EmbedME/USBtinLib
STATUS: mostly untested, examples/message_handling.py working on python 3.5 and 2.7
The DBC loader reads in and remembers the endian flag of signals, calling it "byte_order". It then completely ignores it and makes no use of it at all.
This means it will not cope with big-endian messages - which is most of them where I work!
If the scaling factor of a signal uses a negative gain or, more commonly, offset, the load_dbc method's regex (like I said elsewhere, BAD IDEA) fails.
The init method of USBtinException uses the "super" operator with no arguments, which throws an exception on at least some versions of Python. It should instead say:
def __init__(self, *args, **kwargs): super(USBtinException, self).__init__(*args, **kwargs)
Running PyUSBTin on Linux but with a DBC file written by a Windows program (Kvaser DB Editor) results in only the first frame (message) being loaded but all the defined signals being allocated to it.
I'd provide a patch but the "parser" uses regex's - which is a really bad idea nearly all the time - so it's rather hard to figure out how to fix it.
Thanks for writing this project. But when i using this API, i found out there something wrong with close_can_channel function, it trapped into a deadloop and never get channel closed.
The author of the filtermask module appears to have been writing in a language other than Python.
The class defines two __init__
methods in an attempt to create overloaded constructors like in C++ or Java. This does not work in Python - the second definition merely overwrites the first and the first is thrown away.
Once in the __init__
method, the first thing that happens is the 'registers' member is set to be an empty list of zero length. Then it tries to set the first four elements of this zero-length list, which don't exist because it's zero length!
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.