halui.mdi-command-NN pins not showing up

More
1 year 1 month ago - 1 year 1 month ago #334284 by Aciera
Another test:
AX works :
Warning: Spoiler!




While AZ does not:

Warning: Spoiler!


YZ also doesn't work:
Warning: Spoiler!

 
Last edit: 1 year 1 month ago by Aciera. Reason: add test for YZ

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

More
1 year 1 month ago - 1 year 1 month ago #334286 by Aciera
It seems to fail here:
github.com/LinuxCNC/linuxcnc/blob/master...r_intf/halui.cc#L710

Code:
    *halui_data->axis_is_selected[0] = 1;


Not sure but it looks like this line fails if there is no 'X' axis configured as it wants to maybe select the first item in the list [x,y,z,a,b,c,u,v,w]?
Last edit: 1 year 1 month ago by Aciera.

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

More
1 year 1 month ago #334288 by Aciera
We could set the first configured axis as selected:



github.com/LinuxCNC/linuxcnc/blob/master...r_intf/halui.cc#L694

could be changed to:
Code:
bool first_axis = true; for (axis_num=0; axis_num < EMCMOT_MAX_AXIS ; axis_num++) { if ( !(axis_mask & (1 << axis_num)) ) { continue; } char c = "xyzabcuvw"[axis_num]; retval = hal_pin_bit_newf(HAL_OUT, &(halui_data->axis_is_selected[axis_num]), comp_id, "halui.axis.%c.is-selected", c); if (retval < 0) return retval; retval = hal_pin_float_newf(HAL_OUT, &(halui_data->axis_pos_commanded[axis_num]), comp_id, "halui.axis.%c.pos-commanded", c); if (retval < 0) return retval; retval = hal_pin_float_newf(HAL_OUT, &(halui_data->axis_pos_feedback[axis_num]), comp_id, "halui.axis.%c.pos-feedback", c); if (retval < 0) return retval; retval = hal_pin_float_newf(HAL_OUT, &(halui_data->axis_pos_relative[axis_num]), comp_id, "halui.axis.%c.pos-relative", c); if (retval < 0) return retval; if (first_axis) { // at startup, indicate [0] item is selected: *halui_data->joint_is_selected[0] = 1; *halui_data->axis_is_selected[axis_num] = 1; } first_axis = false; }

Seems to work in my testing.

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

More
1 year 1 month ago #334317 by Aciera
The following user(s) said Thank You: tommylight, JT

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

More
1 year 1 month ago #334328 by andypugh
Thanks for the fix.
It's odd that this seems to not have been seen before.
(Or maybe has just been worked around with dummy axes?)
The following user(s) said Thank You: tommylight

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

More
1 year 1 month ago #334429 by xunil
Seems like that was probably the issue.  I can confirm that rearranging the axes to be ZA instead of AZ order didn't fix it.  I'll try building from HEAD in the next day or two and post here to confirm that it works.

Thanks for finding that bug and fixing it!  This was really holding me up so I really appreciate it.
 

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

Time to create page: 0.121 seconds
Powered by Kunena Forum