Skip to content

Commit

Permalink
supporting REVERSE motor direction
Browse files Browse the repository at this point in the history
  • Loading branch information
EverettQuebral committed Mar 4, 2017
1 parent 37b9538 commit 2453c8e
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 7 deletions.
21 changes: 18 additions & 3 deletions MainWindow.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 32 additions & 4 deletions MainWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,14 @@ private void FocuserMotorChanged(object sender, FocuserMotorChangedEventArgs e)

private void btnFastReverse_Click(object sender, EventArgs e)
{
focuser.CommandString("A", true);
if (checkBoxReverse.Checked)
{
focuser.CommandString("D", true);
}
else
{
focuser.CommandString("A", true);
}
}

private void InitControls()
Expand All @@ -132,17 +139,38 @@ private void InitControls()

private void btnReverse_Click(object sender, EventArgs e)
{
focuser.CommandString("B", true);
if (checkBoxReverse.Checked)
{
focuser.CommandString("C", true);
}
else
{
focuser.CommandString("B", true);
}
}

private void btnForward_Click(object sender, EventArgs e)
{
focuser.CommandString("C", true);
if (checkBoxReverse.Checked)
{
focuser.CommandString("B", true);
}
else
{
focuser.CommandString("C", true);
}
}

private void btnFastForward_Click(object sender, EventArgs e)
{
focuser.CommandString("D", true);
if (checkBoxReverse.Checked)
{
focuser.CommandString("A", true);
}
else
{
focuser.CommandString("D", true);
}
}

private void numericUpDown1_ValueChanged(object sender, EventArgs e)
Expand Down

0 comments on commit 2453c8e

Please sign in to comment.