浏览代码

yofo mrneu

a.binder 5 年之前
父节点
当前提交
9b909b303e

+ 17 - 0
SE/stuff/P5_Automation_can-dev-res-working-1930/P5_Automation_can-dev-res-working-1930.ino

@@ -191,6 +191,14 @@ etc. To deactivate the Serial printing, define the macro empty:
 
 
 
+#if Active_ControllerID == 0x15 
+    const int Active_ControllerID_HEX = 0x15 ;
+    #include "___CONFIG/0x15/config_Active_ControllerID_0x15.h"  //atmega bez wyswietlacza druga i bez portow na razie
+#endif
+
+
+
+
 #if defined(HAS_TFT_ILI9163C)
     #include "_TFT_ILI9163C_config.h"
 #endif
@@ -377,6 +385,15 @@ etc. To deactivate the Serial printing, define the macro empty:
 #endif
 
 
+
+
+
+#if Active_ControllerID == 0x15
+    #include "___CONFIG/0x15/config_Slave_Ports_LOCAL_0x15_init.h"
+#endif
+
+
+
 #if defined(HAS_I2C_driver_Adafruit_PWMServoDriver)
  #include "_I2C_driver_Adafruit_PWMServoDriver/_I2C_driver_Adafruit_PWMServoDriver_init.h"
 #endif

+ 1 - 1
SE/stuff/P5_Automation_can-dev-res-working-1930/___CONFIG/0x13/config_Slave_Ports_LOCAL_0x13_init.h

@@ -7,7 +7,7 @@ ARDUINO_FUNCT_INIT_RESULT_T _Slave_Ports_LOCAL_init(
                  Slave_Ports_Status_T_ARDUINO_ARRAY_ASSOC_TABLE_S_Port_ID_T*  Slave_Ports_Status_T_ARDUINO_ARRAY_ASSOC_TABLE_S_Port_ID_A,
                 
                 DISPLAY_T*  DISPLAY_A ,  DISPLAY_T_ARDUINO_ATTR_ARRAY_T &DISPLAY_T_ARDUINO_ATTR_ARRAY_A,
-                time_seq_id_T time_seq_id,  time_min_run_T time_min_run
+               // time_seq_id_T time_seq_id,  time_min_run_T time_min_run
                 //,*DISPLAY_PHYSICAL_CHAR_A //DISPLAY_PHYSICAL_CHAR_T 
                 ) {
 

+ 3 - 2
SE/stuff/P5_Automation_can-dev-res-working-1930/___CONFIG/0x14/config_Slave_Ports_LOCAL_0x14_init.h

@@ -6,7 +6,8 @@ ARDUINO_FUNCT_INIT_RESULT_T _Slave_Ports_LOCAL_init(
                  Slave_Ports_Status_T_ARDUINO_ARRAY_INDEX_T_TO_DELETE_T*      Slave_Ports_Status_T_ARDUINO_ARRAY_INDEX_T_TO_DELETE_A,
                  Slave_Ports_Status_T_ARDUINO_ARRAY_ASSOC_TABLE_S_Port_ID_T*  Slave_Ports_Status_T_ARDUINO_ARRAY_ASSOC_TABLE_S_Port_ID_A,
                 
-                DISPLAY_T*  DISPLAY_A ,  DISPLAY_T_ARDUINO_ATTR_ARRAY_T &DISPLAY_T_ARDUINO_ATTR_ARRAY_A
+                DISPLAY_T*  DISPLAY_A ,  DISPLAY_T_ARDUINO_ATTR_ARRAY_T &DISPLAY_T_ARDUINO_ATTR_ARRAY_A,
+                   time_seq_id_T time_seq_id,  time_min_run_T time_min_run
                 //,*DISPLAY_PHYSICAL_CHAR_A //DISPLAY_PHYSICAL_CHAR_T 
                 ) {
 
@@ -34,7 +35,7 @@ ARDUINO_FUNCT_INIT_RESULT_T _Slave_Ports_LOCAL_init(
                                 I2C_port_DEFAULT, //int I2C_port,
                                 I2C_driver_Adafruit_PWMServoDriver ,//int I2C_driver
                                 IS_Local_TRUE, Exp_state_level_INIT,
-                                );
+                                0,0);
                                 
                            /*     
                   Slave_Ports_Status_add_port(

+ 17 - 0
SE/stuff/P5_Automation_can-dev-res-working-1930/___CONFIG/0x15/config_Active_ControllerID_0x15.h

@@ -0,0 +1,17 @@
+
+//there kleep config of this id device
+//#define HAS_TFT_ILI9163C 
+// #define HAS_LCD1602 
+//#define HAS_ROTTARY_SW
+//#define HAS__PCINT_setup //to allow interrupts
+
+#define HAS_I2C_driver_Adafruit_PWMServoDriver 
+
+
+//#define DEBUG 5 
+//#define DISABLE_LOOP //To debug and disable any output
+
+//#define DISABLE_TASK_TYPE_T_DISPLAY_queue_pop________
+
+
+#define DISABLE_ANY_PRINT //when uno ?

+ 115 - 0
SE/stuff/P5_Automation_can-dev-res-working-1930/___CONFIG/0x15/config_Slave_Ports_LOCAL_0x15_init.h

@@ -0,0 +1,115 @@
+
+ARDUINO_FUNCT_INIT_RESULT_T _Slave_Ports_LOCAL_init(
+                Slave_Ports_Status_T* Slave_Ports_Status_A ,
+                Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_T &Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A ,
+                 Slave_Ports_Status_T_ARDUINO_ARRAY_INDEX_TABLE_T*            Slave_Ports_Status_T_ARDUINO_ARRAY_INDEX_TABLE_A,
+                 Slave_Ports_Status_T_ARDUINO_ARRAY_INDEX_T_TO_DELETE_T*      Slave_Ports_Status_T_ARDUINO_ARRAY_INDEX_T_TO_DELETE_A,
+                 Slave_Ports_Status_T_ARDUINO_ARRAY_ASSOC_TABLE_S_Port_ID_T*  Slave_Ports_Status_T_ARDUINO_ARRAY_ASSOC_TABLE_S_Port_ID_A,
+                
+                DISPLAY_T*  DISPLAY_A ,  DISPLAY_T_ARDUINO_ATTR_ARRAY_T &DISPLAY_T_ARDUINO_ATTR_ARRAY_A,
+                   time_seq_id_T time_seq_id,  time_min_run_T time_min_run
+                //,*DISPLAY_PHYSICAL_CHAR_A //DISPLAY_PHYSICAL_CHAR_T 
+                ) {
+
+   //DISPLAY_T_ARDUINO_ATTR_ARRAY_A[ARDUINO_ATTR_ARRAY_S_INDEX].ARDUINO_ARRAY_INDEX_CURRENT_INIT ++;
+     #if defined(DEBUG) 
+                                  if(DEBUG > 6) {  
+                Serial.println("#4444 _Slave_Ports_LOCAL_init");
+                }
+     #endif
+      
+                  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,
+                                1,  // int  Port_ID,
+                                Active_ControllerID_HEX ,  //int  _Slave_ID,
+                                PortTypes_PWM_EXP_I2C, // PortTypes_SERVO , //int  PortTypes,
+                                0x40 ,  //int  Address,
+                                1 , //int  LocalPort,
+                                Exp_state_OFF, //int  Exp_state,
+                                Exp_state_ttl_TO_REFRESH, //int  Exp_state_ttl,
+                                Broadcast_state_TO_REFRESH, //int  Broadcast_state,
+                                I2C_port_DEFAULT, //int I2C_port,
+                                I2C_driver_Adafruit_PWMServoDriver ,//int I2C_driver
+                                IS_Local_TRUE, Exp_state_level_INIT,
+                                0,0);
+                                
+                           /*     
+                  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,
+                                2,  // int  Port_ID,
+                                Active_ControllerID ,  //int  _Slave_ID,
+                                PortTypes_P2M_EXP_I2C , //int  PortTypes,
+                                0x40 ,  //int  Address,
+                                2 , //int  LocalPort,
+                                Exp_state_OFF, //int  Exp_state,
+                                Exp_state_ttl_TO_REFRESH, //int  Exp_state_ttl,
+                                Broadcast_state_TO_REFRESH, //int  Broadcast_state,
+                                I2C_port_DEFAULT, //int I2C_port,
+                                I2C_driver_Adafruit_PWMServoDriver ,//int I2C_driver
+                                IS_Local_TRUE 
+                                );
+                                
+                                 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 ,  //int  _Slave_ID,
+                                PortTypes_P2M_EXP_I2C , //int  PortTypes,
+                                0x40 ,  //int  Address,
+                                3 , //int  LocalPort,
+                                Exp_state_BLINK, //int  Exp_state,
+                                Exp_state_ttl_TO_REFRESH, //int  Exp_state_ttl,
+                                Broadcast_state_TO_REFRESH, //int  Broadcast_state,
+                                I2C_port_DEFAULT, //int I2C_port,
+                                I2C_driver_Adafruit_PWMServoDriver ,//int I2C_driver
+                                IS_Local_TRUE 
+                                );
+                                
+                                
+                                
+                           */     
+                    /*    DISPLAY__print_ANY(
+                    DISPLAY_T_ARDUINO_ATTR_ARRAY_A , 
+                    DISPLAY_PHYSICAL_CHAR_A,
+                    DISPLAY_pos_seq_A_NEXT,
+                    "#4 _Slave_Ports_LOCAL_init");             
+                 
+                 */
+                 
+                                              //1234567890123456
+                  // DISPLAY_array16_T DISPLAY_array16_AA ;
+                  //DISPLAY_array16_AA[16]= "#50 Added ports ";
+                 
+                  #if  defined(DISABLE_DISPLAY__add_record)
+               #else  
+                 DISPLAY__add_record(
+                       DISPLAY_A ,
+                      DISPLAY_T_ARDUINO_ATTR_ARRAY_A , 
+                      DISPLAY_PHYSICAL_CHAR_A, 
+                          DISPLAY_pos_seq_A_NEXT ,
+                         //"012345678901234" , //
+                         "#50 Added ports ",//DISPLAY_array16_A
+                          DISPLAY_TARGET_DISPLAY128,
+                          millis(), //time_seq_id_A,
+                           millis() + 5000 //time_min_run_A =
+                           //QUEUE
+                           , Slave_Ports_Status_QUEUE_A, Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A ,
+                            TASK_TYPE_T__EMPTY__JUST_PASSED_ARG__,
+                            TASK_PORT_ASSOC_EMPTY
+                 );
+                #endif 
+                    
+    return true ;
+
+}