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

Method setDayAccuracy

lib/AmsDataStorage/src/AmsDataStorage.cpp:606–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

604}
605
606void AmsDataStorage::setDayAccuracy(uint8_t accuracy) {
607 if(day.accuracy != accuracy) {
608 double multiplier = pow(10, day.accuracy)/pow(10, accuracy);
609 for(uint8_t i = 0; i < 24; i++) {
610 day.hImport[i] = day.hImport[i] * multiplier;
611 day.hExport[i] = day.hExport[i] * multiplier;
612 }
613 day.accuracy = accuracy;
614 }
615}
616
617uint8_t AmsDataStorage::getMonthAccuracy() {
618 return month.accuracy;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected