remove daikin reference
This commit is contained in:
parent
9a0c4ab58f
commit
564f10f6ef
1 changed files with 7 additions and 19 deletions
26
src/main.cpp
26
src/main.cpp
|
|
@ -27,7 +27,7 @@ const uint8_t light_array[4][2] = {
|
||||||
{LIGHT_ROW4_COLUMN1, LIGHT_ROW4_COLUMN2}};
|
{LIGHT_ROW4_COLUMN1, LIGHT_ROW4_COLUMN2}};
|
||||||
|
|
||||||
|
|
||||||
AirConditioner ac_daikin = {
|
AirConditioner ac = {
|
||||||
.max_temperature = 32,
|
.max_temperature = 32,
|
||||||
.min_temperature = 16,
|
.min_temperature = 16,
|
||||||
.modes = 4,
|
.modes = 4,
|
||||||
|
|
@ -36,14 +36,6 @@ AirConditioner ac_daikin = {
|
||||||
.fan_speed_names = fan_speed_names,
|
.fan_speed_names = fan_speed_names,
|
||||||
.getInfraredCode = &getInfraredCode};
|
.getInfraredCode = &getInfraredCode};
|
||||||
|
|
||||||
AirConditioner ac_york = {
|
|
||||||
.max_temperature = 30,
|
|
||||||
.min_temperature = 18,
|
|
||||||
.modes = 3,
|
|
||||||
.mode_names = mode_names,
|
|
||||||
.fan_speeds = 4,
|
|
||||||
.fan_speed_names = fan_speed_names,
|
|
||||||
.getInfraredCode = &getInfraredCode};
|
|
||||||
/***********************************************
|
/***********************************************
|
||||||
* End Configuration *
|
* End Configuration *
|
||||||
***********************************************/
|
***********************************************/
|
||||||
|
|
@ -51,11 +43,7 @@ AirConditioner ac_york = {
|
||||||
ESPMegaPRO espmega = ESPMegaPRO();
|
ESPMegaPRO espmega = ESPMegaPRO();
|
||||||
ISEDisplay iseDisplay = ISEDisplay(&iseDisplayAdapter, &light_array[0][0], row, column);
|
ISEDisplay iseDisplay = ISEDisplay(&iseDisplayAdapter, &light_array[0][0], row, column);
|
||||||
|
|
||||||
ClimateCard climateCard_daikin = ClimateCard(AIR_CONDITIONER_IR_PIN, ac_daikin,
|
ClimateCard climateCard = ClimateCard(AIR_CONDITIONER_IR_PIN, ac,
|
||||||
AIR_CONDITIONER_SENSOR_TYPE, AIR_CONDITIONER_SENSOR_PIN,
|
|
||||||
AIR_CONDITIONER_RMT_CHANNEL);
|
|
||||||
|
|
||||||
ClimateCard climateCard_york = ClimateCard(AIR_CONDITIONER_IR_PIN, ac_york,
|
|
||||||
AIR_CONDITIONER_SENSOR_TYPE, AIR_CONDITIONER_SENSOR_PIN,
|
AIR_CONDITIONER_SENSOR_TYPE, AIR_CONDITIONER_SENSOR_PIN,
|
||||||
AIR_CONDITIONER_RMT_CHANNEL);
|
AIR_CONDITIONER_RMT_CHANNEL);
|
||||||
|
|
||||||
|
|
@ -142,10 +130,10 @@ void setup()
|
||||||
espmega.outputs.setState(12, true);
|
espmega.outputs.setState(12, true);
|
||||||
espmega.outputs.setValue(12,4095);
|
espmega.outputs.setValue(12,4095);
|
||||||
espmega.installCard(2, &climateCard_daikin);
|
espmega.installCard(2, &climateCard_daikin);
|
||||||
climateCard_daikin.bindFRAM(&espmega.fram, 5000);
|
climateCard.bindFRAM(&espmega.fram, 5000);
|
||||||
climateCard_daikin.loadStateFromFRAM();
|
climateCard.loadStateFromFRAM();
|
||||||
climateCard_daikin.setFRAMAutoSave(true);
|
climateCard.setFRAMAutoSave(true);
|
||||||
espmega.display->bindclimateCard_daikin(&climateCard_daikin);
|
espmega.display->bindclimateCard(&climateCard);
|
||||||
espmega.installCard(4, &ct_light_phase1);
|
espmega.installCard(4, &ct_light_phase1);
|
||||||
espmega.installCard(5, &ct_light_phase2);
|
espmega.installCard(5, &ct_light_phase2);
|
||||||
espmega.installCard(6, &ct_socket);
|
espmega.installCard(6, &ct_socket);
|
||||||
|
|
@ -202,7 +190,7 @@ void setup()
|
||||||
espmega.iot->registerCard(1); // Register the Output Card
|
espmega.iot->registerCard(1); // Register the Output Card
|
||||||
espmega.iot->registerCard(2); // Register the Climate Card
|
espmega.iot->registerCard(2); // Register the Climate Card
|
||||||
auto bindedGetTime = std::bind(&ESPMegaPRO::getTime, &espmega);
|
auto bindedGetTime = std::bind(&ESPMegaPRO::getTime, &espmega);
|
||||||
iseDisplay.begin(&espmega.inputs, &espmega.outputs, &climateCard_daikin, &pm_switch, &pm_fan_speed);
|
iseDisplay.begin(&espmega.inputs, &espmega.outputs, &climateCard, &pm_switch, &pm_fan_speed);
|
||||||
espmega.iot->registerRelativeMqttCallback(&handleMqttMessage);
|
espmega.iot->registerRelativeMqttCallback(&handleMqttMessage);
|
||||||
iseDisplay.registerPageChangeCallback(&handlePageChange);
|
iseDisplay.registerPageChangeCallback(&handlePageChange);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue