a.binder пре 5 година
родитељ
комит
4fed152da0

+ 5 - 1
SE/stuff/P5_Automation_can-dev-res/_PortStates_struct.h

@@ -3,11 +3,15 @@ typedef  byte Exp_state_T ;
 
  const  Exp_state_T Exp_state_OFF          =  B00000001 ; 
  const  Exp_state_T Exp_state_ON           =  B00000010 ;
+ const  Exp_state_T Exp_state_ON_LOW       =  B00000100 ;
+ const  Exp_state_T Exp_state_ON_MED       =  B00001000 ;
+ const  Exp_state_T Exp_state_ON_HI        =  B00010000 ;
+ const  Exp_state_T Exp_state_BLINK        =  B00100000 ;
  const  Exp_state_T Exp_state_SET          =  B01000000 ; //when was initialized and set output
  const  Exp_state_T Exp_state_ERROR        =  B10000000 ;
  
  //const  Exp_state_T Exp_state_TOGGLE     =  B10000000 ;
-const  Exp_state_T Exp_state_BLINK         =  B00000100 ;
+
 
  //const    Exp_state_OFF  0x01
  //#define    Exp_state_ON  0x02

+ 10 - 7
SE/stuff/P5_Automation_can-dev-res/_Slave_Ports_Status_func.h

@@ -58,10 +58,13 @@
     
     
             //valid if is uniq
-            boolean found = false ;
+            boolean found  ;
+            found = false ; 
             for(i = ARDUINO_ARRAY_INDEX_FIRST; i<= Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A.ARDUINO_ARRAY_INDEX_NEXT_A  ; i++ ) {
-                if((Slave_Ports_Status_A[i].Port_ID == Port_ID) and (Slave_Ports_Status_A[i]._Slave_ID == _Slave_ID )) found = true ;
-                   Serial.print("+D");Serial.print(i);
+                if((Slave_Ports_Status_A[i].Port_ID == Port_ID) and (Slave_Ports_Status_A[i]._Slave_ID == _Slave_ID ))  {
+                    found = true ;
+                        Serial.print("+D");Serial.print(i);
+                   }
             }
                
                
@@ -160,7 +163,7 @@
                         
                           ); 
         int i;
-        for(i=ARDUINO_ARRAY_INDEX_FIRST ; i <= Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A.ARDUINO_ARRAY_INDEX_CURRENT_A; i++) {//
+        for(i=ARDUINO_ARRAY_INDEX_FIRST ; i<=5 ; i++) {//i <= Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A.ARDUINO_ARRAY_INDEX_CURRENT_A
            DISPLAY_array16_T  DISPLAY_array16_AA="" ;
            DISPLAY_array16_T  DISPLAY_array16_AB="" ;
         
@@ -226,9 +229,9 @@
                     }
                     
                      if(Slave_Ports_Status_A[i].IS_Local_A == IS_Local_TRUE) {
-                         message2.concat("L ");// B:
+                         message2.concat(" L");// B:
                     } else if(Slave_Ports_Status_A[i].IS_Local_A == IS_Local_FALSE) {
-                         message2.concat("R ");// B:
+                         message2.concat(" R");// B:
                     } 
                  //message2.concat(" ");
                  
@@ -238,7 +241,7 @@
                     } else  if (!( ( Slave_Ports_Status_A[i].Exp_state & Exp_state_SET ) ^ Exp_state_SET ))  {
                     message2.concat(" ** ");//E:
                     } else {
-                     message2.concat(" ? ");//E: 
+                     message2.concat(" ?");//E: 
                     
                     
                     #if DEBUG > 7