Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Amanda Ghassaei
DMDesign
Commits
4d447988
Commit
4d447988
authored
Sep 18, 2015
by
Amanda Ghassaei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixes
parent
dc278a7f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
5 deletions
+3
-5
js/cam/processes/GCodeExporter.js
js/cam/processes/GCodeExporter.js
+1
-1
js/models/SerialComm.js
js/models/SerialComm.js
+2
-4
No files found.
js/cam/processes/GCodeExporter.js
View file @
4d447988
...
...
@@ -145,7 +145,7 @@ define(['underscore', 'cam', 'lattice', 'three'], function(_, cam, lattice, THRE
};
GCodeExporter
.
prototype
.
_isMoveCommand
=
function
(
line
){
return
line
.
substr
(
0
,
3
)
==
"
G
0
1
"
||
line
.
substr
(
0
,
2
)
==
"
G0
"
;
return
line
.
substr
(
0
,
2
)
==
"
G1
"
||
line
.
substr
(
0
,
2
)
==
"
G0
"
||
line
.
substr
(
0
,
3
)
==
"
G01
"
;
};
GCodeExporter
.
prototype
.
_simulateMove
=
function
(
line
,
speed
,
machine
,
settings
,
callback
){
...
...
js/models/SerialComm.js
View file @
4d447988
...
...
@@ -137,17 +137,15 @@ define(['underscore', 'backbone', 'socketio', 'machineState', 'cam'],
if
(
data
==
""
||
data
==
'
\n
'
||
data
==
"
\r
"
)
return
;
serialComm
.
set
(
"
lastMessageReceived
"
,
data
,
{
silent
:
true
});
serialComm
.
trigger
(
"
change:lastMessageReceived
"
);
console
.
log
(
data
);
try
{
var
json
=
JSON
.
parse
(
data
);
console
.
log
(
json
);
if
(
json
.
r
&&
json
.
r
.
sr
){
serialComm
.
getMachineState
().
setPosition
(
json
.
r
.
sr
);
}
else
if
(
json
.
sr
){
serialComm
.
getMachineState
().
setPosition
(
json
.
sr
);
}
}
catch
(
err
)
{
console
.
warn
(
err
);
//
console.warn(err);
}
});
...
...
@@ -178,7 +176,7 @@ define(['underscore', 'backbone', 'socketio', 'machineState', 'cam'],
});
socket
.
on
(
"
errorMsg
"
,
function
(
data
){
console
.
log
(
data
);
console
.
warn
(
data
);
serialComm
.
set
(
"
error
"
,
data
.
error
);
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment