| 580 | } |
| 581 | |
| 582 | bool 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 | |
| 602 | uint8_t AmsDataStorage::getDayAccuracy() { |
| 603 | return day.accuracy; |