Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amanda Ghassaei
DMDesign
Commits
e3fe3259
Commit
e3fe3259
authored
Sep 11, 2015
by
Amanda Ghassaei
Browse files
beginning to wire up gcode to send menu
parent
b1368c1b
Changes
3
Hide whitespace changes
Inline
Side-by-side
js/cam/Cam.js
View file @
e3fe3259
...
...
@@ -297,10 +297,10 @@ define(['underscore', 'three', 'backbone', 'appState', 'latticeCAM', 'threeModel
this
.
get
(
"
exporter
"
).
simulate
(
allLines
[
currentLine
],
this
.
get
(
"
assembler
"
),
scaledSettings
,
function
(){
currentLine
++
;
self
.
set
(
"
simLineNumber
"
,
currentLine
);
self
.
_stockSimulation
();
});
currentLine
++
;
self
.
set
(
"
simLineNumber
"
,
currentLine
);
self
.
_stockSimulation
();
});
}
else
{
//finished simulation
this
.
resetSimulation
();
...
...
js/menus/SendMenuView.js
View file @
e3fe3259
...
...
@@ -13,7 +13,8 @@ define(['jquery', 'underscore', 'menuParent', 'serialComm', 'commPlist', 'text!s
"
click #pauseStream
"
:
"
_pauseStream
"
,
"
click #stopMachine
"
:
"
_stopMachine
"
,
"
click #previousLineButton
"
:
"
_decrementLineNum
"
,
"
click #nextLineButton
"
:
"
_incrementLineNum
"
"
click #nextLineButton
"
:
"
_incrementLineNum
"
,
"
click #openSerialMonitor
"
:
"
_openSerialMonitor
"
},
...
...
@@ -23,18 +24,21 @@ define(['jquery', 'underscore', 'menuParent', 'serialComm', 'commPlist', 'text!s
_startStream
:
function
(
e
){
e
.
preventDefault
();
this
.
model
.
set
(
"
stockSimulationPlaying
"
,
true
);
this
.
isStreaming
=
true
;
this
.
render
();
},
_pauseStream
:
function
(
e
){
e
.
preventDefault
();
this
.
model
.
set
(
"
stockSimulationPlaying
"
,
false
);
this
.
isStreaming
=
false
;
this
.
render
();
},
_stopMachine
:
function
(
e
){
e
.
preventDefault
();
this
.
model
.
set
(
"
stockSimulationPlaying
"
,
false
);
this
.
isStreaming
=
false
;
serialComm
.
send
(
"
!
"
);
this
.
render
();
...
...
@@ -50,6 +54,11 @@ define(['jquery', 'underscore', 'menuParent', 'serialComm', 'commPlist', 'text!s
console
.
log
(
"
next
"
);
},
_openSerialMonitor
:
function
(
e
){
e
.
preventDefault
();
serialComm
.
openSerialMonitor
();
},
_makeTemplateJSON
:
function
(){
return
_
.
extend
(
serialComm
.
toJSON
(),
commPlist
,
cam
.
toJSON
(),
camPlist
,
{
streaming
:
this
.
isStreaming
});
},
...
...
js/menus/templates/SendMenuView.html
View file @
e3fe3259
...
...
@@ -9,9 +9,10 @@
<a
href=
"#"
id=
"streamCommands"
class=
"btn btn-block btn-lg btn-success"
>
Stream
</a>
<
%
}
%
>
<br/>
<a
href=
"#"
id=
"openSerialMonitor"
class=
"btn btn-block btn-lg btn-default"
>
Open Serial Monitor
</a><br/>
Next Line:
<input
id=
"nextLine"
value=
""
placeholder=
"##"
class=
"intInput form-control unresponsiveInput"
type=
"text"
>
<a
href=
"#"
id=
"previousLineButton"
class=
"btn btn-lg btn-default"
>
Prev
</a>
<a
href=
"#"
id=
"nextLineButton"
class=
"btn btn-lg btn-default"
>
Next
</a><br/><br/>
<a
href=
"#"
id=
"previousLineButton"
class=
"btn btn-lg btn-default"
>
Prev
</a>
<a
href=
"#"
id=
"nextLineButton"
class=
"btn btn-lg btn-default"
>
Next
</a><br/><br/>
<div
id=
"gcodeEditor"
><
%=
dataOut
%
></div><br/>
<
%
}
%
>
<
%
}
else
{
%
>
...
...
Write
Preview
Supports
Markdown
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