Compare commits
No commits in common. "3409ed8fb7320247c8d91aa9693e8ea0740e65c5" and "a715988f84f93eb5d82fab7df106520b9ce64b5c" have entirely different histories.
3409ed8fb7
...
a715988f84
|
@ -57,7 +57,7 @@ int lcd_current_page = 1;
|
|||
int lcd_pwmAdj_id = 0;
|
||||
EasyNex panel(Serial);
|
||||
#ifdef ENABLE_EXTERNAL_LCD
|
||||
EasyNex ESPMega_EXTLCD(Serial2);
|
||||
EasyNex user_panel(Serial);
|
||||
#endif
|
||||
|
||||
// Air Conditioner Control
|
||||
|
@ -120,7 +120,7 @@ void setup()
|
|||
Serial.begin(115200);
|
||||
#ifdef ENABLE_EXTERNAL_LCD
|
||||
Serial2.begin(115200);
|
||||
ESPMega_EXTLCD.begin(115200);
|
||||
user_panel.begin(115200);
|
||||
#endif
|
||||
panel.begin(115200);
|
||||
Serial.println("ESPMega R3 Initializing");
|
||||
|
@ -131,12 +131,6 @@ void setup()
|
|||
lcd_send_stop_bit();
|
||||
lcd_init();
|
||||
lcd_begin();
|
||||
#ifdef ENABLE_EXTERNAL_LCD
|
||||
Serial2.print("rest");
|
||||
Serial2.write(0xFF);
|
||||
Serial2.write(0xFF);
|
||||
Serial2.write(0xFF);
|
||||
#endif
|
||||
lcd_send_command("boot_state.txt=\"Core Initializing . . .\"");
|
||||
Serial.println("Initializing Infrared . . .");
|
||||
lcd_send_command("boot_state.txt=\"Infrared Initializing . . .\"");
|
||||
|
@ -153,6 +147,12 @@ void setup()
|
|||
Serial.println("Jumping to User Code.");
|
||||
user_init();
|
||||
lcd_send_command("page dashboard");
|
||||
#ifdef ENABLE_EXTERNAL_LCD
|
||||
Serial2.print("rest");
|
||||
Serial2.write(0xFF);
|
||||
Serial2.write(0xFF);
|
||||
Serial2.write(0xFF);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
@ -726,9 +726,6 @@ void lcd_loop()
|
|||
{
|
||||
lcd_thread_controller.run();
|
||||
panel.NextionListen();
|
||||
#ifdef ENABLE_EXTERNAL_LCD
|
||||
ESPMega_EXTLCD.NextionListen();
|
||||
#endif
|
||||
if (panel.currentPageId != lcd_current_page)
|
||||
{
|
||||
lcd_current_page = panel.currentPageId;
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
#include <external_lcd.hpp>
|
||||
void ExternalLCD::callTriggerFunction() {
|
||||
uint8_t touch_hex = Serial2.read();
|
||||
external_lcd_callback(touch_hex);
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
#include <EasyNextionLibrary.h>
|
||||
#ifndef trigger_h
|
||||
#include "trigger.h"
|
||||
#endif
|
||||
#ifndef EXTERNAL_LCD_LOADED
|
||||
#define EXTERNAL_LCD_LOADED
|
||||
#include "user_code.hpp"
|
||||
class ExternalLCD: public EasyNex {
|
||||
protected:
|
||||
void callTriggerFunction();
|
||||
};
|
||||
#endif
|
|
@ -24,10 +24,6 @@ This code will run after every component is initialized
|
|||
void user_init()
|
||||
{
|
||||
timer1.begin();
|
||||
ESPMega_EXTLCD_Serial.print("page home");
|
||||
ESPMega_EXTLCD_Serial.write(0xFF);
|
||||
ESPMega_EXTLCD_Serial.write(0xFF);
|
||||
ESPMega_EXTLCD_Serial.write(0xFF);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue