Skip to content

Commit

Permalink
fix: revert numpy data structure storing display data to uint16 as 2 …
Browse files Browse the repository at this point in the history
…bytes are used per pixel
  • Loading branch information
sassanh committed Mar 24, 2024
1 parent 823b72d commit 2b88edf
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/integration_delivery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ jobs:
path: artifacts

- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
files: artifacts/*
tag_name: v${{ needs.build.outputs.version }}
Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## Version 0.7.2

- fix: revert numpy data structure storing display data to uint16 as 2 bytes are
used per pixel

## Version 0.7.1

- fix: don't interact with window system when running headless for tests
Expand Down
3 changes: 2 additions & 1 deletion headless_kivy_pi/display.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Implement `transfer_to_display` function."""

from __future__ import annotations

from typing import TYPE_CHECKING
Expand All @@ -24,7 +25,7 @@ def transfer_to_display(
logger.debug(f'Rendering frame with hash "{data_hash}"')

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

color = (
((data[:, :, 0] & 0xF8) << 8)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "headless-kivy-pi"
version = "0.7.1"
version = "0.7.2"
description = "Headless renderer for Kivy framework on Raspberry Pi"
authors = ["Sassan Haradji <[email protected]>"]
license = "Apache-2.0"
Expand Down

0 comments on commit 2b88edf

Please sign in to comment.