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
9816f033
Commit
9816f033
authored
9 years ago
by
quillford
Browse files
Options
Downloads
Patches
Plain Diff
added travel feedrate setting
parent
3504533b
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/GenericGcodeDriver.java
+20
-1
20 additions, 1 deletion
src/com/t_oster/liblasercut/drivers/GenericGcodeDriver.java
with
20 additions
and
1 deletion
src/com/t_oster/liblasercut/drivers/GenericGcodeDriver.java
+
20
−
1
View file @
9816f033
...
...
@@ -53,6 +53,7 @@ public class GenericGcodeDriver extends LaserCutter {
protected
static
final
String
SETTING_HTTP_UPLOAD_URL
=
"HTTP Upload URL"
;
protected
static
final
String
SETTING_LINEEND
=
"Lineend (CR,LF,CRLF)"
;
protected
static
final
String
SETTING_MAX_SPEED
=
"Max speed (in mm/min)"
;
protected
static
final
String
SETTING_TRAVEL_SPEED
=
"Travel (non laser moves) speed (in mm/min)"
;
protected
static
final
String
SETTING_PRE_JOB_GCODE
=
"Pre-Job GCode (comma separated)"
;
protected
static
final
String
SETTING_POST_JOB_GCODE
=
"Post-Job GCode (comma separated)"
;
protected
static
final
String
SETTING_RESOLUTIONS
=
"Supported DPI (comma separated)"
;
...
...
@@ -240,6 +241,18 @@ public class GenericGcodeDriver extends LaserCutter {
this
.
max_speed
=
max_speed
;
}
protected
double
travel_speed
=
20
*
60
;
public
double
getTravel_speed
()
{
return
travel_speed
;
}
public
void
setTravel_speed
(
double
travel_speed
)
{
this
.
travel_speed
=
travel_speed
;
}
@Override
/**
* We do not support Frequency atm, so we return power,speed and focus
...
...
@@ -305,7 +318,8 @@ public class GenericGcodeDriver extends LaserCutter {
}
protected
void
move
(
PrintStream
out
,
int
x
,
int
y
,
double
resolution
)
throws
IOException
{
sendLine
(
"G0 X%f Y%f"
,
Util
.
px2mm
(
x
,
resolution
),
Util
.
px2mm
(
y
,
resolution
));
currentSpeed
=
getTravel_speed
();
sendLine
(
"G0 X%f Y%f F%d"
,
Util
.
px2mm
(
x
,
resolution
),
Util
.
px2mm
(
y
,
resolution
),
(
int
)
(
travel_speed
));
}
protected
void
line
(
PrintStream
out
,
int
x
,
int
y
,
double
resolution
)
throws
IOException
{
...
...
@@ -672,6 +686,7 @@ public class GenericGcodeDriver extends LaserCutter {
SETTING_INIT_DELAY
,
SETTING_LINEEND
,
SETTING_MAX_SPEED
,
SETTING_TRAVEL_SPEED
,
SETTING_PRE_JOB_GCODE
,
SETTING_POST_JOB_GCODE
,
SETTING_RESOLUTIONS
,
...
...
@@ -708,6 +723,8 @@ public class GenericGcodeDriver extends LaserCutter {
return
this
.
getLineend
();
}
else
if
(
SETTING_MAX_SPEED
.
equals
(
attribute
))
{
return
this
.
getMax_speed
();
}
else
if
(
SETTING_TRAVEL_SPEED
.
equals
(
attribute
))
{
return
this
.
getTravel_speed
();
}
else
if
(
SETTING_PRE_JOB_GCODE
.
equals
(
attribute
))
{
return
this
.
getPreJobGcode
();
}
else
if
(
SETTING_POST_JOB_GCODE
.
equals
(
attribute
))
{
...
...
@@ -747,6 +764,8 @@ public class GenericGcodeDriver extends LaserCutter {
this
.
setLineend
((
String
)
value
);
}
else
if
(
SETTING_MAX_SPEED
.
equals
(
attribute
))
{
this
.
setMax_speed
((
Double
)
value
);
}
else
if
(
SETTING_TRAVEL_SPEED
.
equals
(
attribute
))
{
this
.
setTravel_speed
((
Double
)
value
);
}
else
if
(
SETTING_PRE_JOB_GCODE
.
equals
(
attribute
))
{
this
.
setPreJobGcode
((
String
)
value
);
}
else
if
(
SETTING_POST_JOB_GCODE
.
equals
(
attribute
))
{
...
...
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