Skip to content

Commit

Permalink
Merge pull request #27 from rsre/0.62
Browse files Browse the repository at this point in the history
Add 0.61 and 0.62 changeset
  • Loading branch information
rsre committed Jan 6, 2023
2 parents e60cc8d + 81fd4f9 commit ddc53a1
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 15 deletions.
11 changes: 10 additions & 1 deletion Change_Log.txt
Original file line number Diff line number Diff line change
Expand Up @@ -301,4 +301,13 @@ Version 0.59:

Version 0.60:
- Fixed scaling problem when loading an SVG file with 'Reduced Memory Use' enabled.
The problem only occurred if the user was prompted for additional scaling information.
The problem only occurred if the user was prompted for additional scaling information.

Version 0.61:
- Added option in the General Settings to disable waiting for the laser to finish the job after the last data has been sent to the laser. This can be used to allow the user to start loading the next design as the laser finishes executing the the final data.

Version 0.62:
- Fixed problem when using M3 Nano board, new job finished code is now detected.
- Fixed problem when using M3 Nano board, laser no longer remains on while moving back to starting position after raster engraving.
- Fixed registration issue between raster and vector operations when custom rapid speed was used.
- Added Option in the Tools menu that may unfreeze the controller after a job is improperly terminated (will not always work)
8 changes: 5 additions & 3 deletions egv.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'''
This script reads/writes egv format
Copyright (C) 2017-2020 Scorch www.scorchworks.com
Copyright (C) 2017-2022 Scorch www.scorchworks.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -682,6 +682,7 @@ def change_speed(self,Feed,board_name,laser_on=False,Raster_step=0,pad=True):
self.write(ord("S"))
self.write(ord("1"))
self.write(ord("E"))
self.write(ord("U"))

if pad:
self.make_dir_dist(cspad,cspad)
Expand All @@ -695,10 +696,11 @@ def strip_redundant_codes(self, EGV_data):
new_data=[]
modal_value = -1
for code in EGV_data:
if code == modal_value:
if code == modal_value and modal_value != E:
continue
elif (code == self.RIGHT) or (code == self.LEFT) or \
(code == self.UP ) or (code == self.DOWN) or (code == E):
(code == self.UP ) or (code == self.DOWN) or \
(code == self.ANGLE) or (code == E):
modal_value = code
new_data.append(code)
return new_data
Expand Down
31 changes: 20 additions & 11 deletions nano_library.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
'''
This script comunicated with the K40 Laser Cutter.
Copyright (C) 2017-2021 Scorch www.scorchworks.com
Copyright (C) 2017-2022 Scorch www.scorchworks.com
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -45,11 +45,12 @@ def __init__(self):
self.read_length= 168

#### RESPONSE CODES ####
self.OK = 206
self.BUFFER_FULL = 238
self.CRC_ERROR = 207
self.TASK_COMPLETE = 236
self.UNKNOWN_2 = 239 #after failed initialization followed by succesful initialization
self.OK = 206
self.BUFFER_FULL = 238
self.CRC_ERROR = 207
self.TASK_COMPLETE = 236
self.UNKNOWN_2 = 239 #after failed initialization followed by succesful initialization
self.TASK_COMPLETE_M3 = 204
#######################
self.hello = [160]
self.unlock = [166,0,73,83,50,80,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,70,166,15]
Expand Down Expand Up @@ -98,10 +99,11 @@ def say_hello(self):
else:
print (".",)

if response[1]==self.OK or \
response[1]==self.BUFFER_FULL or \
response[1]==self.CRC_ERROR or \
response[1]==self.TASK_COMPLETE or \
if response[1]==self.OK or \
response[1]==self.BUFFER_FULL or \
response[1]==self.CRC_ERROR or \
response[1]==self.TASK_COMPLETE or \
response[1]==self.TASK_COMPLETE_M3 or \
response[1]==self.UNKNOWN_2:
return response[1]
else:
Expand Down Expand Up @@ -132,6 +134,13 @@ def pause_un_pause(self):
self.send_data([ord('P'),ord('N')])
except:
pass

def unfreeze(self):
try:
self.send_data([ord('F'),ord('N'),ord('S'),ord('E')])
print("unfreeze sent")
except:
pass


#######################################################################
Expand Down Expand Up @@ -287,7 +296,7 @@ def wait_for_laser_to_finish(self,update_gui=None,stop_calc=None):
FINISHED = False
while not FINISHED:
response = self.say_hello()
if response == self.TASK_COMPLETE:
if response == self.TASK_COMPLETE or response == self.TASK_COMPLETE_M3:
FINISHED = True
break
elif response == None:
Expand Down

0 comments on commit ddc53a1

Please sign in to comment.