move internal display init
This commit is contained in:
parent
5cf8c70483
commit
97de79456a
2 changed files with 9 additions and 4 deletions
11
src/main.cpp
11
src/main.cpp
|
|
@ -148,6 +148,10 @@ void setup()
|
|||
espmega.enableWebServer(80);
|
||||
// ------------ End IoT Module Initialization Routine ------------
|
||||
|
||||
// ------------ Display Post Initialization Routine ------------
|
||||
espmega.enableInternalDisplay(&Serial);
|
||||
// ------------ End Display Post Initialization Routine ------------
|
||||
|
||||
// ------------ Inputs and Outputs Initialization Routine ------------
|
||||
espmega.inputs.registerCallback(on_pin_change);
|
||||
espmega.outputs.setAutoSaveToFRAM(true);
|
||||
|
|
@ -163,6 +167,7 @@ void setup()
|
|||
ESP_LOGD("ISE OS", "Setting up climate cards");
|
||||
|
||||
// Daikin Climate Card
|
||||
ESP_LOGD("ISE OS", "Installing daikin climate card");
|
||||
espmega.installCard(2, &climateCard_daikin);
|
||||
climateCard_daikin.bindFRAM(&espmega.fram, 5000);
|
||||
climateCard_daikin.loadStateFromFRAM();
|
||||
|
|
@ -171,6 +176,7 @@ void setup()
|
|||
espmega.display->bindClimateCard(&climateCard_daikin);
|
||||
|
||||
// York Climate Card
|
||||
ESP_LOGD("ISE OS", "Installing york climate card");
|
||||
espmega.installCard(10, &climateCard_york);
|
||||
climateCard_york.bindFRAM(&espmega.fram, 5005);
|
||||
climateCard_york.loadStateFromFRAM();
|
||||
|
|
@ -249,13 +255,12 @@ void setup()
|
|||
// ------------ End IoT Card Registration Routine ------------
|
||||
|
||||
|
||||
// ------------ Display Initialization Routine ------------
|
||||
espmega.enableInternalDisplay(&Serial);
|
||||
// ------------ External Display Initialization Routine ------------
|
||||
auto bindedGetTime = std::bind(&ESPMegaPRO::getTime, &espmega);
|
||||
iseDisplay.begin(&espmega.inputs, &espmega.outputs, &climateCard_daikin, &climateCard_york, &pm_switch, &pm_fan_speed);
|
||||
espmega.iot->registerRelativeMqttCallback(&handleMqttMessage);
|
||||
iseDisplay.registerPageChangeCallback(&handlePageChange);
|
||||
// ------------ End Display Initialization Routine ------------
|
||||
// ------------ End External Display Initialization Routine ------------
|
||||
}
|
||||
|
||||
void pm25outupdatedisplay(char *value)
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ SET_LOOP_TASK_STACK_SIZE(32*1024);
|
|||
#define AIR_CONDITIONER_SENSOR_TYPE AC_SENSOR_TYPE_DHT22
|
||||
#define AIR_CONDITIONER_SENSOR_PIN 32
|
||||
#define AIR_CONDITIONER_DAIKIN_IR_PIN 5
|
||||
#define AIR_CONDITIONER_YORK_IR_PIN 8
|
||||
#define AIR_CONDITIONER_YORK_IR_PIN 12
|
||||
#define AIR_CONDITIONER_RMT_CHANNEL0 RMT_CHANNEL_0
|
||||
#define AIR_CONDITIONER_RMT_CHANNEL1 RMT_CHANNEL_1
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue