Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove blocking semaphore, display initial state and allow large matrix #14

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

brice-fr
Copy link

@brice-fr brice-fr commented May 4, 2020

Actual library LED_Display animations are not working due to blocking semaphore
The initial state (offset 0,0) of the buffer is never displayed in animations
Large buffer matrix can not be displayed or wrapped around due to limited offset type
Various minor english typo corrections

per1234 and others added 17 commits January 17, 2020 23:23
Specifying the library dependencies in the depends field of library.properties causes the Arduino Library Manager (Arduino IDE 1.8.10 and newer) to offer to install any missing dependencies during installation of this library. "arduino-cli lib install" will automatically install the dependencies (arduino-cli 0.7.0 and newer).
…SemaphoreTake/Give and correcting some typos

The    xSemaphoreTake(_xSemaphore, portMAX_DELAY); in LED_Display::displaybuff was taking a second time the _xSemaphore that had already been taken in LED_Display::run() in the same execution flow and was halting the execution of the program
xSemaphoreGive(_xSemaphore); in LED_Display::displaybuff has also been removed
To keep things consistent, the FastLED.setBrightness(20); has been put after FastLED.show(); in LED_Display::run
Some english typo were also corrected
…k-and-some-typos

Update and rename Display.cpp, removing the  blocking xSemaphoreTake
…of numeric constant

Minor typo corrections to match those of LED_Display.cpp
With the previous code, the initial state (_count_x,_count_y) = (0,0) was never displayed.
Here the buffer is calculated before the increment/decrement. As a side effect the total animation count shall be increased by one unit to display the last line
Following change in LED_Display.cpp to display the initial state, another 1 count is necessary to display the M fully.
int8_t offset limits scrolling to 127 whereas it is supposed to be able to be incremented or decremented several times the pixel size of the initial buffer
to allow large matrix scrolling.
Also deleted unused declaration
Update type of setdatax and setdatay to allow display of large matrix
Corrected max number of LEDs with #define NUM_LEDS value
Specify library dependencies in library.properties
@johnwargo
Copy link
Contributor

So this is months old, why hasn't someone from M5Stack at least commented on this? Merge it?

@KodeMunkie
Copy link

KodeMunkie commented Oct 26, 2020

Wish I'd seen this earlier - I suspected a major bug in the animation code and was confused by the use of a semaphore. I wrote my own horizontal scroller logic (which is all I needed) to work around the issues in my own project Atomic Text.

I'm somewhat shocked too that this hasn't been merged in either or the Atom library itself updated since January.

@Tinyu-Zhao
Copy link
Collaborator

Hi, can you please enable Allow edits from maintainers, I need to format the code.

@Tinyu-Zhao Tinyu-Zhao force-pushed the master branch 3 times, most recently from 8a38424 to e1f2cb9 Compare August 5, 2023 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants