mirror of
https://github.com/xcat2/confluent.git
synced 2024-11-21 09:02:07 +00:00
Avoid redrawing 'powered off' redundantly.
If the power state stays the same between queries, take no action to clear screen and draw redundant data. In the case of misreporting devices, it mitigates the impact of incorrect reporting, while generally preserving the output behavior when accurate.
This commit is contained in:
parent
d8c633a7d5
commit
b1f8cf8f12
@ -948,8 +948,9 @@ def main():
|
||||
except IOError:
|
||||
pass
|
||||
if powerstate is None or powertime < time.time() - 10: # Check powerstate every 10 seconds
|
||||
if powerstate == None:
|
||||
powerstate = True
|
||||
powertime = time.time()
|
||||
powerstate = True
|
||||
check_power_state()
|
||||
else:
|
||||
currcommand = prompt()
|
||||
|
Loading…
Reference in New Issue
Block a user