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
645ee4b3
Commit
645ee4b3
authored
12 years ago
by
Thomas Oster
Browse files
Options
Downloads
Patches
Plain Diff
LAOS: Ventilation and Purge have to be explicitely enabled in the driver. Fixes t-oster/VisiCut#73
parent
d1412767
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/com/t_oster/liblasercut/drivers/LaosCutter.java
+57
-5
57 additions, 5 deletions
src/com/t_oster/liblasercut/drivers/LaosCutter.java
src/com/t_oster/liblasercut/drivers/LaosCutterProperty.java
+28
-3
28 additions, 3 deletions
src/com/t_oster/liblasercut/drivers/LaosCutterProperty.java
with
85 additions
and
8 deletions
src/com/t_oster/liblasercut/drivers/LaosCutter.java
+
57
−
5
View file @
645ee4b3
...
@@ -63,26 +63,52 @@ public class LaosCutter extends LaserCutter
...
@@ -63,26 +63,52 @@ public class LaosCutter extends LaserCutter
private
static
final
String
SETTING_RASTER_WHITESPACE
=
"Additional space per Raster line"
;
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_UNIDIR
=
"Engrave unidirectional"
;
private
static
final
String
SETTING_DEBUGFILE
=
"Debug output file"
;
private
static
final
String
SETTING_DEBUGFILE
=
"Debug output file"
;
private
static
final
String
SETTING_SUPPORTS_PURGE
=
"Supports purge"
;
private
static
final
String
SETTING_SUPPORTS_VENTILATION
=
"Supports ventilation"
;
private
boolean
supportsPurge
=
false
;
public
boolean
isSupportsPurge
()
{
return
supportsPurge
;
}
public
void
setSupportsPurge
(
boolean
supportsPurge
)
{
this
.
supportsPurge
=
supportsPurge
;
}
private
boolean
supportsVentilation
=
false
;
public
boolean
isSupportsVentilation
()
{
return
supportsVentilation
;
}
public
void
setSupportsVentilation
(
boolean
supportsVentilation
)
{
this
.
supportsVentilation
=
supportsVentilation
;
}
private
boolean
unidir
=
false
;
private
boolean
unidir
=
false
;
private
String
debugFilename
=
""
;
private
String
debugFilename
=
""
;
@Override
@Override
public
LaosCutterProperty
getLaserPropertyForVectorPart
()
public
LaosCutterProperty
getLaserPropertyForVectorPart
()
{
{
return
new
LaosCutterProperty
();
return
new
LaosCutterProperty
(
!
this
.
supportsPurge
,
!
this
.
supportsVentilation
);
}
}
@Override
@Override
public
LaosCutterProperty
getLaserPropertyForRasterPart
()
public
LaosCutterProperty
getLaserPropertyForRasterPart
()
{
{
return
new
LaosCutterProperty
();
return
new
LaosCutterProperty
(
!
this
.
supportsPurge
,
!
this
.
supportsVentilation
);
}
}
@Override
@Override
public
LaosCutterProperty
getLaserPropertyForRaster3dPart
()
public
LaosCutterProperty
getLaserPropertyForRaster3dPart
()
{
{
return
new
LaosCutterProperty
();
return
new
LaosCutterProperty
(
!
this
.
supportsPurge
,
!
this
.
supportsVentilation
);
}
}
public
void
setEngraveUnidirectional
(
boolean
uni
)
public
void
setEngraveUnidirectional
(
boolean
uni
)
...
@@ -364,8 +390,14 @@ public class LaosCutter extends LaserCutter
...
@@ -364,8 +390,14 @@ public class LaosCutter extends LaserCutter
{
{
LaosCutterProperty
prop
=
(
LaosCutterProperty
)
p
;
LaosCutterProperty
prop
=
(
LaosCutterProperty
)
p
;
setFocus
(
out
,
prop
.
getFocus
());
setFocus
(
out
,
prop
.
getFocus
());
setVentilation
(
out
,
prop
.
getVentilation
());
if
(
this
.
supportsVentilation
)
setPurge
(
out
,
prop
.
getPurge
());
{
setVentilation
(
out
,
prop
.
getVentilation
());
}
if
(
this
.
supportsPurge
)
{
setPurge
(
out
,
prop
.
getPurge
());
}
setSpeed
(
out
,
prop
.
getSpeed
());
setSpeed
(
out
,
prop
.
getSpeed
());
setPower
(
out
,
prop
.
getPower
());
setPower
(
out
,
prop
.
getPower
());
setFrequency
(
out
,
prop
.
getFrequency
());
setFrequency
(
out
,
prop
.
getFrequency
());
...
@@ -749,6 +781,8 @@ public class LaosCutter extends LaserCutter
...
@@ -749,6 +781,8 @@ public class LaosCutter extends LaserCutter
//SETTING_FLIPX,
//SETTING_FLIPX,
//SETTING_FLIPY,
//SETTING_FLIPY,
//SETTING_MMPERSTEP,
//SETTING_MMPERSTEP,
SETTING_SUPPORTS_VENTILATION
,
SETTING_SUPPORTS_PURGE
,
SETTING_TFTP
,
SETTING_TFTP
,
SETTING_RASTER_WHITESPACE
,
SETTING_RASTER_WHITESPACE
,
SETTING_DEBUGFILE
SETTING_DEBUGFILE
...
@@ -771,6 +805,14 @@ public class LaosCutter extends LaserCutter
...
@@ -771,6 +805,14 @@ public class LaosCutter extends LaserCutter
{
{
return
(
Double
)
this
.
getAddSpacePerRasterLine
();
return
(
Double
)
this
.
getAddSpacePerRasterLine
();
}
}
else
if
(
SETTING_SUPPORTS_PURGE
.
equals
(
attribute
))
{
return
(
Boolean
)
this
.
supportsPurge
;
}
else
if
(
SETTING_SUPPORTS_VENTILATION
.
equals
(
attribute
))
{
return
(
Boolean
)
this
.
supportsVentilation
;
}
else
if
(
SETTING_UNIDIR
.
equals
(
attribute
))
else
if
(
SETTING_UNIDIR
.
equals
(
attribute
))
{
{
return
(
Boolean
)
this
.
isEngraveUnidirectional
();
return
(
Boolean
)
this
.
isEngraveUnidirectional
();
...
@@ -821,6 +863,14 @@ public class LaosCutter extends LaserCutter
...
@@ -821,6 +863,14 @@ public class LaosCutter extends LaserCutter
{
{
this
.
setAddSpacePerRasterLine
((
Double
)
value
);
this
.
setAddSpacePerRasterLine
((
Double
)
value
);
}
}
if
(
SETTING_SUPPORTS_PURGE
.
equals
(
attribute
))
{
this
.
setSupportsPurge
((
Boolean
)
value
);
}
if
(
SETTING_SUPPORTS_VENTILATION
.
equals
(
attribute
))
{
this
.
setSupportsVentilation
((
Boolean
)
value
);
}
else
if
(
SETTING_UNIDIR
.
endsWith
(
attribute
))
else
if
(
SETTING_UNIDIR
.
endsWith
(
attribute
))
{
{
this
.
setEngraveUnidirectional
((
Boolean
)
value
);
this
.
setEngraveUnidirectional
((
Boolean
)
value
);
...
@@ -874,6 +924,8 @@ public class LaosCutter extends LaserCutter
...
@@ -874,6 +924,8 @@ public class LaosCutter extends LaserCutter
clone
.
useTftp
=
useTftp
;
clone
.
useTftp
=
useTftp
;
clone
.
addSpacePerRasterLine
=
addSpacePerRasterLine
;
clone
.
addSpacePerRasterLine
=
addSpacePerRasterLine
;
clone
.
unidir
=
unidir
;
clone
.
unidir
=
unidir
;
clone
.
supportsPurge
=
supportsPurge
;
clone
.
supportsVentilation
=
supportsVentilation
;
return
clone
;
return
clone
;
}
}
...
...
This diff is collapsed.
Click to expand it.
src/com/t_oster/liblasercut/drivers/LaosCutterProperty.java
+
28
−
3
View file @
645ee4b3
...
@@ -26,8 +26,22 @@ import com.t_oster.liblasercut.FloatPowerSpeedFocusFrequencyProperty;
...
@@ -26,8 +26,22 @@ import com.t_oster.liblasercut.FloatPowerSpeedFocusFrequencyProperty;
*/
*/
public
class
LaosCutterProperty
extends
FloatPowerSpeedFocusFrequencyProperty
{
public
class
LaosCutterProperty
extends
FloatPowerSpeedFocusFrequencyProperty
{
private
boolean
hidePurge
=
false
;
private
boolean
hideVentilation
=
false
;
private
boolean
ventilation
=
true
;
private
boolean
ventilation
=
true
;
public
LaosCutterProperty
(
boolean
hidePurge
,
boolean
hideVentilation
)
{
this
.
hidePurge
=
hidePurge
;
this
.
hideVentilation
=
hideVentilation
;
}
public
LaosCutterProperty
()
{
this
(
false
,
false
);
}
/**
/**
* Get the value of ventilation
* Get the value of ventilation
*
*
...
@@ -73,10 +87,21 @@ public class LaosCutterProperty extends FloatPowerSpeedFocusFrequencyProperty {
...
@@ -73,10 +87,21 @@ public class LaosCutterProperty extends FloatPowerSpeedFocusFrequencyProperty {
public
String
[]
getPropertyKeys
()
public
String
[]
getPropertyKeys
()
{
{
String
[]
s
=
super
.
getPropertyKeys
();
String
[]
s
=
super
.
getPropertyKeys
();
String
[]
result
=
new
String
[
s
.
length
+
2
];
if
(
this
.
hidePurge
&&
this
.
hideVentilation
)
{
return
s
;
}
String
[]
result
=
new
String
[
s
.
length
+
(
this
.
hidePurge
?
0
:
1
)
+
(
this
.
hideVentilation
?
0
:
1
)];
System
.
arraycopy
(
s
,
0
,
result
,
0
,
s
.
length
);
System
.
arraycopy
(
s
,
0
,
result
,
0
,
s
.
length
);
result
[
s
.
length
]
=
"ventilation"
;
int
i
=
s
.
length
;
result
[
s
.
length
+
1
]
=
"purge"
;
if
(!
this
.
hideVentilation
)
{
result
[
i
++]
=
"ventilation"
;
}
if
(!
this
.
hidePurge
)
{
result
[
i
++]
=
"purge"
;
}
return
result
;
return
result
;
}
}
...
...
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