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
aa29cd25
Commit
aa29cd25
authored
12 years ago
by
Thomas Oster
Browse files
Options
Downloads
Patches
Plain Diff
Serial fix (still untested)
parent
7bbbb3f3
No related branches found
Branches containing commit
Tags
visicut1.3.5
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/Lasersaur.java
+15
-5
15 additions, 5 deletions
src/com/t_oster/liblasercut/drivers/Lasersaur.java
with
15 additions
and
5 deletions
src/com/t_oster/liblasercut/drivers/Lasersaur.java
+
15
−
5
View file @
aa29cd25
...
...
@@ -25,12 +25,10 @@ import java.io.BufferedOutputStream;
import
java.io.ByteArrayOutputStream
;
import
java.io.PrintStream
;
import
java.io.UnsupportedEncodingException
;
import
java.util.Arrays
;
import
java.util.LinkedList
;
import
java.util.List
;
import
java.util.Locale
;
import
java.util.*
;
import
purejavacomm.CommPort
;
import
purejavacomm.CommPortIdentifier
;
import
purejavacomm.NoSuchPortException
;
import
purejavacomm.SerialPort
;
/**
...
...
@@ -389,7 +387,19 @@ public class Lasersaur extends LaserCutter {
pl
.
taskChanged
(
this
,
"checking job"
);
checkJob
(
job
);
pl
.
taskChanged
(
this
,
"connecting"
);
CommPortIdentifier
cpi
=
CommPortIdentifier
.
getPortIdentifier
(
this
.
getComPort
());
CommPortIdentifier
cpi
=
null
;
//since the CommPortIdentifier.getPortIdentifier(String name) method
//is not working as expected, we have to manually find our port.
Enumeration
en
=
CommPortIdentifier
.
getPortIdentifiers
();
while
(
en
.
hasMoreElements
())
{
Object
o
=
en
.
nextElement
();
if
(
o
instanceof
CommPortIdentifier
&&
((
CommPortIdentifier
)
o
).
getName
().
equals
(
this
.
getComPort
()))
{
cpi
=
(
CommPortIdentifier
)
o
;
break
;
}
}
if
(
cpi
==
null
)
{
throw
new
Exception
(
"Error: No such COM-Port '"
+
this
.
getComPort
()+
"'"
);
...
...
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