Skip to content

Commit

Permalink
fix(camera): closing the camera viewfinder will close the picamera in…
Browse files Browse the repository at this point in the history
…stance so that it can be used again
  • Loading branch information
sassanh committed Jul 21, 2024
1 parent 62f1f20 commit 207d010
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
- feat(core): show hostname of device on the home page - closes #128
- feat(core): long-pressing the reset button for 3 seconds or more reboots the device - closes #116
- fix(keypad): keypad becoming unresponsive if a key was pressed while the app was loading - closes #118
- fix(camera): closing the camera viewfinder will close the picamera instance so that it can be used again

## Version 0.15.4

Expand Down
1 change: 1 addition & 0 deletions ubo_app/services/000-keypad/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ def init_i2c(self: Keypad) -> None:
status='released' if is_mic_active else 'pressed',
)

# This should always be the last line of this method
self.clear_interrupt_flags(new_i2c)

def key_press_cb(self: Keypad, _: object) -> None:
Expand Down
1 change: 1 addition & 0 deletions ubo_app/services/040-camera/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,7 @@ def handle_stop_viewfinder() -> None:
cancel_subscription()
if picamera2:
picamera2.stop()
picamera2.close()

cancel_subscription = subscribe_event(
CameraStopViewfinderEvent,
Expand Down

0 comments on commit 207d010

Please sign in to comment.