implement internal display

This commit is contained in:
Siwat Sirichai 2023-12-29 21:41:19 +07:00
parent efc3450995
commit 2dee25276c
4 changed files with 19 additions and 1 deletions

View File

@ -10,7 +10,6 @@
#include <DS1307RTC.h>
#include <time.h>
struct rtctime_t {
uint8_t hours;
uint8_t minutes;

View File

@ -99,3 +99,17 @@ void InternalDisplay::setPWMAdjustmentPin(uint8_t pin) {
void InternalDisplay::setPWMAdjustmentButton(bool state) {
// TODO: implementation
}
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;
}

View File

@ -8,6 +8,7 @@
class InternalDisplay : public ESPMegaDisplay {
public:
InternalDisplay(HardwareSerial *displayAdapter);
void begin(ESPMegaPRO *espmega);
void loop();
void bindInputCard(uint8_t card_id);

View File

@ -1,7 +1,9 @@
#include <ESPMegaPRO_OOP.hpp>
#include <InternalDisplay.hpp>
#include <ETH.h>
ESPMegaPRO espmega = ESPMegaPRO();
InternalDisplay display = InternalDisplay(&Serial);
void input_change_callback(uint8_t pin, uint8_t value) {
Serial.print("Input change callback: ");
@ -50,6 +52,8 @@ void setup() {
Serial.println("Initialization Routine Complete");
((DigitalInputIoT*)espmega.iot.getComponent(0)) -> registerChangeCallback(input_change_callback);
}
void loop() {