pass compile smart variable

This commit is contained in:
Siwat Sirichai 2024-03-23 10:29:04 +07:00
parent 7f55e3544d
commit 7c338324f3
1 changed files with 3 additions and 3 deletions

View File

@ -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)