Giter VIP home page Giter VIP logo

Comments (2)

kiwi64ajs avatar kiwi64ajs commented on August 23, 2024

from loconet2.

positron96 avatar positron96 commented on August 23, 2024

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 photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.