Skip to content
Snippets Groups Projects
Commit 0dd890b9 authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

footer status codes

parent d85de2e5
No related branches found
No related tags found
No related merge requests found
......@@ -11,4 +11,5 @@ C: &nbsp;&nbsp;<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
......@@ -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);
}
......
......@@ -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) {}
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment