]> rtime.felk.cvut.cz Git - CanFestival-3.git/commitdiff
Preliminary support for TRANS_SYNC_ACYCLIC (0) transmit type.
authoretisserant <etisserant>
Thu, 20 Mar 2008 14:14:07 +0000 (14:14 +0000)
committeretisserant <etisserant>
Thu, 20 Mar 2008 14:14:07 +0000 (14:14 +0000)
include/pdo.h
src/pdo.c

index 973e58737d5d54cd32570bc6e44f8c3a651d2f84..6b0541478054d5d808ec8b4c87d89871824e4cbd 100644 (file)
@@ -51,6 +51,7 @@ struct struct_s_PDO_status {
  * 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 */
index e4c03168745549d41d4d58e9405b8ad5a726db41..f318d4bcc74e84341635047895ca794fdab67551 100644 (file)
--- a/src/pdo.c
+++ b/src/pdo.c
@@ -606,10 +606,14 @@ _sendPDOevent (CO_Data * d, UNS8 isSyncEvent)
                   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);