private void buttonLFDown_Click(object sender, EventArgs e) { textBox.Text = ""; short steps = HotwireControl.Invert(trackBarStepsMotorB.Value, Configuration.ReverseB, true); Port.MoveMotor(2, steps); }
private void buttonRLUp_Click(object sender, EventArgs e) { textBox.Text = ""; short steps = HotwireControl.Invert(trackBarStepsMotorD.Value, Configuration.ReverseD, false); Port.MoveMotor(4, 1); }
protected override void OnLoad(EventArgs e) { base.OnLoad(e); _control = new HotwireControl(Configuration, Port); _control.AfterMovement += (s, ev) => UpdatePositionInfo(); UpdatePositionInfo(); }
private void buttonLBDown_Click(object sender, EventArgs e) { textBox.Text = ""; short steps = HotwireControl.Invert(trackBarStepsMotorA.Value, Configuration.ReverseA, true); if (checkBoxMaster.Checked == false) { Port.MoveMotor(1, steps); } else { Port.MoveMotors(steps, steps, steps, steps); } PortReader(); }
private void buttonCut_Click(object sender, EventArgs e) { double minx, maxx, miny, maxy, scale, width, height; IEnumerable <Vector2> leftProfile, rightProfile; _data.ProcessProfiles(panelPreview.Width, out leftProfile, out rightProfile, out minx, out maxx, out miny, out maxy, out scale, out width, out height); HotwireControl control = new HotwireControl(_configuration, _port); Vector2 last = null; foreach (Vector2 point in leftProfile) { if (last != null) { Vector2 vec = point - last; control.MoveRelative(vec.x, vec.y); } last = point; } }