Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: simplify pyproject.toml and the setup instructions #4

Merged
merged 1 commit into from
Dec 7, 2023
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
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Version 0.5.2

- chore: simplify `pyproject.toml` and the setup instructions

## Version 0.5.1

- fix: incorrect local import path
Expand Down
5 changes: 3 additions & 2 deletions headless_kivy_pi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,9 @@ def transfer_to_display(
"""Transfer data to the display via SPI controller."""
logger.debug(f'Rendering frame with hash "{data_hash}"')

# Flip the image vertically
data = data[::-1, :, :3].astype(np.uint16)

color = (
((data[:, :, 0] & 0xF8) << 8)
| ((data[:, :, 1] & 0xFC) << 3)
Expand Down Expand Up @@ -450,8 +453,6 @@ def render_on_display(self: HeadlessWidget, *_: Any) -> None: # noqa: ANN401
HeadlessWidget.height,
-1,
)
# Flip the image vertically
data = data[::-1, :, :3].astype(np.uint16)
data_hash = hash(data.data.tobytes())
if data_hash == self.last_hash:
# Only drop FPS when the screen has not changed for at least one second
Expand Down
Loading