Skip to content

Feature/demo room - #1492

Merged
ndorin merged 10 commits into
releasefrom
feature/demo-room
Sep 29, 2026
Merged

ndorin merged 10 commits into
releasefrom
feature/demo-room

Conversation

@ndorin

@ndorin ndorin commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

This pull request introduces several enhancements and fixes to the mock device infrastructure and routing logic, focusing on improved simulation fidelity, better handling of routing midpoints, and expanded mock device support. The most notable changes include the addition of a mock lighting device, improved communication monitoring for all mock devices, and refined routing logic for midpoints and sinks.

closes #1490
closes #1491

New mock device infrastructure:

  • Added MockLightingDevice, a simulated lighting scene controller with configurable scenes and a corresponding factory for config-driven instantiation. This allows for more complete simulation and testing of lighting controls.
  • Introduced MockCommunicationMonitor, a status monitor that always reports as online, and integrated it into all mock devices (MockAudioDevice, MockDisplay, MockRoutingMidpoint, and the new MockLightingDevice) to provide consistent communication status simulation. [1] [2] [3] [4] [5] [6] [7]

Routing logic and device improvements:

  • Enhanced routing logic for midpoints: When a route terminates on a midpoint with no unambiguous output, the code now correctly handles the switch by potentially passing a null output selector, and ensures that output port usage tracking and release are only performed when an output port exists. [1] [2] [3] [4]
  • Improved GenericSink input port selection: Now tracks and exposes the last switched-to input port, uses port selectors for accurate switching, and logs warnings for invalid selectors. [1] [2] [3]

Mock routing midpoint enhancements:

  • Added support for video sync feedback on input slots: The MockRoutingMidpoint now links input slots to real video sync status of transmitters, updating sync status dynamically after all devices are constructed. This improves simulation of routing scenarios involving video sync. [1] [2] [3]

Other improvements:

  • Minor code cleanups and using directive additions for consistency and clarity in several files. [1] [2]

These changes collectively make the mock device infrastructure more robust, realistic, and useful for testing and simulation of complex routing and device behaviors.

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.

Copilot review overview

🟡 Changes recommended

USB routing, initial lighting feedback, and split audio/video midpoint feedback remain incorrect.

Review effort: Balanced
Findings: 4 Medium severity

Open (4)
What changed in this PR

Enhances mock-device simulation, routing feedback, terminal midpoint handling, and development URL resolution.

Changes:

  • Adds mock lighting and communication-monitor infrastructure.
  • Improves midpoint, sink, and per-signal routing feedback.
  • Preserves development-server URLs and emits explicit cleared source states.
File Description
MobileControlTouchpanelController.cs Resolves development-server URLs consistently.
IHasNamedRoutingSlotsMessenger.cs Emits explicit per-signal route state.
ICurrentSourcesMessenger.cs Serializes cleared sources as empty strings.
MockRoutingMidpointPropertiesConfig.cs Adds video-sync configuration.
MockRoutingMidpoint.cs Adds sync linking and per-signal route tracking.
MockCommunicationMonitor.cs Adds configurable mock online status.
MockLightingDevice.cs Adds configurable mock lighting scenes.
GenericSink.cs Tracks the selected input port.
MockDisplay.cs Adds communication monitoring.
MockAudioDevice.cs Adds communication monitoring.
RouteDescriptor.cs Handles null terminal midpoint outputs safely.
Extensions.cs Resolves terminal midpoint outputs when unambiguous.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/PepperDash.Essentials.Devices.Common/Routing/MockRoutingMidpoint.cs Outdated
ndorin and others added 2 commits September 29, 2026 11:37
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
MockRoutingOutputSlotInfo and IHasNamedRoutingSlotsMessenger only handled
Audio/Video, dropping USB routes. RouteSwitchDescriptor gains an optional
SignalType so split audio/video routes from AudioVideo inputs report
correctly over the routing feedback websocket.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ndorin
ndorin merged commit c6249c7 into release Sep 29, 2026
3 checks passed
@ndorin
ndorin deleted the feature/demo-room branch September 29, 2026 17:45
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