Skip to content

Commit

Permalink
fix camera initialization for cube
Browse files Browse the repository at this point in the history
  • Loading branch information
odudex committed Sep 26, 2024
1 parent fba1281 commit 2bbc533
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ edit_uri: edit/main/docs
docs_dir: docs
site_dir: public
extra:
latest_krux: krux-v24.09.0
latest_krux: krux-v24.09.1
latest_installer: v0.0.20-alpha-2
latest_installer_rpm: krux-installer-0.0.20_alpha-2-1.x86_64.rpm
latest_installer_deb: krux-installer_0.0.20-alpha-2_amd64.deb
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

[tool.poetry]
name = "krux"
version = "24.09.0"
version = "24.09.1"
description = "Open-source signing device firmware for Bitcoin"
authors = ["Jeff S <[email protected]>"]

Expand Down
13 changes: 5 additions & 8 deletions src/krux/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,12 @@ def __init__(self):
def initialize_sensor(self, grayscale=False):
"""Initializes the camera"""
self.antiglare_enabled = False
if self.cam_id in (OV7740_ID, GC2145_ID):
sensor.reset(freq=18200000)
if board.config["type"] == "cube":
# Rotate camera 180 degrees on Cube
sensor.set_hmirror(1)
sensor.set_vflip(1)
else:
sensor.reset()
sensor.reset(freq=18200000)
self.cam_id = sensor.get_id()
if board.config["type"] == "cube":
# Rotate camera 180 degrees on Cube
sensor.set_hmirror(1)
sensor.set_vflip(1)

Check warning on line 59 in src/krux/camera.py

View check run for this annotation

Codecov / codecov/patch

src/krux/camera.py#L58-L59

Added lines #L58 - L59 were not covered by tests
self.mode = COLOR_MODE
if grayscale and self.cam_id != GC2145_ID:
# GC2145 does not support grayscale
Expand Down
2 changes: 1 addition & 1 deletion src/krux/metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
VERSION = "24.09.0"
VERSION = "24.09.1"
SIGNER_PUBKEY = "03339e883157e45891e61ca9df4cd3bb895ef32d475b8e793559ea10a36766689b"

0 comments on commit 2bbc533

Please sign in to comment.