Docs improvements (#8641)

* go all in on ruff

* upgrade docusaurus

* add netlify toml

* broken link

* fix netlify toml

* start filling out guide

* add debian setup detail

* simplify bash command
This commit is contained in:
Blake Blackshear
2023-11-18 14:04:43 +00:00
committed by GitHub
parent c6208b266b
commit 4879de263b
22 changed files with 7152 additions and 13125 deletions

View File

@@ -225,12 +225,8 @@ class RecordingMaintainer(threading.Thread):
# if cached file's start_time is earlier than the retain days for the camera
if start_time <= (
(
datetime.datetime.now().astimezone(datetime.timezone.utc)
- datetime.timedelta(
days=self.config.cameras[camera].record.retain.days
)
)
datetime.datetime.now().astimezone(datetime.timezone.utc)
- datetime.timedelta(days=self.config.cameras[camera].record.retain.days)
):
# if the cached segment overlaps with the events:
overlaps = False

View File

@@ -287,17 +287,14 @@ def yuv_crop_and_resize(frame, region, height=None):
# copy u2
yuv_cropped_frame[
size + uv_channel_y_offset : size + uv_channel_y_offset + uv_crop_height,
size // 2
+ uv_channel_x_offset : size // 2
size // 2 + uv_channel_x_offset : size // 2
+ uv_channel_x_offset
+ uv_crop_width,
] = frame[u2[1] : u2[3], u2[0] : u2[2]]
# copy v1
yuv_cropped_frame[
size
+ size // 4
+ uv_channel_y_offset : size
size + size // 4 + uv_channel_y_offset : size
+ size // 4
+ uv_channel_y_offset
+ uv_crop_height,
@@ -306,14 +303,11 @@ def yuv_crop_and_resize(frame, region, height=None):
# copy v2
yuv_cropped_frame[
size
+ size // 4
+ uv_channel_y_offset : size
size + size // 4 + uv_channel_y_offset : size
+ size // 4
+ uv_channel_y_offset
+ uv_crop_height,
size // 2
+ uv_channel_x_offset : size // 2
size // 2 + uv_channel_x_offset : size // 2
+ uv_channel_x_offset
+ uv_crop_width,
] = frame[v2[1] : v2[3], v2[0] : v2[2]]