Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
olvidalo committed Nov 23, 2024
1 parent bb213d3 commit 03e2c73
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
from PyQt6.uic import loadUi
from send2trash import send2trash

from bt_controller_controller import BtControllerController, BtControllerCommand, BtControllerRequest, BtControllerState

try:
from bt_controller_controller import BtControllerController, BtControllerCommand, BtControllerRequest, BtControllerState
BT_AVAILABLE = True
except:
BT_AVAILABLE = False

from camera_worker import CameraWorker, CaptureImagesRequest, CameraStates, PropertyChangeEvent, ConfigRequest
from open_session_dialog import OpenSessionDialog
from photo_browser import PhotoBrowser
Expand Down Expand Up @@ -900,8 +906,10 @@ def excepthook(exc_type, exc_value, exc_traceback):


with loop:
if BtControllerController.BLEAK_AVAILABLE and QSettings().value("enableBluetooth", type=bool):
if BT_AVAILABLE and QSettings().value("enableBluetooth", type=bool):
loop.create_task(win.init_bluetooth())
else:
logging.info("Bluetooth not available. Is bleak installed?")

loop.run_until_complete(app_close_event.wait())

Expand Down

0 comments on commit 03e2c73

Please sign in to comment.