ESPMegaPRO-v3-SDK/Template Project/lib/ESPMegaPRO/InternalDisplay.cpp

115 lines
2.8 KiB
C++
Raw Normal View History

2023-12-29 13:04:25 +00:00
#include <InternalDisplay.hpp>
void InternalDisplay::begin(ESPMegaPRO *espmega) {
this->espmega = espmega;
}
void InternalDisplay::loop() {
// TODO: implementation
}
void InternalDisplay::bindInputCard(uint8_t card_id) {
this->bindedInputCard = card_id;
if(currentPage == INTERNAL_DISPLAY_INPUT_PAGE) {
refreshInput();
}
}
void InternalDisplay::bindOutputCard(uint8_t card_id) {
this->bindedOutputCard = card_id;
if(currentPage == INTERNAL_DISPLAY_OUTPUT_PAGE) {
refreshOutput();
}
}
void InternalDisplay::handleInputStateChange(uint8_t pin, bool state) {
// If the input card is binded to the display and the current page is the input page
// then update the respective input component
// TODO: implementation
}
void InternalDisplay::handlePwmStateChange(uint8_t pin, uint16_t value) {
// If the output card is binded to the display and the current page is the output page
// then update the respective output component
// TODO: implementation
}
void InternalDisplay::handlePageChange(uint8_t page) {
// TODO: implementation
}
void InternalDisplay::saveNetworkConfig() {
// TODO: implementation
}
void InternalDisplay::saveMQTTConfig() {
// TODO: implementation
}
void InternalDisplay::updateStatusIcons() {
// TODO: implementation
}
void InternalDisplay::updateClock() {
// TODO: implementation
}
void InternalDisplay::refreshPage() {
// TODO: implementation
}
void InternalDisplay::refreshPage(uint8_t page) {
// TODO: implementation
}
void InternalDisplay::refreshDashboard() {
// TODO: implementation
}
void InternalDisplay::refreshInput() {
// TODO: implementation
}
void InternalDisplay::refreshOutput() {
// TODO: implementation
}
void InternalDisplay::refreshAC() {
// TODO: implementation
}
void InternalDisplay::setOutputBar(uint8_t pin, uint16_t value) {
// Write the value to the output bar
this->displayAdapter->print("j");
this->displayAdapter->print(pin);
this->displayAdapter->print(".val=");
this->displayAdapter->print(value);
this->sendStopBytes();
}
void InternalDisplay::setPWMAdjustmentSlider(uint16_t value) {
// TODO: implementation
}
void InternalDisplay::setPWMAdjustmentPin(uint8_t pin) {
// TODO: implementation
}
void InternalDisplay::setPWMAdjustmentButton(bool state) {
// TODO: implementation
}
2023-12-29 14:41:19 +00:00
void InternalDisplay::setOutputStateColor(uint8_t pin, bool state) {
// TODO: implementation
}
void InternalDisplay::setInputMarker(uint8_t pin, bool state) {
// TODO: implementation
}
InternalDisplay::InternalDisplay(HardwareSerial *displayAdapter) : ESPMegaDisplay(displayAdapter) {
this->currentPage = INTERNAL_DISPLAY_DASHBOARD_PAGE;
this->bindedInputCard = 0;
this->bindedOutputCard = 0;
}