From 95b8b88f38e6cebf230ecaf827cc376089ee0595 Mon Sep 17 00:00:00 2001 From: Florian Pose <fp@igh-essen.com> Date: Mon, 10 Apr 2006 10:50:45 +0000 Subject: [PATCH] Altered CoE "Get object description response" fields --- master/canopen.c | 11 +++++++---- master/slave.c | 3 +-- master/slave.h | 4 ++-- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/master/canopen.c b/master/canopen.c index 74de35ea..bf721812 100644 --- a/master/canopen.c +++ b/master/canopen.c @@ -268,8 +268,8 @@ int ec_slave_fetch_sdo_list(ec_slave_t *slave /**< EtherCAT-Slave */) // Initialize SDO object sdo->index = sdo_index; - sdo->type = 0x0000; - sdo->features = 0x00; + //sdo->unkown = 0x0000; + sdo->object_code = 0x00; sdo->name = NULL; INIT_LIST_HEAD(&sdo->entries); @@ -332,8 +332,11 @@ int ec_slave_fetch_sdo_descriptions(ec_slave_t *slave /**< EtherCAT-Slave */) return -1; } - sdo->type = EC_READ_U16(data + 8); - sdo->features = EC_READ_U8(data + 11); + EC_DBG("object desc response:\n"); + ec_print_data(data, rec_size); + + //sdo->unknown = EC_READ_U16(data + 8); + sdo->object_code = EC_READ_U8(data + 11); name_size = rec_size - 12; if (name_size) { diff --git a/master/slave.c b/master/slave.c index 4bac8262..21c22c41 100644 --- a/master/slave.c +++ b/master/slave.c @@ -1059,8 +1059,7 @@ void ec_slave_print(const ec_slave_t *slave, /**< EtherCAT-Slave */ list_for_each_entry(sdo, &slave->sdo_dictionary, list) { EC_INFO(" 0x%04X \"%s\"\n", sdo->index, sdo->name ? sdo->name : ""); - EC_INFO(" Type 0x%04X, features: 0x%02X\n", - sdo->type, sdo->features); + EC_INFO(" Object code: 0x%02X\n", sdo->object_code); list_for_each_entry(sdo_entry, &sdo->entries, list) { EC_INFO(" 0x%04X:%i \"%s\", type 0x%04X, %i bits\n", sdo->index, sdo_entry->subindex, diff --git a/master/slave.h b/master/slave.h index 3c6d6bf5..7ef3b85c 100644 --- a/master/slave.h +++ b/master/slave.h @@ -157,8 +157,8 @@ typedef struct { struct list_head list; uint16_t index; - uint16_t type; - uint8_t features; + //uint16_t type; + uint8_t object_code; char *name; struct list_head entries; } -- GitLab