Skip to content

Conversation

@nickolas-deboom
Copy link
Contributor

This change adds logic for including the resolutions exposed by the VideoSensorParams and MinViewport attributes in supportedResolutions, rather than only looking at the resolution embedded within RateDistortionTradeOffPoints.

@github-actions
Copy link

github-actions bot commented Jan 14, 2026

Test Results

   71 files    480 suites   0s ⏱️
2 488 tests 2 488 ✅ 0 💤 0 ❌
4 270 runs  4 270 ✅ 0 💤 0 ❌

Results for commit bf77d63.

♻️ This comment has been updated with latest results.

@github-actions
Copy link

github-actions bot commented Jan 14, 2026

File Coverage
All files 92%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/third_reality_mk1/init.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/embedded_cluster_utils.lua 38%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/utils.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_utils/device_configuration.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/ikea_scroll/init.lua 85%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/device_configuration.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_utils/utils.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/eve_energy/init.lua 91%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/attribute_handlers.lua 95%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/camera_handlers/capability_handlers.lua 78%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/camera/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/init.lua 97%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/sub_drivers/aqara_cube/init.lua 96%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/attribute_handlers.lua 85%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/capability_handlers.lua 89%
/home/runner/work/SmartThingsEdgeDrivers/SmartThingsEdgeDrivers/drivers/SmartThings/matter-switch/src/switch_handlers/event_handlers.lua 97%

Minimum allowed coverage is 90%

Generated by 🐒 cobertura-action against bf77d63

local max_encoded_pixel_rate = device:get_field(camera_fields.MAX_ENCODED_PIXEL_RATE)
local max_fps = device:get_field(camera_fields.MAX_FRAMES_PER_SECOND)
local emit_capability = max_encoded_pixel_rate ~= nil and max_fps ~= nil
local emit_capability = max_encoded_pixel_rate ~= nil and max_fps ~= nil and device:get_field(camera_fields.MIN_RESOLUTION) and device:get_field(camera_fields.MAX_RESOLUTION)
Copy link
Contributor

Choose a reason for hiding this comment

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

just a nit, but if this is only being used to gate that if statement, maybe we should just put this in the statement itself? Like if <all this boolean stuff> then, and remove this variable altogether? Confused me a bit reading this initially.

Also, if you go with this suggestion, maybe make all of these booleans either use the explicit "~= nil" syntax or make them all implicit, rather than a mix of the 2?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, made them all implicit in the latest commit. Also, I realized I could clean up some logic in video_sensor_parameters_handler (I developed that handler while using an embedded version of the CAVSM cluster and for some reason I wasn't able to directly index into VideoSensorParamsStruct. Now with the actual cluster it works just fine)

This change adds logic for including the resolutions exposed by the
VideoSensorParams and MinViewport attributes in supportedResolutions,
rather than only looking at the resolution embedded within
RateDistortionTradeOffPoints.
@nickolas-deboom nickolas-deboom force-pushed the fix/matter-camera-consider-video-sensor-params-and-min-viewport-resolution-when-setting-supported-resolutions branch from 916a41c to bf77d63 Compare January 15, 2026 19:59
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.

5 participants