Checking Machine State
Add some Buttons
-
Open up gui4.glade and save as gui5.glade. Go to the DRO tab and add a third column to table1.
Your project should look like this now.
-
Add a Button to each of the new cells. Change the button Label: to:
-
Top Button = Home X
-
Middle Button = Home Y
-
Bottom Button = Home Z
Your project should look like this now.
-
-
Next change the Name: for each button to:
-
Top Button = home_x
-
Middle Button = home_y
-
Bottom Button = home_z
-
-
Next add GtkButton clicked signal handlers and don’t forget to press the Enter key after each one.
-
Top Button = on_home_x_clicked
-
Middle Button = on_home_y_clicked
-
Bottom Button = on_home_z_clicked
Your project should look like this now.
-
-
One last thing we will do is remove the test_error button from the button bar as it will not be needed.
Your project should look like this now.