Ok I looked at the code and this looks right to me.
scrolling with a wheel is handled differently from dragging - which is why delta_scaled is handled twice.
I am not sure what you changed? The code you show is already there.
If this is in the branch that you are having problems with hal_lib then that is probably the actual problem (my guess).
If hal_lib is broken then the widgets will not update the HAL pins.
In other branches of work I have had some problems with the GObject timer but that was mostly with my QT branch and usually made a seg fault.
Without more info it's hard for me to be more specific and I am still working so can't test anything....
From: Nicklas Karlsson <***@gmail.com>
Sent: July 21, 2017 1:37 AM
Subject: [Emc-developers] Haldial update bug and solved?
For some reason the hal dial had stopped working. It is the first time I look into the source code and at first I made wrong conclusion and found something that made it partially react to some action.
It look a little bit odd since self.delta_scaled is incremented/decremented both in the scroll function and emit_count_changed function. The increment/decrement in the emit_count_changed_signal seems to handle the case then dial is moved fast enough to not detect the crossover. Maybe you know better, I only know now it works for me.
diff --git a/lib/python/gladevcp/hal_dial.py b/lib/python/gladevcp/hal_dial.py
index 731fe64ee..e25945195 100644
@@ -142,9 +142,11 @@ class Hal_Dial(gtk.DrawingArea, _HalJogWheelBase):
if event.direction == gtk.gdk.SCROLL_UP:
self._count += 1
+ self._delta_scaled += self.scale
if event.direction == gtk.gdk.SCROLL_DOWN:
self._count -= 1
+ self._delta_scaled -= self.scale
self._last_offset = self._minute_offset
@@ -295,6 +297,7 @@ class Hal_Dial(gtk.DrawingArea, _HalJogWheelBase):
alloc = self.get_allocation()
self.queue_draw_area(alloc.x, alloc.y, alloc.width, alloc.height)
# Get propertys
def do_get_property(self, property):
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Emc-developers mailing list