a.binder 5 年之前
父節點
當前提交
db3421c310

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

@@ -4,7 +4,8 @@ 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_USE_LEVEL =  B00000100 ; // use Exp_state_level 0-255
- const  Exp_state_T Exp_state_BLINK        =  B00100000 ;
+ const  Exp_state_T Exp_state_BLINK        =  B00001000 ;
+ const  Exp_state_T Exp_state_SET_REQ_SEND =  B00100000 ; //when was initialized and set output
  const  Exp_state_T Exp_state_SET          =  B01000000 ; //when was initialized and set output
  const  Exp_state_T Exp_state_ERROR        =  B10000000 ;
  

+ 18 - 0
SE/stuff/P5_Automation_can-dev-res/_Slave_Ports_action_func.h

@@ -73,6 +73,24 @@ Slave_Ports_Status_QUEUE_T* Slave_Ports_Status_QUEUE_A,
                        CAN_data_debug(CAN_MSG8_A_Slave_Ports_Protocol_CAN_request_set_new_Exp_state_A);
     
     
+                    String message ; 
+                    byte sndStat = CAN0.sendMsgBuf(Active_ControllerID_HEX, 0, 8, CAN_MSG8_A_Slave_Ports_Protocol_CAN_request_set_new_Exp_state_A); 
+                    delay(200);
+                     if(sndStat == CAN_OK){
+                     
+                      Slave_Ports_Status_A[TASK_PORT_ASSOC_A.Slave_Ports_Status_T_INDEX].Exp_state = Slave_Ports_Status_A[TASK_PORT_ASSOC_A.Slave_Ports_Status_T_INDEX].Exp_state |  Exp_state_SET_REQ_SEND ;
+                     message = "SND CAN REQ "; message.concat(Exp_state_level_A) ; message.concat(" ");
+                      DISPLAY__CURSOR_Y_CHARS__SET(DISPLAY_PHYSICAL_CHAR_A, DISPLAY_CURSOR_Y_CHARS_CAN_DEBUG);
+                       DISPLAY__print( DISPLAY_A ,DISPLAY_T_ARDUINO_ATTR_ARRAY_A ,  DISPLAY_PHYSICAL_CHAR_A,  DISPLAY_pos_seq_A_NEXT | DISPLAY_pos_seq_A_IMMEDIATE, //TODO BITTEST
+                          message, DISPLAY_TARGET_DISPLAY128, time_seq_id , time_min_run, Slave_Ports_Status_QUEUE_A,  Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A , TASK_TYPE_T_request_set_new_Exp_state  , TASK_PORT_ASSOC_A); 
+                      } else {
+                      message = "ERR SND CAN REQ "; message.concat(Exp_state_level_A) ; message.concat(" ");
+                      DISPLAY__CURSOR_Y_CHARS__SET(DISPLAY_PHYSICAL_CHAR_A, DISPLAY_CURSOR_Y_CHARS_CAN_DEBUG);
+                       DISPLAY__print( DISPLAY_A ,DISPLAY_T_ARDUINO_ATTR_ARRAY_A ,  DISPLAY_PHYSICAL_CHAR_A,  DISPLAY_pos_seq_A_NEXT | DISPLAY_pos_seq_A_IMMEDIATE, //TODO BITTEST
+                          message, DISPLAY_TARGET_DISPLAY128, time_seq_id , time_min_run, Slave_Ports_Status_QUEUE_A,  Slave_Ports_Status_QUEUE_T_ARDUINO_ATTR_ARRAY_A , TASK_TYPE_T_request_set_new_Exp_state  , TASK_PORT_ASSOC_A);
+                      }
+                     
+    
     
     } else if(flag_set_LOCAL > 0 ) {
         Serial.println("51[ACTION][LOCAL][ADD][TASK_TYPE_T_Slave_Ports_set_I2C______]");

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

@@ -124,7 +124,7 @@
                                                 CAN_broadcast_A.PortTypes = Slave_Ports_Status_A[i].PortTypes ; 
                                                 CAN_broadcast_A.Exp_state = Slave_Ports_Status_A[i].Exp_state ;  
                                                 CAN_broadcast_A.Exp_state_ttl = Slave_Ports_Status_A[i].Exp_state_ttl ;
-                                                CAN_broadcast_A.Broadcast_state = Slave_Ports_Status_A[i].Broadcast_state ;
+                                                CAN_broadcast_A.Broadcast_state = Broadcast_state_FULL_FRESH ; //FORCED //Slave_Ports_Status_A[i].Broadcast_state ;
                                                // CAN_broadcast_A._CAN_8 = TASK_TYPE_T_Slave_Ports_broadcast____ ;
                                    
                                      // CAN_broadcast_A._CAN_8 = _CAN_8_EMPTY ;