2019-01-28 21:58:55 +00:00
|
|
|
{% extends 'base.html' %}
|
|
|
|
{% load staticfiles %}
|
2019-01-30 22:23:14 +00:00
|
|
|
{% block title %}Pins{% endblock %}
|
2019-01-28 21:58:55 +00:00
|
|
|
|
|
|
|
{% block mainarea %}
|
|
|
|
<main class="main-bar">
|
|
|
|
<div class="container">
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
<div class="table-responsive text-nowrap">
|
|
|
|
<table class="table" id="pin-table">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th scope="col">BCM</th>
|
|
|
|
<th scope="col">Pin Name</th>
|
|
|
|
<th scope="col">Mode</th>
|
|
|
|
<th scope="col">Value</th>
|
|
|
|
<th scope="col" class="text-right">#</th>
|
|
|
|
<th scope="col">#</th>
|
|
|
|
<th scope="col">Value</th>
|
|
|
|
<th scope="col">Mode</th>
|
|
|
|
<th scope="col">Pin Name</th>
|
|
|
|
<th scope="col">BCM</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
{% verbatim %}
|
|
|
|
<tbody ng-controller="pinTableController" ng-app="pinTableApp">
|
|
|
|
<tr ng-repeat="pin in pins">
|
|
|
|
<td>{{ pin[0].BCM }}</td>
|
|
|
|
<td>{{ pin[0].name }}</td>
|
2019-01-30 22:23:14 +00:00
|
|
|
<td>
|
|
|
|
<div class="input-group">
|
|
|
|
<div class="radioBtn btn-group" ng-show="pin[0].is_gpio">
|
|
|
|
<a class="btn btn-primary {{ pin[0].mode == 1 ? 'active' : 'notActive' }}"
|
|
|
|
data-toggle="happy"
|
|
|
|
data-title="I"
|
|
|
|
ng-click="change_mode(pin[0].physical, 1)"
|
|
|
|
>IN</a>
|
|
|
|
|
|
|
|
<a class="btn btn-primary {{ pin[0].mode == 0 ? 'active' : 'notActive' }}"
|
|
|
|
data-toggle="happy"
|
|
|
|
data-title="O"
|
|
|
|
ng-click="change_mode(pin[0].physical, 0)"
|
|
|
|
>OUT</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<input type="checkbox" class="switch_1"
|
|
|
|
ng-checked="pin[0].value"
|
|
|
|
ng-disabled="pin[0].mode != 0"
|
|
|
|
ng-show="pin[0].value != null"
|
|
|
|
>
|
|
|
|
</td>
|
2019-01-28 21:58:55 +00:00
|
|
|
<th scope="row" class="text-right">{{ pin[0].physical }}</th>
|
2019-01-30 22:23:14 +00:00
|
|
|
|
2019-01-28 21:58:55 +00:00
|
|
|
<th scope="row">{{ pin[1].physical }}</th>
|
2019-01-30 22:23:14 +00:00
|
|
|
<td>
|
|
|
|
<input type="checkbox" class="switch_1"
|
|
|
|
ng-checked="pin[1].value"
|
|
|
|
ng-disabled="pin[1].mode != 0"
|
|
|
|
ng-show="pin[1].value != null"
|
|
|
|
>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<div class="radioBtn btn-group" ng-show="pin[1].is_gpio">
|
|
|
|
<a class="btn btn-primary {{ pin[1].mode == 1 ? 'active' : 'notActive' }}"
|
|
|
|
data-toggle="happy"
|
|
|
|
data-title="I"
|
|
|
|
ng-click="change_mode(pin[1].physical, 1)"
|
|
|
|
>IN</a>
|
|
|
|
|
|
|
|
<a class="btn btn-primary {{ pin[1].mode == 0 ? 'active' : 'notActive' }}"
|
|
|
|
data-toggle="happy"
|
|
|
|
data-title="O"
|
|
|
|
ng-click="change_mode(pin[1].physical, 0)"
|
|
|
|
>OUT</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</td>
|
2019-01-28 21:58:55 +00:00
|
|
|
<td>{{ pin[1].name }}</td>
|
|
|
|
<td>{{ pin[1].BCM }}</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
{% endverbatim %}
|
|
|
|
</table>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</main>
|
2019-01-30 22:23:14 +00:00
|
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|
|
|
|
{% block extraFoot %}
|
2019-01-28 21:58:55 +00:00
|
|
|
<script src="{% static 'js/pintable.js' %}"></script>
|
|
|
|
{% endblock %}
|