GithubHelp home page GithubHelp logo

Small bugs in the code about apa102-pi HOT 5 CLOSED

tinue avatar tinue commented on June 29, 2024
Small bugs in the code

from apa102-pi.

Comments (5)

pcjacobse avatar pcjacobse commented on June 29, 2024

I just checked out sebastian's fork. You should also merge in his commits, it looks like they fix a couple of other issues :)

from apa102-pi.

tinue avatar tinue commented on June 29, 2024

Thanks for your comments! This explains why the LEDs sometimes did not clear up when I hit Ctrl-C ;-)
Usually they did, but this obviously depends on when in the entire cycle Ctrl-C is being hit.

The new samples are not quite debugged yet, I suspect that there will be some more errors present. For example I don't check at all for overflow, so for example stuff like "currentCycle*numLEDs+currentStep" is bound to break after a few hours, and with a lot of LEDs.

As for the fork: I don't understand the change. What error does it prevent? The clearStrip method is only to clear the strip e.g. before exiting the application (the comment explains this). Why would one want to release and reallocate the memory for the strip buffer?

-> Anyway, I'll have a more detailed look at your comments on the weekend.

from apa102-pi.

pcjacobse avatar pcjacobse commented on June 29, 2024

The clearing of the memory help if you only want to set specific leds after clearing the strip. I guess its not really usefullI for exiting the application, but when you built out some of the samples and want to clear the strip midrun, and after that just set a couple of pixels, you dont have to set all other leds to black manually.

And the other commit he did was swap the green and blue byte, since those are in the wrong order in your code. For example your colorwheel starts on blue instead of green.

from apa102-pi.

tinue avatar tinue commented on June 29, 2024

Coloring is a different issue, that I haven't tackled yet: There are different strips out on the market. Some are rgb, others are bgr, and there are possibly even more. It will get tricky if strips of different makes are coupled together. For example the strandtest would suddenly change color on the boundary of different types.
It looks like I have a different strip than you have, because on mine the colors are correct.

from apa102-pi.

tinue avatar tinue commented on June 29, 2024

I think I fixed the reported issues, so I am closing it. Feel free to reopen if you disagree.

from apa102-pi.

Related Issues (20)

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.