Skip to content

Commit

Permalink
Comment for precision fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicalh committed Mar 31, 2016
1 parent 1030794 commit 1628ff8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ekmmeters.py
Original file line number Diff line number Diff line change
Expand Up @@ -1600,8 +1600,12 @@ def convertData(self, contents, def_buf, kwh_scale=ScaleKWH.EmptyScale):
"""
log_str = ""
count = 0

# getting scale does not require a full read. It does require that the
# reads have the scale value in the first block read. This requirement
# is filled by default in V3 and V4 requests
if kwh_scale == ScaleKWH.EmptyScale:
if self.m_kwh_precision <= 0 :
if self.m_kwh_precision == ScaleKWH.EmptyScale :
scale_offset = int(def_buf.keys().index(Field.kWh_Scale))
self.m_kwh_precision = kwh_scale = int(contents[scale_offset])

Expand Down

0 comments on commit 1628ff8

Please sign in to comment.