semiversus / python-durand Goto Github PK
View Code? Open in Web Editor NEWPython CANopen library with focus on implementing responder nodes
Python CANopen library with focus on implementing responder nodes
I take the README example:
node.tpdo[0].mapping = [(0x2001, 1), (0x2001, 2)]
node.tpdo[0].transmission_type = 1 # transmit on every SYNC
node.rpdo[0].mapping = [(0x2000, 0)]
node.tpdo[0].transmission_type = 255 # event driven (processed when received)
When setting .transmission_type
to 255
it works, because 255
is the default value (I'm not completely sure how that works). However, when setting to any other value, the PDO sync scheduler is indeed configured, but the object dictionary for PDO communication parameters is not updated:
IMHO, the setter should write it to the OD, as the setter of .inhibit_time
does it as well:
@inhibit_time.setter
def inhibit_time(self, value: float):
return self._node.object_dictionary.write(
0x1800 + self._index, 3, value * 10_000
)
For transmission type it should be added in tpdo and rpdo, at this time it's missing:
def _set_transmission_type(self, value: int):
if self._sync_handler:
self._sync_handler.cancel()
self._sync_handler = None
if value <= 240:
self._sync_handler = SyncHandler(self, value)
self._transmission_type = value
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.