SetupCommMenuView.html 2.07 KB
Newer Older
1
<% if(connected){ %>
2
3
4
    <% if(error){ %>
        <div class="inlineWarning"><%= error %></div>
    <% } %>
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
    Status: &nbsp;&nbsp;<% if (portConnected){ %> Connected <% } else { %> <span class="red">Disconnected</span> <% } %><br/><br/>
    Baud Rate: &nbsp;&nbsp;
        <div class="btn-group">
            <button data-toggle="dropdown" class="btn dropdown-toggle" type="button"><%= baudRate %><span class="caret"></span></button>
            <ul role="menu" class="dropdown-menu">
                <% _.each(allBaudRates, function(rate){ %>
                    <li><a class="serialComm dropdownSelector" data-property="baudRate" data-value="<%= rate %>" href="#"><%= rate %></a></li>
                <% }); %>
            </ul>
        </div><br/><br/>
    Port: &nbsp;&nbsp;
        <div class="btn-group">
            <button data-toggle="dropdown" class="btn dropdown-toggle" type="button"><%= portName %><span class="caret"></span></button>
            <ul role="menu" class="dropdown-menu">
                <% _.each(availablePorts, function(port){ %>
                    <li><a class="serialComm dropdownSelector" data-property="portName" data-value="<%= port %>" href="#"><%= port %></a></li>
                <% }); %>
            </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/>
25
    <a href="#" id="openSerialMonitor" class="btn btn-block btn-lg btn-default">Open Serial Monitor</a><br/>
26
    Incoming: &nbsp;&nbsp;<pre id="incomingSerialMessage"></pre><br/><br/>
Amanda Ghassaei's avatar
Amanda Ghassaei committed
27
    Out: &nbsp;&nbsp;<input id="sendSerialMessage" value="" placeholder="Send Message" class="seventyFiveWidth form-control unresponsiveInput" type="text"><br/><br/>
28
29
30
31
32
33
    <a href="#" id="serialFlushBuffer" class="btn btn-block btn-lg btn-danger">Flush Buffer</a><br/>
<% }else{ %>
    No node server found.<br/><br/>
    <a href="#" id="nodeSetupInstructions" class="btn btn-block btn-lg btn-default">Setup Instructions</a><br/>
    <a href="#" id="reconnectToNode" class="btn btn-block btn-lg btn-success">Reconnect</a><br/>
<% } %>