diff --git a/master/canopen.c b/master/canopen.c index 74de35ea785151757d3f19ab0d19a47bef9cc52d..bf721812f8644031d8f645027b53bc480e345b5f 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 4bac82626cf20d25e790bab872f338079fd46236..21c22c41fe44729289569c1594a052325803dcdf 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 3c6d6bf59ea4cce860712d5cc2b9e107b5d3e9af..7ef3b85c4dd0ce954c64603d77f4d86082ae30ad 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; }