Jerky Jogging (QTPlasmaC)

More
24 Dec 2020 02:45 #193055 by cmorley
Replied by cmorley on topic Jerky Jogging (QTPlasmaC)
if the problem shows in screen jogging and keyboard jogging, then I would be surprised if repeat was the real problem.

Please Log in or Create an account to join the conversation.

More
24 Dec 2020 02:54 - 24 Dec 2020 02:56 #193056 by phillc54
Replied by phillc54 on topic Jerky Jogging (QTPlasmaC)
AFAIK it is only keyboard jogging.

This plot is using the gui jog buttons:
Warning: Spoiler!


This plot is with a keyboard key held down:
Warning: Spoiler!


You can see the behaviour with:
        if event.isAutoRepeat():
            print('REPEAT')
            event.accept()
            return True

        print('SINGLE')
Attachments:
Last edit: 24 Dec 2020 02:56 by phillc54.

Please Log in or Create an account to join the conversation.

More
24 Dec 2020 03:03 #193057 by cmorley
Replied by cmorley on topic Jerky Jogging (QTPlasmaC)
Ok I misunderstood then- I thought jog keys did it too in some circumstances.

Please Log in or Create an account to join the conversation.

More
24 Dec 2020 03:05 #193058 by phillc54
Replied by phillc54 on topic Jerky Jogging (QTPlasmaC)
I am not 100% sure but I am fairly certain it is only keyboard. I haven't used it on a real machine, only a sim. Greg mentioned it to me after he tried it on his machine. The two plots are from a sim.

Please Log in or Create an account to join the conversation.

More
24 Dec 2020 03:08 #193061 by cmorley
Replied by cmorley on topic Jerky Jogging (QTPlasmaC)
This is the event filter from makegui.py that sends keybinding to the handler file:
    def eventFilter(self, receiver, event):
        # in pyqt5 QWindow gets all events before the widgets inside it do
        # we need the widgets inside it to get their events first
        # this line line provides that.
        # (pyqt4 did not require this)
        if isinstance(receiver, QtGui.QWindow):
            return super(MyEventFilter,self).eventFilter(receiver, event)
        # Run in try statement so if we want to event to run through normal event routines,
        # we just raise an error and run the super class event handler.
        # This is necessary because if the widget (such as dialogs) are owned by c++ rather then python,
        # it causes an error and the keystrokes don't get to the widgets.
        try:
            if(event.type() == QtCore.QEvent.KeyPress):
                handled = False
                handled = self.w.keyPressTrap(event)
                if (self.has_key_p_handler):
                    handled = self.w.handler_instance.keypress_event__(receiver,event)
                elif self.has_process_key_handler:
                    p,k,c,s,ctrl = self.process_event(event,True)
                    handled = self.w.handler_instance.processed_key_event__(receiver,event,p,k,c,s,ctrl)
                if handled: return True
            elif (event.type() == QtCore.QEvent.KeyRelease):
                handled = False
                handled = self.w.keyReleaseTrap(event)
                if (self.has_key_r_handler):
                    handled = self.w.handler_instance.keyrelease_event__(event)
                elif self.has_process_key_handler:
                    p,k,c,s,ctrl = self.process_event(event,False)
                    handled = self.w.handler_instance.processed_key_event__(receiver,event,p,k,c,s,ctrl)
                if handled: return True
            elif event.type() in (QtCore.QEvent.FocusIn, QtCore.QEvent.FocusOut):
                self.w.handler_instance.processed_focus_event__(receiver,event)
            #Call Base Class Method to Continue Normal Event Processing
            return super(MyEventFilter,self).eventFilter(receiver, event)
        except:
            return super(MyEventFilter,self).eventFilter(receiver, event)

As you can see, if there is an error , it is trapped and the event is passed to super.
I would change the
except:

to
except Exception as e:
print e

to see if something is causing an error causing the event to go through again.

just to try to track down whats going on.


i hate keybinding.... :)

Please Log in or Create an account to join the conversation.

More
24 Dec 2020 03:09 #193062 by cmorley
Replied by cmorley on topic Jerky Jogging (QTPlasmaC)
Oh ok I'' look at sim then.

Please Log in or Create an account to join the conversation.

More
24 Dec 2020 03:23 #193064 by phillc54
Replied by phillc54 on topic Jerky Jogging (QTPlasmaC)
I get an occasional one of these:
HandlerClass instance has no attribute 'processed_focus_event__'
but that doesn't seem to be related to keypresses.

Please Log in or Create an account to join the conversation.

More
24 Dec 2020 06:19 #193072 by cmorley
Replied by cmorley on topic Jerky Jogging (QTPlasmaC)
This is sounding like what we are seeing:

stackoverflow.com/questions/38102221/qke...torepeat-not-working

I haven't tried their fix yet

Please Log in or Create an account to join the conversation.

More
24 Dec 2020 10:27 #193082 by phillc54
Replied by phillc54 on topic Jerky Jogging (QTPlasmaC)

This is sounding like what we are seeing:

stackoverflow.com/questions/38102221/qke...torepeat-not-working

I haven't tried their fix yet


Yes, that ldoes look very similar. I did some plots on qtaxis and it is the same, then I added a few prints in qt_makegui.py and it does seem that the issue is with Qt's isAutoRepeat function.

i hate keybinding...

I can see why. :)

Please Log in or Create an account to join the conversation.

More
24 Dec 2020 10:48 #193086 by snowgoer540

I am not 100% sure but I am fairly certain it is only keyboard. I haven't used it on a real machine, only a sim. Greg mentioned it to me after he tried it on his machine. The two plots are from a sim.


Sorry I was busy counting Z’s...

Yes that is correct, only keyboard jog is wonky (I believe you guys got there just wanted to confirm).

The thing that makes me think the link Chris posted is on to something about something taking over keyboard focus is the fact that keyboard jogging on the parameters tab seems to work fine.

It’s only when the main tab is active does keyboard jogging go crazy.

Please Log in or Create an account to join the conversation.

Moderators: cmorley
Time to create page: 0.112 seconds
Powered by Kunena Forum