Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions python/PiFinder/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from PiFinder.multiproclogging import MultiprocLogging
from PiFinder.catalogs import CatalogBuilder, CatalogFilter, Catalogs
from PiFinder.calc_utils import sf_utils
from PiFinder.state_utils import sleep_for_framerate

from PiFinder.ui.console import UIConsole
from PiFinder.ui.menu_manager import MenuManager
Expand Down Expand Up @@ -195,10 +196,6 @@ def update(self):
if _imu["moving"]:
self.wake_up()

# should we pause execution for a bit?
if self.shared_state.power_state() < 1:
time.sleep(0.2)

def get_sleep_timeout(self):
"""
returns the sleep timeout amount
Expand Down Expand Up @@ -557,7 +554,9 @@ def main(
else:
console.write(console_msg)
except queue.Empty:
time.sleep(0.1)
# Frame-rate-limit the main loop; sleep_for_framerate also
# handles power-save by sleeping longer when asleep.
sleep_for_framerate(shared_state)

# GPS
try:
Expand Down
Loading
Loading