QtDragon feature request go_to_zero
- ucancallmebob89
 - Offline
 - Senior Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 44
 - Thank you received: 8
 
			
	
						29 Dec 2021 13:42				#230235
		by ucancallmebob89
	
	
		
			
	
			
			 		
													
	
				Replied by ucancallmebob89 on topic QtDragon feature request go_to_zero			
			
				I figured out how to do it from the ini yesterday, I'll make a post showing what I did later today when I have more time.			
					Please Log in or Create an account to join the conversation.
- ucancallmebob89
 - Offline
 - Senior Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 44
 - Thank you received: 8
 
			
	
						30 Dec 2021 05:01				#230319
		by ucancallmebob89
	
	
		
			
	
	
		
	
			 		
													
	
				Replied by ucancallmebob89 on topic QtDragon feature request go_to_zero			
			
				Ok here's my macro button implementation:
 
You can have up to 10 macro buttons. You define the labels for each one according to its corresponding MDI_COMMAND.
I had to add one line to qt_istat.py, so here's the git diff. The changes to origin_offsetview.py and tool_offsetview.py are just cosmetic to fix the godawful highlight color.
 
And here's my updated .ui and handler.py files. I would supply the git diff for those but my VS Code does code cleanup and it changed a lot of arbitrary things.
qtdragon_hd_handler.py: I added a few dozen lines of code at the end of the initialized__ method. It assigns each label to a macrobutton and hides the macrobuttons not in use.
 
qtdragon_hd.ui: The main change is to add the frame_macro_buttons section. It also changes the led off_colors to red.
 
 			
					You can have up to 10 macro buttons. You define the labels for each one according to its corresponding MDI_COMMAND.
I had to add one line to qt_istat.py, so here's the git diff. The changes to origin_offsetview.py and tool_offsetview.py are just cosmetic to fix the godawful highlight color.
And here's my updated .ui and handler.py files. I would supply the git diff for those but my VS Code does code cleanup and it changed a lot of arbitrary things.
qtdragon_hd_handler.py: I added a few dozen lines of code at the end of the initialized__ method. It assigns each label to a macrobutton and hides the macrobuttons not in use.
qtdragon_hd.ui: The main change is to add the frame_macro_buttons section. It also changes the led off_colors to red.
Attachments:
		The following user(s) said Thank You: tommylight, zu4lu, Nikolaj9 	
			Please Log in or Create an account to join the conversation.
- cmorley
 - Offline
 - Moderator
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 7230
 - Thank you received: 2106
 
			
	
						23 Jan 2022 09:21				#232867
		by cmorley
	
	
		
			
	
	
			 		
													
	
				Replied by cmorley on topic QtDragon feature request go_to_zero			
			
				I finally added this idea to master. thanks for the code and the feedback.
The difference is you add the label text to the MDI command line after a comma.
ie.
[MDI_COMMAND_LIST]
MDI_COMMAND = G0 Z25 X0 Y0;Z0,Goto\nZero
MDI_COMMAND = G53 G0 Z0;G53 G0 X0 Y0,Goto\nMach\nZero
					The difference is you add the label text to the MDI command line after a comma.
ie.
[MDI_COMMAND_LIST]
MDI_COMMAND = G0 Z25 X0 Y0;Z0,Goto\nZero
MDI_COMMAND = G53 G0 Z0;G53 G0 X0 Y0,Goto\nMach\nZero
		The following user(s) said Thank You: ikkuh, ucancallmebob89 	
			Please Log in or Create an account to join the conversation.
- ucancallmebob89
 - Offline
 - Senior Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 44
 - Thank you received: 8
 
			
	
						14 Mar 2024 14:30				#295903
		by ucancallmebob89
	
	
		
			
	
	
			 		
													
	
				Replied by ucancallmebob89 on topic QtDragon feature request go_to_zero			
			
				Had to remake my config because I upgraded to a mesa card, and I ended up circling back to this thread. I like that you made it a one-line solution, it's much cleaner this way. Thanks!			
					
		The following user(s) said Thank You: cmorley 	
			Please Log in or Create an account to join the conversation.
- Nikolaj9
 - Offline
 - New Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 1
 - Thank you received: 0
 
			
	
						23 Aug 2025 10:15				#333794
		by Nikolaj9
	
	
		
			
	
			
			 		
													
	
				Replied by Nikolaj9 on topic QtDragon feature request go_to_zero			
			
				Hi,
I know this thread is a bit old, but I think it’s the right place to ask.
I would like to make a custom MDI button (for example, a "GotoMachZero" button) that changes its outline to green – maybe even shows a green LED – when the button is active, similar to how the MAN, MDI, and AUTO buttons behave when they are selected.
So basically: When I press the "GotoMachZero" button, it should highlight (e.g. green border or LED) and stay like that until the motion is completed.
Is it possible to do this in QtDragon? And if so, how can I implement it?Thanks in advance!
					I know this thread is a bit old, but I think it’s the right place to ask.
I would like to make a custom MDI button (for example, a "GotoMachZero" button) that changes its outline to green – maybe even shows a green LED – when the button is active, similar to how the MAN, MDI, and AUTO buttons behave when they are selected.
So basically: When I press the "GotoMachZero" button, it should highlight (e.g. green border or LED) and stay like that until the motion is completed.
Is it possible to do this in QtDragon? And if so, how can I implement it?Thanks in advance!
Please Log in or Create an account to join the conversation.
- cmorley
 - Offline
 - Moderator
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 7230
 - Thank you received: 2106
 
			
	
						23 Aug 2025 22:58				#333828
		by cmorley
	
	
		
			
	
			
			 		
													
	
				Replied by cmorley on topic QtDragon feature request go_to_zero			
			
				What version of linuxcnc are you using?
I like this idea and have it working in principle for master branch.
					I like this idea and have it working in principle for master branch.
Please Log in or Create an account to join the conversation.
		Moderators: cmorley	
		Time to create page: 0.113 seconds