a.binder 5 anni fa
parent
commit
d972d741f8

+ 13 - 2
SE/stuff/P5_Automation_can-dev-res/_Slave_Ports_I2C_func.h

@@ -122,9 +122,13 @@
                                                     if(Slave_Ports_Status_A[i].Exp_state |  Exp_state_SET )   Serial.print(" [ | SET ] ");
                                                     if(Slave_Ports_Status_A[i].Exp_state |  Exp_state_SET )   Serial.print(" [ | SET ] ");
                                                     if(Slave_Ports_Status_A[i].Exp_state &  Exp_state_SET )   Serial.print(" [ & SET ] ");
                                                     if(Slave_Ports_Status_A[i].Exp_state &  Exp_state_SET )   Serial.print(" [ & SET ] ");
                                                     if(Slave_Ports_Status_A[i].Exp_state |  Exp_state_ERROR )   Serial.print(" [ | ERR ] ");
                                                     if(Slave_Ports_Status_A[i].Exp_state |  Exp_state_ERROR )   Serial.print(" [ | ERR ] ");
-                                                    if(Slave_Ports_Status_A[i].Exp_state &  Exp_state_ERROR )   Serial.print(" [ & ERR ] ");                                                    
+                                                    if(Slave_Ports_Status_A[i].Exp_state &  Exp_state_ERROR )   Serial.print(" [ & ERR ] ");
+                                                        if(Slave_Ports_Status_A[i].Exp_state |  Exp_state_OFF )   Serial.print(" [ | OFF ] ");
+                                                        if(Slave_Ports_Status_A[i].Exp_state &  Exp_state_OFF )   Serial.print(" [ & OFF ] ");                                                         
                                                         if (!( ( Slave_Ports_Status_A[i].Exp_state & Exp_state_SET ) ^ Exp_state_SET ))  Serial.print(" [ ^ SET ] ");
                                                         if (!( ( Slave_Ports_Status_A[i].Exp_state & Exp_state_SET ) ^ Exp_state_SET ))  Serial.print(" [ ^ SET ] ");
                                                         if (!( ( Slave_Ports_Status_A[i].Exp_state & B00000000 ) ^ Exp_state_SET ))  Serial.print(" [ + SET ] ");
                                                         if (!( ( Slave_Ports_Status_A[i].Exp_state & B00000000 ) ^ Exp_state_SET ))  Serial.print(" [ + SET ] ");
+                                                           if (!( ( Slave_Ports_Status_A[i].Exp_state & Exp_state_OFF ) ^ Exp_state_OFF ))  Serial.print(" [ ^ OFF ] ");
+                                                        if (!( ( Slave_Ports_Status_A[i].Exp_state & B00000000 ) ^ Exp_state_OFF ))  Serial.print(" [ + OFF ] ");
                                       #endif          
                                       #endif          
                       
                       
                              //   Slave_Ports_Status_A[i].Exp_state_ttl = Exp_state_ttl_IS_ACTIVE ;
                              //   Slave_Ports_Status_A[i].Exp_state_ttl = Exp_state_ttl_IS_ACTIVE ;
@@ -178,9 +182,16 @@
                                                     if(Slave_Ports_Status_A[i].Exp_state |  Exp_state_SET )   Serial.print(" [ | SET ] ");
                                                     if(Slave_Ports_Status_A[i].Exp_state |  Exp_state_SET )   Serial.print(" [ | SET ] ");
                                                     if(Slave_Ports_Status_A[i].Exp_state &  Exp_state_SET )   Serial.print(" [ & SET ] ");
                                                     if(Slave_Ports_Status_A[i].Exp_state &  Exp_state_SET )   Serial.print(" [ & SET ] ");
                                                     if(Slave_Ports_Status_A[i].Exp_state |  Exp_state_ERROR )   Serial.print(" [ | ERR ] ");
                                                     if(Slave_Ports_Status_A[i].Exp_state |  Exp_state_ERROR )   Serial.print(" [ | ERR ] ");
-                                                    if(Slave_Ports_Status_A[i].Exp_state &  Exp_state_ERROR )   Serial.print(" [ & ERR ] ");                                                    
+                                                    if(Slave_Ports_Status_A[i].Exp_state &  Exp_state_ERROR )   Serial.print(" [ & ERR ] ");
+                                                     if(Slave_Ports_Status_A[i].Exp_state |  Exp_state_OFF )   Serial.print(" [ | OFF ] ");
+                                                    if(Slave_Ports_Status_A[i].Exp_state &  Exp_state_OFF )   Serial.print(" [ & OFF ] ");                                                    
                                                         if (!( ( Slave_Ports_Status_A[i].Exp_state & Exp_state_SET ) ^ Exp_state_SET ))  Serial.print(" [ ^ SET ] ");
                                                         if (!( ( Slave_Ports_Status_A[i].Exp_state & Exp_state_SET ) ^ Exp_state_SET ))  Serial.print(" [ ^ SET ] ");
                                                         if (!( ( Slave_Ports_Status_A[i].Exp_state & B00000000 ) ^ Exp_state_SET ))  Serial.print(" [ + SET ] ");
                                                         if (!( ( Slave_Ports_Status_A[i].Exp_state & B00000000 ) ^ Exp_state_SET ))  Serial.print(" [ + SET ] ");
+                                                        if (!( ( Slave_Ports_Status_A[i].Exp_state & Exp_state_OFF ) ^ Exp_state_OFF ))  Serial.print(" [ ^ OFF ] ");
+                                                        if (!( ( Slave_Ports_Status_A[i].Exp_state & B00000000 ) ^ Exp_state_OFF ))  Serial.print(" [ + OFF ] ");
+                                                        
+                                                        
+                                                        
                                                         //if ((Slave_Ports_Status_A[i].Exp_state & Exp_state_SET) == (x & 0x0f)) {
                                                         //if ((Slave_Ports_Status_A[i].Exp_state & Exp_state_SET) == (x & 0x0f)) {
                                                           // match
                                                           // match
                                                         //}
                                                         //}