From 7a67732daf54f064854fb377d867b66d8fe0c170 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Sat, 10 Feb 2024 16:30:23 +0700 Subject: [PATCH] adjust fram address size --- ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/CurrentTransformer.cpp | 2 +- ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/CurrentTransformer.hpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/CurrentTransformer.cpp b/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/CurrentTransformer.cpp index ce5c835..5378f07 100644 --- a/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/CurrentTransformer.cpp +++ b/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/CurrentTransformer.cpp @@ -8,7 +8,7 @@ CurrentTransformer::CurrentTransformer(AnalogCard* analogCard, uint8_t pin, floa this->adcToCurrent = adcToCurrent; } -void CurrentTransformer::bindFRAM(FRAM *fram, uint8_t framAddress) +void CurrentTransformer::bindFRAM(FRAM *fram, uint32_t framAddress) { this->fram = fram; this->framAddress = framAddress; diff --git a/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/CurrentTransformer.hpp b/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/CurrentTransformer.hpp index daf0e9f..fdd5c8d 100644 --- a/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/CurrentTransformer.hpp +++ b/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/CurrentTransformer.hpp @@ -12,7 +12,7 @@ class CurrentTransformer { public: CurrentTransformer(AnalogCard* analogCard, uint8_t pin, float *voltage, std::function adcToCurrent, uint32_t conversionInterval); - void bindFRAM(FRAM *fram, uint8_t framAddress); // Takes 16 bytes of FRAM (long double energy) + void bindFRAM(FRAM *fram, uint32_t framAddress); // Takes 16 bytes of FRAM (long double energy) void begin(); void loop(); void beginConversion(); @@ -30,7 +30,7 @@ class CurrentTransformer private: AnalogCard* analogCard; uint8_t pin; - uint8_t framAddress; + uint32_t framAddress; FRAM *fram; uint32_t conversionInterval; bool autoSave;