From 65a12a2b84cc17f5666d9e9586ca0027aacc268b Mon Sep 17 00:00:00 2001 From: Florian Pose <fp@igh-essen.com> Date: Thu, 23 Feb 2006 14:51:45 +0000 Subject: [PATCH] EL31XX-Typ korrigiert. --- master/domain.c | 12 ++++++------ master/types.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/master/domain.c b/master/domain.c index 799795fc..5b9f7664 100644 --- a/master/domain.c +++ b/master/domain.c @@ -205,7 +205,7 @@ ec_slave_t *EtherCAT_rt_register_slave_field( ec_master_t *master; const ec_sync_t *sync; const ec_field_t *field; - unsigned int field_idx, found, i, j; + unsigned int field_idx, i, j; uint32_t field_offset; if (!field_count) { @@ -234,8 +234,7 @@ ec_slave_t *EtherCAT_rt_register_slave_field( } field_idx = 0; - found = 0; - for (i = 0; type->sync_managers[i] && !found; i++) { + for (i = 0; type->sync_managers[i]; i++) { sync = type->sync_managers[i]; field_offset = 0; for (j = 0; sync->fields[j]; j++) { @@ -252,9 +251,10 @@ ec_slave_t *EtherCAT_rt_register_slave_field( } } - printk(KERN_ERR "EtherCAT: Slave %i (\"%s %s\") has less than %i fields of" - " type %i, starting at %i!\n", slave->ring_position, - vendor_name, product_name, field_count, field_type, field_index); + printk(KERN_ERR "EtherCAT: Slave %i (\"%s %s\") has less than %i field(s)" + " of type %i, starting at %i (only %i)!\n", slave->ring_position, + vendor_name, product_name, field_count, field_type, field_index, + field_idx); return NULL; } diff --git a/master/types.c b/master/types.c index 4de1fa2c..14aeeded 100644 --- a/master/types.c +++ b/master/types.c @@ -88,12 +88,12 @@ const ec_sync_t el31X2_sm3 = { const ec_slave_type_t Beckhoff_EL3102 = { "Beckhoff", "EL3102", "2x Analog Input diff.", - {&mailbox_sm0, &mailbox_sm1, &el31X2_sm2, &el31X2_sm2, NULL} + {&mailbox_sm0, &mailbox_sm1, &el31X2_sm2, &el31X2_sm3, NULL} }; const ec_slave_type_t Beckhoff_EL3162 = { "Beckhoff", "EL3102", "2x Analog Input", - {&mailbox_sm0, &mailbox_sm1, &el31X2_sm2, &el31X2_sm2, NULL} + {&mailbox_sm0, &mailbox_sm1, &el31X2_sm2, &el31X2_sm3, NULL} }; /*****************************************************************************/ -- GitLab