halui.mdi-command-NN pins not showing up

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 to join the conversation.

More
1 year 1 month ago #334317 by Aciera

Please Log in 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?)

Please Log in 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 to join the conversation.

More
1 year 1 month ago #334663 by xunil
I'm happy to report that building the 2.9 branch (incorporating the merged PR mentioned above) from the LinuxCNC github solved the problem - the mdi-command-NN pins show up and function as expected.  Thanks for the fix!

-Rob

Please Log in to join the conversation.

More
1 year 1 month ago #334694 by andypugh
In that case the fix should be in the just-released 2.9.5 release. (so you probably won't have to build from source again)

Please Log in to join the conversation.

Time to create page: 0.573 seconds
Powered by Kunena Forum