Skip to content

Fix DEV-740 USB dock reconnect logging handoff#108

Merged
marknolan merged 3 commits into
mainfrom
copilot/fix-usb-docking-logging-issue
May 18, 2026
Merged

Fix DEV-740 USB dock reconnect logging handoff#108
marknolan merged 3 commits into
mainfrom
copilot/fix-usb-docking-logging-issue

Conversation

@marknolan

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Refines the dock/USB handoff gating so that dock state changes are no longer entirely suppressed during sensing. The previous coarse !sensing guard is replaced with a finer-grained predicate (LogAndStream_allowDockComms) that defers only the communication-interface init (DockUart / USB-CDC/MSC) while BT streaming is active; SD routing, dock state tracking and the dock state-change sequence now always proceed. Deferred comms init is expected to be restored later by ShimSens_stopSensing(1) when BT streaming ends.

Changes:

  • Drop the LogAndStream_allowProcessDockChange() gating from LogAndStream_dockOrUsbStateUpdate() so dock/USB state changes are always processed.
  • Rename LogAndStream_allowProcessDockChange()LogAndStream_allowDockComms() and switch its condition from !sensing to !btStreaming; apply it inside assignSdToUsb (gates USB_init) and assignSdToDock (gates DockUart_init).
  • Update the corresponding declaration in the header.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
log_and_stream_common.h Renames the public predicate from allowProcessDockChange to allowDockComms.
log_and_stream_common.c Removes top-level dock-change gate, narrows scope to comms init, and changes condition to !btStreaming.

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

Comment thread log_and_stream_common.c
Comment thread log_and_stream_common.c
Comment thread log_and_stream_common.c
@marknolan marknolan merged commit 099e2cd into main May 18, 2026
1 check passed
@marknolan marknolan deleted the copilot/fix-usb-docking-logging-issue branch May 18, 2026 16:05
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