Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Amanda Ghassaei
DMDesign
Commits
0dd890b9
Commit
0dd890b9
authored
Sep 17, 2015
by
Amanda Ghassaei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
footer status codes
parent
d85de2e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
0 deletions
+9
-0
js/SerialMonitor/PositionDataView.html
js/SerialMonitor/PositionDataView.html
+1
-0
js/models/MachineState.js
js/models/MachineState.js
+6
-0
js/models/SerialComm.js
js/models/SerialComm.js
+2
-0
No files found.
js/SerialMonitor/PositionDataView.html
View file @
0dd890b9
...
...
@@ -11,4 +11,5 @@ C: <span class="positionVal"><%= c %></span><br/><br/>
<
%
}
else
if
(status =
=
5)
{
%
>
moving
<
%
}
else
if
(status =
=
6)
{
%
>
holding
<
%
}
else
if
(status =
=
9)
{
%
>
homing
<
%
}
else
if
(status =
=
10)
{
%
>
bad footer status
<
%
}
else
{
%
>
status =
<
%=
status
%
><
%
}
%
></span>
\ No newline at end of file
js/models/MachineState.js
View file @
0dd890b9
...
...
@@ -26,6 +26,12 @@ define(['underscore', 'backbone'], function(_, Backbone){
if
(
data
.
stat
!==
null
&&
data
.
stat
!==
undefined
)
this
.
set
(
"
status
"
,
data
.
stat
);
},
setFooterStatus
:
function
(
data
){
if
(
data
[
1
]
==
0
){
//ok status
this
.
set
(
"
status
"
,
3
);
}
else
this
.
set
(
"
status
"
,
10
);
},
refresh
:
function
(){
this
.
set
(
this
.
defaults
);
}
...
...
js/models/SerialComm.js
View file @
0dd890b9
...
...
@@ -107,6 +107,8 @@ define(['underscore', 'backbone', 'socketio', 'machineState'], function(_, Backb
}
else
if
(
json
.
sr
){
serialComm
.
getMachineState
().
setPosition
(
json
.
sr
);
}
if
(
json
.
f
)
serialComm
.
getMachineState
().
setFooterStatus
(
json
.
f
);
else
if
(
json
.
r
.
f
)
serialComm
.
getMachineState
().
setFooterStatus
(
json
.
r
.
f
);
}
catch
(
err
)
{}
});
...
...
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