Back
[00:42:03] <tom3p> does emc2 have DNC? (drip feed/spoon feed). any references?
[00:47:20] <SWPadnos> no
[00:59:55] <dgarr> is this a bug?
http://www.panix.com/~dgarrett/stuff/isthisabug.txt
[01:05:58] <SWPadnos> it looks like a buglet to me
[01:06:30] <SWPadnos> I think the fix is wrong though. The right thing to do would be to set have_home_all if any axis has HOME_SEQUENCE set
[01:06:37] <SWPadnos> using AXIS_0 was just a shortcut, I imagine
[01:09:49] <tom3p> SWPadnos: thx
[01:21:12] <dgarr> The right thing ... -- with that strategy, if all axes omit HOME_SEQUECE, then halui will not work
[01:37:27] <SWPadnos> oh - there could be a bug that makes halui croak when there's no defined homing sequence
[01:37:55] <SWPadnos> (I only looked at the snippets of code in your bug report)
[01:55:22] <jepler> in axis, you either get a "home all" button or a "home" button. axis will never give you both. "all axes have home sequence" and "no axes have home sequence" are the two configurations I think are sane.
[01:55:41] <jepler> oh, is this about halui? I don't know much about how it does homing.
[01:57:06] <jepler> the bug is probably
[01:57:07] <jepler> + if (check_bit_changed(halui_data->home_all, &(old_halui_data.home_all)) != 0)
[01:57:10] <jepler> + sendHome(-1);
[01:57:17] <jepler> the home_all pin is dereferenced even if it's not created
[01:57:43] <jepler> it shuld be if(halui_data->home_all && check_bit_changed(...)) so that if the pointer is NULL nothing happens
[01:58:06] <jepler> but always presenting the halui pin all the time is fine -- unlike axis, it's not a battle against insufficient screen real estate
[02:10:37] <dgarr> ah -- i believe you are correct (as usual) about the dereferencing -- adding the check works for me
[02:13:59] <jepler> alternate idea:
[02:14:00] <jepler> static int check_bit_changed(hal_bit_t *halpin, hal_bit_t *oldpin) {
[02:14:00] <jepler> + if(!halpin) return 0; // uncreated pin never changes
[02:14:21] <jepler> if halui gets more optional "do xxx" pins in the future, this'll make it easier
[02:15:46] <dgarr> That sounds good to me
[02:17:03] <dgarr> got to to, thanks for looking at it
[03:06:46] <jepler> dgarr: thanks for reporting it in the first place
[03:06:56] <CIA-5> EMC: 03jepler 07master * r9800aaab3e6b 10/src/emc/usr_intf/halui.cc: allow check_bit_changed to be called on an optional pin
[14:18:41] <micges_work1> micges_work1 is now known as micges
[15:28:25] <jepler> hm, I see that gcc4.1+ have builtin atomic functions such as __sync_fetch_and_add. I wonder if we should use those in lieu of the copied-from-linux inline asm when available