Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
DMDesign
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Amanda Ghassaei
DMDesign
Commits
da5a2ca0
Commit
da5a2ca0
authored
9 years ago
by
Amanda Ghassaei
Browse files
Options
Downloads
Patches
Plain Diff
fix for rendering issue
parent
9a724c55
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
js/SerialMonitor/appState.js
+8
-0
8 additions, 0 deletions
js/SerialMonitor/appState.js
js/SerialMonitor/lattice.js
+8
-0
8 additions, 0 deletions
js/SerialMonitor/lattice.js
js/models/SerialComm.js
+17
-2
17 additions, 2 deletions
js/models/SerialComm.js
with
33 additions
and
2 deletions
js/SerialMonitor/appState.js
0 → 100644
+
8
−
0
View file @
da5a2ca0
/**
* Created by aghassaei on 10/22/15.
*/
define
([],
function
(){
return
{};
});
\ No newline at end of file
This diff is collapsed.
Click to expand it.
js/SerialMonitor/lattice.js
0 → 100644
+
8
−
0
View file @
da5a2ca0
/**
* Created by aghassaei on 10/22/15.
*/
define
([],
function
(){
return
{};
});
\ No newline at end of file
This diff is collapsed.
Click to expand it.
js/models/SerialComm.js
+
17
−
2
View file @
da5a2ca0
...
@@ -2,8 +2,10 @@
...
@@ -2,8 +2,10 @@
* Created by aghassaei on 6/17/15.
* Created by aghassaei on 6/17/15.
*/
*/
define
([
'
underscore
'
,
'
backbone
'
,
'
socketio
'
,
'
machineState
'
,
'
cam
'
],
//todo get cam, lattice, appstate out of here
function
(
_
,
Backbone
,
io
,
machineState
,
cam
){
define
([
'
underscore
'
,
'
backbone
'
,
'
socketio
'
,
'
machineState
'
,
'
cam
'
,
'
lattice
'
,
'
appState
'
],
function
(
_
,
Backbone
,
io
,
machineState
,
cam
,
lattice
,
appState
){
var
SerialComm
=
Backbone
.
Model
.
extend
({
var
SerialComm
=
Backbone
.
Model
.
extend
({
...
@@ -23,9 +25,14 @@ define(['underscore', 'backbone', 'socketio', 'machineState', 'cam'],
...
@@ -23,9 +25,14 @@ define(['underscore', 'backbone', 'socketio', 'machineState', 'cam'],
initialize
:
function
(){
initialize
:
function
(){
this
.
machineState
=
machineState
;
this
.
machineState
=
machineState
;
this
.
listenTo
(
machineState
,
"
change
"
,
this
.
_updateVirtualMachine
);
this
.
listenTo
(
machineState
,
"
change
"
,
this
.
_updateVirtualMachine
);
if
(
appState
.
get
)
this
.
listenTo
(
appState
,
"
change:currentNav
"
,
this
.
_navChanged
);
this
.
attemptToConnectToNode
();
this
.
attemptToConnectToNode
();
},
},
_navChanged
:
function
(){
if
(
appState
.
previous
(
"
currentNav
"
)
==
"
navComm
"
)
lattice
.
showCells
(
"
cells
"
);
},
attemptToConnectToNode
:
function
(){
attemptToConnectToNode
:
function
(){
if
(
!
this
.
get
(
"
connected
"
))
{
if
(
!
this
.
get
(
"
connected
"
))
{
this
.
socket
=
io
.
connect
(
'
http://localhost:8080
'
,
{
'
forceNew
'
:
true
});
this
.
socket
=
io
.
connect
(
'
http://localhost:8080
'
,
{
'
forceNew
'
:
true
});
...
@@ -75,8 +82,16 @@ define(['underscore', 'backbone', 'socketio', 'machineState', 'cam'],
...
@@ -75,8 +82,16 @@ define(['underscore', 'backbone', 'socketio', 'machineState', 'cam'],
if
(
machineState
&&
machineState
.
isReadyStatus
()){
if
(
machineState
&&
machineState
.
isReadyStatus
()){
var
lineNum
=
cam
.
get
(
"
simLineNumber
"
);
var
lineNum
=
cam
.
get
(
"
simLineNumber
"
);
var
allLines
=
cam
.
get
(
"
dataOut
"
).
split
(
"
\n
"
);
var
allLines
=
cam
.
get
(
"
dataOut
"
).
split
(
"
\n
"
);
if
(
lineNum
==
0
)
lattice
.
hideCells
(
"
cells
"
);
if
(
lineNum
>=
0
&&
lineNum
<
allLines
.
length
)
{
if
(
lineNum
>=
0
&&
lineNum
<
allLines
.
length
)
{
var
line
=
allLines
[
lineNum
];
var
line
=
allLines
[
lineNum
];
if
(
line
.
substr
(
0
,
2
)
==
"
({
"
){
var
index
=
line
.
substr
(
1
,
line
.
length
-
2
);
index
=
JSON
.
parse
(
index
);
lattice
.
showCellAtIndex
(
index
);
}
self
.
listenToOnce
(
machineState
,
"
readyForNextCommand
"
,
function
(){
self
.
listenToOnce
(
machineState
,
"
readyForNextCommand
"
,
function
(){
lineNum
++
;
lineNum
++
;
cam
.
set
(
"
simLineNumber
"
,
lineNum
);
cam
.
set
(
"
simLineNumber
"
,
lineNum
);
...
...
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