chaotic_highlighting

More
6 years 9 months ago #156001 by nkp
chaotic_highlighting was created by nkp
Hi!
When the Gcode contains subroutines,
chaotic highlighting of the active line is observed.
(I"m using hal_sourceview.py )
The reason is clear - lcnc highlights the line number from the "main" code ,
when a subroutine is found - jumps to the line (line number) from the subroutine.
Is there any solution to this?

Please Log in to join the conversation.

More
6 years 9 months ago #156008 by cmorley
Replied by cmorley on topic chaotic_highlighting
What version of linuxcnc?
I thought this problem was worked around already.

Chris

Please Log in to join the conversation.

More
6 years 9 months ago #156010 by nkp
Replied by nkp on topic chaotic_highlighting
lcnc 2.7.14
but userscreen

gtk
hal_sourceview.py

Please Log in to join the conversation.

More
6 years 9 months ago #156012 by cmorley
Replied by cmorley on topic chaotic_highlighting
There is comments in the code of hal_glib about subroutine line changes.
sourceview uses the line-changed and file-loaded signals.

It's not clear to me if it was thought to be fixed - maybe was just improved...
I would make a bug report.

Chris

Please Log in to join the conversation.

More
6 years 8 months ago #156939 by nkp
Replied by nkp on topic chaotic_highlighting

I would make a bug report.

github.com/LinuxCNC/linuxcnc/issues/681

Please Log in to join the conversation.

More
6 years 8 months ago #156947 by nkp
Replied by nkp on topic chaotic_highlighting
del

Please Log in to join the conversation.

More
6 years 8 months ago #156961 by cmorley
Replied by cmorley on topic chaotic_highlighting
I would think call level would be more likely.
maybe:
Code:
if self.stat.call_level == 0: self.old['line'] = self.stat.motion_line

Chris

Please Log in to join the conversation.

More
6 years 8 months ago #156964 by nkp
Replied by nkp on topic chaotic_highlighting
I tried to do
Code:
line_old = old.get('line', None) line_new = self.old['line'] if line_new > line_old: self.emit('line-changed', line_new)
that would not jump UP
but it doesn't work (although it should seem to work))

Please Log in to join the conversation.

More
6 years 8 months ago #156966 by nkp
Replied by nkp on topic chaotic_highlighting
for now
Code:
def set_line_number(self,linenum): self.offset = linenum self.check_offset() self.highlight_line(self.gstat, self.offset) if linenum == 0: #nkp self.line_mem = 0 def highlight_line(self, w, l): if l > self.line_mem : #nkp self.line_mem = l else: return .... ....
hal_sourceview.py

Please Log in to join the conversation.

More
6 years 8 months ago #157027 by nkp
Replied by nkp on topic chaotic_highlighting
Axis
Code:
--- /home/nkp//axis +++ /home/nkp/linuxcnc/configs/jog/axis @@ -664,7 +664,8 @@ self.notifications_clear = False self.notifications_clear_info = False self.notifications_clear_error = False - + self.current_line_mem = 0 + def start(self): if self.running.get(): return if not os.path.exists(linuxcnc.nmlfile): @@ -734,14 +735,16 @@ root_window.tk.eval(pane_top + ".tabs raise manual") if (self.current_task_mode == linuxcnc.MODE_MDI): root_window.tk.eval(pane_top + ".tabs raise mdi") - if (self.current_task_mode == linuxcnc.MODE_AUTO): + if (self.current_task_mode != linuxcnc.MODE_AUTO): # not sure if anything needs to be done for this pass + self.current_line_mem = 0 self.after = self.win.after(update_ms, self.update) - - self.win.set_current_line(self.stat.id or self.stat.motion_line) - + if (self.stat.id or self.stat.motion_line) > self.current_line_mem : + self.win.set_current_line(self.stat.id or self.stat.motion_line) + self.current_line_mem = (self.stat.id or self.stat.motion_line) + speed = self.stat.current_vel limits = soft_limits()

Of course, this is not a solution to the problem ...
but the line jumps a little less =)

Please Log in to join the conversation.

Time to create page: 0.096 seconds
Powered by Kunena Forum