Skip to content

Commit

Permalink
8.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Jul 8, 2015
1 parent 4c3ea87 commit ea7c80e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
11 changes: 7 additions & 4 deletions modules/gpio/html/gpio_rev.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
$gpio_rev = isset($_POST['gpio_rev']) ? $_POST['gpio_rev'] : '';
$gpio_rev1 = isset($_POST['gpio_rev1']) ? $_POST['gpio_rev1'] : '';
if (($gpio_rev1 == "gpio_rev1") ){
if ( $a['rev'] == "on") {
$db->exec("UPDATE gpio SET rev='' where gpio='$gpio_post' ") or die("exec error");
if ( $gpio_rev == "on") {
$db->exec("UPDATE gpio SET rev='on' where gpio='$gpio_post' ") or die("exec error");
}
else {
$db->exec("UPDATE gpio SET rev='on' where gpio='$gpio_post' ") or die("exec error");
$db->exec("UPDATE gpio SET rev='' where gpio='$gpio_post' ") or die("exec error");
}
$db = null;
header("location: " . $_SERVER['REQUEST_URI']);
Expand All @@ -15,12 +15,15 @@
?>

<form action="" method="post" style=" display:inline!important;">
<?php if ( $a['rev'] == "on"){ ?>
<?php if ( $a['rev'] === "on"){ ?>
<button class="btn btn-xs btn-primary">LOW</button>
<input type="hidden" name="gpio_rev" value="" />
<?php } else { ?>
<button class="btn btn-xs btn-danger">HIGH</button>
<input type="hidden" name="gpio_rev" value="on" />
<?php } ?>
<input type="hidden" name="gpio_rev1" value="gpio_rev1" />

<input type="hidden" name="gpio" value="<?php echo $a['gpio']; ?>"/>
</form>

Expand Down
5 changes: 4 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,11 @@ USERS:

Changelog:

8.6
8.6.1

Fix not working HIGH/LOW reverse state.

8.6
add wifi relays based on ESP8266. To upload firmware to ESP8266 go to tools > ESPupload

8.5.21
Expand Down

0 comments on commit ea7c80e

Please sign in to comment.