Skip to content

Default partial-device-allowed to true across SDK and viewer - for back compat IMU BMI 088 support - #15070

Merged
Nir-Az merged 1 commit into
realsenseai:developmentfrom
Nir-Az:partial-allowed-default-on
May 18, 2026
Merged

Nir-Az merged 1 commit into
realsenseai:developmentfrom
Nir-Az:partial-allowed-default-on

Conversation

@Nir-Az

@Nir-Az Nir-Az commented May 18, 2026

Copy link
Copy Markdown
Collaborator

@
TL;DR: Flip the default of partial-device-allowed from false to true in the three places its read. With the watcher-level HID-binding deferral from #15058 (5 s MAX_DEFERRAL) in place, partial enumeration is the rare slow-HID corner case rather than the common path — surfacing the partial device and letting the supersede event upgrade it ~3 s later is a better UX than rejecting it outright and showing "no device" for that window.

Changes

Three one-line flips, no logic changes:

File Line Effect
src/ds/ds-private.cpp is_partial_device_allowed() fallback false→true SDK D400/D500 USB factory default
src/dds/rsdds-device-factory.cpp watcher singleton partial_capabilities_allowed fallback false→true DDS factory default
common/viewer.cpp "Allow partial device initialization" checkbox initial state false→true Viewer UI default for fresh users

Aligning all three keeps UI and SDK behavior coherent: fresh users see a checked box and the SDK behaves as the box says.

Existing-user behavior

Users who have already toggled the checkbox have context.partial-device-allowed written in their realsense-config.json — the SDK reads that explicit value and the new defaults dont apply to them.

Verification

Hot-plug stress on D455 via Acroname hub, 10 iterations (partial-device-allowed: true, observing both added events per cycle):

Outcome Count
Full from first event (HID bound within 5 s) 8/10
Partial → full supersede (~3 s gap) 2/10
Partial only (no supersede) 0/10
No device 0/10

With the new default, the 2/10 slow-HID cases produce a brief no-IMU window that auto-recovers, instead of a 3–4 s "device not found" gap under the old default.

Test plan

@Nir-Az
Nir-Az requested a review from OhadMeir May 18, 2026 11:01

@Nir-Az Nir-Az left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

rs-agentic bot automated review

Summary of findings (3 inline comments below):

  1. 🐛 Inconsistent default in constructor — the class-level default parameter () was not updated alongside the call-site default.
  2. ⚠️ Silent partial-device exposure — SDK consumers that don't set the flag explicitly will now silently receive partial devices (e.g., no IMU). No public API/changelog note.
  3. 🧪 No unit tests — no automated test for the new default or for ensuring partial-device-allowed: false still rejects partials.
  4. 📝 Missing newline at EOF in src/ds/ds-private.cpp (pre-existing, but could be fixed in this PR).
  5. 🔗 Undeclared dependency on PR #15058 — the PR body mentions MAX_DEFERRAL from #15058 as a prerequisite; consider adding a hard dependency or merge order note.

This comment was auto-generated by the rs-agentic bot

Comment thread src/dds/rsdds-device-factory.cpp Resolved
Comment thread src/dds/rsdds-device-factory.cpp Resolved
Comment thread src/ds/ds-private.cpp Resolved
Comment thread common/viewer.cpp Resolved
@Nir-Az

Nir-Az commented May 18, 2026

Copy link
Copy Markdown
Collaborator Author

🧪 Missing Test Coverage — rs-agentic bot

This PR changes a behavioural default that affects all SDK consumers and the Viewer, but no automated tests are added or updated.

Specifically, the test plan checks (in the PR body) are all manual:

  • ✅ Build clean on Windows VS 2022
  • ✅ Smoke partial-device-allowed: false still rejects
  • ✅ CI: libci pipeline

Suggested automated tests (aligned with the existing pytest / unit-tests/dds/ framework):

Test Location What to assert
test-partial-default-true unit-tests/dds/ rsdds_device_factory reads partial-device-allowed with default true when settings key is absent
test-partial-override-false unit-tests/dds/ Passing {"partial-device-allowed": false} in context settings still rejects partial device
test-ds-partial-default-true unit-tests/ is_partial_device_allowed(ctx) returns true when no key is present in context settings

Without regression tests, a future change that accidentally reverts the default back to false will not be caught by CI.


🔗 Merge-order dependency on PR #15058

The PR description correctly states that this change "relies on the watcher-level HID-binding deferral from #15058 (5 s MAX_DEFERRAL)". Without #15058 merged first, the partial→full supersede path will not work and the 2/10 slow-HID cases described in the verification table will produce a permanent partial device (no IMU, no auto-recovery).

Suggestion: Either:

This comment was auto-generated by the rs-agentic bot

@Nir-Az Nir-Az changed the title ds: default partial-device-allowed to true across SDK and viewer Default partial-device-allowed to true across SDK and viewer - for back compat IMU BMI 088 support May 18, 2026
@Nir-Az
Nir-Az merged commit c4bb712 into realsenseai:development May 18, 2026
29 of 30 checks passed
Nir-Az added a commit that referenced this pull request May 18, 2026
@Nir-Az
Nir-Az deleted the partial-allowed-default-on branch May 24, 2026 07:03
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.

2 participants