Compare commits
2 Commits
8aeb6ab30a
...
520fd76b91
Author | SHA1 | Date |
---|---|---|
Siwat Sirichai | 520fd76b91 | |
Siwat Sirichai | c2e45490b0 |
|
@ -84,6 +84,9 @@ void CurrentTransformerCard::saveEnergy(){
|
||||||
}
|
}
|
||||||
void CurrentTransformerCard::loadEnergy(){
|
void CurrentTransformerCard::loadEnergy(){
|
||||||
this->fram->read(this->framAddress, (uint8_t*)&this->energy, sizeof(this->energy));
|
this->fram->read(this->framAddress, (uint8_t*)&this->energy, sizeof(this->energy));
|
||||||
|
if (this->energy < 0 || isnan(this->energy)) {
|
||||||
|
this->energy = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CurrentTransformerCard::setEnergyAutoSave(bool autoSave){
|
void CurrentTransformerCard::setEnergyAutoSave(bool autoSave){
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define SDK_VESRION "2.9.3"
|
#define SDK_VESRION "2.9.4"
|
Loading…
Reference in New Issue