#linuxcnc-devel | Logs for 2015-09-16

[10:28:32] <mozmck> Looks like dgarr's method for remembering the line number would work, but I would need a way to reset when the program is finished. If I'm reading it right, his method simply returns the last non-zero line-number.
[10:30:25] <cradek> what problem are you solving?
[10:32:05] <mozmck> The problem I'm trying to solve, is that if you need to stop in the middle of cutting, the line number will reset to 0. When plasma cutting you often need to back up to the last M5 and run from there, but if hal_sourceview has gone back to the beginning of the file you may not know where it was.
[10:32:20] <mozmck> Or even if it just un-highlighted the line.
[10:32:26] <cradek> ah
[10:32:38] <cradek> in AXIS when you abort it leaves the line highlighted
[10:32:39] <mozmck> You asked as I was about half-way through writing that :)
[10:32:47] <cradek> hehe :-)
[10:33:12] <cradek> so you need a solution in your gui, not a hal solution?
[10:33:13] <mozmck> Maybe I should look at the axis code then. It seems to leave the line highlighted some of the time here.
[10:33:30] <mozmck> Probably so.
[10:33:47] <cradek> it seems easy if your abort/estop/whatever is generated in your gui, but they can come from elsewhere and that makes it harder
[10:33:59] <mozmck> My gui being a gscreen skin, with custom code too.
[10:34:13] <cradek> yeah I also don't know anything about that world
[10:34:36] <mozmck> Yes, I had an error generated in linuxcnc and it reset to line 0
[10:34:39] <KGB-linuxcnc> 03Sebastian Kuzminsky 052.6 0e967d3 06linuxcnc 10scripts/get-deb-component-from-git 10scripts/get-version-from-git 10scripts/version-is-release build system: make the git scripts more user friendly * 14http://git.linuxcnc.org/?p=linuxcnc.git;a=commitdiff;h=0e967d3
[10:36:22] <mozmck> one solution that would be similar to dgarr's might be to make hal_sourceview ignore a line number of 0
[10:37:00] <cradek> it does seem like it might be nice for it to never reset
[10:37:17] <mozmck> That might work, because when you restart the code the line numbers would be non-zero again.
[10:39:18] <mozmck> We are doing more cutting with linuxcnc now, and feedback from the guy in the shop is very positive overall.
[10:47:20] <mozmck> cradek: http://www.linuxcnc.org/index.php/english/forum/40-subroutines-and-ngcgui/26578-linuxcnc-features-a-kind-of-ngcgui/62643
[10:51:25] <seb_kuzminsky> mozmck: that's nice to hear :-)
[10:52:36] <cradek> mozmck: that's great, I hope they combine in a useful way
[10:53:06] <cradek> mozmck: I wonder what features is using now? they look like they might be hershey (which is very smart and useful)
[10:53:30] <mozmck> is hershey a font?
[10:53:51] <mozmck> features looks pretty neat. I hope to have time to play with it sometime soon.
[10:54:05] <cradek> they are very old free fonts, used in hp pen plotters and early autocad and probably everything from that era
[10:54:25] <cradek> AXIS uses a hershey derivative to draw the various numbers and letters in the preview
[10:54:33] <mozmck> I see.
[10:55:04] <cradek> and pen plotter fonts are exactly what you want for cnc engraving because it's the same
[11:43:41] <skunkworks> pcw_home, what is the 7i92H?
[11:46:58] <pcw_home> 7I92 with two 26 pin Headers instead of DB25 +one header
[11:47:08] <skunkworks> oh god - missed that..
[11:47:33] <skunkworks> oh - the picture doesn't show taht..
[11:49:30] <pcw_home> No picture yet
[11:49:31] <pcw_home> Theres also a 7I92M with male DB25
[11:49:48] <skunkworks> wow. cool
[11:50:26] <skunkworks> that would be nice because you could plug it right into something like the g540 or such
[11:58:18] <pcw_home> Yeah or 7I77
[12:11:32] <mozmck> Yeah, I think we need some of those!
[13:13:41] <mozmck> Looks like the main reason hal_sourceview rewinds on stop is because they do this: self.gstat.connect('interp_idle', lambda w: self.set_line_number(0))
[13:16:07] <mozmck> I wonder if it would mess up other GUIs to remove that line?
[13:46:49] <jepler> from my cursory searching, it appears that line is affecting information in the ui only, not task or other uis
[13:48:11] <mozmck> Yes, it will affect any UI which uses hal_sourceview though. So Gmoccapy and Gscreen I think at least.
[13:48:34] <jepler> I bet axis's idea of the last line before abort can be "old", particularly if the gcode is rapid contouring with short moves
[13:48:54] <mozmck> The only difference is that the gcode view will not rewind when the file is done.
[13:49:53] <mozmck> This seems to work pretty well. For plasma we generally need to find the last M5 and start from there anyhow, because you have to move to cut height and maybe touch off, and start the torch etc.
[13:50:23] <mozmck> So if it leaves the highlight on the line it was working on last, at least you can see where you were in the file easily.
[14:34:35] <skunkworks> jeepers my heart jumps everytime I test something in 2.6 and see acc violations..
[14:36:53] <PCW> mozmck: 00601B10002E through 00601B100036
[14:37:04] <PCW> 9 right?
[14:37:26] <mozmck> Looks like 10
[14:37:58] <PCW> ok through 37
[14:38:10] <mozmck> thanks!
[14:38:38] <PCW> ( putting little x's on labels )
[14:38:44] <skunkworks> I think PCW is going to get even busier..
[14:39:30] <Tom_itx> skunkworks, why test 2.6 when 2.7 is out now?
[14:39:43] <skunkworks> comparing
[14:39:54] <Tom_itx> i never ran 2.6
[14:40:02] <Tom_itx> jumped from 2.5 to 2.7
[14:40:45] <Tom_itx> 2.6 didn't have the TP did it?
[14:40:58] <skunkworks> nope
[14:41:12] <Tom_itx> reason enough to stick with 2.7
[14:42:00] <skunkworks> most definatley.. :)
[14:42:53] <mozmck> skunkworks: do you know if Rob has had a chance to look at the m67 bug?
[14:43:43] <skunkworks> I have not heard from him since I emailed him. (he is very busy...)
[14:54:47] <mozmck> I bet! I kinda know the feeling too.
[17:42:02] <mozmck> I created a property to allow the sourceview to keep the highlighting after an abort. The default is the old behavior. Does this look reasonable? http://pastie.org/10424589
[17:54:45] <seb_kuzminsky> maybe ask chris morley and norbert schechner
[18:06:04] <mozmck> I guess I can do that. I guess my only question is if a property like this is necessary, or could I just delete the 'interp_idle' signal connection and let the behavior change for everyone.
[18:06:50] <mozmck> This way is safer as it won't affect anything unless you set the property to False
[19:57:32] <cradek> mozmck: did you try the other guis that use it, and you feel it's better behavior for everyone?
[20:28:22] <mozmck> cradek: no, and I think it may be mostly a matter of what people are expecting if they are used to the old behavior
[20:33:03] <cradek> I guess there are two things leaving the line highlighted might mean: this is where I stopped; this is where I'll start now if you hit run
[20:33:39] <cradek> if there's a chance people assume the second (and I think it's possible) it's going to be deceptive
[20:34:26] <cradek> I think showing where it stopped is valuable, but it has to not be confused for the restart point
[20:34:43] <cradek> AXIS uses different colors, which of course is only just barely adequate
[20:35:05] <cradek> [thinking out loud]
[20:42:49] <mozmck> Thanks for that!
[20:44:29] <mozmck> The way I've done it in my gui, is that will be the restart point if you just click Run From Line (a button on my gui)
[20:44:36] <mozmck> Run will simply start over.
[20:45:01] <cradek> that sounds useful
[20:46:16] <mozmck> But basically we instruct users that you can't just restart where it stopped normally. We normally go back to the last M5 if possible.
[21:04:29] <jepler> there must be a reason they wrote this initially: self.gstat.connect('interp_idle', lambda w: self.set_line_number(0))
[21:04:56] <jepler> it would be worth trying to find out why
[21:05:12] <jepler> unfortunately it's the sort of thing the author is unlikely to remember after the fact
[21:18:19] <mozmck> Yes, so that's why I made it configurable with the default being the current way
[21:21:53] <mozmck> I think that will be best for now anyhow.
[21:27:34] <cradek> I trust your judgment