Commit graph

7 commits

Author SHA1 Message Date
Nick Genovese
cdabbdb164 fix: Refactor Mpc4TouchpanelController initialization logic
Refactored Mpc4TouchpanelController to store the processor as a private readonly field and moved button dictionary initialization to the constructor. Moved touchpanel slot selection logic from the constructor to an overridden Initialize() method, now using the _processor field and removing fallback to ControllerTouchScreenSlotDevice. Improved error logging by removing references to processor type and key variables. Changed button initialization to occur in Initialize() with a foreach loop, eliminating AddPostActivationAction and null checks for the button dictionary.
2026-08-14 09:17:47 -04:00
Nick Genovese
83bf40491b fix: Refine touchpanel device selection and logging
Improve logic to check for MPC3Basic type using pattern matching. Update debug and error messages to report actual device type. Clarify conditional structure for better readability.
2026-08-12 14:55:04 -04:00
Nick Genovese
25693c7071 fix: Add debug logs for touchscreen slot selection in controller
Improved logging to indicate which touchscreen slot is used during Mpc4TouchpanelController initialization. Updated error log to report processor.TouchscreenType for clearer diagnostics.
2026-08-12 14:40:54 -04:00
Nick Genovese
8c56623641 fix: Support multiple MPC4 touchscreen slot types in ctor
Updated Mpc4TouchpanelController constructor to assign _touchpanel from the first available slot among MPC4x102, MPC4x201, MPC4x301, or MPC4x302 touchscreen slots, improving compatibility with various MPC4 touchscreen models.
2026-08-12 14:17:50 -04:00
Nick Genovese
31fd665594 fix: Simplify touchscreen slot selection logic
Replaced switch statement for touchscreen type selection with a single cast assignment to MPC3Basic. This streamlines initialization and removes explicit handling for each touchscreen type. Error logging is retained for failed casts.
2026-08-12 12:44:43 -04:00
Nick Genovese
d713d65c7a fix: Refactor touchpanel init and error logging
Change _touchpanel type to MPC3Basic. Update constructor to select touchscreen slot by TouchscreenType using switch. Improve error logging with error level and detailed type info.
2026-08-12 12:35:21 -04:00
Nick Genovese
f5d6a076ad feat: Add Mpc4TouchpanelController for MPC4 processors
Introduced Mpc4TouchpanelController to manage touchpanel behavior for MPC4 class processors, including button initialization, feedback, and event handling. Updated ControlSystem.cs to detect MPC4 models, deserialize button configs, and register the controller with DeviceManager.
2026-08-12 11:22:03 -04:00