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)