Comments (2)
from loconet2.
Hi Alex. Thanks for the response.
Actually what I was pointing out is not the inherent issue with LocoNet protocol but the way it is implemented. The problem lies in that the task that sends bits to network also does receiving and processing bits from network. So when a packet arrives, its notify function is called from that task. If there is a send
inside notify function, the task comes to a busy loop that waits for data to be sent. But that is never sent because sending is done by that same task. If, for example, sending was implemented in another task or by timer interrupt (as it is done in AVR version), there would be no issue even considering CD backoffs and stuff - sending would eventually succeed and the task would continue.
I found only one fork that had some commits. The timer+bitbanging code does not seem to work (or I've messed with its timings somehow), but there is an implementation via UART driver that kinda works but does not allow to invert tx pin while not inverting rx pin - which most DIY LocoNet schematics require. On the good side, it does not seem to be deadlocking in the described case, though I have not tested it yet.
Anyway, thanks for your good work with the libraries. I'll keep poking around in the library and its fork, trying to fit it to my hardware and software requirements, probably making some changes in the process. Do you accept pull requests though?
from loconet2.
Related Issues (5)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from loconet2.