a.binder 5 лет назад
Родитель
Сommit
7f58087987

+ 24 - 1
SE/stuff/P5_Automation_can-dev-res/_CAN/_CAN_func.h

@@ -80,8 +80,31 @@ void CAN_READ(
                                                                        0 ,//int I2C_driver
                                                                        IS_Local_FALSE 
                                                                        );
-                                } else { // if(CAN_MSG8_BIT_8_A == TASK_TYPE_T_Slave_Ports_broadcast____)
+                                } else if(CAN_MSG8_BIT_8_A == TASK_TYPE_T_request_set_new_Exp_state) { // if(CAN_MSG8_BIT_8_A == TASK_TYPE_T_Slave_Ports_broadcast____)
+                                   /*CAN_MSG8_A_Slave_Ports_Protocol_CAN_request_set_new_Exp_state_T
+                                       1 _Slave_Ports_Protocol_CAN_A._CAN_REMOTE_ID; // 0xFF;
+                                       2  = _Slave_Ports_Protocol_CAN_A._CAN_SENDER_ID; // 0xFF;
+                                       3 =_Slave_Ports_Protocol_CAN_A.Port_ID ; //0xFF;
+                                       4 = _Slave_Ports_Protocol_CAN_A.PortTypes ;//0xFF;
+                                       5 = _Slave_Ports_Protocol_CAN_A.Exp_state; // 0xFF;
+                                       6   _Slave_Ports_Protocol_CAN_A.Exp_state_ttl ;// 0xFF;
+                                       7=  _Slave_Ports_Protocol_CAN_A.Exp_state_level_A;// 0xFF;
+                                        8 =  _Slave_Ports_Protocol_CAN_A._CAN_8; // 0xFF;
+                                   */
+                                   
+                                   
+                                      Serial.println("[CAN_MSG8_BIT_8_A]==[request_set_new_Exp_state]->[SET][PORTS]")   ;      
+                                       TASK_PORT_ASSOC_T TASK_PORT_ASSOC_A={
+                                         CAN_MSG8_BIT_3_A,
+                                         CAN_MSG8_BIT_1_A,
+                                         0
+                                        };
+                                       Slave_Ports_action_func(Slave_Ports_Status_QUEUE_A,  Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A, Slave_Ports_Status_A , Slave_Ports_Status_T_ARDUINO_ATTR_ARRAY_A ,
+                                         TASK_TYPE_T_request_set_new_Exp_state , TASK_PORT_ASSOC_A,  0, 0, ARDUINO_ARRAY_INDEX_NOT_SET ,  
+                                         CAN_MSG8_BIT_5_A , CAN_MSG8_BIT_7_A);
+                                    
                                 
+                                } else {
                                     Serial.println("81[CAN][RECV][UNKNOWN][CAN_MSG8_BIT_8_A][")   ;
                                     Serial.print(CAN_MSG8_BIT_8_A, HEX) ;
                                     Serial.print("] ");   

+ 1 - 1
SE/stuff/P5_Automation_can-dev-res/_Slave_Ports_Status_func.h

@@ -288,7 +288,7 @@
                                     
                                     
                                   if(Slave_Ports_Status_A[i].Exp_state & Exp_state_SET_REQ_SEND ) {
-                                   message2.concat("->*");//E:
+                                   message2.concat(">*");//E:
                                   } else if(Slave_Ports_Status_A[i].Exp_state & Exp_state_SET ) {
                                    message2.concat("*");//E: