Bug found in qtdragon_hd

More
4 years 10 months ago #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?

 

Attachment not found




 

Attachment not found

Please Log in to join the conversation.

More
4 years 10 months ago #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 to join the conversation.

More
4 years 10 months ago #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.

Please Log in to join the conversation.

More
4 years 10 months ago #228862 by cmorley
Replied by cmorley on topic Bug found in qtdragon_hd
try changing the code to this
Code:
    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)

Please Log in to join the conversation.

More
4 years 10 months ago #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 to join the conversation.

More
4 years 10 months ago #228876 by ucancallmebob89
I attached my .ini. The KINS section is:
Code:
[KINS] KINEMATICS = trivkins coordinates=XYYZ kinstype=BOTH JOINTS = 4

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

Please Log in to join the conversation.

More
4 years 10 months ago #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.

Please Log in to join the conversation.

More
4 years 10 months ago #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 to join the conversation.

More
4 years 10 months ago #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.

Please Log in to join the conversation.

Time to create page: 0.091 seconds
Powered by Kunena Forum