|
|
@@ -57,33 +57,40 @@ void CAN_READ(
|
|
|
Serial.print(" ");
|
|
|
}
|
|
|
|
|
|
- if(CAN_MSG8_BIT_8_A == TASK_TYPE_T_Slave_Ports_broadcast____) {
|
|
|
- Serial.println("[CAN_MSG8_BIT_8_A]==[T_BCAST]->[ADD][PORTS]") ;
|
|
|
- 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,
|
|
|
- CAN_MSG8_BIT_3_A, // int Port_ID,
|
|
|
- CANrxId , //int _Slave_ID,
|
|
|
- CAN_MSG8_BIT_4_A , //int PortTypes,
|
|
|
- 0 , //int Address,
|
|
|
- 0 , //int LocalPort,
|
|
|
- CAN_MSG8_BIT_5_A , //Exp_state_BLINK, //int Exp_state,
|
|
|
- CAN_MSG8_BIT_6_A, //Exp_state_ttl_TO_REFRESH, //int Exp_state_ttl,
|
|
|
- CAN_MSG8_BIT_7_A, //Broadcast_state_TO_REFRESH, //int Broadcast_state,
|
|
|
- 0 , //int I2C_port,
|
|
|
- 0 ,//int I2C_driver
|
|
|
- IS_Local_FALSE
|
|
|
- );
|
|
|
- } else {
|
|
|
-
|
|
|
- Serial.println("81[CAN][RECV][UNKNOWN][CAN_MSG8_BIT_8_A][") ;
|
|
|
- Serial.print(CAN_MSG8_BIT_8_A, HEX) ;
|
|
|
- Serial.print("] ");
|
|
|
- }
|
|
|
-
|
|
|
+
|
|
|
+ if(CAN_MSG8_BIT_2_A == _CAN_REMOTE_ID ) {
|
|
|
+
|
|
|
+ if(CAN_MSG8_BIT_8_A == TASK_TYPE_T_Slave_Ports_broadcast____) {
|
|
|
+ Serial.println("[CAN_MSG8_BIT_8_A]==[T_BCAST]->[ADD][PORTS]") ;
|
|
|
+ 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,
|
|
|
+ CAN_MSG8_BIT_3_A, // int Port_ID,
|
|
|
+ CANrxId , //int _Slave_ID,
|
|
|
+ CAN_MSG8_BIT_4_A , //int PortTypes,
|
|
|
+ 0 , //int Address,
|
|
|
+ 0 , //int LocalPort,
|
|
|
+ CAN_MSG8_BIT_5_A , //Exp_state_BLINK, //int Exp_state,
|
|
|
+ CAN_MSG8_BIT_6_A, //Exp_state_ttl_TO_REFRESH, //int Exp_state_ttl,
|
|
|
+ CAN_MSG8_BIT_7_A, //Broadcast_state_TO_REFRESH, //int Broadcast_state,
|
|
|
+ 0 , //int I2C_port,
|
|
|
+ 0 ,//int I2C_driver
|
|
|
+ IS_Local_FALSE
|
|
|
+ );
|
|
|
+ } else { // if(CAN_MSG8_BIT_8_A == TASK_TYPE_T_Slave_Ports_broadcast____)
|
|
|
+
|
|
|
+ Serial.println("81[CAN][RECV][UNKNOWN][CAN_MSG8_BIT_8_A][") ;
|
|
|
+ Serial.print(CAN_MSG8_BIT_8_A, HEX) ;
|
|
|
+ Serial.print("] ");
|
|
|
+ }
|
|
|
+ } else { //if(CAN_MSG8_BIT_2_A == _CAN_REMOTE_ID ) {
|
|
|
+ Serial.println("81[CAN][RECV][ERROR][_CAN_REMOTE_ID<>CAN_MSG8_BIT_2_A][") ;
|
|
|
+ Serial.print(CAN_MSG8_BIT_2_A, HEX) ; Serial.print("]["); Serial.print(_CAN_REMOTE_ID, HEX) ;
|
|
|
+ Serial.print("] ");
|
|
|
+ }
|
|
|
|
|
|
} else { //if(CANlen == CAN_MSG_DATA8_LEN)
|
|
|
|