From 0f29bd689cee55f47e4ade51611559327991a519 Mon Sep 17 00:00:00 2001 From: etisserant Date: Thu, 20 Mar 2008 14:14:07 +0000 Subject: [PATCH] Preliminary support for TRANS_SYNC_ACYCLIC (0) transmit type. --- include/pdo.h | 1 + src/pdo.c | 12 ++++++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/include/pdo.h b/include/pdo.h index 973e587..6b05414 100644 --- a/include/pdo.h +++ b/include/pdo.h @@ -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 */ diff --git a/src/pdo.c b/src/pdo.c index e4c0316..f318d4b 100644 --- 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); -- 2.39.2