Skip to content

Commit 7bb89a4

Browse files
committed
fix: timeout waiting for cyclic loop running
1 parent 961241a commit 7bb89a4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ int ec_dc_sync(ec_t *pec, osal_uint16_t slave, osal_uint8_t active,
200200
osal_timer_init(&dc_time_to, 1000000000); // wait 1 sec for cyclic loop
201201

202202
do {
203-
if (osal_timer_expired(&dc_time_to) != OSAL_ERR_TIMEOUT) {
203+
if (osal_timer_expired(&dc_time_to) == OSAL_ERR_TIMEOUT) {
204204
ec_log(1, "DC_SYNC", "slave %2d: ERROR calculating start time because there's no cyclic "
205205
"loop running right now! DC will not work correctly!\n", slave);
206206

0 commit comments

Comments
 (0)