Skip to content

Commit 7b332b1

Browse files
authored
Release v1.3.0
Release v1.3.0
2 parents 5afdbc4 + 5594edc commit 7b332b1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+162
-119
lines changed

.bumpversion.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.2.0
2+
current_version = 1.3.0
33
commit = False
44
allow_dirty = True
55

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ci:
33

44
repos:
55
- repo: https://github.com/psf/black
6-
rev: 24.3.0
6+
rev: 24.4.0
77
hooks:
88
- id: black
99
- repo: https://github.com/pycqa/isort
@@ -18,7 +18,7 @@ repos:
1818
additional_dependencies:
1919
- flake8-annotations
2020
- repo: https://github.com/pre-commit/pre-commit-hooks
21-
rev: v4.5.0
21+
rev: v4.6.0
2222
hooks:
2323
- id: check-case-conflict
2424
- id: check-json
@@ -35,6 +35,6 @@ repos:
3535
- id: python-check-blanket-type-ignore
3636
- id: python-use-type-annotations
3737
- repo: https://github.com/astral-sh/ruff-pre-commit
38-
rev: v0.3.4
38+
rev: v0.3.7
3939
hooks:
4040
- id: ruff

CHANGELOG.md

Lines changed: 5 additions & 0 deletions

README.md

Lines changed: 3 additions & 3 deletions

code.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import gc
44
import math
5+
import os
56

67
from adafruit_datetime import datetime, timedelta
78
from adafruit_pyportal import PyPortal
@@ -35,26 +36,37 @@ def _utc_to_local(utc_timestamp: float, utc_offset: str = "-0000") -> datetime:
3536
return utc_time + delta
3637

3738

39+
# Starting with CircuitPython v9.0 an "sd" folder has to be created to be used as a mount point
40+
# For newer installs this should already be present but may not if migrating from v8.x
41+
# See: https://github.com/adafruit/circuitpython/issues/8872
42+
# See: https://github.com/adafruit/circuitpython/pull/8860
43+
if "sd" not in os.listdir("/"):
44+
# Our boot.py already makes the filesystem writeable so we shouldn't need to guard
45+
os.mkdir("/sd")
46+
3847
# Device Initialization
3948
PYPORTAL = PyPortal() # This also takes care of mounting the SD to /sd
4049
skyportal_ui = SkyPortalUI()
4150

4251
PYPORTAL.network.connect()
4352
print("Wifi connected")
4453

54+
SESSION = PYPORTAL.network._wifi.requests
55+
4556
# The internal PyPortal query to AIO returns as "%Y-%m-%d %H:%M:%S.%L %j %u %z %Z"
4657
# This method sets the internal clock, but we also retain it to transform the API time to local
4758
init_timestamp = PYPORTAL.get_local_time(location=secrets["timezone"])
4859
utc_offset = init_timestamp.split()[4]
4960

5061
grid_bounds = build_bounding_box()
51-
skyportal_ui.post_connect_init(grid_bounds)
62+
skyportal_ui.post_connect_init(grid_bounds, SESSION)
5263

5364
api_handler: APIHandlerBase
5465
if skyportal_config.AIRCRAFT_DATA_SOURCE == "adsblol":
5566
from skyportal.networklib import ADSBLol
5667

5768
api_handler = ADSBLol(
69+
request_session=SESSION,
5870
lat=skyportal_config.MAP_CENTER_LAT,
5971
lon=skyportal_config.MAP_CENTER_LON,
6072
radius=skyportal_config.GRID_WIDTH_MI * 2,
@@ -63,12 +75,13 @@ def _utc_to_local(utc_timestamp: float, utc_offset: str = "-0000") -> datetime:
6375
elif skyportal_config.AIRCRAFT_DATA_SOURCE == "opensky":
6476
from skyportal.networklib import OpenSky
6577

66-
api_handler = OpenSky(grid_bounds=grid_bounds)
78+
api_handler = OpenSky(request_session=SESSION, grid_bounds=grid_bounds)
6779
print("Using OpenSky as aircraft data source")
6880
elif skyportal_config.AIRCRAFT_DATA_SOURCE == "proxy":
6981
from skyportal.networklib import ProxyAPI
7082

7183
api_handler = ProxyAPI(
84+
request_session=SESSION,
7285
lat=skyportal_config.MAP_CENTER_LAT,
7386
lon=skyportal_config.MAP_CENTER_LON,
7487
radius=skyportal_config.GRID_WIDTH_MI * 2,

lib/adafruit_binascii.mpy

730 Bytes
Binary file not shown.

lib/adafruit_bitmap_font/bdf.mpy

-35 Bytes
Binary file not shown.
20 Bytes
Binary file not shown.
14 Bytes
Binary file not shown.

lib/adafruit_bitmap_font/pcf.mpy

-361 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)