GladeVCP widget customization.................

More
21 Nov 2021 23:31 #227249 by Roguish
well, getting my qtdragon going....  joint velocity and following error display is cool.

problem with the jog velocity slider.....it's TOOOOO narrow.

I there a way to make the graghic wider?  I've stretched it in qtdesigner, but the slot and little rectangle don't change size. 
That's what I would like to make wider and larger.   Been looking through all the docs in linuxcnc and in QtDesigner/Qt-5.
Can't find a thing...

little help please, if it's possible.... hopefully in the .qss file.
thanks.
 

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

More
22 Nov 2021 01:15 #227262 by cmorley
You should post in the Qtvcp topic - you are not using Gladevcp.

styling the slider:
doc.qt.io/qt-5/stylesheet-examples.html#customizing-qslider

You might check if the maximuimSize horizontal/vertical has been set

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

More
29 Nov 2021 17:14 #227926 by Roguish
cmorley,
thanks. figured it out. took a bit of back-and-forthing, and open and closing in designer.

another question please. what the heck signal connects to the statusLED for 'spindle at speed'? I have spindle.0.at-speed connected (netted) in hal and it works. but the statusLED does not change.....
Do I need to add a connection (net) ????

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

More
29 Nov 2021 21:03 #227948 by cmorley
Do you mean stateLED?
do you have spindle.0.speed-in connected?
The following user(s) said Thank You: Roguish

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

More
29 Nov 2021 22:23 - 29 Nov 2021 22:33 #227954 by Roguish
cmorley.
thanks.
ok, found it.... gotta connect mydragon-fe.led_at_speed to spindle.0.speed-in
works now..
I run the actual spindle speed through a 'lowpass' comp to smooth it a bit,
then through a 'near' comp to get the actual 'at-speed' signal to go to spindle.0.speed-in
make sense???
Is this also done somehow in dragon???

check out the velocity and following errors.  lower right.   also the wider jog speed slider, and larger at-speed led.....


of these mydragon gui specific hal pins, what else do I need to connect???
Attachments:
Last edit: 29 Nov 2021 22:33 by Roguish.

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

More
30 Nov 2021 00:43 #227966 by cmorley
If you use the stateLED you don't need to connect an at speed pin - qtvcp calculates it from the requested speed, override and actual speed.

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

More
02 Dec 2021 22:47 - 03 Dec 2021 01:03 #228235 by Roguish
cmorley,well, i may have messed up. I did a system update, and linuxcnc, etc. got updated....now CRASH.  something with my velocity display.  
honestly, was working fine before the update....LIttle help please? 
not sure if I need to revert, or even how to.....


progress i think. 
i'm pretty sure it has to do with what I added to the hal_glib.py file to get the current joint velocities.just can't recall.  
attached new files here.

this is hal_glib.py, .....(full file attached)
you added the following-error, I added the velocity.   recall joint velocities are in the joint dictionary. 
          'following-error': (GObject.SignalFlags.RUN_FIRST , GObject.TYPE_NONE,(GObject.TYPE_PYOBJECT,)),       
           'velocity': (GObject.SignalFlags.RUN_FIRST , GObject.TYPE_NONE,(GObject.TYPE_PYOBJECT,)),       

        # ferror
        self.emit('following-error', self.old)
        # current velocity
        self.emit('velocity', self.old)


this is my handler file.....(full file attached)
        STATUS.connect('following-error', lambda w, data: self.updateFerrorDisplay(data))
        STATUS.connect('velocity', lambda w, data: self.updateVeloDisplay(data))

    def updateFerrorDisplay(self, data):
        self.w.xFerrorLCD.display('{:+7.5f}'.format(data[0]))
        self.w.yFerrorLCD.display('{:+7.5f}'.format(data[1]))
        self.w.zFerrorLCD.display('{:+7.5f}'.format(data[2]))    

    def updateVeloDisplay(self, data):
        self.w.xVeloLCD.display('{:+6.2f}'.format(data[0]))
        self.w.yVeloLCD.display('{:+6.2f}'.format(data[1]))
        self.w.zVeloLCD.display('{:+6.2f}'.format(data[2]))    

AND   what and where is the 'joint dictionary'  and the 'python interface'?  I want to peruse it....
thanks again for your help.
Attachments:
Last edit: 03 Dec 2021 01:03 by Roguish. Reason: more info

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

More
03 Dec 2021 01:58 #228250 by cmorley
When you updated it over wrote the hal_glib.py file.
You will need to add back your edits.

See docs here:
linuxcnc.org/docs/devel/html/config/python-interface.html
The following user(s) said Thank You: Roguish

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

More
03 Dec 2021 15:00 #228288 by Roguish
jmorley,
yup. figured that out. doh.

Would you please add a line or so to the hal_glib.py that makes joint velocity easily available. Same as you did with following error? Please.

I must have done that somehow, but cannot get it back, yet. A permanent code fix would be far better, and not as susceptible to brain fade.....

Please?????

Thanks.

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

More
03 Dec 2021 15:45 - 03 Dec 2021 16:21 #228295 by Roguish
Chris.
well, I found a copy of my hal_glib.py on my VM test setup.....
The file is attached.
I have added a comment lines everywhere I modified the stock file: #added by NR
It works, at least in my VM sim.
If it could use cleanup, please advise. I am not a programmer.
And as I requested above, add the the source this, or whatever is more proper, please.

Thanks.

NOTE.......just moved the files to the mill and all is well for the time......
Attachments:
Last edit: 03 Dec 2021 16:21 by Roguish.

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

Moderators: HansU
Time to create page: 0.154 seconds
Powered by Kunena Forum