Skip to content

Add VGA/2K/4K resolution - #217

Draft
johannesschrimpf wants to merge 1 commit into
masterfrom
streaming
Draft

Add VGA/2K/4K resolution#217
johannesschrimpf wants to merge 1 commit into
masterfrom
streaming

Conversation

@johannesschrimpf

@johannesschrimpf johannesschrimpf commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Description

Add 480 (VGA), 1440 (2K) and 2160 (4K) to the camera resolution property, using the enum members that actually exist in the protocol (RESOLUTION_VGA_480P, RESOLUTION_QHD_2K, RESOLUTION_UHD_4K). Add tests for the resolution mapping in both directions and for the existing streaming_protocol property, which was previously untested.

Checklist before merging

  • Run the tests while connected to a drone
  • Update the package version according to semver

@codecov

codecov Bot commented Jun 9, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.19%. Comparing base (d5ab7a4) to head (8ffcbaa).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #217      +/-   ##
==========================================
+ Coverage   77.88%   79.19%   +1.30%     
==========================================
  Files          11       11              
  Lines        1723     1735      +12     
==========================================
+ Hits         1342     1374      +32     
+ Misses        381      361      -20     
Flag Coverage Δ
macos-latest_3.10 79.19% <100.00%> (+1.30%) ⬆️
macos-latest_3.11 79.19% <100.00%> (+1.30%) ⬆️
macos-latest_3.12 79.19% <100.00%> (+1.30%) ⬆️
macos-latest_3.13 79.19% <100.00%> (+1.30%) ⬆️
macos-latest_3.14 79.19% <100.00%> (+1.30%) ⬆️
ubuntu-latest_3.10 79.19% <100.00%> (+1.30%) ⬆️
ubuntu-latest_3.11 79.19% <100.00%> (+1.30%) ⬆️
ubuntu-latest_3.12 79.19% <100.00%> (+1.30%) ⬆️
ubuntu-latest_3.13 79.19% <100.00%> (+1.30%) ⬆️
ubuntu-latest_3.14 79.19% <100.00%> (+1.30%) ⬆️
windows-latest_3.10 79.19% <100.00%> (+1.30%) ⬆️
windows-latest_3.11 79.19% <100.00%> (+1.30%) ⬆️
windows-latest_3.12 79.19% <100.00%> (+1.30%) ⬆️
windows-latest_3.13 79.19% <100.00%> (+1.30%) ⬆️
windows-latest_3.14 79.19% <100.00%> (+1.30%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request updates the SDK’s camera configuration surface to align with the underlying protocol by expanding supported camera resolutions (VGA/2K/4K) and adding streaming protocol access, along with tests to validate the new behavior.

Changes:

  • Extend Camera.resolution to support 480 (VGA), 1440 (2K), and 2160 (4K) mappings in addition to existing values.
  • Add Camera.streaming_protocol getter/setter behavior and corresponding tests.
  • Add/expand unit tests for resolution and streaming_protocol properties.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
blueye/sdk/camera.py Extends resolution mapping and adds streaming protocol property logic.
tests/test_camera.py Adds parametrized tests for new resolution values and streaming protocol getter/setter validation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread blueye/sdk/camera.py Outdated
Add 480 (VGA), 1440 (2K) and 2160 (4K) to the camera resolution
property, using the enum members that actually exist in the protocol
(RESOLUTION_VGA_480P, RESOLUTION_QHD_2K, RESOLUTION_UHD_4K). Add tests
for the resolution mapping in both directions and for the existing
streaming_protocol property, which was previously untested.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@johannesschrimpf
johannesschrimpf requested a review from Copilot June 9, 2026 12:17
@johannesschrimpf johannesschrimpf changed the title Add VGA/2K/4K resolution and streaming protocol support Add VGA/2K/4K resolution Jun 9, 2026

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

Comment thread blueye/sdk/camera.py
Comment on lines 1005 to 1018
self._update_camera_parameters()
if self._camera_parameters.resolution == blueye.protocol.Resolution.RESOLUTION_HD_720P:
if self._camera_parameters.resolution == blueye.protocol.Resolution.RESOLUTION_VGA_480P:
return 480
elif self._camera_parameters.resolution == blueye.protocol.Resolution.RESOLUTION_HD_720P:
return 720
elif (
self._camera_parameters.resolution == blueye.protocol.Resolution.RESOLUTION_FULLHD_1080P
):
return 1080
elif self._camera_parameters.resolution == blueye.protocol.Resolution.RESOLUTION_QHD_2K:
return 1440
elif self._camera_parameters.resolution == blueye.protocol.Resolution.RESOLUTION_UHD_4K:
return 2160

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants