diff --git a/js/menus/SendMenuView.js b/js/menus/SendMenuView.js index 1b35f55cd5ffe35455baa902b7689412a2bfdf4d..e76b6db23290431ab9aafbcc86f7578dcdc49090 100644 --- a/js/menus/SendMenuView.js +++ b/js/menus/SendMenuView.js @@ -2,8 +2,8 @@ * Created by aghassaei on 3/11/15. */ -define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'commPlist', 'text!sendMenuTemplate'], - function($, _, CommParentMenu, serialComm, commPlist, template){ +define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'commPlist', 'text!sendMenuTemplate', 'cam', 'camPlist'], + function($, _, CommParentMenu, serialComm, commPlist, template, cam, camPlist){ return CommParentMenu.extend({ @@ -13,11 +13,12 @@ define(['jquery', 'underscore', 'commParentMenu', 'serialComm', 'commPlist', 'te __initialize: function(){ + this.isStreaming = false; }, _makeTemplateJSON: function(){ console.log("render"); - return _.extend(serialComm.toJSON(), commPlist); + return _.extend(serialComm.toJSON(), commPlist, cam.toJSON(), camPlist, {streaming: this.isStreaming}); }, template: _.template(template) diff --git a/js/menus/templates/Ribbon.html b/js/menus/templates/Ribbon.html index 989e1c11c9ec6a213cab210a688ca1535b4df662..af3b1b241f52c2782d1a6d89ccbd6b419513965e 100644 --- a/js/menus/templates/Ribbon.html +++ b/js/menus/templates/Ribbon.html @@ -9,8 +9,7 @@ <!--<a data-type="beam" class="btn btn-primary btn-ribbon ribbonCellMode<% if (cellMode == "beam"){ %> ribbon-selected<% } %>" href="#">Beam</a>--> <% if (currentNav != "navDesign"){%> <a data-type="hide" class="btn btn-primary btn-ribbon ribbonCellMode<% if (cellMode == "hide"){ %> ribbon-selected"<% } %>">Hide</a> - <% } %> - <% if (currentNav != "navSim" && currentNav != "navAssemble" && currentNav != "navOptimize"){%> + <% }else{ %> <a class="btn btn-primary btn-ribbon ribbonDeleteMode<% if (deleteMode){ %> ribbon-selected"<% } %>"><span class="fui-cross"></span></a> <% } %> <a id="ribbonAxesToggle" class="btn btn-primary btn-ribbon <% if (axesAreVisible){ %> ribbon-selected"<% } %>">Axes</a> diff --git a/js/menus/templates/SendMenuView.html b/js/menus/templates/SendMenuView.html index de21d124369af75d94cc34b799fccf508cd33137..7ea0bf981992f1f3f035a82280f2b5f589554744 100644 --- a/js/menus/templates/SendMenuView.html +++ b/js/menus/templates/SendMenuView.html @@ -1,7 +1,18 @@ <% if(connected){ %> - Incoming: <pre id="incomingSerialMessage"></pre><br/><br/> - Out: <input id="sendSerialMessage" value="" placeholder="Send Message" class="seventyFiveWidth form-control unresponsiveInput" type="text"><br/><br/> - <a href="#" id="stopMachine" class="btn btn-block btn-lg btn-danger">Stop</a><br/> -<% }else{ %> + <% if(dataOut==0){ %> + You need to go through the Assemble workflow to setup your machine and create <%= allCamProcesses[camProcess] %> first. + <% }else{ %> + <% if(streaming){ %> + <a href="#" id="pauseStream" class="btn btn-halfWidth btn-lg btn-warning">Pause</a> + <% }else{ %> + <a href="#" id="streamCommands" class="btn btn-halfWidth btn-lg btn-success">Stream</a> + <% } %> + <a href="#" id="stopMachine" class="btn pull-right btn-halfWidth btn-lg btn-danger">Stop</a><br/><br/> + Incoming: <pre id="incomingSerialMessage"></pre><br/><br/> + Out: <input id="sendSerialMessage" value="" placeholder="Send Message" class="seventyFiveWidth form-control unresponsiveInput" type="text"><br/><br/> + Next Line: <input id="nextLine" value="" placeholder="##" class="intInput form-control unresponsiveInput" type="text">Up/down<br/><br/> + <div id="gcodeEditor"><%= dataOut %></div><br/> + <% } %> +<% } else { %> Not connected, go back to setup tab and connect to Node server. <% } %> \ No newline at end of file diff --git a/js/plists/CamPList.js b/js/plists/CamPList.js index d5a374b0d436ed7d43628aec6c1aa2bf7e0aecc0..6d9e5b6a46f84c7a145350432232566430fadaf8 100644 --- a/js/plists/CamPList.js +++ b/js/plists/CamPList.js @@ -192,7 +192,7 @@ define(['three'], function(THREE){ allCamProcesses: { shopbot: "Shopbot (sbp)", gcode: "G-Code", - tinyG: "TinyG" + tinyG: "TinyG (G-Code)" }, allUnitTypes: {