Skip to content

Commit

Permalink
Yahboom anti-glare support different IO mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
odudex committed Jun 14, 2024
1 parent 48bfa69 commit d1d9980
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/krux/pages/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,11 @@ def callback(part_total, num_parts_captured, new_part):
elif self.ctx.input.enter_event():
return 1

# Anti-glare mode (M5stickV and Amigo)
if self.ctx.input.page_event():
# Anti-glare mode
if self.ctx.input.page_event() or (
# Yahboom may have page or page_prev mapped to its single button
board.config["type"] == "yahboom" and self.ctx.input.page_prev_event()
):
if self.ctx.camera.has_antiglare():
self._time_frame = time.ticks_ms()
self.ctx.display.to_portrait()
Expand Down

0 comments on commit d1d9980

Please sign in to comment.