From 564f10f6ef17815595336c85a51080cdb32ee45d Mon Sep 17 00:00:00 2001 From: reaw55 <58457329+reaw55@users.noreply.github.com> Date: Sat, 9 Mar 2024 17:06:03 +0700 Subject: [PATCH] remove daikin reference --- src/main.cpp | 26 +++++++------------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 14819f7..ef6dbe4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,7 +27,7 @@ const uint8_t light_array[4][2] = { {LIGHT_ROW4_COLUMN1, LIGHT_ROW4_COLUMN2}}; -AirConditioner ac_daikin = { +AirConditioner ac = { .max_temperature = 32, .min_temperature = 16, .modes = 4, @@ -36,14 +36,6 @@ AirConditioner ac_daikin = { .fan_speed_names = fan_speed_names, .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 * ***********************************************/ @@ -51,11 +43,7 @@ AirConditioner ac_york = { ESPMegaPRO espmega = ESPMegaPRO(); ISEDisplay iseDisplay = ISEDisplay(&iseDisplayAdapter, &light_array[0][0], row, column); -ClimateCard climateCard_daikin = ClimateCard(AIR_CONDITIONER_IR_PIN, ac_daikin, - AIR_CONDITIONER_SENSOR_TYPE, AIR_CONDITIONER_SENSOR_PIN, - AIR_CONDITIONER_RMT_CHANNEL); - -ClimateCard climateCard_york = ClimateCard(AIR_CONDITIONER_IR_PIN, ac_york, +ClimateCard climateCard = ClimateCard(AIR_CONDITIONER_IR_PIN, ac, AIR_CONDITIONER_SENSOR_TYPE, AIR_CONDITIONER_SENSOR_PIN, AIR_CONDITIONER_RMT_CHANNEL); @@ -142,10 +130,10 @@ void setup() espmega.outputs.setState(12, true); espmega.outputs.setValue(12,4095); espmega.installCard(2, &climateCard_daikin); - climateCard_daikin.bindFRAM(&espmega.fram, 5000); - climateCard_daikin.loadStateFromFRAM(); - climateCard_daikin.setFRAMAutoSave(true); - espmega.display->bindclimateCard_daikin(&climateCard_daikin); + climateCard.bindFRAM(&espmega.fram, 5000); + climateCard.loadStateFromFRAM(); + climateCard.setFRAMAutoSave(true); + espmega.display->bindclimateCard(&climateCard); espmega.installCard(4, &ct_light_phase1); espmega.installCard(5, &ct_light_phase2); espmega.installCard(6, &ct_socket); @@ -202,7 +190,7 @@ void setup() espmega.iot->registerCard(1); // Register the Output Card espmega.iot->registerCard(2); // Register the Climate Card 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); iseDisplay.registerPageChangeCallback(&handlePageChange);