display initialization
This commit is contained in:
parent
009ac8d961
commit
efc3450995
6 changed files with 375 additions and 24 deletions
38
Template Project/lib/ESPMegaPRO/InternalDisplay.hpp
Normal file
38
Template Project/lib/ESPMegaPRO/InternalDisplay.hpp
Normal file
|
@ -0,0 +1,38 @@
|
|||
#include <ESPMegaPRO_OOP.hpp>
|
||||
#include <ESPMegaDisplay.hpp>
|
||||
|
||||
#define INTERNAL_DISPLAY_DASHBOARD_PAGE 0
|
||||
#define INTERNAL_DISPLAY_INPUT_PAGE 1
|
||||
#define INTERNAL_DISPLAY_OUTPUT_PAGE 2
|
||||
#define INTERNAL_DISPLAY_AC_PAGE 3
|
||||
|
||||
class InternalDisplay : public ESPMegaDisplay {
|
||||
public:
|
||||
void begin(ESPMegaPRO *espmega);
|
||||
void loop();
|
||||
void bindInputCard(uint8_t card_id);
|
||||
void bindOutputCard(uint8_t card_id);
|
||||
private:
|
||||
uint8_t bindedInputCard;
|
||||
uint8_t bindedOutputCard;
|
||||
ESPMegaPRO *espmega;
|
||||
void handleInputStateChange(uint8_t pin, bool state);
|
||||
void handlePwmStateChange(uint8_t pin, uint16_t value);
|
||||
void handlePageChange(uint8_t page);
|
||||
void setOutputBar(uint8_t pin, uint16_t value);
|
||||
void setOutputStateColor(uint8_t pin, bool state);
|
||||
void setInputMarker(uint8_t pin, bool state);
|
||||
void setPWMAdjustmentSlider(uint16_t value);
|
||||
void setPWMAdjustmentPin(uint8_t pin);
|
||||
void setPWMAdjustmentButton(bool state);
|
||||
void saveNetworkConfig();
|
||||
void saveMQTTConfig();
|
||||
void updateStatusIcons();
|
||||
void updateClock();
|
||||
void refreshPage();
|
||||
void refreshPage(uint8_t page);
|
||||
void refreshDashboard();
|
||||
void refreshInput();
|
||||
void refreshOutput();
|
||||
void refreshAC();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue