From 0d6b28ca584a77b020cc6532ffbe1388c7a8a7ed Mon Sep 17 00:00:00 2001 From: Joey-1970 Date: Mon, 10 Dec 2018 22:43:08 +0100 Subject: [PATCH] Update module.php --- GeCoS_16In/module.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/GeCoS_16In/module.php b/GeCoS_16In/module.php index 5e1503ec..0c7dddaa 100644 --- a/GeCoS_16In/module.php +++ b/GeCoS_16In/module.php @@ -252,16 +252,16 @@ private function Interrupt() // Statusvariablen setzen for ($i = 0; $i <= 7; $i++) { - If (pow(2, $i) AND $INTFA) { + If (((pow(2, $i) & $INTFA) >> $i) == true) { // Port A - $Value = $INTCAPA & pow(2, $i); + $Value = boolval($INTCAPA & pow(2, $i)); If (GetValueBoolean($this->GetIDForIdent("Input_X".$i)) == !$Value) { SetValueBoolean($this->GetIDForIdent("Input_X".$i), $Value); } } - If (pow(2, $i) AND $INTFB) { + If (((pow(2, $i) & $INTFB) >> $i) == true) { // Port B - $Value = $INTCAPB & pow(2, $i); + $Value = boolval($INTCAPB & pow(2, $i)); If (GetValueBoolean($this->GetIDForIdent("Input_X".($i + 8))) == !$Value) { SetValueBoolean($this->GetIDForIdent("Input_X".($i + 8)), $Value); }