/// <summary> /// The handle motor pulse. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> public static void HandleMotorPulse(object sender, OnMotorPulseEventArgs e) { var conveyor = e.Maker.FirstConveyor; // ToDo: Set Extruder and Stamper to work async Extruder.HandleMotorPulse(sender, e); Stamper.HandleMotorPulse(sender, e); BucketManager.HandleMotorPulse(sender, e); RollBelt(conveyor); }
/// <summary> /// The handle motor pulse. /// </summary> /// <param name="sender"> /// The sender. /// </param> /// <param name="e"> /// The e. /// </param> public static void HandleMotorPulse(object sender, OnMotorPulseEventArgs e) { if (e.Maker.FirstSwitch.State != SwitchState.On) { return; } var conveyor = e.Maker.FirstConveyor; var extruderIndex = e.Maker.Settings.ExtruderIndex; var biscuit = Extruder.Extrude(); conveyor.Belt.RemoveAt(extruderIndex); conveyor.Belt.Insert(extruderIndex, biscuit); }