Skip to content

Commit

Permalink
inverted inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
BauerPh committed Jul 16, 2018
1 parent 1c4fa54 commit e0613ff
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions ESP8266_Firmware/ESP8266_Firmware.ino
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include <Bounce2.h>
#include <JSONtoSPIFFS.h>

#include "Modul_Info_1O.h"
#include "Modul_Info_2O.h"

#define CONFIGFILE_MQTT "config_MQTT.json"
#define CONFIGFILE_IO "config_IO.json"
Expand Down Expand Up @@ -153,8 +153,8 @@ void evaluateInput(int x, Bounce &debouncer) {
int tmpInNr = x - 1;
if (tmpInNr < 0 || tmpInNr > 1) return;
debouncer.update();
//Rising Edge
if (debouncer.rose()) {
//Rising Edge (Opto inverts Signal!!!)
if (debouncer.fell()) {
switch (InConf[tmpInNr].ctrlOutput1RisingEdge) {
case 1: //ON
if (!lockOutput[0]) output[0] = true;
Expand Down Expand Up @@ -189,8 +189,8 @@ void evaluateInput(int x, Bounce &debouncer) {
mqttClient.publish(InConf[tmpInNr].cmd.topic.c_str(), InConf[tmpInNr].cmd.qos, InConf[tmpInNr].cmd.retain, InConf[tmpInNr].cmd.payloadOn.c_str());
}
}
//Falling Edge
else if (debouncer.fell()) {
//Falling Edge (Opto inverts Signal!!!)
else if (debouncer.rose()) {
switch (InConf[tmpInNr].ctrlOutput1FallingEdge) {
case 1: //ON
if (!lockOutput[0]) output[0] = true;
Expand Down
2 changes: 1 addition & 1 deletion ESP8266_Firmware/Modul_Info_1O.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define MODEL_NAME "ESP_230V_IO_UP_1O"
#define VERSION "1.3.3"
#define VERSION "1.3.4"
//************************ IOs ***************************
#define INPUT1_PIN 12
#define INPUT2_PIN 13
Expand Down
2 changes: 1 addition & 1 deletion ESP8266_Firmware/Modul_Info_2O.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define MODEL_NAME "ESP_230V_IO_UP_2O"
#define VERSION "1.3.3"
#define VERSION "1.3.4"
//************************ IOs ***************************
#define INPUT1_PIN 12
#define INPUT2_PIN 13
Expand Down
2 changes: 1 addition & 1 deletion ESP8266_Firmware/data/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
<td align="left"><hr></td>
</tr>
<tr>
<td align="left">Version: 1.3.3</td>
<td align="left">Version: 1.3.4</td>
</tr>
</table>
4 changes: 2 additions & 2 deletions php_updateServer/version.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?PHP
return array(

"ESP_230V_IO_UP_1O" => "1.3.3",
"ESP_230V_IO_UP_2O" => "1.3.3",
"ESP_230V_IO_UP_1O" => "1.3.4",
"ESP_230V_IO_UP_2O" => "1.3.4",

);
?>

0 comments on commit e0613ff

Please sign in to comment.