fix bug regarding analog card call error
This commit is contained in:
parent
03d8dc9c8b
commit
fe75c3aceb
2 changed files with 5 additions and 3 deletions
|
|
@ -14,6 +14,4 @@ board = wt32-eth01
|
||||||
framework = arduino
|
framework = arduino
|
||||||
lib_deps = siwats/ESPMegaPROR3@^2.3.7
|
lib_deps = siwats/ESPMegaPROR3@^2.3.7
|
||||||
monitor_speed = 115200
|
monitor_speed = 115200
|
||||||
build_flags = -DCORE_DEBUG_LEVEL=0
|
build_flags = -DCORE_DEBUG_LEVEL=5
|
||||||
upload_port = COM32
|
|
||||||
monitor_port = COM32
|
|
||||||
|
|
@ -121,6 +121,7 @@ void setup()
|
||||||
espmega.enableWebServer(80);
|
espmega.enableWebServer(80);
|
||||||
espmega.inputs.registerCallback(on_pin_change);
|
espmega.inputs.registerCallback(on_pin_change);
|
||||||
espmega.outputs.setAutoSaveToFRAM(true);
|
espmega.outputs.setAutoSaveToFRAM(true);
|
||||||
|
analogCard.begin();
|
||||||
// Set value of pin 0-12 to 4095
|
// Set value of pin 0-12 to 4095
|
||||||
for (uint8_t i = 0; i < 13; i++)
|
for (uint8_t i = 0; i < 13; i++)
|
||||||
{
|
{
|
||||||
|
|
@ -128,17 +129,20 @@ void setup()
|
||||||
}
|
}
|
||||||
espmega.outputs.setState(12, true);
|
espmega.outputs.setState(12, true);
|
||||||
espmega.outputs.setValue(12,4095);
|
espmega.outputs.setValue(12,4095);
|
||||||
|
ESP_LOGD("ISE OS", "Setting up climate cards");
|
||||||
espmega.installCard(2, &climateCard);
|
espmega.installCard(2, &climateCard);
|
||||||
climateCard.bindFRAM(&espmega.fram, 5000);
|
climateCard.bindFRAM(&espmega.fram, 5000);
|
||||||
climateCard.loadStateFromFRAM();
|
climateCard.loadStateFromFRAM();
|
||||||
climateCard.setFRAMAutoSave(true);
|
climateCard.setFRAMAutoSave(true);
|
||||||
espmega.display->bindClimateCard(&climateCard);
|
espmega.display->bindClimateCard(&climateCard);
|
||||||
|
ESP_LOGD("ISE OS", "Installing current transformer cards");
|
||||||
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);
|
||||||
espmega.installCard(7, &ct_ac_phase1);
|
espmega.installCard(7, &ct_ac_phase1);
|
||||||
espmega.installCard(8, &ct_ac_phase2);
|
espmega.installCard(8, &ct_ac_phase2);
|
||||||
espmega.installCard(9, &ct_ac_phase3);
|
espmega.installCard(9, &ct_ac_phase3);
|
||||||
|
ESP_LOGD("ISE OS", "Registering Current Transformer Cards with IoT Module");
|
||||||
espmega.iot->registerCard(4);
|
espmega.iot->registerCard(4);
|
||||||
espmega.iot->registerCard(5);
|
espmega.iot->registerCard(5);
|
||||||
espmega.iot->registerCard(6);
|
espmega.iot->registerCard(6);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue