From 7c338324f392d18f9725a0bdcf45107fc7eca6bc Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Sat, 23 Mar 2024 10:29:04 +0700 Subject: [PATCH] pass compile smart variable --- ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/SmartVariable.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/SmartVariable.cpp b/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/SmartVariable.cpp index 229709e..66251ba 100644 --- a/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/SmartVariable.cpp +++ b/ESPMegaPRO-OS-SDK/lib/ESPMegaPRO/SmartVariable.cpp @@ -58,7 +58,7 @@ void SmartVariable::publishValue() this->iot->publish(this->topic, this->value); } -void SmartVariable::bindFRAM(FRAM fram, uint32_t framAddress) +void SmartVariable::bindFRAM(FRAM *fram, uint32_t framAddress) { this->bindFRAM(fram, framAddress, true); } @@ -73,13 +73,13 @@ void SmartVariable::bindFRAM(FRAM *fram, uint32_t framAddress, bool loadValue) void SmartVariable::loadValue() { - this->fram.read(this->framAddress, (uint8_t *)this->value, this->size); + this->fram->read(this->framAddress, (uint8_t *)this->value, this->size); this->setValue(this->value); } void SmartVariable::saveValue() { - this->fram.write(this->framAddress, (uint8_t *)this->value, this->size); + this->fram->write(this->framAddress, (uint8_t *)this->value, this->size); } void SmartVariable::setValueAutoSave(bool autoSave)