How hard is it to build a completely new standalone GUI?
28 Jan 2019 09:03 #125057
by cmorley
Replied by cmorley on topic How hard is it to build a completely new standalone GUI?
Not sure if you know but if you type HALMETER in caps into the MDI widget, it will load halmeter - thought it might be handy to know
Chris M
Chris M
Please Log in or Create an account to join the conversation.
28 Jan 2019 09:12 - 28 Jan 2019 09:14 #125058
by KevKim
PERFECT!!!
All operation buttons are replaced with momentary switches, vcp actions are working very nice together with leds!!! TY!
It's time to continue button image work
Replied by KevKim on topic How hard is it to build a completely new standalone GUI?
halui.estop.is-activated would work for the estop LED
PERFECT!!!
All operation buttons are replaced with momentary switches, vcp actions are working very nice together with leds!!! TY!
It's time to continue button image work
Last edit: 28 Jan 2019 09:14 by KevKim.
Please Log in or Create an account to join the conversation.
28 Jan 2019 10:03 #125061
by KevKim
Replied by KevKim on topic How hard is it to build a completely new standalone GUI?
Please Log in or Create an account to join the conversation.
28 Jan 2019 14:24 #125076
by KevKim
Replied by KevKim on topic How hard is it to build a completely new standalone GUI?
Made some more button images, upper part of page1 is almost done.
Yes, final goal is to be mach-like screen, or maybe I can call it tormach-like, whatever.
I wonder if there are pins to indicate in which coord system machine is on between machine coord/non-machine coord.
That would be desirable to have.
I found motion.on-soft-limit pin, though its not clear at the moment what this exactly means, I need some hal functions to set & indicate whether soft limit is on or not.
Btw, how would I fill the entire workspace with a color? I want to fill whole area with some dark grey color like the example, that would be good for eyes. - I just filled it in windows paint brush.
Yes, final goal is to be mach-like screen, or maybe I can call it tormach-like, whatever.
I wonder if there are pins to indicate in which coord system machine is on between machine coord/non-machine coord.
That would be desirable to have.
I found motion.on-soft-limit pin, though its not clear at the moment what this exactly means, I need some hal functions to set & indicate whether soft limit is on or not.
Btw, how would I fill the entire workspace with a color? I want to fill whole area with some dark grey color like the example, that would be good for eyes. - I just filled it in windows paint brush.
Please Log in or Create an account to join the conversation.
28 Jan 2019 20:59 - 28 Jan 2019 21:36 #125094
by Grotius
Replied by Grotius on topic How hard is it to build a completely new standalone GUI?
Nice to see a Gscreen application.
Keep up the good work !!
Btw, how would I fill the entire workspace with a color? I want to fill whole area with some dark grey color like the example, that would be good for eyes
If you look at themes, you can switch system colors. You can concider to use this text into your gscreen code, it's a dark theme example :
self.settings = gtk.settings_get_default()
self.settings.set_property("gtk-theme-name", "Adwaita-dark")
In your case it can be :
self.gscreen.settings, or some text, but first try above.
If you want to switch background color in glade, you can do that. But if i want to do that, i would make a new linux theme i think.
That option is located in your system file, just google the source location.
Upcoming is the QT. If you are starter, you can look at this. But i don't know how free you are in the python coding with QT.
I feel good at glade and pure C. Python is to simple for me to understand.
Keep up the good work !!
Btw, how would I fill the entire workspace with a color? I want to fill whole area with some dark grey color like the example, that would be good for eyes
If you look at themes, you can switch system colors. You can concider to use this text into your gscreen code, it's a dark theme example :
self.settings = gtk.settings_get_default()
self.settings.set_property("gtk-theme-name", "Adwaita-dark")
In your case it can be :
self.gscreen.settings, or some text, but first try above.
If you want to switch background color in glade, you can do that. But if i want to do that, i would make a new linux theme i think.
That option is located in your system file, just google the source location.
Upcoming is the QT. If you are starter, you can look at this. But i don't know how free you are in the python coding with QT.
I feel good at glade and pure C. Python is to simple for me to understand.
Last edit: 28 Jan 2019 21:36 by Grotius.
The following user(s) said Thank You: KevKim
Please Log in or Create an account to join the conversation.
28 Jan 2019 22:24 #125112
by cmorley
Replied by cmorley on topic How hard is it to build a completely new standalone GUI?
Theme is the best way to change the background.
You can change the theme is the preference file;
gtk_theme = Redmond
You's have to build a custom theme or download a suitable dark theme.
As for motion.on-soft-limit pin (True when the machine has tripped a soft limit - not a hard limit), I would use python code to read the pin. This saves you from connecting a bunch of HAL pins in a separate file.
In the tester_handler file find the function:
change it to:
Then add the relevantly named LED on to your screen.
Chris M
You can change the theme is the preference file;
gtk_theme = Redmond
You's have to build a custom theme or download a suitable dark theme.
As for motion.on-soft-limit pin (True when the machine has tripped a soft limit - not a hard limit), I would use python code to read the pin. This saves you from connecting a bunch of HAL pins in a separate file.
In the tester_handler file find the function:
def periodic(self):
pass
change it to:
def periodic(self):
value = hal.get_value("motion.on-soft-limit")
self.widgets.hal_led_soft_limit.set_active(value)
Chris M
Please Log in or Create an account to join the conversation.
28 Jan 2019 22:59 #125114
by cmorley
Replied by cmorley on topic How hard is it to build a completely new standalone GUI?
Just for fun, if you want to see what themes can do...
I've tried this so I know it works.
in your handler file change the function to this:
now load up the gscreen sim config 'gscreen'
You will see a tab name 'preferences'
click the tab and look for a combobox for themes.
select different theme they will change gscreen right away.
If you find one you think might be interesting for your GUI then close gscreen with that theme still on.
Now when you load your screen it will use that theme.
Repeat to try different themes.
While none will be exactly what you want it does show the power of themes (depending on how many you have on your system - you can download more)
Chris
I've tried this so I know it works.
in your handler file change the function to this:
def initialize_widgets(self):
self.gscreen.init_show_windows()
self.gscreen.change_theme(self.data.theme_name)
now load up the gscreen sim config 'gscreen'
You will see a tab name 'preferences'
click the tab and look for a combobox for themes.
select different theme they will change gscreen right away.
If you find one you think might be interesting for your GUI then close gscreen with that theme still on.
Now when you load your screen it will use that theme.
Repeat to try different themes.
While none will be exactly what you want it does show the power of themes (depending on how many you have on your system - you can download more)
Chris
The following user(s) said Thank You: KevKim
Please Log in or Create an account to join the conversation.
29 Jan 2019 02:39 #125124
by KevKim
Replied by KevKim on topic How hard is it to build a completely new standalone GUI?
ty grotius & Chris, I'll try that themes stuff definitely.
BTW, my desired function keys under dro are like these;
- go home : go to machine home, probably available through .ngc macro
- go zero : go to work zero of current work offset, probably available through .ngc macro
- soft limit : toggle activate/deactivate soft-limitation of all axis, useful when setting up machine travel to see how far it can go under operator's responsibility ( I have no idea if this is available by simple macro/widget/hal call)
- soft-limit led : shows current status of soft-limit active/inactive, green for ON, red for OFF
- machine coord&led : sets DRO to machine-coord display and shows its status, green for ON, grey for inactive
- work coord & led : sets DRO to (current) work-coord display, radio button group with together machine coord (or if technically possible, can make just one toggle to show if it is in machine coord display or not)
- dro2enc : overwrites current DRO to encoder DRO, will be possible using LCNC variables and .ngc macro
- enc2dro : overwrites DRO backward, these last two functions are quite useful that I modified my Mach3 screen like this. I use servo and made a circuit board to read enc report from servo amp, its mentally comfortable to see it always, and also useful to go back to certain coord when something (or zeroing by mistake) happened, it can help to go back to previous position without too much hassle
So, I'll try to implement such stuffs, however, if something brings too much complex or sophisticated modification then I may drop a few stuffs. If you can add several python codes, that would be nice too. I'll upload whole pack from time to time for ppl who feel interest in this project. Needless to say, I am too ambitious ;p
regards,
kevin
BTW, my desired function keys under dro are like these;
- go home : go to machine home, probably available through .ngc macro
- go zero : go to work zero of current work offset, probably available through .ngc macro
- soft limit : toggle activate/deactivate soft-limitation of all axis, useful when setting up machine travel to see how far it can go under operator's responsibility ( I have no idea if this is available by simple macro/widget/hal call)
- soft-limit led : shows current status of soft-limit active/inactive, green for ON, red for OFF
- machine coord&led : sets DRO to machine-coord display and shows its status, green for ON, grey for inactive
- work coord & led : sets DRO to (current) work-coord display, radio button group with together machine coord (or if technically possible, can make just one toggle to show if it is in machine coord display or not)
- dro2enc : overwrites current DRO to encoder DRO, will be possible using LCNC variables and .ngc macro
- enc2dro : overwrites DRO backward, these last two functions are quite useful that I modified my Mach3 screen like this. I use servo and made a circuit board to read enc report from servo amp, its mentally comfortable to see it always, and also useful to go back to certain coord when something (or zeroing by mistake) happened, it can help to go back to previous position without too much hassle
So, I'll try to implement such stuffs, however, if something brings too much complex or sophisticated modification then I may drop a few stuffs. If you can add several python codes, that would be nice too. I'll upload whole pack from time to time for ppl who feel interest in this project. Needless to say, I am too ambitious ;p
regards,
kevin
Please Log in or Create an account to join the conversation.
29 Jan 2019 02:53 #125125
by KevKim
Replied by KevKim on topic How hard is it to build a completely new standalone GUI?
Please Log in or Create an account to join the conversation.
29 Jan 2019 06:49 #125134
by cmorley
Replied by cmorley on topic How hard is it to build a completely new standalone GUI?
Sorry that doesn't give enough information to diagnosis the error.
What does the dialog say and what does the end of the debug info say?
Thanks
What does the dialog say and what does the end of the debug info say?
Thanks
Please Log in or Create an account to join the conversation.
Moderators: HansU
Time to create page: 0.196 seconds