Skip to content

Commit

Permalink
Merge pull request #4 from ubopod/simplify-pyproject
Browse files Browse the repository at this point in the history
chore: simplify `pyproject.toml` and the setup instructions
  • Loading branch information
sassanh authored Dec 7, 2023
2 parents dcc0a7b + 48a5e8e commit da5963e
Show file tree
Hide file tree
Showing 4 changed files with 217 additions and 234 deletions.
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

0 comments on commit da5963e

Please sign in to comment.