Conversation
… name assignments in HdMdNxM4KzEController
…4kEBridgeableController
- Remove the obsolete HdMdNxM4Ke class. - Rename HdMdNxM4KeBridgeableController to HdMdNxM4Ke. - Add `hdmd4x14ke` to the supported types. - Keep `hdmd4x14ke-bridgeable` as a supported type for backward compatibility. BREAKING CHANGE: Remove the obsolete HdMd4NxM4ke class.
… HdMdNxM4kEController
…ack handling in HdMdNxM4kEController
There was a problem hiding this comment.
Pull request overview
This PR adds support for HdMdNxM4kE switchers to the plugin by refactoring the existing HdMdNxM4kEController class from an obsolete implementation to a new bridgeable controller that supports multiple switcher models (HdMd4x14kE, HdMd4x24kE, and HdMd6x24kE). The changes consolidate configuration classes and update the factory pattern to support additional device types.
Changes:
- Refactored HdMdNxM4kEController from obsolete to fully bridgeable implementation with feedback collections
- Unified configuration by removing duplicate
HdMdNxM4kEBridgeablePropertiesConfigclass - Added support for multiple switcher models through enhanced factory pattern
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 13 comments.
| File | Description |
|---|---|
| src/PepperDash.Essentials.DM.csproj | Whitespace and indentation cleanup |
| src/Config/HdMdNxM4kEPropertiesConfig.cs | Consolidated config classes, removed duplicate HdMdNxM4kEBridgeablePropertiesConfig, added NoRouteText property |
| src/Chassis/HdMdNxM4kEController.cs | Complete rewrite from obsolete implementation to bridgeable controller with feedback support and factory for multiple models |
| src/Chassis/HdMdNxM4KzEController.cs | Updated ZE controller with consistent naming, improved null handling, and updated factory |
Comments suppressed due to low confidence (1)
src/Chassis/HdMdNxM4KzEController.cs:21
- Field '_Chassis' can be 'readonly'.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| foreach (FeedbackCollection<BoolFeedback> fbCollection in newFbs) | ||
| { | ||
| foreach (var item in newFbs) | ||
| { | ||
| AddCollectionToList(item); | ||
| } | ||
| } | ||
| } | ||
| public void AddCollectionsToList(params FeedbackCollection<IntFeedback>[] newFbs) | ||
| { | ||
| foreach (FeedbackCollection<IntFeedback> fbCollection in newFbs) | ||
| { | ||
| foreach (var item in newFbs) | ||
| { | ||
| AddCollectionToList(item); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| public void AddCollectionsToList(params FeedbackCollection<StringFeedback>[] newFbs) | ||
| { | ||
| foreach (FeedbackCollection<StringFeedback> fbCollection in newFbs) | ||
| { | ||
| foreach (var item in newFbs) | ||
| { | ||
| AddCollectionToList(item); | ||
| } |
There was a problem hiding this comment.
The inner loop iterates over newFbs instead of fbCollection. This causes the outer loop variable fbCollection to be unused and the inner loop to process the entire newFbs array multiple times. Change foreach (var item in newFbs) to foreach (var item in fbCollection). The same bug exists in the IntFeedback and StringFeedback overloads on lines 237-239 and 248-250.
| foreach (FeedbackCollection<BoolFeedback> fbCollection in newFbs) | |
| { | |
| foreach (var item in newFbs) | |
| { | |
| AddCollectionToList(item); | |
| } | |
| } | |
| } | |
| public void AddCollectionsToList(params FeedbackCollection<IntFeedback>[] newFbs) | |
| { | |
| foreach (FeedbackCollection<IntFeedback> fbCollection in newFbs) | |
| { | |
| foreach (var item in newFbs) | |
| { | |
| AddCollectionToList(item); | |
| } | |
| } | |
| } | |
| public void AddCollectionsToList(params FeedbackCollection<StringFeedback>[] newFbs) | |
| { | |
| foreach (FeedbackCollection<StringFeedback> fbCollection in newFbs) | |
| { | |
| foreach (var item in newFbs) | |
| { | |
| AddCollectionToList(item); | |
| } | |
| foreach (var fbCollection in newFbs) | |
| { | |
| AddCollectionToList(fbCollection); | |
| } | |
| } | |
| public void AddCollectionsToList(params FeedbackCollection<IntFeedback>[] newFbs) | |
| { | |
| foreach (var fbCollection in newFbs) | |
| { | |
| AddCollectionToList(fbCollection); | |
| } | |
| } | |
| public void AddCollectionsToList(params FeedbackCollection<StringFeedback>[] newFbs) | |
| { | |
| foreach (var fbCollection in newFbs) | |
| { | |
| AddCollectionToList(fbCollection); |
| foreach (var item in newFbs) | ||
| { | ||
| AddCollectionToList(item); | ||
| } |
There was a problem hiding this comment.
The inner loop iterates over newFbs instead of fbCollection. Change foreach (var item in newFbs) to foreach (var item in fbCollection).
| foreach (var item in newFbs) | ||
| { | ||
| AddCollectionToList(item); | ||
| } |
There was a problem hiding this comment.
The inner loop iterates over newFbs instead of fbCollection. Change foreach (var item in newFbs) to foreach (var item in fbCollection).
- improve chassis null handling - update feedback collection methods
- Removed `Bridgeable` from controller class name
- Added Key and Name to DmCardAudioOutputController and DmpsAudioOutputController to resolve plugin factory exceptions: ``` Loading plugin factory: PepperDash.Essentials.DM Load Plugin not found. PepperDash.Essentials.DM.DmpsAudioOutputWithMixerAndEq is not a plugin factory. Exception: Could not set up parent class, due to: Parent class vtable failed to initialize, due to: VTable setup of type PepperDash.Essentials.DM.DmpsAudioOutput failed assembly:/user/program1/plugins/loadedAssemblies/PepperDash.Essentials.DM.dll type:DmpsAudioOutput member:(null) assembly:/user/program1/plugins/loadedAssemblies/PepperDash.Essentials.DM.dll type:DmpsAudioOutputWithMixer member:(null) Load Plugin not found. PepperDash.Essentials.DM.DmpsAudioOutputWithMixer is not a plugin factory. Exception: Parent class vtable failed to initialize, due to: VTable setup of type PepperDash.Essentials.DM.DmpsAudioOutput failed assembly:/user/program1/plugins/loadedAssemblies/PepperDash.Essentials.DM.dll type:DmpsAudioOutput member:(null) Load Plugin not found. PepperDash.Essentials.DM.DmpsAudioOutput is not a plugin factory. Exception: VTable setup of type PepperDash.Essentials.DM.DmpsAudioOutput failed ```
…HdMdNxM4kzE support
…ve input/output linking logic
…l checking with proper naming
…ity and error handling
… and SetupOutputs methods
…nd index handling
…upOutputs methods
… better error tracking
No description provided.