Skip to content

Commit

Permalink
✨ Adds open/close button support to UI
Browse files Browse the repository at this point in the history
  • Loading branch information
donatmarko committed Jan 17, 2019
1 parent cefee02 commit 9378375
Show file tree
Hide file tree
Showing 7 changed files with 127 additions and 110 deletions.
16 changes: 8 additions & 8 deletions src/webh/esprfid.htm.gz.h

Large diffs are not rendered by default.

18 changes: 9 additions & 9 deletions src/webh/esprfid.js.gz.h

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/webh/index.html.gz.h

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions src/webh/required.css.gz.h

Large diffs are not rendered by default.

128 changes: 64 additions & 64 deletions src/webh/required.js.gz.h

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions src/websrc/esprfid.htm
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,20 @@ <h6 class="text-muted">Please refer the <a href="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/esprfid/esp-
<input class="form-control input-sm" value="300" placeholder="in Microsecond" id="delay" type="text" name="hightime">
</span>
</div>
<br>
<div class="row form-group">
<label class="col-xs-3">Button Pin<i style="margin-left: 10px;" class="glyphicon glyphicon-info-sign" aria-hidden="true" data-toggle="popover" data-trigger="hover" data-placement="right" data-content="Choose a pin to have a button with equivalent behaviour to scan a valid card (open/close button)."></i></label>
<span class="col-xs-9 col-md-5">
<select class="form-control input-sm" id="buttonPin">
<option selected="selected" value="255">None</option>
<option value="4">GPIO-4</option>
<option value="5">GPIO-5</option>
<option value="12">GPIO-12</option>
<option value="13">GPIO-13</option>
<option value="14">GPIO-14</option>
</select>
</span>
</div>
<div class="row form-group">
<br>
<br>
Expand Down
5 changes: 4 additions & 1 deletion src/websrc/js/esprfid.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ var config = {
"rtype": 1,
"ltype": 0,
"rpin": 4,
"rtime": 400
"rtime": 400,
"buttonpin": 255
},
"general": {
"hostnm": "esp-rfid",
Expand Down Expand Up @@ -128,6 +129,7 @@ function listhardware() {
document.getElementById("typerly").value = config.hardware.rtype;
document.getElementById("delay").value = config.hardware.rtime;
document.getElementById("wifipin").value = config.hardware.wifipin;
document.getElementById("buttonPin").value = config.hardware.buttonpin;
if (isOfficialBoard) {
document.getElementById("readerType").value = 1;
document.getElementById("wg0pin").value = 5;
Expand Down Expand Up @@ -193,6 +195,7 @@ function savehardware() {
config.hardware.rpin = parseInt(document.getElementById("gpiorly").value);
config.hardware.rtime = parseInt(document.getElementById("delay").value);
config.hardware.wifipin = parseInt(document.getElementById("wifipin").value);
config.hardware.buttonpin = parseInt(document.getElementById("buttonPin").value);
uncommited();
}

Expand Down

0 comments on commit 9378375

Please sign in to comment.