/* * SSL_Display.hpp * * Created on: Feb 11, 2024 * Author: Gabriel */ #ifndef SRC_COMPONENTS_SSL_DISPLAY_HPP_ #define SRC_COMPONENTS_SSL_DISPLAY_HPP_ #include #include #include "ILI9341.hpp" #include "SSL_GFX.hpp" class SSL_Display { public: SSL_Display(ILI9341* hDisplay); virtual ~SSL_Display(); int32_t init(); int32_t update(RobotStatus status); private: static void taskDisplayStatic(SSL_Display* obj); void taskDisplay(); static constexpr size_t taskDisplayStackSize = 128; static constexpr size_t queueDisplayLength = 12; ILI9341* hDisplay; SSL_GFX robots[12] = { SSL_GFX(hDisplay, 0, 0, buffer, 19200), SSL_GFX(hDisplay, 80, 0, buffer, 19200), SSL_GFX(hDisplay, 160, 0, buffer, 19200), SSL_GFX(hDisplay, 0, 80, buffer, 19200), SSL_GFX(hDisplay, 80, 80, buffer, 19200), SSL_GFX(hDisplay, 160, 80, buffer, 19200), SSL_GFX(hDisplay, 0, 160, buffer, 19200), SSL_GFX(hDisplay, 80, 160, buffer, 19200), SSL_GFX(hDisplay, 160, 160, buffer, 19200), SSL_GFX(hDisplay, 0, 240, buffer, 19200), SSL_GFX(hDisplay, 80, 240, buffer, 19200), SSL_GFX(hDisplay, 160, 240, buffer, 19200), }; uint8_t buffer[80][80][3]; TaskHandle_t hTaskDisplay; StackType_t taskDisplayStack[taskDisplayStackSize]; StaticTask_t taskDisplayTCB; QueueHandle_t hQueueDisplay; uint8_t queueDisplayStorage[queueDisplayLength*sizeof(RobotStatus)]; StaticQueue_t queueDisplayStructure; }; #endif /* SRC_COMPONENTS_SSL_DISPLAY_HPP_ */