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

eod

parent 2d7f2e76
Branches
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'serialComm'], function($
_initialize: function(){
this.listenTo(serialComm, "change", this.render);
this.listenTo(serialComm, "change:lastMessageReceived", this._updateIncomingMesage);
this.listenTo(serialComm, "change:lastMessageReceived", this._updateIncomingMessage);
this.inTimeout = false;
},
......@@ -35,9 +35,10 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'serialComm'], function($
serialComm.send(message);
},
_updateIncomingMesage: function(){
_updateIncomingMessage: function(){
var message = serialComm.get("lastMessageReceived");
var $message = $("#incomingSerialMessage");
console.log(message);
$message.html(message);
$message.css("background", "#ffff99");
if (!this.inTimeout) {
......@@ -104,7 +105,7 @@ define(['jquery', 'underscore', 'menuParent', 'plist', 'serialComm'], function($
</ul>\
</div>\
&nbsp;&nbsp;<a href="#" id="refreshPorts" class="btn btn-lg btn-default btn-icon"><img src="assets/imgs/refreshIcon.png"></a><br/><br/>\
Incoming: &nbsp;&nbsp;<pre id="incomingSerialMessage"></pre><br/><br/>\
Incoming: &nbsp;&nbsp;<pre id="incomingSerialMessage"></pre><br/>\
<input id="seriallTestMessage" value="<%= testMessage %>" placeholder="Send Message" class="form-control fullWidth unresponsiveInput" type="text"><br/><br/>\
<a href="#" id="serialFlushBuffer" class="btn btn-block btn-lg btn-danger">Flush Buffer</a><br/>\
<% }else{ %>\
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment