Skip to content

Commit

Permalink
GPS subclasses, requirements + code cleansing Allow setting port and …
Browse files Browse the repository at this point in the history
…host for test purpose
  • Loading branch information
Ptosiek committed Oct 17, 2023
1 parent dd5ceef commit 9316795
Show file tree
Hide file tree
Showing 32 changed files with 1,587 additions and 1,411 deletions.
15 changes: 9 additions & 6 deletions modules/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
from modules.utils.map import get_maptile_filename, get_tilexy_and_xy_in_tile
from modules.utils.timer import Timer


BOOT_FILE = "/boot/config.txt"
_IS_RASPI = False
try:
Expand Down Expand Up @@ -806,17 +805,21 @@ async def delay_init(self):
if is_available:
self.G_BT_ADDRESSES = await self.bt_pan.find_bt_pan_devices()

# logger, sensor
await self.gui.set_boot_status("initialize sensor...")
self.logger.delay_init()

# gadgetbridge (has to be before gui but after sensors for proper init state of buttons)
if self.G_IS_RASPI:
try:
from modules.helper.ble_gatt_server import GadgetbridgeService

self.ble_uart = GadgetbridgeService(self)
self.ble_uart = GadgetbridgeService(
self.G_PRODUCT, self.logger.sensor.sensor_gps
)
except Exception as e: # noqa
app_logger.info(f"Gadgetbridge service not initialized: {e}")

# logger, sensor
await self.gui.set_boot_status("initialize sensor...")
self.logger.delay_init()

# gui
await self.gui.set_boot_status("initialize screens...")
self.gui.delay_init()
Expand Down
Loading

0 comments on commit 9316795

Please sign in to comment.