public Animatroller.Framework.PhysicalDevice.MotorWithFeedback AddMotor(MotorWithFeedback logicalDevice)
{
var moduleControl = new Control.ModuleControl();
moduleControl.Text = logicalDevice.Name;
moduleControl.Size = new System.Drawing.Size(160, 80);
var control = new Control.Motor();
moduleControl.ChildControl = control;
flowLayoutPanelLights.Controls.Add(moduleControl);
var device = new Animatroller.Framework.PhysicalDevice.MotorWithFeedback((target, speed, timeout) =>
{
control.Target = target;
control.Speed = speed;
control.Timeout = timeout;
});
control.Trigger = device.Trigger;
device.Connect(logicalDevice);
return device;
}