Skip to content

Commit 53710e3

Browse files
authored
Merge pull request #26 from arduino/battery-perc-on-idle
fix: ALVIKDEV-95 battery readout must be stored in status when in idl…
2 parents 02529aa + dbe98ab commit 53710e3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

arduino_alvik/arduino_alvik.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ def _idle(self, delay_=1, check_on_thread=False, blocking=False) -> None:
135135

136136
soc_raw = struct.unpack('h', self.i2c.readfrom(0x36, 2))[0]
137137
soc_perc = soc_raw * 0.00390625
138+
self._battery_perc = soc_perc
138139
self._progress_bar(round(soc_perc))
139140
if blocking:
140141
self._lenghty_op(10000)

0 commit comments

Comments
 (0)