Preliminary support for TRANS_SYNC_ACYCLIC (0) transmit type.
authoretisserant
Thu, 20 Mar 2008 15:14:07 +0100
changeset 426 8011552b1319
parent 425 4bc4706528ae
child 427 6deafe46484f
Preliminary support for TRANS_SYNC_ACYCLIC (0) transmit type.
include/pdo.h
src/pdo.c
--- a/include/pdo.h	Thu Mar 20 15:03:25 2008 +0100
+++ b/include/pdo.h	Thu Mar 20 15:14:07 2008 +0100
@@ -51,6 +51,7 @@
  * SYNCHRO(n) means that the PDO will be transmited every n SYNC signal.
  */
 #define TRANS_EVERY_N_SYNC(n) (n) /*n = 1 to 240 */
+#define TRANS_SYNC_ACYCLIC    0    /* Trans after reception of n SYNC. n = 1 to 240 */
 #define TRANS_SYNC_MIN        1    /* Trans after reception of n SYNC. n = 1 to 240 */
 #define TRANS_SYNC_MAX        240  /* Trans after reception of n SYNC. n = 1 to 240 */
 #define TRANS_RTR_SYNC        252  /* Transmission on request */
--- a/src/pdo.c	Thu Mar 20 15:03:25 2008 +0100
+++ b/src/pdo.c	Thu Mar 20 15:14:07 2008 +0100
@@ -606,10 +606,14 @@
                   break;
                   /* If transmission on Event and not inhibited, check for changes */
                 }
-              else if ((*pTransmissionType == TRANS_EVENT_PROFILE ||
-                        *pTransmissionType == TRANS_EVENT_SPECIFIC) &&
-                       !(d->PDO_status[pdoNum].
-                         transmit_type_parameter & PDO_INHIBITED))
+              else
+                if ((isSyncEvent
+                     && (*pTransmissionType == TRANS_SYNC_ACYCLIC))
+                    ||
+                    ((*pTransmissionType == TRANS_EVENT_PROFILE
+                      || *pTransmissionType == TRANS_EVENT_SPECIFIC)
+                     && !(d->PDO_status[pdoNum].
+                          transmit_type_parameter & PDO_INHIBITED)))
                 {
                   MSG_WAR (0x3968, "  PDO is on EVENT. Trans type : ",
                            *pTransmissionType);