From 439dc7480ec6d132ee20ecaead3c1d18aff79fbd Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Sun, 10 Mar 2024 01:08:32 +0700 Subject: [PATCH] CT state saving --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index ce33d4e..3570e53 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -141,11 +141,17 @@ void setup() if (analogCardAvailable) { ESP_LOGV("ISE OS", "Analog card available, installing current transformer cards"); espmega.installCard(5, &ct_light_phase1); + ct_light_phase1.bindFRAM(&espmega.fram, 5010); espmega.installCard(6, &ct_light_phase2); + ct_light_phase2.bindFRAM(&espmega.fram, 5020); espmega.installCard(7, &ct_socket); + ct_socket.bindFRAM(&espmega.fram, 5030); espmega.installCard(8, &ct_ac_phase1); + ct_ac_phase1.bindFRAM(&espmega.fram, 5040); espmega.installCard(9, &ct_ac_phase2); + ct_ac_phase2.bindFRAM(&espmega.fram, 5050); espmega.installCard(10, &ct_ac_phase3); + ct_ac_phase3.bindFRAM(&espmega.fram, 5060); espmega.iot->registerCard(4); espmega.iot->registerCard(5); espmega.iot->registerCard(6);