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

Fix Adafruit_GFX writeColor implementation for ESP32 #2712

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

mikee47
Copy link
Contributor

@mikee47 mikee47 commented Jan 15, 2024

Fixes #2711

The problem occurs with a code path for ESP32 which buffers up to 32 pixels at a time for transfer. However, the first call to 'writePixels' clears the buffer to black (0 - empty response data). If the fill colour is black no abnormal operation is observed, but any other colour and at most 32 pixels get filled with the requested colour.

The benefit of these opimisations is minimal so the library is patched to simplify code path for all architectures.

Copy link

what-the-diff bot commented Jan 15, 2024

PR Summary

  • Introduction of bigEndian variable
    The newly implemented variable bigEndian was created to handle specific tasks efficiently and ensure the system operates seamlessly.

  • Modification of bigEndian related code
    The existing code related to the bigEndian variable has been also adjusted. This ensures that the whole system can fully utilize the potential benefits of this new variable and offer consistent performance.

  • Addition of writeColor function
    A new function named writeColor was introduced. This new feature improves the system's color handling capabilities, providing a richer and more diverse visual experience for the users.

  • Miscellaneous code modifications and deletions
    Routine maintenance tasks have been carried out with some minor code modifications and deletions done to enhance the overall code quality and maintainability. Although these are mainly minor tweaks, they might result in smoother operations and easier future updates.

@slaff slaff added this to the 5.2.0 milestone Jan 16, 2024
@slaff slaff merged commit fa90b7a into SmingHub:develop Jan 16, 2024
46 checks passed
@mikee47 mikee47 deleted the fix/adafruit-gfx-esp32 branch January 16, 2024 09:01
slaff pushed a commit that referenced this pull request Jan 19, 2024
Fixes #2711

The problem occurs with a code path for ESP32 which buffers up to 32 pixels at a time for transfer. However, the first call to 'writePixels' clears the buffer to black (0 - empty response data). If the fill colour is black no abnormal operation is observed, but any other colour and at most 32 pixels get filled with the requested colour.

The benefit of these optimisations is minimal so the library is patched to simplify code path for all architectures.
@slaff slaff mentioned this pull request Feb 5, 2024
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AdafruitGFX fillscreen(), drawFastVLine(), drawFastHLine() working only partially (ESP32)
2 participants