Reduce RAM usage for TFT Color UI on SGen-L (#20179)

This commit is contained in:
Victor Oliveira
2020-11-17 17:32:30 -03:00
committed by GitHub
parent a15ab85557
commit 51a1561ae9
3 changed files with 7 additions and 4 deletions

View File

@@ -210,7 +210,7 @@ void TFT_Queue::set_background(uint16_t color) {
#define QUEUE_SAFETY_FREE_SPACE 100
void TFT_Queue::handle_queue_overflow(uint16_t sizeNeeded) {
if (uintptr_t(end_of_queue) + sizeNeeded + (QUEUE_SAFETY_FREE_SPACE) - uintptr_t(queue) >= QUEUE_SIZE) {
if (uintptr_t(end_of_queue) + sizeNeeded + (QUEUE_SAFETY_FREE_SPACE) - uintptr_t(queue) >= TFT_QUEUE_SIZE) {
end_of_queue = queue;
((parametersCanvasText_t *)last_parameter)->nextParameter = end_of_queue;
}