Skip to content

Commit

Permalink
Release v0.2.3: Fix underflow of negative temperature values
Browse files Browse the repository at this point in the history
  • Loading branch information
CAM-Gerlach committed Nov 19, 2019
1 parent ffea5a5 commit 35ed1fe
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Brokkr Changelog


## Version 0.2.3 (2019-11-18)

Bugfix release with the following change:

* Fix pseudo-underflow in temperature data due to incorrect int interpretation



## Version 0.2.2 (2019-10-28)

Bugfix release with the following changes:
Expand Down
2 changes: 1 addition & 1 deletion src/brokkr/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Version file."""

VERSION_INFO = (0, 2, 2)
VERSION_INFO = (0, 2, 3)
__version__ = '.'.join((str(version) for version in VERSION_INFO))
9 changes: 5 additions & 4 deletions src/brokkr/sunsaver.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
("adc_vl_f", "V"),
("adc_ic_f", "A"),
("adc_il_f", "A"),
("t_hs", "F"),
("t_batt", "F"),
("t_amb", "F"),
("t_rts", "F"),
("t_hs", "T"),
("t_batt", "T"),
("t_amb", "T"),
("t_rts", "T"),
("charge_state", "S"),
("array_fault", "B"),
("vb_f", "V"),
Expand Down Expand Up @@ -76,6 +76,7 @@
"S": lambda val: str(val),
"I": lambda val: int(val),
"F": lambda val: float(val),
"T": lambda val: float(val) - 2**16 if val > 2**8 else float(val),
"B": lambda val: format(val, "b").zfill(16),
"BL": lambda hi, lo: format(hi << 16 | lo, "b").zfill(32),
"V": lambda val: round(val * 100 * 2 ** -15, 3),
Expand Down

0 comments on commit 35ed1fe

Please sign in to comment.