-
Notifications
You must be signed in to change notification settings - Fork 523
Matter Camera: Include all supported resolutions #2707
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Test Results 71 files 480 suites 0s ⏱️ Results for commit bf77d63. ♻️ This comment has been updated with latest results. |
|
Minimum allowed coverage is 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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
916a41c to
bf77d63
Compare
This change adds logic for including the resolutions exposed by the
VideoSensorParamsandMinViewportattributes insupportedResolutions, rather than only looking at the resolution embedded withinRateDistortionTradeOffPoints.