![]() ![]() It was done this way at the time because NeoPixel timing is strict, AVR microcontrollers (all we had at the time) are limited, and assembly language is hard. As currently written, brightness scaling is still a "destructive" operation - pixel values are altered in RAM and the original value as set can't be accurately read back, only approximated, which has been confusing and frustrating to users.Not for M0 yet, which is why this item is still here.) (As of 1.4.2, systick is used on M4 devices and it appears to be overclock-compatible. In the M0 and M4 code, use the hardware systick counter for bit timing rather than hand-tweaked NOPs (a temporary kludge at the time because I wasn't reading systick correctly).setPin() is OK for now though, it's a trick we can use to 'recycle' pixel memory across multiple strips. They should not have been implemented this way (use the C++ 'new' operator with the regular constructor instead) and are only sticking around because of the Prime Directive. Please don't use updateLength() or updateType() in new code.For the show() function (with all the delicate pixel timing stuff), break out each architecture into separate source files rather than the current unmaintainable tangle of #ifdef statements!.Of course the #defines should remain so old sketches still compile, but both can be set to 0 and would have no effect on anything. 400 KHz support can be removed, turns out it was never actually necessary even the earliest NeoPixels can ingest 800 KHz data.Things I'd Like To Do But There's No Official Timeline So Please Don't Count On Any Of This Ever Being Canonical: Also, don't bother with PRs for timing adjustments "to better match the datasheet," because the datasheet isn't really true to begin with. The resulting large "visual diff" makes it impossible to untangle actual bug fixes from merely rearranged lines. Please don't reformat code for the sake of reformatting code. The PRIME DIRECTIVE is to maintain backward compatibility with existing Arduino sketches - many are hosted elsewhere and don't track changes here, some are in print and can never be changed! Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us. If you want to contribute to this project: You can find other examples here SimpleĪdafruit_NeoPixel pixels(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800) There are many examples implemented in this library. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |