Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
DMDesign
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Amanda Ghassaei
DMDesign
Commits
d85de2e5
Commit
d85de2e5
authored
Sep 17, 2015
by
Amanda Ghassaei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
machine status
parent
ef1e6396
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
3 deletions
+17
-3
css/serialMonitor.css
css/serialMonitor.css
+4
-0
js/SerialMonitor/PositionControlPanelView.html
js/SerialMonitor/PositionControlPanelView.html
+1
-1
js/SerialMonitor/PositionDataView.html
js/SerialMonitor/PositionDataView.html
+9
-1
js/models/MachineState.js
js/models/MachineState.js
+3
-1
No files found.
css/serialMonitor.css
View file @
d85de2e5
...
...
@@ -97,3 +97,7 @@ span.outgoing {
font-size
:
30px
;
padding-left
:
5px
;
}
#machineStatus
{
font-size
:
18px
;
}
js/SerialMonitor/PositionControlPanelView.html
View file @
d85de2e5
<div
id=
"positionData"
>
</div>
<br/>
</div>
<a
href=
"#"
id=
"askForPosition"
class=
"btn btn-block btn-lg btn-default"
>
Refresh Position
</a><br/>
<a
href=
"#"
id=
"pauseOutput"
class=
"btn btn-block btn-lg btn-warning"
>
Pause
</a>
<a
href=
"#"
id=
"stopMachine"
class=
"btn pull-right btn-block btn-lg btn-danger"
>
Stop
</a>
\ No newline at end of file
js/SerialMonitor/PositionDataView.html
View file @
d85de2e5
...
...
@@ -3,4 +3,12 @@ Y: <span class="positionVal"><%= y %></span><br/>
Z:
<span
class=
"positionVal"
><
%=
z
%
></span><br/><br/>
A:
<span
class=
"positionVal"
><
%=
a
%
></span><br/>
B:
<span
class=
"positionVal"
><
%=
b
%
></span><br/>
C:
<span
class=
"positionVal"
><
%=
c
%
></span><br/>
\ No newline at end of file
C:
<span
class=
"positionVal"
><
%=
c
%
></span><br/><br/>
<span
id=
"machineStatus"
>
status:
<
%
if
(status =
=
0)
{
%
>
initializing
<
%
}
else
if
(status =
=
1
||
status =
=
3
||
status =
=
4){
%
>
ready
<
%
}
else
if
(status =
=
2){
%
>
alarm
<
%
}
else
if
(status =
=
5)
{
%
>
moving
<
%
}
else
if
(status =
=
6)
{
%
>
holding
<
%
}
else
if
(status =
=
9)
{
%
>
homing
<
%
}
else
{
%
>
status =
<
%=
status
%
><
%
}
%
></span>
\ No newline at end of file
js/models/MachineState.js
View file @
d85de2e5
...
...
@@ -13,7 +13,8 @@ define(['underscore', 'backbone'], function(_, Backbone){
z
:
null
,
a
:
null
,
b
:
null
,
c
:
null
c
:
null
,
status
:
0
},
setPosition
:
function
(
data
){
...
...
@@ -22,6 +23,7 @@ define(['underscore', 'backbone'], function(_, Backbone){
var
val
=
data
[
"
pos
"
+
key
];
if
(
val
!==
null
&&
val
!==
undefined
)
self
.
set
(
key
,
val
);
});
if
(
data
.
stat
!==
null
&&
data
.
stat
!==
undefined
)
this
.
set
(
"
status
"
,
data
.
stat
);
},
refresh
:
function
(){
...
...
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