mirror of
https://github.com/PepperDash/Essentials.git
synced 2026-08-31 19:08:29 +00:00
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.
This commit is contained in:
parent
31fd665594
commit
8c56623641
1 changed files with 16 additions and 1 deletions
|
|
@ -28,7 +28,22 @@ namespace PepperDash.Essentials.Core.Touchpanels
|
||||||
public Mpc4TouchpanelController(string key, string name, CrestronControlSystem processor, Dictionary<string, KeypadButton> buttons)
|
public Mpc4TouchpanelController(string key, string name, CrestronControlSystem processor, Dictionary<string, KeypadButton> buttons)
|
||||||
: base(key, name)
|
: base(key, name)
|
||||||
{
|
{
|
||||||
_touchpanel = processor.ControllerTouchScreenSlotDevice as MPC3Basic;
|
if (processor.MPC4x102TouchscreenSlot != null)
|
||||||
|
{
|
||||||
|
_touchpanel = processor.MPC4x102TouchscreenSlot;
|
||||||
|
}
|
||||||
|
else if (processor.MPC4x201TouchscreenSlot != null)
|
||||||
|
{
|
||||||
|
_touchpanel = processor.MPC4x201TouchscreenSlot;
|
||||||
|
}
|
||||||
|
else if (processor.MPC4x301TouchscreenSlot != null)
|
||||||
|
{
|
||||||
|
_touchpanel = processor.MPC4x301TouchscreenSlot;
|
||||||
|
}
|
||||||
|
else if (processor.MPC4x302TouchscreenSlot != null)
|
||||||
|
{
|
||||||
|
_touchpanel = processor.MPC4x302TouchscreenSlot;
|
||||||
|
}
|
||||||
|
|
||||||
if (_touchpanel == null)
|
if (_touchpanel == null)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue