MCPcopy Create free account
hub / github.com/UtilitechAS/amsreader-firmware / setMonthData

Method setMonthData

lib/AmsDataStorage/src/AmsDataStorage.cpp:582–600  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

580}
581
582bool AmsDataStorage::setMonthData(MonthDataPoints& month) {
583 if(month.version == 6 || month.version == 7) {
584 this->month = month;
585 this->month.version = 7;
586 return true;
587 } else if(month.version == 5) {
588 this->month = month;
589 this->month.accuracy = 1;
590 this->month.version = 7;
591 return true;
592 } else if(month.version == 4) {
593 this->month = month;
594 for(uint8_t i = 0; i < 31; i++) this->month.dExport[i] = 0;
595 this->month.accuracy = 1;
596 this->month.version = 7;
597 return true;
598 }
599 return false;
600}
601
602uint8_t AmsDataStorage::getDayAccuracy() {
603 return day.accuracy;

Callers 1

configFileParseFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected