a.binder 4 năm trước cách đây
mục cha
commit
1e5bbde4d9

+ 13 - 8
SE/stuff/P5_Automation_can-dev-res-working-1930/P5_Automation_can-dev-res-working-1930.ino

@@ -80,6 +80,9 @@
 //#define HAS_TFT_ILI9163C 
 //#define HAS_TFT_ILI9163C__ROTATED
 //#define HAS_LCD1602 
+//#define HAS_LCD1602_I2C
+//#define LCD1602_DISPLAY_PHYSICAL_X_CHARS_A 
+//#define LCD1602_DISPLAY_PHYSICAL_Y_CHARS_A
 //#define HAS_ROTTARY_SW
 //#define HAS_CAN
 
@@ -148,7 +151,7 @@ etc. To deactivate the Serial printing, define the macro empty:
 */
 
 
-
+#include "progmem.h"
 
 #include "___CONFIG/config_Active_Controller_EEPROM.h" //there kleep id of device
 
@@ -279,12 +282,11 @@ etc. To deactivate the Serial printing, define the macro empty:
 
 //BEGIN 1602
 #if defined(HAS_LCD1602)
-  #include <LiquidCrystal.h>
+ 
   // initialize the library with the numbers of the interface pins
   //LiquidCrystal lcd(4, 6, 10, 11, 12, 13);
   //LiquidCrystal lcd(4, 6, 53, 51, 50, 52  );
   #include "_LCD1602_struct.h"
- // #include "_LCD1602_init.h"
 #endif
 
 
@@ -333,6 +335,12 @@ etc. To deactivate the Serial printing, define the macro empty:
 #include "_DISPLAY_add_record_func.h"
 #include "_DISPLAY_func.h"
 
+
+
+#if defined(HAS_LCD1602)
+  #include "_LCD1602_init.h"
+#endif
+
 #if defined(HAS_LCD1602)
   #include "_LCD1602_func.h"
   //#include "_LCD1602_init.h"
@@ -375,9 +383,6 @@ etc. To deactivate the Serial printing, define the macro empty:
  
  
  
-#if defined(HAS_LCD1602)
-  #include "_LCD1602_init.h"
-#endif
 
 #if defined(HAS_TFT_ILI9163C)
   #include "_TFT_ILI9163C_init.h"
@@ -440,12 +445,12 @@ etc. To deactivate the Serial printing, define the macro empty:
 
 
 
-
+ #include "scan.h"
 
 void setup() {  //REMEMBER NOT INITIALIZE ANY VARIABLES OR ARRAYS
     Serial.begin(115200);
      Wire.begin();
-    
+        scan_h();
 ARDUINO_SETUP_DEF_T HAS_I2C_driver_Adafruit_PWMServoDriver_A = false;
 
 #if defined(DEBUG) || defined(DEBUG_QUEUE)

+ 28 - 21
SE/stuff/P5_Automation_can-dev-res-working-1930/_DISPLAY_func.h

@@ -531,26 +531,29 @@ void DISPLAY__print_menu(DISPLAY_T* DISPLAY_A ,
                                                   
                                                   
                                                   
-                                                  
                                                   //EOF MESSAGE
-                                                  if(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[DISPLAY_MENU_ITEM_INDEX_A].DISPLAY_MENU_ITEM_A[i].DISPLAY_MENU_ITEM_CLASS_A ==  DISPLAY_MENU_ITEM_CLASS_MENU_TITLE) {
-                                                    #include "_DISPLAY_func_PRINT_CLASS_MENU_TITLE.h"
-                                                  } else {
-                                                    #include "_DISPLAY_func_PRINT_PORT_ELEMENT.h"
-                                                  }
-                                                            for (int iA = 0; iA < 24; iA++) {
-                                                                    if(iA % DISPLAY_char24_TAB_SIZE == 0) next_tab_pos++ ;
-                                                                    
-                                                                    //if(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[DISPLAY_MENU_ITEM_INDEX_A].DISPLAY_MENU_ITEM_A[i].DISPLAY_char24_A[iA] == TAB) {
-                                                                    if(String(message[iA]) == TAB_S) {
-                                                                    //move cursor to optimal tab pos
-                                                                    DISPLAY_DEV.setCursor( (next_tab_pos * DISPLAY_char24_TAB_SIZE * DISPLAY_PHYSICAL_CHAR_A.DISPLAY_textsize_x_A ) , maxYi );
-                                                                    } else  {
-                                                                      //DISPLAY_DEV.print(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[DISPLAY_MENU_ITEM_INDEX_A].DISPLAY_MENU_ITEM_A[i].DISPLAY_char24_A[iA]);
-                                                                      DISPLAY_DEV.print(message[iA]);
-                                                                    }
-                                                            }
+                                                  //if(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[DISPLAY_MENU_ITEM_INDEX_A].DISPLAY_MENU_ITEM_A[i].DISPLAY_ELEMENT_TO_REFRESH_A == true) {  
+                                                        if(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[DISPLAY_MENU_ITEM_INDEX_A].DISPLAY_MENU_ITEM_A[i].DISPLAY_MENU_ITEM_CLASS_A ==  DISPLAY_MENU_ITEM_CLASS_MENU_TITLE) {
+                                                          #include "_DISPLAY_func_PRINT_CLASS_MENU_TITLE.h"
+                                                        } else {
+                                                          #include "_DISPLAY_func_PRINT_PORT_ELEMENT.h"
+                                                        }
+                                                                  for (int iA = 0; iA < 24; iA++) {
+                                                                          if(iA % DISPLAY_char24_TAB_SIZE == 0) next_tab_pos++ ;
+                                                                          
+                                                                          //if(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[DISPLAY_MENU_ITEM_INDEX_A].DISPLAY_MENU_ITEM_A[i].DISPLAY_char24_A[iA] == TAB) {
+                                                                          if(String(message[iA]) == TAB_S) {
+                                                                          //move cursor to optimal tab pos
+                                                                          DISPLAY_DEV.setCursor( (next_tab_pos * DISPLAY_char24_TAB_SIZE * DISPLAY_PHYSICAL_CHAR_A.DISPLAY_textsize_x_A ) , maxYi );
+                                                                          } else  {
+                                                                            //DISPLAY_DEV.print(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[DISPLAY_MENU_ITEM_INDEX_A].DISPLAY_MENU_ITEM_A[i].DISPLAY_char24_A[iA]);
+                                                                            DISPLAY_DEV.print(message[iA]);
+                                                                          }
+                                                                  }
+                                                // DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[DISPLAY_MENU_ITEM_INDEX_A].DISPLAY_MENU_ITEM_A[i].DISPLAY_ELEMENT_TO_REFRESH_A = false;
+                                                //    }
                                                  
+                                                  
                                                  // DISPLAY_DEV.print("test 123");
                                                           
                                                 
@@ -702,10 +705,14 @@ void DISPLAY_MENU_SELECTOR(DISPLAY_T* DISPLAY_A ,
                                         DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_SELECTOR_A[1].DISPLAY_MENU_SELECTOR_STATUS_A = DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_SELECTOR_A[1].DISPLAY_MENU_SELECTOR_STATUS_A | DISPLAY_MENU_SELECTOR_ITEM_OPTIONS_LEVEL_FLAG ;
                                          DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_SELECTOR_A[1].DISPLAY_MENU_INDEX_A].DISPLAY_MENU_ITEM_A[DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_SELECTOR_A[1].DISPLAY_MENU_ITEM_INDEX_A].DISPLAY_MENU_SELECTOR_STATUS_A = DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_SELECTOR_A[1].DISPLAY_MENU_SELECTOR_STATUS_A ;
                                 } else {
-                                        Serial.print(" >[ELS][LEV] ");
-                                        DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_SELECTOR_A[1].DISPLAY_MENU_SELECTOR_STATUS_A = DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_SELECTOR_A[1].DISPLAY_MENU_SELECTOR_STATUS_A | DISPLAY_MENU_SELECTOR_ITEM_OPTIONS_LEVEL_FLAG ;
+                                        Serial.print(" >[ELS][LEV] css[");
+                                        Serial.print(String(DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_SELECTOR_A[1].DISPLAY_MENU_INDEX_A].DISPLAY_MENU_ITEM_A[DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_SELECTOR_A[1].DISPLAY_MENU_ITEM_INDEX_A].DISPLAY_MENU_ITEM_CLASS_A  , BIN) );
+                                        if( DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_SELECTOR_A[1].DISPLAY_MENU_INDEX_A].DISPLAY_MENU_ITEM_A[DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_SELECTOR_A[1].DISPLAY_MENU_ITEM_INDEX_A].DISPLAY_MENU_ITEM_CLASS_A &  DISPLAY_MENU_ITEM_CLASS_MENU_TITLE) {
+                                            SPFT(menu_class); SPFT(ignored);
+                                        } else {
+                                         DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_SELECTOR_A[1].DISPLAY_MENU_SELECTOR_STATUS_A = DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_SELECTOR_A[1].DISPLAY_MENU_SELECTOR_STATUS_A | DISPLAY_MENU_SELECTOR_ITEM_OPTIONS_LEVEL_FLAG ;
                                          DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_A[DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_SELECTOR_A[1].DISPLAY_MENU_INDEX_A].DISPLAY_MENU_ITEM_A[DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_SELECTOR_A[1].DISPLAY_MENU_ITEM_INDEX_A].DISPLAY_MENU_SELECTOR_STATUS_A = DISPLAY_PHYSICAL_CHAR_A.DISPLAY_MENU_SELECTOR_A[1].DISPLAY_MENU_SELECTOR_STATUS_A ;
-                                }
+                                }       }
                      }
             
             

+ 2 - 0
SE/stuff/P5_Automation_can-dev-res-working-1930/_DISPLAY_struct.h

@@ -1,4 +1,5 @@
 
+typedef bool DISPLAY_ELEMENT_TO_REFRESH_T; 
 
 typedef  char DISPLAY_array16_T[16] ;
 typedef String DISPLAY_string64_T[16];
@@ -153,6 +154,7 @@ struct DISPLAY_MENU_ITEM_S { //elementy menu
      DISPLAY_char24_T  *DISPLAY_char_PA ; //pointer do wiadomosci
      #endif
      DISPLAY_char24_T DISPLAY_char24_A;
+     DISPLAY_ELEMENT_TO_REFRESH_T DISPLAY_ELEMENT_TO_REFRESH_A = true;
 } ;
 
 typedef struct DISPLAY_MENU_ITEM_S DISPLAY_MENU_ITEM_T ;

+ 6 - 9
SE/stuff/P5_Automation_can-dev-res-working-1930/_LCD1602_init.h

@@ -1,9 +1,6 @@
-                            
-
-Queue<int> _LCD_print_queue = Queue<int>(5);
-
-
- _LCD_print_bufforT _LCD_print_buffors[1];
- _LCD_print_screensT _LCD_print_screens[10];
-
-                 
+#if defined(HAS_LCD1602_I2C)
+ #include <LiquidCrystal_I2C.h>
+ LiquidCrystal_I2C lcd(0x27,LCD1602_DISPLAY_PHYSICAL_X_CHARS_A,LCD1602_DISPLAY_PHYSICAL_Y_CHARS_A);
+ #else
+  #include <LiquidCrystal.h> 
+#endif

+ 11 - 2
SE/stuff/P5_Automation_can-dev-res-working-1930/_LCD1602_setup.h

@@ -1,2 +1,11 @@
- lcd.begin(16, 2);
-     //LCD_print(LCDarray1, LCDarray2, LCDtim/5);
+#if defined(HAS_LCD1602_I2C)
+  // lcd.begin(LCD1602_DISPLAY_PHYSICAL_X_CHARS_A, LCD1602_DISPLAY_PHYSICAL_Y_CHARS_A);
+  lcd.init();                      // Print a message to the LCD.
+  lcd.backlight();
+  lcd.setCursor(0,0);
+ // lcd.print("Hello, world!");
+   
+#else
+ lcd.begin(LCD1602_DISPLAY_PHYSICAL_X_CHARS_A, LCD1602_DISPLAY_PHYSICAL_Y_CHARS_A);
+     //LCD_print(LCDarray1, LCDarray2, LCDtim/5);
+#endif

+ 4 - 4
SE/stuff/P5_Automation_can-dev-res-working-1930/_LCD1602_struct.h

@@ -29,7 +29,7 @@ struct _LCD_print_screenS {
 
 typedef struct _LCD_print_screenS _LCD_print_screensT;
 
-   int b_ascii_value = character;
+  // int b_ascii_value = character;
 
 
       
@@ -75,12 +75,12 @@ void updateQty(int id, int new_qty, Record* records) {
 */
 
 
-}           
-                            
+        
+/*                           
 String make_str16(String str){
     for(int i = 0; i < (16 - str.length()); i++)
         str += ' ';  
     return str;
 }
                 
-                                      
+*/                                      

+ 3 - 2
SE/stuff/P5_Automation_can-dev-res-working-1930/_PortTypes_struct.h

@@ -11,8 +11,9 @@ typedef  byte PortTypes_T ;
  const  PortTypes_T PortTypes_INPUT         =  B00100000 ; // 
 
 
- const  PortTypes_T PortTypes_P2M_EXP_I2C =  PortTypes_PWM | PortTypes_I2C | PortTypes_EXP  ; //0x07 ; //TODO BITTEST
- const  PortTypes_T PortTypes_PWM_EXP_I2C =  PortTypes_PWM | PortTypes_I2C | PortTypes_EXP  ; //0x07 ; //TODO BITTEST
+ const  PortTypes_T PortTypes_P2M_EXP_I2C =   PortTypes_PWM | PortTypes_I2C | PortTypes_EXP  ; //0x07 ; //TODO BITTEST
+ const  PortTypes_T PortTypes_PWM_EXP_I2C =   PortTypes_PWM | PortTypes_I2C | PortTypes_EXP  ; //0x07 ; //TODO BITTEST
+ const  PortTypes_T PortTypes_PWM_I2C_SERVO = PortTypes_PWM | PortTypes_I2C | PortTypes_SERVO  ; //0x07 ; //TODO BITTEST
 
 
 

+ 1 - 0
SE/stuff/P5_Automation_can-dev-res-working-1930/_Port_I2C_driver_struct.h

@@ -4,4 +4,5 @@ typedef int I2C_driver_T ;
 const I2C_driver_T  EI2C_driver_NOT_USED_ = 0x00 ;
 const I2C_driver_T  I2C_driver_Adafruit_PWMServoDriver = 0x01 ;
 const I2C_driver_T  I2C_driver_PCF8574 = 0x02 ;
+const I2C_driver_T  I2C_driver_PHYSICAL_PORT_SERVO = 0x03 ; //USES SERVO.H AT LOCAL PORT servo.attach(3); 
 

+ 2 - 2
SE/stuff/P5_Automation_can-dev-res-working-1930/_ROTTARY_SW/_ROTTARY_SW_config.h

@@ -1,7 +1,7 @@
 // rottary switch ports 
 #define ROTTARY_SW_sw PortA8 //A8 // 62 // A8 //A8 //53 // 89 // = A8
-#define ROTTARY_SW_dt PortA9  //A9 // 90 // = A9
-#define ROTTARY_SW_clk PortA10 //A10  // 91 // = A10
+#define ROTTARY_SW_dt PortA10  //A9 // 90 // = A9
+#define ROTTARY_SW_clk PortA9 //A10  // 91 // = A10
 
 /*
  LOW to trigger the interrupt whenever the pin is low,

+ 4 - 4
SE/stuff/P5_Automation_can-dev-res-working-1930/_Slave_Ports_I2C_func.h

@@ -93,11 +93,11 @@
                  Serial.print(" Port_ID[");  Serial.print(Slave_Ports_Status_A[i].Port_ID);   Serial.println("]  ");   Serial.print(" #[");  Serial.print(i);   Serial.println("]  "); 
                  //} //{4
              #endif
-                if(Slave_Ports_Status_A[i].I2C_driver == I2C_driver_PCF8574) {
+                       if(Slave_Ports_Status_A[i].I2C_driver == I2C_driver_PCF8574) {
                      #include "_Slave_Ports_I2C_func_PCF8574.h"
-                     
-                     
-                } else if(Slave_Ports_Status_A[i].I2C_driver == I2C_driver_Adafruit_PWMServoDriver) {
+                } else if(Slave_Ports_Status_A[i].I2C_driver == I2C_driver_PHYSICAL_PORT_SERVO) {
+                     #include "_Slave_Ports_I2C_func_PHYSICAL_PORT_SERVO.h"
+                }  else if(Slave_Ports_Status_A[i].I2C_driver == I2C_driver_Adafruit_PWMServoDriver) {
                           //ARDUINO_ARRAY_PRIMARY_KET_T  Adafruit_PWMServoDriver__get_PRIMARY_KET_A = Adafruit_PWMServoDriver__get_PRIMARY_KET_T(
                       
                       //find port status

+ 2 - 2
SE/stuff/P5_Automation_can-dev-res-working-1930/_Slave_Ports_I2C_func_PCF8574.h

@@ -28,9 +28,9 @@
                       Serial.print(" PCF8574[ ind");Serial.print(drvindex);Serial.print("] ");  
                          Serial.print(String(PCF8574_PORSTATUS_DRIVER_A[drvindex].PCF8574_PORSTATUS_A,BIN));  
                       if(Slave_Ports_Status_A[i].Exp_state_level_A == 0) { //
-                        bitWrite(PCF8574_PORSTATUS_DRIVER_A[drvindex].PCF8574_PORSTATUS_A,Slave_Ports_Status_A[i].LocalPort,0 );
+                        bitWrite(PCF8574_PORSTATUS_DRIVER_A[drvindex].PCF8574_PORSTATUS_A,Slave_Ports_Status_A[i].LocalPort - 1,0 );
                       } else {
-                        bitWrite(PCF8574_PORSTATUS_DRIVER_A[drvindex].PCF8574_PORSTATUS_A,Slave_Ports_Status_A[i].LocalPort,1 );
+                        bitWrite(PCF8574_PORSTATUS_DRIVER_A[drvindex].PCF8574_PORSTATUS_A,Slave_Ports_Status_A[i].LocalPort - 1,1 );
                       }
                       
                         Serial.print(" PCF8574 l[");   Serial.print(Slave_Ports_Status_A[i].Exp_state_level_A);   Serial.print(" B");  

+ 10 - 1
SE/stuff/P5_Automation_can-dev-res-working-1930/_Slave_Ports_Status_struct.h

@@ -13,13 +13,22 @@ typedef boolean IS_gone_T ;
 const IS_gone_T IS_gone_TRUE = true ; 
 const IS_gone_T IS_gone_FALSE = false ; 
 
-#define I2C_port_DEFAULT 0x01
 
 
 typedef byte Exp_state_level_T ;
 const Exp_state_level_T Exp_state_level_INIT = 0;
 const Exp_state_level_T Exp_state_level_DO_NOT_CHANGE = -1;
 
+typedef int I2C_port_T ;
+const I2C_port_T I2C_port_NOT_I2C_A = 0x00 ;
+const I2C_port_T I2C_port_DEFAULT = 0x01 ;
+
+
+typedef int Address_T ;
+
+const Address_T Address_NOT_DEFINED_A = 0x00 ;
+
+
 
 
  struct Slave_Ports_Status_S {

+ 11 - 1
SE/stuff/P5_Automation_can-dev-res-working-1930/___CONFIG/0x35/config_Active_ControllerID_0x35.h

@@ -1,7 +1,17 @@
 
 //there kleep config of this id device#define HAS_TFT_ILI9163C 
-// #define HAS_LCD1602 
+#define HAS_LCD1602 
+#define LCD1602_DISPLAY_PHYSICAL_X_CHARS_A 20
+#define LCD1602_DISPLAY_PHYSICAL_Y_CHARS_A 4
+#define HAS_LCD1602_I2C
 #define HAS_ROTTARY_SW
+
+// rottary switch ports 
+#define ROTTARY_SW_sw PortA8 
+#define ROTTARY_SW_dt PortA10
+#define ROTTARY_SW_clk PortA9   
+
+
 #define HAS_TFT_ILI9163C
 //#define HAS_TFT_ILI9163C__ROTATED
 #define HAS_I2C_driver_Adafruit_PWMServoDriver 

+ 40 - 1
SE/stuff/P5_Automation_can-dev-res-working-1930/___CONFIG/0x35/config_Slave_Ports_LOCAL_0x35_init.h

@@ -162,11 +162,50 @@ ARDUINO_FUNCT_INIT_RESULT_T _Slave_Ports_LOCAL_init(
                                 Exp_state_OFF, //int  Exp_state,
                                 Exp_state_ttl_TO_REFRESH , //Exp_state_ttl_TO_REFRESH, //int  Exp_state_ttl,
                                 Broadcast_state_FULL_FRESH, //Broadcast_state_TO_REFRESH, //int  Broadcast_state,
-                                I2C_port_DEFAULT, //int I2C_port,
+                                 I2C_port_DEFAULT , //int I2C_port,
                                 I2C_driver_PCF8574 ,//int I2C_driver
                                 IS_Local_TRUE, Exp_state_level_INIT,
                                 0,0// time_seq_id, time_min_run
                                 );
+                             //local pwm port
+                             Slave_Ports_Status_add_port(
+                                Slave_Ports_Status_A ,
+                                Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A,
+                                    Slave_Ports_Status_T_ARDUINO_ARRAY_INDEX_TABLE_A,
+                                    Slave_Ports_Status_T_ARDUINO_ARRAY_INDEX_T_TO_DELETE_A,
+                                    Slave_Ports_Status_T_ARDUINO_ARRAY_ASSOC_TABLE_S_Port_ID_A,
+                                3,  // int  Port_ID,
+                                Active_ControllerID_HEX ,  //int  _Slave_ID,
+                                PortTypes_PWM_I2C_SERVO ,// | PortTypes_SERVO  ,// | PortTypes_SERVO //int  PortTypes,
+                                Address_NOT_DEFINED_A ,  //int  Address,
+                                    3 , //int  LocalPort,
+                                Exp_state_OFF, //int  Exp_state,
+                                Exp_state_ttl_TO_REFRESH , //Exp_state_ttl_TO_REFRESH, //int  Exp_state_ttl,
+                                Broadcast_state_FULL_FRESH, //Broadcast_state_TO_REFRESH, //int  Broadcast_state,
+                                I2C_port_NOT_I2C_A, //int I2C_port,
+                                I2C_driver_PHYSICAL_PORT_SERVO ,//int I2C_driver
+                                IS_Local_TRUE, Exp_state_level_INIT,
+                                0,0// time_seq_id, time_min_run
+                                );   
+                             Slave_Ports_Status_add_port(
+                                Slave_Ports_Status_A ,
+                                Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A,
+                                    Slave_Ports_Status_T_ARDUINO_ARRAY_INDEX_TABLE_A,
+                                    Slave_Ports_Status_T_ARDUINO_ARRAY_INDEX_T_TO_DELETE_A,
+                                    Slave_Ports_Status_T_ARDUINO_ARRAY_ASSOC_TABLE_S_Port_ID_A,
+                                4,  // int  Port_ID,
+                                Active_ControllerID_HEX ,  //int  _Slave_ID,
+                                PortTypes_PWM_I2C_SERVO ,// | PortTypes_SERVO  ,// | PortTypes_SERVO //int  PortTypes,
+                                Address_NOT_DEFINED_A ,  //int  Address,
+                                    4 , //int  LocalPort,
+                                Exp_state_OFF, //int  Exp_state,
+                                Exp_state_ttl_TO_REFRESH , //Exp_state_ttl_TO_REFRESH, //int  Exp_state_ttl,
+                                Broadcast_state_FULL_FRESH, //Broadcast_state_TO_REFRESH, //int  Broadcast_state,
+                                I2C_port_NOT_I2C_A, //int I2C_port,
+                                I2C_driver_PHYSICAL_PORT_SERVO ,//int I2C_driver
+                                IS_Local_TRUE, Exp_state_level_INIT,
+                                0,0// time_seq_id, time_min_run
+                                );   
                                 
                                 
                             Serial.println("#151ADD");

+ 17 - 0
SE/stuff/P5_Automation_can-dev-res-working-1930/___main/__main_I2C_struc.h

@@ -30,6 +30,23 @@ struct PCF8574_PORSTATUS_DRIVER_S {
 typedef PCF8574_PORSTATUS_DRIVER_S PCF8574_PORSTATUS_DRIVER_T ;
 
 PCF8574_PORSTATUS_DRIVER_T PCF8574_PORSTATUS_DRIVER_A[2] ;
+
+
+#include <Servo.h>
+
+
+struct I2C_driver_PHYSICAL_PORT_SERVO_PORSTATUS_DRIVER_S {
+    int LocalPort = 0;
+    bool LocalPort_servo_attach_INITIALIZED_A = false ;
+    Servo *Servo_A ;
+};
+
+typedef I2C_driver_PHYSICAL_PORT_SERVO_PORSTATUS_DRIVER_S I2C_driver_PHYSICAL_PORT_SERVO_PORSTATUS_DRIVER_T ;
+
+I2C_driver_PHYSICAL_PORT_SERVO_PORSTATUS_DRIVER_T I2C_driver_PHYSICAL_PORT_SERVO_PORSTATUS_DRIVER_A[8] ;
+Servo I2C_driver_PHYSICAL_PORT_SERVO_PORSTATUS_DRIVER_SERVO_A[8] ;
+//Servo I2C_driver_PHYSICAL_PORT_SERVO_PORSTATUS_DRIVER_SERVO_A_TEST ;
+
 // PCF8574_PORSTATUS_DRIVER_A[0].I2C_ADDRESS_A  = 0x20 ;
 // = {
 //    { 0x20, B00000000} ,

+ 23 - 23
se.oxygen.xpr

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<project version="22.1">
+<project version="22.0">
     <meta>
         <filters directoryPatterns="" filePatterns="se.oxygen.xpr" positiveFilePatterns="" showHiddenFiles="false"/>
         <options>
-            <serialized version="22.1" xml:space="preserve">
+            <serialized version="22.0" xml:space="preserve">
                 <serializableOrderedMap>
                     <entry>
                         <String>enable.project.master.files.support</String>
@@ -2000,26 +2000,6 @@
                     <entry>
                         <String>scenario.associations</String>
                         <scenarioAssociation-array>
-                            <scenarioAssociation>
-                                <field name="url">
-                                    <String>../../procesy5-dita-templates-druki/CONCEPTS/concept_lukasz_kosmala_story_dita/concept_lukasz_kosmala_story_dita.ditamap</String>
-                                </field>
-                                <field name="scenarioIds">
-                                    <list>
-                                        <String>DITA Map PDF - based on XSL-FO - Copy</String>
-                                    </list>
-                                </field>
-                                <field name="scenarioTypes">
-                                    <list>
-                                        <String>DITAMAP</String>
-                                    </list>
-                                </field>
-                                <field name="scenarioStorageLocations">
-                                    <list>
-                                        <Byte>2</Byte>
-                                    </list>
-                                </field>
-                            </scenarioAssociation>
                             <scenarioAssociation>
                                 <field name="url">
                                     <String>doc/SE/schema/WPS_Functions/default_db/CRM_PROCESS_tree/build_CRM_PROCES_tree.xml.ditamap</String>
@@ -3320,6 +3300,26 @@
                                     </list>
                                 </field>
                             </scenarioAssociation>
+                            <scenarioAssociation>
+                                <field name="url">
+                                    <String>../../procesy5-dita-templates-druki/CONCEPTS/concept_lukasz_kosmala_story_dita/concept_lukasz_kosmala_story_dita.ditamap</String>
+                                </field>
+                                <field name="scenarioIds">
+                                    <list>
+                                        <String>DITA Map PDF - based on XSL-FO - Copy</String>
+                                    </list>
+                                </field>
+                                <field name="scenarioTypes">
+                                    <list>
+                                        <String>DITAMAP</String>
+                                    </list>
+                                </field>
+                                <field name="scenarioStorageLocations">
+                                    <list>
+                                        <Byte>2</Byte>
+                                    </list>
+                                </field>
+                            </scenarioAssociation>
                         </scenarioAssociation-array>
                     </entry>
                     <entry>
@@ -5310,7 +5310,7 @@
             </serialized>
         </options>
     </meta>
-    <projectTree name="se.oxygen.xpr">
+    <projectTree name="SE.oxygen.xpr">
         <folder masterFiles="true" name="Master Files">
             <file name="SE/schema/default_db_xml_cache.public/_procesy_gen.xsl"/>
             <file name="SE/schema/default_db_xml_cache.public/_stanowiska_nazwy_gen_ant.xsl"/>