Closed
Description
I can declare a float value and use it returning the default value, but as soon as I add an assignment statement to my code I get a compilation error. I was developing on the cloud and had the problem and then I downloaded to my local IDE and have the same problem.
Here's the code:
float LowVoltageTrigger;
EEPROMStorage<float> permLowVoltageTrigger(0,12.2);
...
permLowVoltageTrigger.set(LowVoltageTrigger);
Here's the error:
WARNING: library EEPROM-Storage claims to run on particle-photon, particle-electron, avr architecture(s) and may be incompatible with your current board which runs on renesas_uno architecture(s).
In file included from /Users/xxxxxxxx/Library/CloudStorage/OneDrive-xxxxxxxx.com/Active/APU Control/APUResearch2/APUResearch2.ino:2:0:
/Users/xxxxxxxx/Documents/Arduino/libraries/EEPROM-Storage/src/EEPROM-Storage.h: In instantiation of 'void EEPROMStorage<T>::set(const T&) const [with T = float]':
/Users/xxxxxxxx/Library/CloudStorage/OneDrive-xxxxxxxx.com/Active/APU Control/APUResearch2/APUResearch2.ino:447:46: required from here
/Users/xxxxxxxx/Documents/Arduino/libraries/EEPROM-Storage/src/EEPROM-Storage.h:273:7: error: passing 'const EEPROMStorage<float>' as 'this' argument discards qualifiers [-fpermissive]
EEPROM.update(this->checksumAddress(), checksum);
^~~~~~
/Users/xxxxxxxx/Documents/Arduino/libraries/EEPROM-Storage/src/EEPROM-Storage.h:314:14: note: in call to 'uint16_t EEPROMStorage<T>::checksumAddress() [with T = float; uint16_t = short unsigned int]'
uint16_t checksumAddress()
^~~~~~~~~~~~~~~
exit status 1
Compilation error: exit status 1
Metadata
Metadata
Assignees
Labels
No labels