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
c8e66326
Commit
c8e66326
authored
9 years ago
by
Thomas Oster
Browse files
Options
Downloads
Patches
Plain Diff
Added Timeout to serial port
parent
11779b8f
No related branches found
Branches containing commit
No related tags found
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
+8
-1
8 additions, 1 deletion
src/com/t_oster/liblasercut/drivers/GenericGcodeDriver.java
with
8 additions
and
1 deletion
src/com/t_oster/liblasercut/drivers/GenericGcodeDriver.java
+
8
−
1
View file @
c8e66326
...
...
@@ -357,7 +357,6 @@ public class GenericGcodeDriver extends LaserCutter {
String
line
=
""
;
while
(
""
.
equals
(
line
))
{
//skip empty lines
//TODO: Add Timeout
line
=
in
.
readLine
();
}
System
.
out
.
println
(
"< "
+
line
);
//TODO: remove
...
...
@@ -396,6 +395,14 @@ public class GenericGcodeDriver extends LaserCutter {
try
{
port
=
i
.
open
(
"VisiCut"
,
1000
);
try
{
port
.
enableReceiveTimeout
(
1000
);
}
catch
(
UnsupportedCommOperationException
e
)
{
System
.
err
.
println
(
"Serial timeout not supported. Driver may hang if device does not respond properly."
);
}
if
(
this
.
getBaudRate
()
>
0
&&
port
instanceof
SerialPort
)
{
SerialPort
sp
=
(
SerialPort
)
port
;
...
...
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