Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
LibLaserCut
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
Elektronikföreningen Admittansen
LibLaserCut
Commits
61e81671
Commit
61e81671
authored
12 years ago
by
Thomas Oster
Browse files
Options
Downloads
Patches
Plain Diff
LAOS: Fixed resetting of properties and added possiblity to output the code in a file
parent
42e364ae
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/com/t_oster/liblasercut/drivers/LaosCutter.java
+26
-1
26 additions, 1 deletion
src/com/t_oster/liblasercut/drivers/LaosCutter.java
with
26 additions
and
1 deletion
src/com/t_oster/liblasercut/drivers/LaosCutter.java
+
26
−
1
View file @
61e81671
...
...
@@ -62,8 +62,10 @@ public class LaosCutter extends LaserCutter
private
static
final
String
SETTING_TFTP
=
"Use TFTP instead of TCP"
;
private
static
final
String
SETTING_RASTER_WHITESPACE
=
"Additional space per Raster line"
;
private
static
final
String
SETTING_UNIDIR
=
"Engrave unidirectional"
;
private
static
final
String
SETTING_DEBUGFILE
=
"Debug output file"
;
private
boolean
unidir
=
false
;
private
String
debugFilename
=
""
;
@Override
public
LaosCutterProperty
getLaserPropertyForVectorPart
()
...
...
@@ -622,6 +624,12 @@ public class LaosCutter extends LaserCutter
@Override
public
void
sendJob
(
LaserJob
job
,
ProgressListener
pl
)
throws
IllegalJobException
,
Exception
{
currentFrequency
=
-
1
;
currentPower
=
-
1
;
currentSpeed
=
-
1
;
currentFocus
=
0
;
currentPurge
=
false
;
currentVentilation
=
false
;
pl
.
progressChanged
(
this
,
0
);
BufferedOutputStream
out
;
ByteArrayOutputStream
buffer
=
null
;
...
...
@@ -655,6 +663,13 @@ public class LaosCutter extends LaserCutter
tftp
.
sendFile
(
job
.
getName
().
replace
(
" "
,
""
)
+
".lgc"
,
TFTP
.
BINARY_MODE
,
bain
,
this
.
getHostname
(),
this
.
getPort
());
tftp
.
close
();
bain
.
close
();
if
(
debugFilename
!=
null
&&
!
""
.
equals
(
debugFilename
))
{
pl
.
taskChanged
(
this
,
"writing "
+
debugFilename
);
FileOutputStream
o
=
new
FileOutputStream
(
new
File
(
debugFilename
));
o
.
write
(
buffer
.
toByteArray
());
o
.
close
();
}
pl
.
taskChanged
(
this
,
"sent."
);
}
pl
.
progressChanged
(
this
,
100
);
...
...
@@ -736,6 +751,7 @@ public class LaosCutter extends LaserCutter
//SETTING_MMPERSTEP,
SETTING_TFTP
,
SETTING_RASTER_WHITESPACE
,
SETTING_DEBUGFILE
};
@Override
...
...
@@ -747,7 +763,11 @@ public class LaosCutter extends LaserCutter
@Override
public
Object
getProperty
(
String
attribute
)
{
if
(
SETTING_RASTER_WHITESPACE
.
equals
(
attribute
))
if
(
SETTING_DEBUGFILE
.
equals
(
attribute
))
{
return
this
.
debugFilename
;
}
else
if
(
SETTING_RASTER_WHITESPACE
.
equals
(
attribute
))
{
return
(
Double
)
this
.
getAddSpacePerRasterLine
();
}
...
...
@@ -793,6 +813,10 @@ public class LaosCutter extends LaserCutter
@Override
public
void
setProperty
(
String
attribute
,
Object
value
)
{
if
(
SETTING_DEBUGFILE
.
equals
(
attribute
))
{
this
.
debugFilename
=
value
!=
null
?
(
String
)
value
:
""
;
}
if
(
SETTING_RASTER_WHITESPACE
.
equals
(
attribute
))
{
this
.
setAddSpacePerRasterLine
((
Double
)
value
);
...
...
@@ -841,6 +865,7 @@ public class LaosCutter extends LaserCutter
LaosCutter
clone
=
new
LaosCutter
();
clone
.
hostname
=
hostname
;
clone
.
port
=
port
;
clone
.
debugFilename
=
debugFilename
;
clone
.
bedHeight
=
bedHeight
;
clone
.
bedWidth
=
bedWidth
;
clone
.
flipXaxis
=
flipXaxis
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment