mirror of
https://github.com/Makuna/NeoPixelBus.git
synced 2025-08-07 12:54:26 +02:00
Updated NeoPixelBus object API (markdown)
@@ -57,7 +57,8 @@ This is used with DotStars only using the `DotStartSpiMethod` only. Defining th
|
|||||||
This will try to send the pixel information to the physical pixels. If there has been no change since the last time it was called, nothing will be sent.
|
This will try to send the pixel information to the physical pixels. If there has been no change since the last time it was called, nothing will be sent.
|
||||||
Due to the hardware protocol, if you call this quickly after the last time it was called, it may wait up to 50us extra.
|
Due to the hardware protocol, if you call this quickly after the last time it was called, it may wait up to 50us extra.
|
||||||
Based upon the Method used, sometimes this may take some time before it returns depending on the number of pixels or it may return almost immediately. If the method defined for the bus uses hardware, it will return quickly and send the data asynchronously. Otherwise, 300 pixel strip can take 9ms to send the data. The more pixels, the longer it takes, the less pixels, the quicker it can send them.
|
Based upon the Method used, sometimes this may take some time before it returns depending on the number of pixels or it may return almost immediately. If the method defined for the bus uses hardware, it will return quickly and send the data asynchronously. Otherwise, 300 pixel strip can take 9ms to send the data. The more pixels, the longer it takes, the less pixels, the quicker it can send them.
|
||||||
> * _maintainBufferConsistency_ - (defaults to true) Some methods are asynchronous and will return quickly before the pixel data is completely sent. Due to this, these methods will internally use two buffers, one for sending and one for editing. By default, it will copy the contents between the buffers to maintain consistency between them. If you always overwrite the buffers and never call GetPixelColor(), then you can gain some performance by passing false for this argument.
|
> * _maintainBufferConsistency_ - (defaults to true) Some methods are asynchronous and will return quickly before the pixel data is completely sent. Due to this, some of these methods will internally use two buffers that they will swap between, one for sending and one for editing. By default, it will copy the contents between the buffers to maintain consistency between them. If you always overwrite the buffers and never call GetPixelColor(), then you can gain some performance by passing false for this argument.
|
||||||
|
**CAUTION:** If you call `Show(false)`, You should consider calling `Show(true)` once after calling `Begin()` so that both internal buffers start with a consistent cleared state, as `Show(false)` expects that you overwrite every pixel on every update.
|
||||||
|
|
||||||
### bool CanShow()
|
### bool CanShow()
|
||||||
This will return true if enough time has passed since the last time Show() was called. This also means that calling Show() will not cause any undue waiting. If the method for the defined bus is hardware that sends asynchronously, then call CanShow() will let you know if it has finished sending the data from the last Show().
|
This will return true if enough time has passed since the last time Show() was called. This also means that calling Show() will not cause any undue waiting. If the method for the defined bus is hardware that sends asynchronously, then call CanShow() will let you know if it has finished sending the data from the last Show().
|
||||||
|
Reference in New Issue
Block a user