Fix crash on 100%SoC
This commit is contained in:
parent
f6de481fa1
commit
94d0308da5
|
@ -183,8 +183,8 @@ class DbusBatteryService:
|
||||||
self.dailyResetDone = datetime.now().day
|
self.dailyResetDone = datetime.now().day
|
||||||
|
|
||||||
def _update(self):
|
def _update(self):
|
||||||
time = datetime.now()
|
timeLastUpdate = datetime.now()
|
||||||
self.lastUpdated = time.timestamp()
|
self.lastUpdated = timeLastUpdate.timestamp()
|
||||||
|
|
||||||
## Monitor communication ##
|
## Monitor communication ##
|
||||||
if (self._bat.updated != -1 and self.lastUpdated == 0) or ((self.lastUpdated - self._bat.updated) < 10):
|
if (self._bat.updated != -1 and self.lastUpdated == 0) or ((self.lastUpdated - self._bat.updated) < 10):
|
||||||
|
|
Loading…
Reference in a new issue