Bug found in qtdragon_hd

More
11 Dec 2021 03:42 #228841 by ucancallmebob89
Getting this error any time I try to home one of the axes after they are already homed. Looks like it has something to do with a missing attribute. Anyone else seeing this error?

 


 
Attachments:

Please Log in or Create an account to join the conversation.

More
11 Dec 2021 03:55 #228843 by ucancallmebob89
@persei8 Also, would it be possible to add a "go to zero" button under the DRO section for each axis in qtdragon_hd? I'm loving this screenset so far.

Please Log in or Create an account to join the conversation.

More
11 Dec 2021 05:54 #228847 by ucancallmebob89
Digging into this, it looks like the offending code is originating here in qtdragon_hd_handler.py:

def btn_home_clicked(self):
joint = self.w.sender().property('joint')
axis = INFO.GET_NAME_FROM_JOINT.get(joint).lower()
if self.w["dro_axis_{}".format(axis)].property('isHomed') is True:
ACTION.SET_MACHINE_UNHOMED(joint)
else:
ACTION.SET_MACHINE_HOMING(joint)

I'm not sure where it's getting 'y2' from. In the qtdragon_hd.ui file I see references to dro_axis_x, dro_axis_y, dro_axis_z and dro_axis_a.

My machine is a dual-Y gantry, but in my .ini file they're just listed as AXIS_X, AXIS_Y, and AXIS_Z, and JOINT_1 through JOINT_3.
Attachments:

Please Log in or Create an account to join the conversation.

More
11 Dec 2021 08:45 #228862 by cmorley
Replied by cmorley on topic Bug found in qtdragon_hd
try changing the code to this
    def btn_home_clicked(self):
        joint = self.w.sender().property('joint')
        if STATUS.is_joint_homed(joint) == True:
            ACTION.SET_MACHINE_UNHOMED(joint)
        else:
            ACTION.SET_MACHINE_HOMING(joint)

The following user(s) said Thank You: ucancallmebob89

Please Log in or Create an account to join the conversation.

More
11 Dec 2021 08:47 #228863 by cmorley
Replied by cmorley on topic Bug found in qtdragon_hd
What does:
[KINS]
KINEMATICS =

say in the INI please

Please Log in or Create an account to join the conversation.

More
11 Dec 2021 14:02 #228876 by ucancallmebob89
I attached my .ini. The KINS section is:
[KINS]
KINEMATICS = trivkins coordinates=XYYZ kinstype=BOTH
JOINTS = 4

Haven't been able to try your other suggestion yet, hopefully a bit later today.
Attachments:

Please Log in or Create an account to join the conversation.

More
11 Dec 2021 16:13 - 11 Dec 2021 16:15 #228878 by ucancallmebob89
Ok this partly worked, it's no longer throwing that error.

What I'm seeing now is that once all 3 axes are homed, pressing the Home X button will unhome X, then pressing it again will rehome X. The same is true for Y.

The current issue is that the Home Z button is being applied to the Y axis as well. Maybe because of the order of my axes in my .ini? I have them defined as XYYZ instead of XYZY.
Attachments:
Last edit: 11 Dec 2021 16:15 by ucancallmebob89.

Please Log in or Create an account to join the conversation.

More
11 Dec 2021 16:18 #228879 by ucancallmebob89
Yeah it looks like in QTDesigner the "Home Z" button is hardcoded to joint[2], so I need to rearrange them in my .ini. I'll try this and report back.

Please Log in or Create an account to join the conversation.

More
11 Dec 2021 17:13 #228881 by ucancallmebob89
Ok so after reordering my joints to XYZY in my .ini and .hal files, the individual homing is working correctly. I included both files for anyone who runs into this in the future.

I would recommend that the code snippet that @cmorley pasted above be committed, since it simplifies the readability of that function.
Attachments:
The following user(s) said Thank You: tommylight

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.132 seconds
Powered by Kunena Forum