|
|
@@ -43,7 +43,7 @@ const int _CAN_8_EMPTY = 0x07 ;
|
|
|
|
|
|
struct _Slave_Ports_Protocol_CAN_message_S {
|
|
|
_CAN_REMOTE_ID_T _CAN_REMOTE_ID ; // 1remote id - use FF for broadcast
|
|
|
- const _CAN_SENDER_ID_T _CAN_SENDER_ID = Active_ControllerID ; //2 sender //Device which orginated port
|
|
|
+ const _CAN_SENDER_ID_T _CAN_SENDER_ID = Active_ControllerID_HEX ; //2 sender //Device which orginated port
|
|
|
int Port_ID ; //3 global id for device //const char * const _Protocol;
|
|
|
PortTypes_T PortTypes; //4 0xFF = 1111 1111 s
|
|
|
//int Address ; //
|
|
|
@@ -58,7 +58,7 @@ const int _CAN_8_EMPTY = 0x07 ;
|
|
|
|
|
|
struct _Slave_Ports_Protocol_CAN_broadcast_S {
|
|
|
const _CAN_REMOTE_ID_T _CAN_REMOTE_ID = _CAN_REMOTE_ID_BROADCAST ; // 1remote id - use FF for broadcast
|
|
|
- const _CAN_SENDER_ID_T _CAN_SENDER_ID = Active_ControllerID ; //2 sender //Device which orginated port
|
|
|
+ const _CAN_SENDER_ID_T _CAN_SENDER_ID = Active_ControllerID_HEX ; //2 sender //Device which orginated port
|
|
|
int Port_ID ; //3 global id for device //const char * const _Protocol;
|
|
|
PortTypes_T PortTypes; //4 0xFF = 1111 1111 s
|
|
|
//int Address ; //
|
|
|
@@ -78,7 +78,7 @@ typedef int _CAN_SEND_1_T ; //1 byte = 0
|
|
|
typedef int _CAN_SEND_2_T ; //2 byte = 8
|
|
|
|
|
|
struct _Slave_Ports_Protocol_CAN_SEND_S {
|
|
|
- const _CAN_SENDER_ID_T _CAN_SENDER_ID = Active_ControllerID ;
|
|
|
+ const _CAN_SENDER_ID_T _CAN_SENDER_ID = Active_ControllerID_HEX ;
|
|
|
const _CAN_SEND_1_T _CAN_SEND_1 = 0 ;
|
|
|
const _CAN_SEND_2_T _CAN_SEND_2 = 8 ;
|
|
|
_Slave_Ports_Protocol_CAN_broadcast_T _Slave_Ports_Protocol_CAN_broadcast_A ;
|
|
|
@@ -146,7 +146,7 @@ void CAN_MSG8_A_ptr(_Slave_Ports_Protocol_CAN_broadcast_T
|
|
|
|
|
|
//CAN_MSG8_BIT_1_T
|
|
|
|
|
|
- #ifdef DEBUG_CAN
|
|
|
+ //#ifdef DEBUG_CAN
|
|
|
Serial.print("#155 CAN_broadcast_to_data_ptr [ ");
|
|
|
Serial.print(" "); Serial.print("1["); Serial.print(_Slave_Ports_Protocol_CAN_broadcast_A._CAN_REMOTE_ID); Serial.print("] ");
|
|
|
Serial.print(" "); Serial.print("2["); Serial.print(_Slave_Ports_Protocol_CAN_broadcast_A._CAN_SENDER_ID); Serial.print("] ");
|
|
|
@@ -157,7 +157,7 @@ void CAN_MSG8_A_ptr(_Slave_Ports_Protocol_CAN_broadcast_T
|
|
|
Serial.print(" "); Serial.print("7["); Serial.print(_Slave_Ports_Protocol_CAN_broadcast_A.Broadcast_state); Serial.print("] ");
|
|
|
Serial.print(" "); Serial.print("8["); Serial.print(_Slave_Ports_Protocol_CAN_broadcast_A._CAN_8); Serial.print("] ");
|
|
|
Serial.println(" ");
|
|
|
- #endif
|
|
|
+ // #endif
|
|
|
CAN_MSG8_A[1] = _Slave_Ports_Protocol_CAN_broadcast_A._CAN_REMOTE_ID; // 0xFF;
|
|
|
CAN_MSG8_A[2] = _Slave_Ports_Protocol_CAN_broadcast_A._CAN_SENDER_ID; // 0xFF;
|
|
|
CAN_MSG8_A[3] =_Slave_Ports_Protocol_CAN_broadcast_A.Port_ID ; //0xFF;
|
|
|
@@ -177,7 +177,7 @@ void CAN_MSG8_A_ptr(_Slave_Ports_Protocol_CAN_broadcast_T
|
|
|
void CAN_data_debug(byte data[8]) {
|
|
|
int i;
|
|
|
Serial.print("#102 CAN_data_debug [ ");
|
|
|
- for(i=0; i<=7; i++) {
|
|
|
+ for(i=1; i<=8; i++) {
|
|
|
Serial.print(" "); Serial.print(i+1); Serial.print("["); Serial.print(data[i]); Serial.print("."); Serial.print(data[i], HEX); Serial.print("] ");
|
|
|
}
|
|
|
Serial.println(" ");
|