EL31XX-Typ korrigiert.
authorFlorian Pose <fp@igh-essen.com>
Thu, 23 Feb 2006 14:51:45 +0000
changeset 76 9dc136e3801c
parent 75 aae1b9520e4d
child 77 677967864795
EL31XX-Typ korrigiert.
master/domain.c
master/types.c
--- a/master/domain.c	Thu Feb 23 13:54:27 2006 +0000
+++ b/master/domain.c	Thu Feb 23 14:51:45 2006 +0000
@@ -205,7 +205,7 @@
     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 @@
     }
 
     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 @@
         }
     }
 
-    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;
 }
 
--- a/master/types.c	Thu Feb 23 13:54:27 2006 +0000
+++ b/master/types.c	Thu Feb 23 14:51:45 2006 +0000
@@ -88,12 +88,12 @@
 
 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}
 };
 
 /*****************************************************************************/