- fullscreen button no longer disables when laser operations is in progress

- add new "turbo" button that restores position from where last laser operations started
main
Petr Kratina 2023-07-02 13:12:26 +02:00
rodzic d3bd90398c
commit 66ce7d72e3
2 zmienionych plików z 48 dodań i 0 usunięć

Wyświetl plik

@ -669,6 +669,23 @@ class K40_Whisperer_Images:
vgNEV8r1gsXZaFnBVhjG6oF8Lk9DuYqFfqGA3wcLBASBC34hXHt7hlMDgo4EixlUAZSVVFqYmRIR\
ADs='
xyr_B64=b'R0lGODlhGAAYAPcMAA0XH//TWS5GWUNdc5QkGs/bcnqVp3TO2pmwv7TF0dDd5PH09wAAAAAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG1tbaqqqv///yH5BAX//wwALAAAAAAYABgA\
BwRakMlJq704V8C77xoDHMdYFgWAAqHprmtLzmoaaxxdo6k8lzuOz8W54UgukTHzEXpC0CizyZKK\
AoCAFiuMZrkcbRX6xYpA3qcV85E+y+OWuCN2h7fZOJm67vsjADs='
check_on_B64=b'R0lGODlhGAAYAPEAACNcREKPQqPCVQAAACH5BAEAAAMAIf8LSW1hZ2VNYWdpY2sNZ2FtbWE9MC40\
NTQ1NQAsAAAAABgAGAAAAkacj6nL7Q+jdGIuEao9OOQ9dF4AJBojeiWCneaovp5rpKQ8uvaaAPAX\
+vEUPphg9yj+RsOGUjh5xizPpqRojWZB3K73aygAADs='

Wyświetl plik

@ -295,6 +295,9 @@ class Application(Frame):
self.gotoX = StringVar()
self.gotoY = StringVar()
self.lastX = StringVar()
self.lastY = StringVar()
self.n_egv_passes = StringVar()
self.inkscape_path = StringVar()
@ -410,6 +413,9 @@ class Application(Frame):
self.gotoX.set("0.0")
self.gotoY.set("0.0")
self.lastX.set("0.0")
self.lastY.set("0.0")
self.n_egv_passes.set("1")
self.comb_engrave.set(0)
@ -564,6 +570,7 @@ class Application(Frame):
self.fs_image = PhotoImage(data=K40_Whisperer_Images.fs_B64, format='gif')
self.adv_image = PhotoImage(data=K40_Whisperer_Images.adv_B64, format='gif')
self.xy_image = PhotoImage(data=K40_Whisperer_Images.xy_B64, format='gif')
self.xyr_image = PhotoImage(data=K40_Whisperer_Images.xyr_B64, format='gif')
self.check_on_image = PhotoImage(data=K40_Whisperer_Images.check_on_B64, format='gif')
self.check_off_image = PhotoImage(data=K40_Whisperer_Images.check_off_B64, format='gif')
@ -624,6 +631,7 @@ class Application(Frame):
self.FastPlot_Button = Button(self.master,image=self.fastplot_off_image, command=self.Toggle_FastPlot)
self.AdvancedShow_Button = Button(self.master,image=self.adv_image,command=self.Toggle_Advanced)
self.Remember_Button = Button(self.master,image=self.xy_image,command=self.Remember_Position)
self.Restore_Button = Button(self.master,image=self.xyr_image,command=self.Restore_head_position, state="disabled")
self.Fullscreen_Button = Button(self.master,image=self.fs_image,command=self.Toggle_Fullscreen)
self.fastPlot.trace_variable("w", self.Update_FastPlot)
@ -3046,6 +3054,7 @@ class Application(Frame):
except:
pass
self.Stop_Button.configure(state="normal")
self.Fullscreen_Button.configure(state="normal")
self.statusbar.configure(state="normal")
self.master.update()
except:
@ -3199,9 +3208,29 @@ class Application(Frame):
self.statusMessage.set("No g-code data to cut")
self.Finish_Job()
def Remember_head_position(self):
self.Restore_Button.configure(state="normal")
if self.units.get()=="in":
self.lastX.set(self.laserX + self.pos_offset[0]/1000.0)
self.lastY.set(self.laserY + self.pos_offset[1]/1000.0)
else:
self.lastX.set((self.laserX + self.pos_offset[0]/1000.0)*self.units_scale)
self.lastY.set((self.laserY + self.pos_offset[1]/1000.0)*self.units_scale)
def Restore_head_position(self):
xpos = float(self.lastX.get())
ypos = float(self.lastY.get())
if self.k40 != None:
self.k40.home_position()
self.laserX = 0.0
self.laserY = 0.0
self.Rapid_Move(xpos,ypos)
self.menu_View_Refresh()
def Prepare_for_laser_run(self,msg):
self.stop[0]=False
self.move_head_window_temporary([0,0])
self.Remember_head_position()
self.set_gui("disabled")
self.statusbar.configure( bg = 'green' )
self.statusMessage.set(msg)
@ -4202,6 +4231,8 @@ class Application(Frame):
self.AdvancedShow_Button.place(x=w - 50, y=typos, width=40, height=40)
typos = typos + 45
self.Remember_Button.place(x=w - 50, y=typos, width=40, height=40)
typos = typos + 45
self.Restore_Button.place(x=w - 50, y=typos, width=40, height=40)
typos = h - 70
self.SaveSlot_Button5.place(x=w - 50, y=typos, width=40, height=40)