Moved generation of Mpc3TouchpanelController device from core device factory into ControlSystem LoadDevices() method.

This commit is contained in:
Neil Dorin
2020-03-12 12:46:21 -06:00
parent 7afcbaee61
commit 1b096de377
2 changed files with 19 additions and 15 deletions

View File

@@ -83,21 +83,6 @@ namespace PepperDash.Essentials.Core
return new C2nRthsController(key, name, new C2nRths(cresnetId, Global.ControlSystem));
}
if (typeName.StartsWith("mpc3"))
{
var butToken = dc.Properties["buttons"];
if (butToken != null)
{
var buttons = butToken.ToObject<Dictionary<uint, KeypadButton>>();
return new Mpc3TouchpanelController(key, name, Global.ControlSystem, buttons);
}
else
{
Debug.Console(0, Debug.ErrorLogLevel.Error, "Error: Unable to deserialize buttons collection for device: {0}", key);
}
}
return null;
}