diff --git a/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/InternalDisplay.cpp b/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/InternalDisplay.cpp index b74f022..1317d4c 100644 --- a/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/InternalDisplay.cpp +++ b/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/InternalDisplay.cpp @@ -928,4 +928,14 @@ void InternalDisplay::setBootStatus(const char *text) this->displayAdapter->print("\""); this->sendStopBytes(); this->giveSerialMutex(); +} + + +void InternalDisplay::handlePayload(uint8_t type, uint8_t *payload, uint8_t length) { + // If payload of type 0x92 is received + // Send the display to page 1 + if (type == 0x92) + { + this->jumpToPage(1); + } } \ No newline at end of file diff --git a/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/InternalDisplay.hpp b/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/InternalDisplay.hpp index c6388a3..cbc2854 100644 --- a/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/InternalDisplay.hpp +++ b/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/InternalDisplay.hpp @@ -104,6 +104,7 @@ class InternalDisplay : public ESPMegaDisplay { void handleInputStateChange(uint8_t pin, bool state); void handlePwmStateChange(uint8_t pin, bool state, uint16_t value); void handlePageChange(uint8_t page); + void handlePayload(uint8_t type, uint8_t *payload, uint8_t length); void setOutputBar(uint8_t pin, uint16_t value); void setOutputStateColor(uint8_t pin, bool state); void setInputMarker(uint8_t pin, bool state);